survey-creator-core 1.11.1 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/mongolian.js +1 -1
- package/i18n/mongolian.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/package.json +2 -2
- package/survey-creator-core.css +17 -6
- package/survey-creator-core.fontless.css +16 -5
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +2 -2
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js +1 -1
- package/survey-creator-core.js +483 -727
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +3 -3
- package/survey-creator-core.min.js +3 -3
- package/typings/components/tabs/preview.d.ts +51 -0
- package/typings/components/tabs/test.d.ts +5 -47
- package/typings/components/tabs/theme-builder.d.ts +5 -39
- package/typings/components/tabs/theme-model.d.ts +4 -3
- package/typings/property-grid/index.d.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v1.11.
|
|
2
|
+
* SurveyJS Creator v1.11.2
|
|
3
3
|
* (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -12,7 +12,7 @@ https://github.com/mholt/PapaParse
|
|
|
12
12
|
License: MIT
|
|
13
13
|
*/n=[],void 0===(i="function"==typeof(r=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},o=!t.document&&!!t.postMessage,r=t.IS_PAPA_WORKER||!1,n={},i=0,a={parse:function(o,r){var s=(r=r||{}).dynamicTyping||!1;if(w(s)&&(r.dynamicTypingFunction=s,s={}),r.dynamicTyping=s,r.transform=!!w(r.transform)&&r.transform,r.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var o,r,s=(o=t.URL||t.webkitURL||null,r=e.toString(),a.BLOB_URL||(a.BLOB_URL=o.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))),l=new t.Worker(s);return l.onmessage=m,l.id=i++,n[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,void l.postMessage({input:o,config:r,workerId:l.id})}var h=null;return a.NODE_STREAM_INPUT,"string"==typeof o?(o=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(o),h=r.download?new c(r):new u(r)):!0===o.readable&&w(o.read)&&w(o.on)?h=new d(r):(t.File&&o instanceof File||o instanceof Object)&&(h=new p(r)),h.stream(o)},unparse:function(e,t){var o=!1,r=!0,n=",",i="\r\n",s='"',l=s+s,c=!1,p=null,u=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(n=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(o=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(i=t.newline),"string"==typeof t.quoteChar&&(s=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");p=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(u=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(g(s),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,c);if("object"==typeof e[0])return h(p||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||p),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function h(e,t,o){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var s=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(s&&r){for(var c=0;c<e.length;c++)0<c&&(a+=n),a+=f(e[c],c);0<t.length&&(a+=i)}for(var p=0;p<t.length;p++){var u=s?e.length:t[p].length,d=!1,h=s?0===Object.keys(t[p]).length:0===t[p].length;if(o&&!s&&(d="greedy"===o?""===t[p].join("").trim():1===t[p].length&&0===t[p][0].length),"greedy"===o&&s){for(var g=[],m=0;m<u;m++){var y=l?e[m]:m;g.push(t[p][y])}d=""===g.join("").trim()}if(!d){for(var b=0;b<u;b++){0<b&&!h&&(a+=n);var v=s&&l?e[b]:b;a+=f(t[p][v],b)}p<t.length-1&&(!o||0<u&&!h)&&(a+=i)}}return a}function f(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var r=!1;u&&"string"==typeof e&&u.test(e)&&(e="'"+e,r=!0);var i=e.toString().replace(d,l);return(r=r||!0===o||"function"==typeof o&&o(e,t)||Array.isArray(o)&&o[t]||function(e,t){for(var o=0;o<t.length;o++)if(-1<e.indexOf(t[o]))return!0;return!1}(i,a.BAD_DELIMITERS)||-1<i.indexOf(n)||" "===i.charAt(0)||" "===i.charAt(i.length-1))?s+i+s:i}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!o&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=f,a.ParserHandle=h,a.NetworkStreamer=c,a.FileStreamer=p,a.StringStreamer=u,a.ReadableStreamStreamer=d,t.jQuery){var s=t.jQuery;s.fn.parse=function(e){var o=e.config||{},r=[];return this.each((function(e){if("INPUT"!==s(this).prop("tagName").toUpperCase()||"file"!==s(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var n=0;n<this.files.length;n++)r.push({file:this.files[n],inputElem:this,instanceConfig:s.extend({},o)})})),n(),this;function n(){if(0!==r.length){var t,o,n,l=r[0];if(w(e.before)){var c=e.before(l.file,l.inputElem);if("object"==typeof c){if("abort"===c.action)return t=l.file,o=l.inputElem,n=c.reason,void(w(e.error)&&e.error({name:"AbortError"},t,o,n));if("skip"===c.action)return void i();"object"==typeof c.config&&(l.instanceConfig=s.extend(l.instanceConfig,c.config))}else if("skip"===c)return void i()}var p=l.instanceConfig.complete;l.instanceConfig.complete=function(e){w(p)&&p(e,l.file,l.inputElem),i()},a.parse(l.file,l.instanceConfig)}else w(e.complete)&&e.complete()}function i(){r.splice(0,1),n()}}}function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=v(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,o){if(this.isFirstChunk&&w(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(e);void 0!==n&&(e=n)}this.isFirstChunk=!1,this._halted=!1;var i=this._partialLine+e;this._partialLine="";var s=this._handle.parse(i,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=s.meta.cursor;this._finished||(this._partialLine=i.substring(l-this._baseIndex),this._baseIndex=l),s&&s.data&&(this._rowCount+=s.data.length);var c=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)t.postMessage({results:s,workerId:a.WORKER_ID,finished:c});else if(w(this._config.chunk)&&!o){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!c||!w(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.call(this,e),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),o||(t.onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var n=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+n)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}o&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var o=t.statusText||e;this._sendError(new Error(o))}}function p(e){var t,o;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,o=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=o.call(e,this._start,n)}var i=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:i}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,o=this._config.chunkSize;return o?(e=t.substring(0,o),t=t.substring(o)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){l.call(this,e=e||{});var t=[],o=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):o=!0},this._streamData=x((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),o&&(o=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=x((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=x((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=x((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function h(e){var t,o,r,n=Math.pow(2,53),i=-n,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,c=this,p=0,u=0,d=!1,h=!1,m=[],y={data:[],errors:[],meta:{}};if(w(e.step)){var b=e.step;e.step=function(t){if(y=t,C())j();else{if(j(),0===y.data.length)return;p+=t.data.length,e.preview&&p>e.preview?o.abort():(y.data=y.data[0],b(y,c))}}}function x(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function j(){return y&&r&&(T("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!x(e)}))),C()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;C()&&t<y.data.length;t++)y.data[t].forEach(o);y.data.splice(0,1)}else y.data.forEach(o);function o(t,o){w(e.transformHeader)&&(t=e.transformHeader(t,o)),m.push(t)}}(),function(){if(!y||!e.header&&!e.dynamicTyping&&!e.transform)return y;function t(t,o){var r,n=e.header?{}:[];for(r=0;r<t.length;r++){var i=r,a=t[r];e.header&&(i=r>=m.length?"__parsed_extra":m[r]),e.transform&&(a=e.transform(a,i)),a=S(i,a),"__parsed_extra"===i?(n[i]=n[i]||[],n[i].push(a)):n[i]=a}return e.header&&(r>m.length?T("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+r,u+o):r<m.length&&T("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+r,u+o)),n}var o=1;return!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(t),o=y.data.length):y.data=t(y.data,0),e.header&&y.meta&&(y.meta.fields=m),u+=o,y}()}function C(){return e.header&&0===m.length}function S(t,o){return r=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[r]&&(e.dynamicTyping[r]=e.dynamicTypingFunction(r)),!0===(e.dynamicTyping[r]||e.dynamicTyping)?"true"===o||"TRUE"===o||"false"!==o&&"FALSE"!==o&&(function(e){if(s.test(e)){var t=parseFloat(e);if(i<t&&t<n)return!0}return!1}(o)?parseFloat(o):l.test(o)?new Date(o):""===o?null:o):o;var r}function T(e,t,o,r){var n={type:e,code:t,message:o};void 0!==r&&(n.row=r),y.errors.push(n)}this.parse=function(n,i,s){var l=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var o=new RegExp(g(t)+"([^]*?)"+g(t),"gm"),r=(e=e.replace(o,"")).split("\r"),n=e.split("\n"),i=1<n.length&&n[0].length<r[0].length;if(1===r.length||i)return"\n";for(var a=0,s=0;s<r.length;s++)"\n"===r[s][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(n,l)),r=!1,e.delimiter)w(e.delimiter)&&(e.delimiter=e.delimiter(n),y.meta.delimiter=e.delimiter);else{var c=function(t,o,r,n,i){var s,l,c,p;i=i||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var u=0;u<i.length;u++){var d=i[u],h=0,g=0,m=0;c=void 0;for(var y=new f({comments:n,delimiter:d,newline:o,preview:10}).parse(t),b=0;b<y.data.length;b++)if(r&&x(y.data[b]))m++;else{var v=y.data[b].length;g+=v,void 0!==c?0<v&&(h+=Math.abs(v-c),c=v):c=v}0<y.data.length&&(g/=y.data.length-m),(void 0===l||h<=l)&&(void 0===p||p<g)&&1.99<g&&(l=h,s=d,p=g)}return{successful:!!(e.delimiter=s),bestDelimiter:s}}(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);c.successful?e.delimiter=c.bestDelimiter:(r=!0,e.delimiter=a.DefaultDelimiter),y.meta.delimiter=e.delimiter}var p=v(e);return e.preview&&e.header&&p.preview++,t=n,o=new f(p),y=o.parse(t,i,s),j(),d?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),t=w(e.chunk)?"":t.substring(o.getCharIndex())},this.resume=function(){c.streamer._halted?(d=!1,c.streamer.parseChunk(t,!0)):setTimeout(c.resume,3)},this.aborted=function(){return h},this.abort=function(){h=!0,o.abort(),y.meta.aborted=!0,w(e.complete)&&e.complete(y),t=""}}function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function f(e){var t,o=(e=e||{}).delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,l=e.fastMode,c=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(c=e.escapeChar),("string"!=typeof o||-1<a.BAD_DELIMITERS.indexOf(o))&&(o=","),n===o)throw new Error("Comment character same as delimiter");!0===n?n="#":("string"!=typeof n||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var p=0,u=!1;this.parse=function(a,d,h){if("string"!=typeof a)throw new Error("Input must be a string");var f=a.length,m=o.length,y=r.length,b=n.length,v=w(i),x=[],j=[],C=[],S=p=0;if(!a)return G();if(e.header&&!d){var T=a.split(r)[0].split(o),P=[],E={},I=!1;for(var O in T){var V=T[O];w(e.transformHeader)&&(V=e.transformHeader(V,O));var N=V,k=E[V]||0;for(0<k&&(I=!0,N=V+"_"+k),E[V]=k+1;P.includes(N);)N=N+"_"+k;P.push(N)}if(I){var A=a.split(r);A[0]=P.join(o),a=A.join(r)}}if(l||!1!==l&&-1===a.indexOf(t)){for(var _=a.split(r),L=0;L<_.length;L++){if(C=_[L],p+=C.length,L!==_.length-1)p+=r.length;else if(h)return G();if(!n||C.substring(0,b)!==n){if(v){if(x=[],Q(C.split(o)),z(),u)return G()}else Q(C.split(o));if(s&&s<=L)return x=x.slice(0,s),G(!0)}}return G()}for(var D=a.indexOf(o,p),M=a.indexOf(r,p),R=new RegExp(g(c)+g(t),"g"),q=a.indexOf(t,p);;)if(a[p]!==t)if(n&&0===C.length&&a.substring(p,p+b)===n){if(-1===M)return G();p=M+y,M=a.indexOf(r,p),D=a.indexOf(o,p)}else if(-1!==D&&(D<M||-1===M))C.push(a.substring(p,D)),p=D+m,D=a.indexOf(o,p);else{if(-1===M)break;if(C.push(a.substring(p,M)),W(M+y),v&&(z(),u))return G();if(s&&x.length>=s)return G(!0)}else for(q=p,p++;;){if(-1===(q=a.indexOf(t,q+1)))return h||j.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:x.length,index:p}),U();if(q===f-1)return U(a.substring(p,q).replace(R,t));if(t!==c||a[q+1]!==c){if(t===c||0===q||a[q-1]!==c){-1!==D&&D<q+1&&(D=a.indexOf(o,q+1)),-1!==M&&M<q+1&&(M=a.indexOf(r,q+1));var H=F(-1===M?D:Math.min(D,M));if(a.substr(q+1+H,m)===o){C.push(a.substring(p,q).replace(R,t)),a[p=q+1+H+m]!==t&&(q=a.indexOf(t,p)),D=a.indexOf(o,p),M=a.indexOf(r,p);break}var B=F(M);if(a.substring(q+1+B,q+1+B+y)===r){if(C.push(a.substring(p,q).replace(R,t)),W(q+1+B+y),D=a.indexOf(o,p),q=a.indexOf(t,p),v&&(z(),u))return G();if(s&&x.length>=s)return G(!0);break}j.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:x.length,index:p}),q++}}else q++}return U();function Q(e){x.push(e),S=p}function F(e){var t=0;if(-1!==e){var o=a.substring(q+1,e);o&&""===o.trim()&&(t=o.length)}return t}function U(e){return h||(void 0===e&&(e=a.substring(p)),C.push(e),p=f,Q(C),v&&z()),G()}function W(e){p=e,Q(C),C=[],M=a.indexOf(r,p)}function G(e){return{data:x,errors:j,meta:{delimiter:o,linebreak:r,aborted:u,truncated:!!e,cursor:S+(d||0)}}}function z(){i(G()),x=[],j=[]}},this.abort=function(){u=!0},this.getCharIndex=function(){return p}}function m(e){var t=e.data,o=n[t.workerId],r=!1;if(t.error)o.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(w(o.userStep)){for(var a=0;a<t.results.data.length&&(o.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},i),!r);a++);delete t.results}else w(o.userChunk)&&(o.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!r&&y(t.workerId,t.results)}function y(e,t){var o=n[e];w(o.userComplete)&&o.userComplete(t),o.terminate(),delete n[e]}function b(){throw new Error("Not implemented.")}function v(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var o in e)t[o]=v(e[o]);return t}function x(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var o=e.data;if(void 0===a.WORKER_ID&&o&&(a.WORKER_ID=o.workerId),"string"==typeof o.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(o.input,o.config),finished:!0});else if(t.File&&o.input instanceof File||o.input instanceof Object){var r=a.parse(o.input,o.config);r&&t.postMessage({workerId:a.WORKER_ID,results:r,finished:!0})}}),(c.prototype=Object.create(l.prototype)).constructor=c,(p.prototype=Object.create(l.prototype)).constructor=p,(u.prototype=Object.create(u.prototype)).constructor=u,(d.prototype=Object.create(l.prototype)).constructor=d,a})?r.apply(t,n):r)||(e.exports=i)},function(e,t,o){
|
|
14
14
|
/*!
|
|
15
|
-
* surveyjs - Survey JavaScript library v1.11.
|
|
15
|
+
* surveyjs - Survey JavaScript library v1.11.2
|
|
16
16
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
17
17
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
18
18
|
*/
|
|
@@ -180,4 +180,4 @@ var r;r=function(){return function(e){var t={};function o(r){if(t[r])return t[r]
|
|
|
180
180
|
/*!**********************************************!*\
|
|
181
181
|
!*** ./src/themes/threedimensional-light.ts ***!
|
|
182
182
|
\**********************************************/
|
|
183
|
-
/*! exports provided: default, ThreeDimensionalLight */function(e,t,o){"use strict";o.r(t),o.d(t,"ThreeDimensionalLight",(function(){return n}));var r={themeName:"threedimensional",colorPalette:"light",isPanelless:!1,cssVariables:{"--sjs-general-backcolor":"rgba(248, 248, 248, 1)","--sjs-general-backcolor-dark":"rgba(242, 242, 242, 1)","--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(242, 242, 242, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-primary-backcolor":"rgba(217, 74, 100, 1)","--sjs-primary-backcolor-light":"rgba(217, 74, 100, 0.1)","--sjs-primary-backcolor-dark":"rgba(189, 61, 84, 1)","--sjs-primary-forecolor":"rgba(255, 255, 255, 1)","--sjs-primary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-secondary-backcolor":"rgba(255, 152, 20, 1)","--sjs-secondary-backcolor-light":"rgba(255, 152, 20, 0.1)","--sjs-secondary-backcolor-semi-light":"rgba(255, 152, 20, 0.25)","--sjs-secondary-forecolor":"rgba(255, 255, 255, 1)","--sjs-secondary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-shadow-small":"0px 2px 0px 2px rgba(228, 228, 228, 1),0px 0px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-small-reset":"0px 0px 0px 0px rgba(228, 228, 228, 1),0px 0px 0px 0px rgba(228, 228, 228, 1)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(228, 228, 228, 1),0px 8px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-large":"0px 0px 0px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px 0px 0px 2px rgba(228, 228, 228, 1),0px -2px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-inner-reset":"0px 0px 0px 0px rgba(228, 228, 228, 1),0px 0px 0px 0px rgba(228, 228, 228, 1)","--sjs-border-light":"rgba(0, 0, 0, 0.08)","--sjs-border-default":"rgba(0, 0, 0, 0.08)","--sjs-border-inside":"rgba(0, 0, 0, 0.16)","--sjs-special-red":"rgba(229, 10, 62, 1)","--sjs-special-red-light":"rgba(229, 10, 62, 0.1)","--sjs-special-red-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-green":"rgba(25, 179, 148, 1)","--sjs-special-green-light":"rgba(25, 179, 148, 0.1)","--sjs-special-green-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-blue":"rgba(67, 127, 217, 1)","--sjs-special-blue-light":"rgba(67, 127, 217, 0.1)","--sjs-special-blue-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(255, 255, 255, 1)","--sjs-article-font-xx-large-textDecoration":"none","--sjs-article-font-xx-large-fontWeight":"700","--sjs-article-font-xx-large-fontStyle":"normal","--sjs-article-font-xx-large-fontStretch":"normal","--sjs-article-font-xx-large-letterSpacing":"0","--sjs-article-font-xx-large-lineHeight":"64px","--sjs-article-font-xx-large-paragraphIndent":"0px","--sjs-article-font-xx-large-textCase":"none","--sjs-article-font-x-large-textDecoration":"none","--sjs-article-font-x-large-fontWeight":"700","--sjs-article-font-x-large-fontStyle":"normal","--sjs-article-font-x-large-fontStretch":"normal","--sjs-article-font-x-large-letterSpacing":"0","--sjs-article-font-x-large-lineHeight":"56px","--sjs-article-font-x-large-paragraphIndent":"0px","--sjs-article-font-x-large-textCase":"none","--sjs-article-font-large-textDecoration":"none","--sjs-article-font-large-fontWeight":"700","--sjs-article-font-large-fontStyle":"normal","--sjs-article-font-large-fontStretch":"normal","--sjs-article-font-large-letterSpacing":"0","--sjs-article-font-large-lineHeight":"40px","--sjs-article-font-large-paragraphIndent":"0px","--sjs-article-font-large-textCase":"none","--sjs-article-font-medium-textDecoration":"none","--sjs-article-font-medium-fontWeight":"700","--sjs-article-font-medium-fontStyle":"normal","--sjs-article-font-medium-fontStretch":"normal","--sjs-article-font-medium-letterSpacing":"0","--sjs-article-font-medium-lineHeight":"32px","--sjs-article-font-medium-paragraphIndent":"0px","--sjs-article-font-medium-textCase":"none","--sjs-article-font-default-textDecoration":"none","--sjs-article-font-default-fontWeight":"400","--sjs-article-font-default-fontStyle":"normal","--sjs-article-font-default-fontStretch":"normal","--sjs-article-font-default-letterSpacing":"0","--sjs-article-font-default-lineHeight":"28px","--sjs-article-font-default-paragraphIndent":"0px","--sjs-article-font-default-textCase":"none"}};t.default=r;var n=r}})},e.exports=r()},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){var r={"./add-lg.svg":33,"./add.svg":34,"./add_16x16.svg":35,"./add_24x24.svg":36,"./apply.svg":37,"./arrow-down.svg":38,"./arrow-left.svg":39,"./arrow-left_16x16.svg":40,"./arrow-right.svg":41,"./arrow-right_16x16.svg":42,"./arrow-up.svg":43,"./boolean.svg":44,"./change-question-type_16x16.svg":45,"./checkbox.svg":46,"./checked.svg":47,"./clear.svg":48,"./clear_16x16.svg":49,"./collapse-detail-light_16x16.svg":50,"./collapse-detail_16x16.svg":51,"./collapse-panel.svg":52,"./collapse_16x16.svg":53,"./color-picker.svg":54,"./comment.svg":55,"./config.svg":56,"./copy.svg":57,"./default.svg":58,"./delete_16x16.svg":59,"./description-hide.svg":60,"./description.svg":61,"./device-desktop.svg":62,"./device-phone.svg":63,"./device-rotate.svg":64,"./device-tablet.svg":65,"./download.svg":66,"./drag-area-indicator.svg":67,"./drag-area-indicator_24x16.svg":68,"./drop-down-arrow.svg":69,"./drop-down-arrow_16x16.svg":70,"./dropdown.svg":71,"./duplicate_16x16.svg":72,"./edit.svg":73,"./edit_16x16.svg":74,"./editing-finish.svg":75,"./error.svg":76,"./expand-detail-light_16x16.svg":77,"./expand-detail_16x16.svg":78,"./expand-panel.svg":79,"./expand_16x16.svg":80,"./export.svg":81,"./expression.svg":82,"./fast-entry.svg":83,"./file.svg":84,"./fix.svg":85,"./html.svg":86,"./image.svg":87,"./imagepicker.svg":88,"./import.svg":89,"./invisible-items.svg":90,"./keyboard-dragging.svg":91,"./language.svg":92,"./load.svg":93,"./logic-collapse.svg":94,"./logic-expand.svg":95,"./logo.svg":96,"./matrix.svg":97,"./matrixdropdown.svg":98,"./matrixdynamic.svg":99,"./multipletext.svg":100,"./next_16x16.svg":101,"./panel.svg":102,"./paneldynamic.svg":103,"./preview.svg":104,"./previous_16x16.svg":105,"./radiogroup.svg":106,"./ranking.svg":107,"./rating.svg":108,"./redo.svg":109,"./remove_16x16.svg":110,"./required.svg":111,"./reset.svg":112,"./save.svg":113,"./select-page.svg":114,"./settings.svg":115,"./settings_16x16.svg":116,"./signaturepad.svg":117,"./switch-active_16x16.svg":118,"./switch-inactive_16x16.svg":119,"./tagbox.svg":120,"./text.svg":121,"./theme.svg":122,"./toolbox.svg":123,"./undo.svg":124,"./visible.svg":125,"./wizard.svg":126};function n(e){var t=i(e);return o(t)}function i(e){if(!o.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}n.keys=function(){return Object.keys(r)},n.resolve=i,e.exports=n,n.id=32},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 11H17V13H13V17H11V13H7V11H11V7H13V11ZM24 12C24 18.6 18.6 24 12 24C5.4 24 0 18.6 0 12C0 5.4 5.4 0 12 0C18.6 0 24 5.4 24 12ZM22 12C22 6.5 17.5 2 12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 7H12V9H9V12H7V9H4V7H7V4H9V7ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 7H12V9H9V12H7V9H4V7H7V4H9V7ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1C5.9 1 1 5.9 1 12C1 18.1 5.9 23 12 23C18.1 23 23 18.1 23 12C23 5.9 18.1 1 12 1ZM12 21C7 21 3 17 3 12C3 7 7 3 12 3C17 3 21 7 21 12C21 17 17 21 12 21ZM16.3 8L17.7 9.4L10 17.1L6.3 13.4L7.7 12L10 14.3L16.3 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.01 11.59L13.01 15.59V6H11.01V15.59L7.00998 11.59L5.59998 13L12.01 19.41L18.43 13L17.01 11.59Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10.4 2.60001L11.8 4.00001L4.8 11H22V13H4.8L11.8 20L10.4 21.4L1 12L10.4 2.60001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 8.99999H4.39998L8.69998 13.3L7.29998 14.7L0.599976 7.99999L7.29998 1.29999L8.69998 2.69999L4.39998 6.99999H15V8.99999V8.99999Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.6 2.60001L12.2 4.00001L19.2 11H2V13H19.2L12.2 20L13.6 21.4L23 12L13.6 2.60001Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M18.43 11.01L12.01 4.60001L5.59998 11.01L7.00998 12.43L11.01 8.43001V18.01H13.01V8.43001L17.01 12.43L18.43 11.01Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 11H17C19.8 11 22 8.8 22 6C22 3.2 19.8 1 17 1H7C4.2 1 2 3.2 2 6C2 8.8 4.2 11 7 11ZM7 3H17C18.7 3 20 4.3 20 6C20 7.7 18.7 9 17 9H7C5.3 9 4 7.7 4 6C4 4.3 5.3 3 7 3ZM5 6C5 4.9 5.9 4 7 4C8.1 4 9 4.9 9 6C9 7.1 8.1 8 7 8C5.9 8 5 7.1 5 6ZM19 18C19 19.1 18.1 20 17 20C15.9 20 15 19.1 15 18C15 16.9 15.9 16 17 16C18.1 16 19 16.9 19 18ZM17 13H7C4.2 13 2 15.2 2 18C2 20.8 4.2 23 7 23H17C19.8 23 22 20.8 22 18C22 15.2 19.8 13 17 13ZM17 21H7C5.3 21 4 19.7 4 18C4 16.3 5.3 15 7 15H17C18.7 15 20 16.3 20 18C20 19.7 18.7 21 17 21Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 2V7H10L12 5C11.1 3.8 9.6 3 8 3C5.2 3 3 5.2 3 8H1C1 4.1 4.1 1 8 1C10.2 1 12.1 2 13.4 3.6L15 2ZM8 13C6.4 13 4.9 12.2 4 11L6 9H1V14L2.6 12.4C3.9 14 5.8 15 8 15C11.9 15 15 11.9 15 8H13C13 10.8 10.8 13 8 13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19 8.90001L21 6.10001V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5.00001C3 3.90001 3.9 3.00001 5 3.00001H19C19 3.00001 19 3.00001 19.1 3.00001L20.8 0.600006L22.4 1.80001L11.1 17.5L6.6 13L8 11.6L10.9 14.5L17.7 5.00001H5V19H19V8.90001Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<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.4 14.6C0.600003 15.4 0.600003 16.6 1.4 17.4L6 22H12L22.6 11.4C23.3 10.6 23.3 9.3 22.6 8.6ZM11.1 20H6.8L2.8 16L6.2 12.6L12.4 18.8L11.1 20ZM13.8 17.4L7.6 11.2L15 3.8L21.2 10L13.8 17.4ZM16 20H23V22H14L16 20Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H3V9H13V7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 9H4V7H12V9ZM16 0V16H0V0H16ZM14 2H2V14H14V2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 5.6L19.4 12L13 18.4L11.6 17L15.6 13H2V11H15.6L11.6 7L13 5.6ZM20 2V22H22V2H20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 6L3 5L8 10L13 5L14 6L8 12L2 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M3.31 15.0002C2.69 15.0002 2.11 14.7602 1.68 14.3202C0.780005 13.4202 0.780005 11.9502 1.68 11.0502L2.45 10.2802C2.45 10.1802 2.44 10.0802 2.44 9.98023C2.44 9.02023 2.81 8.12023 3.49 7.44023L5.6 5.33023C5.37 5.04023 5.25 4.68023 5.25 4.31023C5.25 3.86023 5.42 3.44023 5.74 3.12023C6.06 2.80023 6.48 2.63023 6.92 2.63023C7.29 2.63023 7.65 2.75023 7.94 2.98023L8.88 2.04023C9.56 1.36023 10.46 0.990234 11.41 0.990234C12.36 0.990234 13.27 1.36023 13.95 2.04023C14.63 2.72023 15 3.62023 15 4.58023C15 5.54023 14.63 6.44023 13.95 7.12023L12.94 8.13023C13.04 8.34023 13.09 8.58023 13.09 8.82023C13.09 9.27023 12.92 9.69023 12.6 10.0002C12.28 10.3102 11.86 10.4902 11.42 10.4902C11.18 10.4902 10.94 10.4402 10.73 10.3402L8.56 12.5102C7.88 13.1902 6.98 13.5602 6.03 13.5602C5.93 13.5602 5.83 13.5602 5.73 13.5402L4.97 14.3002C4.53 14.7402 3.95 14.9802 3.34 14.9802L3.31 15.0002Z" fill="black" fill-opacity="0.15"></path><path d="M14.0001 4.57969C14.0001 3.88969 13.7301 3.23969 13.2401 2.74969C12.2301 1.73969 10.5901 1.73969 9.58006 2.74969L7.94006 4.38969L7.39006 3.83969C7.13006 3.57969 6.70006 3.57969 6.44006 3.83969C6.18006 4.09969 6.18006 4.52969 6.44006 4.78969L6.99006 5.33969L4.18006 8.14969C3.69006 8.63969 3.42006 9.28969 3.42006 9.97969C3.42006 10.1997 3.46006 10.4097 3.51006 10.6197L2.38006 11.7497C1.87006 12.2597 1.87006 13.0897 2.38006 13.6097C2.64006 13.8697 2.97006 13.9897 3.31006 13.9897C3.65006 13.9897 3.98006 13.8597 4.24006 13.6097L5.37006 12.4797C5.58006 12.5297 5.79006 12.5697 6.01006 12.5697C6.70006 12.5697 7.35006 12.2997 7.84006 11.8097L10.6501 8.99969L10.9401 9.28969C11.0701 9.41969 11.2401 9.48969 11.4201 9.48969C11.6001 9.48969 11.7701 9.41969 11.9001 9.28969C12.1601 9.02969 12.1601 8.59969 11.9001 8.33969L11.6101 8.04969L13.2501 6.40969C13.7401 5.91969 14.0101 5.26969 14.0101 4.57969H14.0001ZM6.89006 10.8597C6.42006 11.3297 5.61006 11.3297 5.14006 10.8597C4.91006 10.6297 4.78006 10.3197 4.78006 9.98969C4.78006 9.65969 4.91006 9.34969 5.14006 9.11969L7.95006 6.30969L9.70006 8.05969L6.89006 10.8697V10.8597Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3ZM20 19H4V5H20V19ZM18 9H6V7H18V9ZM18 13H6V11H18V13ZM12 17H6V15H12V17Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 25 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_19827_2206)"><path d="M15.13 2.02C15.74 2.02 16.33 2.11 16.9 2.25L13.63 5.52C12.25 6.9 12.25 9.14 13.63 10.52C14.32 11.21 15.23 11.56 16.13 11.56C17.03 11.56 17.94 11.21 18.63 10.52L21.9 7.25C22.05 7.82 22.13 8.41 22.13 9.02C22.13 12.89 19 16.02 15.13 16.02C13.97 16.02 12.88 15.73 11.92 15.23L6.13 21.02C5.72 21.43 5.17 21.64 4.63 21.64C4.09 21.64 3.54 21.43 3.13 21.02C2.3 20.19 2.3 18.85 3.13 18.02L8.92 12.23C8.42 11.27 8.13 10.18 8.13 9.02C8.13 5.15 11.26 2.02 15.13 2.02ZM15.13 0.02C10.17 0.02 6.13 4.06 6.13 9.02C6.13 9.95 6.28 10.88 6.56 11.76L1.71 16.61C0.93 17.39 0.5 18.42 0.5 19.52C0.5 20.62 0.93 21.66 1.71 22.43C2.49 23.21 3.52 23.64 4.62 23.64C5.72 23.64 6.76 23.21 7.53 22.43L12.38 17.58C13.27 17.86 14.19 18.01 15.12 18.01C20.08 18.01 24.12 13.97 24.12 9.01C24.12 8.26 24.02 7.5 23.82 6.74C23.64 6.05 23.1 5.5 22.41 5.31C22.24 5.26 22.06 5.24 21.89 5.24C21.37 5.24 20.86 5.45 20.48 5.83L17.21 9.1C16.92 9.39 16.53 9.55 16.12 9.55C15.71 9.55 15.32 9.39 15.03 9.1C14.74 8.81 14.58 8.42 14.58 8.01C14.58 7.6 14.74 7.21 15.03 6.92L18.3 3.65C18.81 3.14 19 2.4 18.82 1.71C18.63 1.02 18.09 0.48 17.39 0.3C16.63 0.1 15.87 0 15.12 0L15.13 0.02Z"></path></g><defs><clipPath id="clip0_19827_2206"><rect width="24" height="24" transform="translate(0.5)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 1H9C7.9 1 7 1.9 7 3V7H3C1.9 7 1 7.9 1 9V21C1 22.1 1.9 23 3 23H15C16.1 23 17 22.1 17 21V17H21C22.1 17 23 16.1 23 15V3C23 1.9 22.1 1 21 1ZM15 21H3V9H15V21ZM21 15H17V9C17 7.9 16.1 7 15 7H9V3H21V15Z" fill="black" fill-opacity="0.45"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C16.41 4 20 7.14 20 11C19.9901 11.928 19.7826 12.8433 19.3911 13.6847C18.9997 14.5262 18.4334 15.2746 17.73 15.88C17.5103 16.0801 17.338 16.3266 17.2256 16.6017C17.1132 16.8767 17.0634 17.1733 17.08 17.47C16.7752 17.2972 16.4304 17.2076 16.08 17.21C15.8237 17.212 15.5698 17.2594 15.33 17.35C14.2722 17.7789 13.1415 17.9996 12 18C7.59 18 4 14.86 4 11C4 7.14 7.59 4 12 4ZM12 2C6.48 2 2 6 2 11C2 16 6.48 20 12 20C13.4012 19.9996 14.7894 19.7314 16.09 19.21L20 22L19.07 17.36C19.9796 16.5667 20.711 15.5899 21.216 14.4937C21.721 13.3975 21.9882 12.2069 22 11C22 6 17.52 2 12 2Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.3 3.7L3.6 5C2 6.9 1 9.3 1 12C1 18.1 5.9 23 12 23C14.7 23 17.1 22 19 20.4L20.3 21.7L21.7 20.3L3.7 2.3L2.3 3.7ZM12 21C7 21 3 17 3 12C3 9.9 3.7 7.9 5 6.4L10.8 12.2C10.7 12.3 10.6 12.4 10.6 12.5C10.5 12.7 10.4 13 10.4 13.3C10.4 13.6 10.5 13.9 10.6 14.1C10.7 14.3 10.8 14.5 10.9 14.8C11 15 11.2 15.1 11.4 15.1C11.5 15.1 11.5 15.1 11.6 15.1H11.7C11.8 15.1 11.9 15.1 12.1 15C12.4 14.9 12.6 14.7 12.6 14.5V14.4V14.1L17.5 19C16.1 20.3 14.1 21 12 21ZM7.8 4.1L6.3 2.6C8 1.6 9.9 1 12 1C18.1 1 23 5.9 23 12C23 14.1 22.4 16 21.4 17.7L19.9 16.2C20.6 15 21 13.5 21 12C21 7 17 3 12 3C10.5 3 9 3.4 7.8 4.1ZM13.5 9.8C13.5 9.7 13.6 9.6 13.6 9.4C13.6 9 13.5 8.6 13.2 8.4C12.8 8 12.4 7.9 12 7.9C11.9 7.9 11.8 7.9 11.6 7.9L10.1 6.4C10.2 6.4 10.2 6.3 10.3 6.3C11.5 5.9 12.7 5.9 13.6 6.1C14.1 6.2 14.5 6.4 14.9 6.6C15.6 7.3 16 8.1 16 9.3C16 10.1 15.7 10.8 15.2 11.4L13.5 9.8ZM11.8 15.9C12.5 15.9 13 16.2 13.3 16.8C13.4 17 13.4 17.2 13.4 17.4C13.4 17.8 13.2 18.2 13 18.5C12.7 18.8 12.3 18.9 11.9 18.9C11.5 18.9 11.1 18.7 10.8 18.5C10.5 18.2 10.4 17.8 10.4 17.4C10.4 17 10.6 16.6 10.8 16.3C11 16 11.4 15.9 11.8 15.9Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1C5.9 1 1 5.9 1 12C1 18.1 5.9 23 12 23C18.1 23 23 18.1 23 12C23 5.9 18.1 1 12 1ZM12 21C7 21 3 17 3 12C3 7 7 3 12 3C17 3 21 7 21 12C21 17 17 21 12 21ZM13.3 16.8C13.4 17 13.4 17.2 13.4 17.4C13.4 17.8 13.2 18.2 13 18.5C12.7 18.8 12.3 18.9 11.9 18.9C11.5 18.9 11.1 18.7 10.8 18.5C10.5 18.2 10.4 17.8 10.4 17.4C10.4 17 10.6 16.6 10.8 16.3C11.1 16 11.5 15.8 11.9 15.8C12.5 15.9 13 16.2 13.3 16.8ZM16 9.3C16 10.4 15.5 11.2 14.6 11.9C14.4 12.1 14.1 12.2 13.9 12.4L13.3 12.8C13 13 12.9 13.1 12.9 13.1C12.8 13.2 12.8 13.3 12.8 13.4C12.8 13.6 12.7 13.8 12.7 14.1V14.4V14.5C12.6 14.7 12.4 14.9 12.2 15C12 15.1 11.9 15.1 11.8 15.1H11.7C11.6 15.1 11.6 15.1 11.5 15.1C11.3 15 11.1 14.9 11 14.8C10.9 14.6 10.7 14.4 10.7 14.1C10.6 13.8 10.5 13.6 10.5 13.3C10.5 13 10.6 12.7 10.7 12.5C10.8 12.3 11 12.1 11.2 11.9C11.4 11.7 11.6 11.6 11.8 11.5L12.4 11.2C13 10.9 13.2 10.7 13.3 10.6C13.6 10.3 13.7 9.9 13.7 9.5C13.7 9.1 13.6 8.7 13.3 8.5C12.8 8 12.4 7.9 12 7.9C10.9 7.9 10.6 8.4 10.6 8.8C10.4 9.3 10.4 9.4 10.4 9.4V9.6C10.4 9.7 10.4 9.7 10.4 9.8L10.5 10.2L10.2 10.3C9.6 10.6 9.1 10.6 8.7 10.4C8.6 10.3 8.4 10.1 8.3 10C8.1 9.7 8 9.4 8 9C8 8.6 8.1 8.3 8.2 8C8.3 7.7 8.5 7.5 8.7 7.3C8.9 7.1 9.1 6.9 9.4 6.7C9.7 6.6 10 6.4 10.3 6.3C11.5 5.9 12.7 5.9 13.6 6.1C14.1 6.2 14.5 6.4 14.9 6.6C15.6 7.3 16 8.1 16 9.3Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 17V2H2V17H10V19C10 19.7956 9.68393 20.5587 9.12132 21.1213C8.55871 21.6839 7.79565 22 7 22H17C16.2044 22 15.4413 21.6839 14.8787 21.1213C14.3161 20.5587 14 19.7956 14 19V17H22ZM4 4H20V15H4V4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16 18H8V6H16V18ZM16 2H8C7.46957 2 6.96086 2.21071 6.58579 2.58579C6.21071 2.96086 6 3.46957 6 4V20C6 20.5304 6.21071 21.0391 6.58579 21.4142C6.96086 21.7893 7.46957 22 8 22H16C16.5304 22 17.0391 21.7893 17.4142 21.4142C17.7893 21.0391 18 20.5304 18 20V4C18 3.46957 17.7893 2.96086 17.4142 2.58579C17.0391 2.21071 16.5304 2 16 2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.41 5.99591L18 11.4059L16.59 9.99591L19.59 6.99591H17C13.5522 6.99591 10.2456 8.36555 7.80761 10.8035C5.36964 13.2415 4 16.5481 4 19.9959V21.9959H2V19.9959C2 16.0177 3.58035 12.2024 6.3934 9.38931C9.20644 6.57626 13.0218 4.99591 17 4.99591H19.59L16.59 1.99591L18 0.585907L23.41 5.99591Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 18H4V6H20V18ZM21 4H3C2.46957 4 1.96086 4.21071 1.58579 4.58579C1.21071 4.96086 1 5.46957 1 6V18C1 18.5304 1.21071 19.0391 1.58579 19.4142C1.96086 19.7893 2.46957 20 3 20H21C21.5304 20 22.0391 19.7893 22.4142 19.4142C22.7893 19.0391 23 18.5304 23 18V6C23 5.46957 22.7893 4.96086 22.4142 4.58579C22.0391 4.21071 21.5304 4 21 4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18.41L4.59 11L6 9.59L11 14.59V2H13V14.59L18 9.59L19.41 11L12 18.41ZM2 20V22H22V20H2Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 15L17 10H7L12 15Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 11L13 6H3L8 11Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4C2.9 2 2 2.9 2 4V6C2 7.1 2.9 8 4 8V20C4 21.1 4.9 22 6 22H20C21.1 22 22 21.1 22 20V8V6V4C22 2.9 21.1 2 20 2ZM20 20H6V8H20V20ZM4 6V4H20V6H4ZM18 12H8V10H18V12ZM18 16H8V14H18V16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_9500_71113)"><path d="M14 0H6C5.46957 0 4.96086 0.210714 4.58579 0.585786C4.21071 0.960859 4 1.46957 4 2V4H2C1.46957 4 0.960859 4.21071 0.585786 4.58579C0.210714 4.96086 0 5.46957 0 6L0 14C0 14.5304 0.210714 15.0391 0.585786 15.4142C0.960859 15.7893 1.46957 16 2 16H10C10.5304 16 11.0391 15.7893 11.4142 15.4142C11.7893 15.0391 12 14.5304 12 14V12H14C14.5304 12 15.0391 11.7893 15.4142 11.4142C15.7893 11.0391 16 10.5304 16 10V2C16 1.46957 15.7893 0.960859 15.4142 0.585786C15.0391 0.210714 14.5304 0 14 0V0ZM10 14H2V6H10V14ZM14 10H12V6C12 5.46957 11.7893 4.96086 11.4142 4.58579C11.0391 4.21071 10.5304 4 10 4H6V2H14V10Z"></path></g><defs><clipPath id="clip0_9500_71113"><rect width="16" height="16"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.9 4.8L19.1 2C18.5 1.5 17.8 1.2 17 1.2C16.2 1.2 15.5 1.5 14.9 2.1L4.6 12.3C2.9 14 2 16.3 2 18.7V21C2 21.6 2.4 22 3 22H5.3C7.7 22 10 21.1 11.7 19.4L21.9 9.1C23.1 7.9 23.1 6 21.9 4.8ZM10.2 17.9C8.9 19.2 7.1 20 5.3 20H4V18.7C4 16.8 4.7 15.1 6.1 13.8L12.3 7.6L16.5 11.8L10.2 17.9ZM20.5 7.7L17.8 10.4L13.6 6.2L16.3 3.5C16.5 3.2 16.8 3.2 17 3.2C17.2 3.2 17.5 3.2 17.7 3.5L20.5 6.3C20.9 6.6 20.9 7.3 20.5 7.7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2693_58208)"><path d="M15.3 2.8L13.2 0.7C12.7 0.2 12.2 0 11.6 0C11 0 10.4 0.2 10 0.7L2 8.6C0.7 9.9 0 11.7 0 13.5V15.3C0 15.7 0.3 16 0.8 16H2.6C4.4 16 6.2 15.3 7.5 14L15.4 6.1C16.2 5.2 16.2 3.7 15.3 2.8ZM6 12.6C5.1 13.5 3.8 14 2.5 14H2V13.5C2 12.2 2.5 10.9 3.4 10L8 5.4L10.6 8L6 12.6ZM13.9 4.7L12 6.6L9.4 4L11.3 2.1C11.4 2 11.5 2 11.6 2C11.7 2 11.7 2 11.8 2.1L13.9 4.2C14 4.3 14 4.5 13.9 4.7Z"></path></g><defs><clipPath id="clip0_2693_58208"><rect width="16" height="16"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.3 3.7L7.8 9.2L4.6 12.4C2.9 14.1 2 16.4 2 18.8V21.1C2 21.7 2.4 22.1 3 22.1H5.3C7.7 22.1 10 21.2 11.7 19.5L14.9 16.3L20.4 21.8L21.8 20.4L3.8 2.4L2.3 3.7ZM10.2 17.9C8.9 19.2 7.1 20 5.3 20H4V18.7C4 16.8 4.7 15.1 6.1 13.8L9.3 10.6L13.5 14.8L10.2 17.9ZM21.9 9.1L17.2 13.8L15.8 12.4L20.5 7.7C20.9 7.3 20.9 6.7 20.5 6.3L17.7 3.5C17.5 3.2 17.2 3.2 17 3.2C16.8 3.2 16.5 3.2 16.3 3.5L11.6 8.2L10.2 6.8L14.9 2.1C15.5 1.5 16.2 1.2 17 1.2C17.8 1.2 18.5 1.5 19.1 2.1L21.9 4.9C23.1 6 23.1 7.9 21.9 9.1Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_19289_560924)"><path d="M8 0C3.58 0 0 3.58 0 8C0 12.42 3.58 16 8 16C12.42 16 16 12.42 16 8C16 3.58 12.42 0 8 0ZM8 14C4.69 14 2 11.31 2 8C2 4.69 4.69 2 8 2C11.31 2 14 4.69 14 8C14 11.31 11.31 14 8 14ZM11.41 6L9.41 8L11.41 10L10 11.41L8 9.41L6 11.41L4.59 10L6.59 8L4.59 6L6 4.59L8 6.59L10 4.59L11.41 6Z"></path></g><defs><clipPath id="clip0_19289_560924"><rect width="16" height="16" fill="transparent"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H9V3H7V7H3V9H7V13H9V9H13V7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M7 9H4V7H7V4H9V7H12V9H9V12H7V9ZM16 0V16H0V0H16ZM14 2H2V14H14V2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.9959 2H14.9959V22H21.9959V2H19.9959ZM19.9959 20H16.9959V4H19.9959V20ZM4.40588 11H12.9959V13H4.40588L8.40588 17L6.99588 18.41L0.585876 12L6.99588 5.59L8.40588 7L4.40588 11Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6 14L5 13L10 8L5 3L6 2L12 8L6 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 10.4059L4.59 8.99591L12 1.58591L19.41 8.99591L18 10.4059L13 5.40591V17.9959H11V5.40591L6 10.4059ZM2 19.9959V21.9959H22V19.9959H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 0.5C19.4 0.2 18.7 0 17.8 0C15.9 0 14.3 0.8 13 2.3C11.5 4.1 10.1 7.1 9 11.5H6.2L5.8 13H8.5L8.3 14C8.2 14.4 8.1 14.9 7.9 15.7C7.7 16.4 7.6 17.1 7.5 17.6C6.8 20.6 6.1 21.9 5.6 22.4C5.6 22.1 5.5 21.8 5.2 21.6C4.7 21.3 3.8 21.2 3.3 21.8C3.1 22 3 22.4 3 22.7C3 23.1 3.1 23.4 3.4 23.6C3.7 23.9 4.2 24 4.8 24C5.4 24 6 23.9 6.5 23.6C7.9 23 9 21.7 9.8 19.6C10.2 18.5 10.8 16.7 11.4 14.1L11.7 12.9H15.1L15.5 11.4H12.1C13.1 7.2 14.2 4.2 15.3 2.7C15.6 2.3 15.9 2 16.2 1.8C16.6 1.5 16.8 1.5 17 1.5C17.2 1.5 17.4 1.5 17.7 1.6C17.5 1.9 17.5 2.2 17.5 2.5C17.5 2.9 17.7 3.3 18 3.6C18.7 4.1 19.8 4.1 20.5 3.6C20.8 3.2 21 2.8 21 2.3C21 1.5 20.7 0.9 20 0.5Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 5H2V3H13V5ZM10 7H2V9H10V7ZM2 17H10V15H2V17ZM13 11H2V13H13V11ZM23.4 14.9L17 21.3C16 22.4 14.5 23 13 23H11.6C11.3 23 11 22.7 11 22.4V21C11 19.5 11.6 18.1 12.7 17L19.1 10.6C19.4 10.2 19.9 10 20.4 10C20.9 10 21.4 10.2 21.7 10.6L23.4 12.3C24.2 13 24.2 14.2 23.4 14.9ZM21.9 13.6L20.3 12L14 18.3C13.4 19.1 13 20 13 21C14 21 14.9 20.6 15.6 19.9L21.9 13.6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 9V7C22 5.9 21.1 5 20 5H12L10 3H4C2.9 3 2 3.9 2 5V9V10V21H22L24 9H22ZM4 5H9.2L10.6 6.4L11.2 7H12H20V9H4V5ZM20.3 19H4V11H21.6L20.3 19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_506_606)"><path opacity="0.75" d="M8.71 11.29L5.71 8.29C5.32 7.9 4.69 7.9 4.3 8.29C3.91 8.68 3.91 9.31 4.3 9.7L5.59 10.99H1C0.45 10.99 0 11.44 0 11.99C0 12.54 0.45 12.99 1 12.99H5.59L4.3 14.28C3.91 14.67 3.91 15.3 4.3 15.69C4.5 15.89 4.75 15.98 5.01 15.98C5.27 15.98 5.52 15.88 5.72 15.69L8.72 12.69C8.81 12.6 8.89 12.49 8.94 12.36C9.04 12.12 9.04 11.84 8.94 11.6C8.89 11.48 8.82 11.37 8.72 11.27L8.71 11.29Z" fill="black" fill-opacity="0.45"></path><path opacity="0.75" d="M15.71 10.29C15.32 9.89999 14.69 9.89999 14.3 10.29C13.91 10.68 13.91 11.31 14.3 11.7L16.3 13.7C16.5 13.9 16.75 13.99 17.01 13.99C17.27 13.99 17.52 13.89 17.72 13.7L23.72 7.69999C24.11 7.30999 24.11 6.67999 23.72 6.28999C23.33 5.89999 22.7 5.89999 22.31 6.28999L21.05 7.54999C19.99 6.57999 18.57 5.98999 17.02 5.98999C13.71 5.98999 11.02 8.67999 11.02 11.99C11.02 15.3 13.71 17.99 17.02 17.99C20.33 17.99 23.02 15.3 23.02 11.99C23.02 11.5 22.96 11.03 22.85 10.58L20.98 12.45C20.75 14.44 19.07 15.99 17.03 15.99C14.82 15.99 13.03 14.2 13.03 11.99C13.03 9.77999 14.82 7.98999 17.03 7.98999C18.03 7.98999 18.93 8.36999 19.63 8.97999L17.03 11.58L15.74 10.29H15.71Z"></path></g><defs><clipPath id="clip0_506_606"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.85 6.64999L3.35 11.95L7.85 17.35L6.25 18.65L0.75 11.95L6.25 5.34999L7.85 6.64999ZM17.85 5.34999L16.25 6.64999L20.75 11.95L16.25 17.35L17.75 18.65L23.25 12.05L17.85 5.34999ZM8.15 20.65L10.05 21.25L16.05 3.24999L14.15 2.64999L8.15 20.65Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4C2.9 2 2 2.9 2 4V20C2 21.1 2.9 22 4 22H20C21.1 22 22 21.1 22 20V4C22 2.9 21.1 2 20 2ZM20 20H4V4H20V20ZM7 8C7 6.9 7.9 6 9 6C10.1 6 11 6.9 11 8C11 9.1 10.1 10 9 10C7.9 10 7 9.1 7 8ZM19 19H5L9 14L11 15L14 12L19 19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 5H4C2.9 5 2 5.9 2 7V20C2 21.1 2.9 22 4 22H17C18.1 22 19 21.1 19 20V7C19 5.9 18.1 5 17 5ZM17 20H4V7H17V20ZM6 11C6 9.9 6.9 9 8 9C9.1 9 10 9.9 10 11C10 12.1 9.1 13 8 13C6.9 13 6 12.1 6 11ZM16 19H5L16 14V19ZM22 4V17C22 18.1 21.1 19 20 19V17V4H7H5C5 2.9 5.9 2 7 2H20C21.1 2 22 2.9 22 4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18.41L4.59 11L6 9.59L11 14.59V2H13V14.59L18 9.59L19.41 11L12 18.41ZM2 20V22H22V20H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 7.003C12.4641 7.01107 12.9249 7.08171 13.37 7.213L11.54 9.053C10.9155 9.15262 10.3384 9.44704 9.89125 9.89423C9.44406 10.3414 9.14964 10.9185 9.05002 11.543L7.21002 13.373C7.07873 12.9279 7.00809 12.467 7.00002 12.003C7.00002 10.6769 7.5268 9.40515 8.46449 8.46747C9.40217 7.52978 10.6739 7.003 12 7.003ZM5.40002 15.183C4.39516 14.2466 3.52369 13.1766 2.81002 12.003C5.10002 8.223 8.47002 6.003 12 6.003C12.765 6.0082 13.5255 6.11925 14.26 6.333L15.86 4.733C14.6291 4.25486 13.3206 4.0074 12 4.003C7.24002 4.003 3.05002 7.173 0.52002 12.003C1.41557 13.7255 2.59165 15.2868 4.00002 16.623L5.40002 15.183ZM23.48 12.003C21 16.833 16.76 20.003 12 20.003C10.1707 19.9916 8.37315 19.5242 6.77002 18.643L2.71002 22.713L1.29002 21.293L21.29 1.293L22.71 2.713L18.94 6.473C20.8367 7.96509 22.3858 9.8521 23.48 12.003ZM14.7 10.723L10.7 14.723C11.1058 14.9158 11.5508 15.0116 12 15.003C12.7957 15.003 13.5587 14.6869 14.1213 14.1243C14.6839 13.5617 15 12.7986 15 12.003C14.9993 11.559 14.8967 11.1211 14.7 10.723ZM21.19 12.003C20.243 10.4087 18.9887 9.01851 17.5 7.913L16.16 9.263C16.7052 10.073 16.9975 11.0266 17 12.003C17 13.3291 16.4732 14.6009 15.5356 15.5385C14.5979 16.4762 13.3261 17.003 12 17.003C11.0237 17.0005 10.07 16.7081 9.26002 16.163L8.26002 17.163C9.43056 17.7122 10.707 17.9989 12 18.003C15.53 18.003 18.9 15.783 21.19 12.003Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 5L12 0L7 5H11V9H13V5H17Z"></path><path d="M13 19V15H11V19H7L12 24L17 19H13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.75 8H15.25L13.35 13.08C12.2029 12.2588 11.2439 11.2027 10.537 9.98187C9.83 8.76107 9.39127 7.40364 9.25 6H14V4H9V2H7V4H2V6H6.91C6.73189 7.75797 6.09115 9.43736 5.05302 10.8672C4.01489 12.2971 2.61643 13.4263 1 14.14C1.32315 14.7296 1.69441 15.2915 2.11 15.82C4.82764 14.5445 6.96846 12.2966 8.11 9.52C9.02641 11.7596 10.5985 13.6698 12.62 15L10 22H12.42L13.79 18.13H19.16L20.56 22H23L17.75 8ZM14.46 16.16L15.73 12.53C16.0406 11.7049 16.2945 10.8596 16.49 10C16.55 10.26 16.67 10.66 16.84 11.21C17.01 11.76 17.14 12.15 17.24 12.41L18.55 16.2L14.46 16.16Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_252_57732)"><path d="M19 29.2996L20.4 30.6996L22.7 28.3996V33.9996H24.7V28.3996L27 30.6996L28.4 29.2996L23.7 24.5996L19 29.2996Z"></path><path d="M24.7 19.6V14H22.7V19.6L20.4 17.3L19 18.7L23.7 23.4L28.4 18.7L27 17.3L24.7 19.6Z"></path></g><defs><clipPath id="clip0_252_57732"><rect width="9.4" height="20" fill="white" transform="translate(19 14)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_252_57727)"><path d="M19 17.7L20.4 19.1L22.7 16.8V22.4H24.7V16.8L27 19.1L28.4 17.7L23.7 13L19 17.7Z"></path><path d="M24.7 32.0004V26.4004H22.7V32.0004L20.4 29.7004L19 31.1004L23.7 35.8004L28.4 31.1004L27 29.7004L24.7 32.0004Z"></path></g><defs><clipPath id="clip0_252_57727"><rect width="9.4" height="22.8" fill="white" transform="translate(19 13)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M28 0H4C1.79 0 0 1.79 0 4V28C0 30.21 1.79 32 4 32H28C30.21 32 32 30.21 32 28V4C32 1.79 30.21 0 28 0ZM30 28C30 29.1 29.1 30 28 30H4C2.9 30 2 29.1 2 28V4C2 2.9 2.9 2 4 2H28C29.1 2 30 2.9 30 4V28ZM6 9C6 7.34 7.34 6 9 6C10.66 6 12 7.34 12 9C12 10.66 10.66 12 9 12C7.34 12 6 10.66 6 9ZM19 16L28 28H4L11 19L15 21L19 16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 1C3.2 1 1 3.2 1 6C1 8.8 3.2 11 6 11C8.8 11 11 8.8 11 6C11 3.2 8.8 1 6 1ZM6 9C4.3 9 3 7.7 3 6C3 4.3 4.3 3 6 3C7.7 3 9 4.3 9 6C9 7.7 7.7 9 6 9ZM8 6C8 7.1 7.1 8 6 8C4.9 8 4 7.1 4 6C4 4.9 4.9 4 6 4C7.1 4 8 4.9 8 6ZM20 18C20 19.1 19.1 20 18 20C16.9 20 16 19.1 16 18C16 16.9 16.9 16 18 16C19.1 16 20 16.9 20 18ZM6 13C3.2 13 1 15.2 1 18C1 20.8 3.2 23 6 23C8.8 23 11 20.8 11 18C11 15.2 8.8 13 6 13ZM6 21C4.3 21 3 19.7 3 18C3 16.3 4.3 15 6 15C7.7 15 9 16.3 9 18C9 19.7 7.7 21 6 21ZM18 11C20.8 11 23 8.8 23 6C23 3.2 20.8 1 18 1C15.2 1 13 3.2 13 6C13 8.8 15.2 11 18 11ZM18 3C19.7 3 21 4.3 21 6C21 7.7 19.7 9 18 9C16.3 9 15 7.7 15 6C15 4.3 16.3 3 18 3ZM18 13C15.2 13 13 15.2 13 18C13 20.8 15.2 23 18 23C20.8 23 23 20.8 23 18C23 15.2 20.8 13 18 13ZM18 21C16.3 21 15 19.7 15 18C15 16.3 16.3 15 18 15C19.7 15 21 16.3 21 18C21 19.7 19.7 21 18 21Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 4C7 5.7 5.7 7 4 7C2.3 7 1 5.7 1 4C1 2.3 2.3 1 4 1C5.7 1 7 2.3 7 4ZM15 4C15 5.7 13.7 7 12 7C10.3 7 9 5.7 9 4C9 2.3 10.3 1 12 1C13.7 1 15 2.3 15 4ZM13 4C13 3.4 12.6 3 12 3C11.4 3 11 3.4 11 4C11 4.6 11.4 5 12 5C12.6 5 13 4.6 13 4ZM17 4C17 2.3 18.3 1 20 1C21.7 1 23 2.3 23 4C23 5.7 21.7 7 20 7C18.3 7 17 5.7 17 4ZM19 4C19 4.6 19.4 5 20 5C20.6 5 21 4.6 21 4C21 3.4 20.6 3 20 3C19.4 3 19 3.4 19 4ZM7 12C7 13.7 5.7 15 4 15C2.3 15 1 13.7 1 12C1 10.3 2.3 9 4 9C5.7 9 7 10.3 7 12ZM5 12C5 11.4 4.6 11 4 11C3.4 11 3 11.4 3 12C3 12.6 3.4 13 4 13C4.6 13 5 12.6 5 12ZM12 9C10.3 9 9 10.3 9 12C9 13.7 10.3 15 12 15C13.7 15 15 13.7 15 12C15 10.3 13.7 9 12 9ZM20 9C18.3 9 17 10.3 17 12C17 13.7 18.3 15 20 15C21.7 15 23 13.7 23 12C23 10.3 21.7 9 20 9ZM4 17C2.3 17 1 18.3 1 20C1 21.7 2.3 23 4 23C5.7 23 7 21.7 7 20C7 18.3 5.7 17 4 17ZM12 17C10.3 17 9 18.3 9 20C9 21.7 10.3 23 12 23C13.7 23 15 21.7 15 20C15 18.3 13.7 17 12 17ZM23 20C23 21.7 21.7 23 20 23C18.3 23 17 21.7 17 20C17 18.3 18.3 17 20 17C21.7 17 23 18.3 23 20ZM21 20C21 19.4 20.6 19 20 19C19.4 19 19 19.4 19 20C19 20.6 19.4 21 20 21C20.6 21 21 20.6 21 20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 4C7 5.7 5.7 7 4 7C2.3 7 1 5.7 1 4C1 2.3 2.3 1 4 1C5.7 1 7 2.3 7 4ZM15 4C15 5.7 13.7 7 12 7C10.3 7 9 5.7 9 4C9 2.3 10.3 1 12 1C13.7 1 15 2.3 15 4ZM13 4C13 3.4 12.6 3 12 3C11.4 3 11 3.4 11 4C11 4.6 11.4 5 12 5C12.6 5 13 4.6 13 4ZM17 4C17 2.3 18.3 1 20 1C21.7 1 23 2.3 23 4C23 5.7 21.7 7 20 7C18.3 7 17 5.7 17 4ZM19 4C19 4.6 19.4 5 20 5C20.6 5 21 4.6 21 4C21 3.4 20.6 3 20 3C19.4 3 19 3.4 19 4ZM7 12C7 13.7 5.7 15 4 15C2.3 15 1 13.7 1 12C1 10.3 2.3 9 4 9C5.7 9 7 10.3 7 12ZM5 12C5 11.4 4.6 11 4 11C3.4 11 3 11.4 3 12C3 12.6 3.4 13 4 13C4.6 13 5 12.6 5 12ZM12 9C10.3 9 9 10.3 9 12C9 13.7 10.3 15 12 15C13.7 15 15 13.7 15 12C15 10.3 13.7 9 12 9ZM20 9C18.3 9 17 10.3 17 12C17 13.7 18.3 15 20 15C21.7 15 23 13.7 23 12C23 10.3 21.7 9 20 9ZM5 17H3V19H1V21H3V23H5V21H7V19H5V17Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 1H4C2.9 1 2 1.9 2 3V9C2 10.1 2.9 11 4 11H20C21.1 11 22 10.1 22 9V3C22 1.9 21.1 1 20 1ZM20 9H4V3H20V9ZM14 7H6V5H14V7ZM20 13H4C2.9 13 2 13.9 2 15V21C2 22.1 2.9 23 4 23H20C21.1 23 22 22.1 22 21V15C22 13.9 21.1 13 20 13ZM20 21H4V15H20V21ZM14 19H6V17H14V19Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2V4H4V9H2V4C2 2.9 2.9 2 4 2H9ZM20 2H15V4H20V9H22V4C22 2.9 21.1 2 20 2ZM4 20V15H2V20C2 21.1 2.9 22 4 22H9V20H4ZM20 20H15V22H20C21.1 22 22 21.1 22 20V15H20V20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2V4H4V9H2V4C2 3.46957 2.21071 2.96086 2.58579 2.58579C2.96086 2.21071 3.46957 2 4 2H9ZM20 2H15V4H20V9H22V4C22 3.46957 21.7893 2.96086 21.4142 2.58579C21.0391 2.21071 20.5304 2 20 2ZM4 20V15H2V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H9V20H4ZM20 20H15V22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V15H20V20ZM17 13H15V11H13V13H11V15H13V17H15V15H17V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 25 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.5 1C6.42 1 1.5 5.92 1.5 12C1.5 18.08 6.42 23 12.5 23C18.58 23 23.5 18.08 23.5 12C23.5 5.92 18.58 1 12.5 1ZM12.5 21C7.54 21 3.5 16.96 3.5 12C3.5 7.04 7.54 3 12.5 3C17.46 3 21.5 7.04 21.5 12C21.5 16.96 17.46 21 12.5 21ZM17.41 10.25L11.47 6.95C10.85 6.6 10.1 6.61 9.49 6.97C8.87 7.33 8.5 7.98 8.5 8.69V15.29C8.5 16.01 8.87 16.65 9.49 17.01C9.81 17.2 10.15 17.29 10.5 17.29C10.85 17.29 11.17 17.21 11.47 17.04L17.41 13.74C18.04 13.39 18.44 12.72 18.44 11.99C18.44 11.26 18.05 10.59 17.41 10.24V10.25ZM10.5 15.3V8.7L16.44 12L10.5 15.3Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M10.393 12.6465L5.69297 8.04651L10.393 3.34651L9.69297 2.64651L4.29297 8.04651L9.69297 13.3465L10.393 12.6465Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C16.4 4 20 7.6 20 12C20 16.4 16.4 20 12 20C7.6 20 4 16.4 4 12C4 7.6 7.6 4 12 4ZM12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12C22 6.5 17.5 2 12 2ZM12 10C13.1 10 14 10.9 14 12C14 13.1 13.1 14 12 14C10.9 14 10 13.1 10 12C10 10.9 10.9 10 12 10ZM12 8C9.8 8 8 9.8 8 12C8 14.2 9.8 16 12 16C14.2 16 16 14.2 16 12C16 9.8 14.2 8 12 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 4H2V21H14V16H18V11H22V4ZM12 19H4V16H12V19ZM16 14H4V11H16V14ZM20 9H4V6H20V9Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0)"><path d="M12 6.8L12.9 9.7L13.3 11.1H14.8H17.8L15.4 12.9L14.2 13.8L14.6 15.2L15.5 18.1L13.1 16.3L12 15.3L10.8 16.2L8.4 18L9.3 15.1L9.7 13.7L8.5 12.8L6.1 11H9.1H10.6L11 9.6L12 6.8ZM12 0.300003L9.2 9H0L7.4 14.4L4.6 23.1L12 17.7L19.4 23.1L16.6 14.4L24 9H14.8L12 0.300003Z"></path></g><defs><clipPath id="clip0"><rect width="24" height="24"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 8.00001H19.6L15.6 4.00001L17 2.60001L23.4 9.00001L17 15.4L15.6 14L19.6 10H7C4.8 10 3 11.8 3 14C3 16.2 4.8 18 7 18H8V20H7C3.7 20 1 17.3 1 14C1 10.7 3.7 8.00001 7 8.00001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 7V9H4V7H12ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1564_16728)"><path d="M2.77 14.1393L6.09 9.03927L0 9.18927L0.06 6.51927L6.15 6.88927L2.96 1.68927L5.29 0.379272L8.02 5.81927L10.96 0.489272L13.23 1.84927L9.91 6.94927L16 6.79927L15.94 9.46927L9.85 9.09927L13.04 14.2993L10.71 15.6093L7.98 10.1693L5.04 15.4993L2.77 14.1393Z"></path></g><defs><clipPath id="clip0_1564_16728"><rect width="16" height="16" fill="white"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 2.993C11.8 2.993 11.59 3.023 11.37 3.043L12.71 1.703L11.3 0.292999L7.59 4.003L11.3 7.713L12.71 6.303L11.46 5.053C11.64 5.043 11.82 5.013 12 5.013C15.86 5.013 19 8.153 19 12.013C19 15.873 15.86 19.013 12 19.013C8.14 19.013 5 15.873 5 12.013C5 11.463 4.55 11.013 4 11.013C3.45 11.013 3 11.463 3 12.013C3 16.973 7.04 21.013 12 21.013C16.96 21.013 21 16.973 21 12.013C21 7.053 16.97 2.993 12.01 2.993Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4L2 4V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V4C22 3.46957 21.7893 2.96086 21.4142 2.58579C21.0391 2.21071 20.5304 2 20 2ZM15 4V6H9V4H15ZM8 20V15H16V20H8ZM20 20H18V13H6V20H4V4.83L4.83 4H7V8H17V4H20V20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23 11H19.9C19.4 7.4 16.6 4.5 13 4.1V1H11V4.1C7.4 4.5 4.5 7.4 4.1 11H1V13H4.1C4.6 16.6 7.4 19.5 11 19.9V23H13V19.9C16.6 19.4 19.5 16.6 19.9 13H23V11ZM12 18C8.7 18 6 15.3 6 12C6 8.7 8.7 6 12 6C15.3 6 18 8.7 18 12C18 15.3 15.3 18 12 18Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.9 4C9.4 2.3 7.9 1 6 1C3.8 1 2 2.8 2 5C2 7.2 3.8 9 6 9C7.9 9 9.4 7.7 9.9 6H22V4H9.9ZM6 7C4.9 7 4 6.1 4 5C4 3.9 4.9 3 6 3C7.1 3 8 3.9 8 5C8 6.1 7.1 7 6 7ZM9 15C7.1 15 5.6 16.3 5.1 18H2V20H5.1C5.5 21.7 7.1 23 9 23C10.9 23 12.4 21.7 12.9 20H22V18H12.9C12.4 16.3 10.9 15 9 15ZM9 21C7.9 21 7 20.1 7 19C7 17.9 7.9 17 9 17C10.1 17 11 17.9 11 19C11 20.1 10.1 21 9 21ZM18 8C16.1 8 14.6 9.3 14.1 11H2V13H14.1C14.5 14.7 16.1 16 18 16C20.2 16 22 14.2 22 12C22 9.8 20.2 8 18 8ZM18 14C16.9 14 16 13.1 16 12C16 10.9 16.9 10 18 10C19.1 10 20 10.9 20 12C20 13.1 19.1 14 18 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6.8 2C6.4 0.8 5.3 0 4 0C2.3 0 1 1.3 1 3C1 4.7 2.3 6 4 6C5.3 6 6.4 5.2 6.8 4H15V2H6.8ZM4 4C3.4 4 3 3.6 3 3C3 2.4 3.4 2 4 2C4.6 2 5 2.4 5 3C5 3.6 4.6 4 4 4ZM12 5C10.7 5 9.6 5.8 9.2 7H1V9H9.2C9.6 10.2 10.7 11 12 11C13.7 11 15 9.7 15 8C15 6.3 13.7 5 12 5ZM12 9C11.4 9 11 8.6 11 8C11 7.4 11.4 7 12 7C12.6 7 13 7.4 13 8C13 8.6 12.6 9 12 9ZM6 10C4.7 10 3.6 10.8 3.2 12H1V14H3.2C3.6 15.2 4.7 16 6 16C7.3 16 8.4 15.2 8.8 14H15V12H8.8C8.4 10.8 7.3 10 6 10ZM6 14C5.4 14 5 13.6 5 13C5 12.4 5.4 12 6 12C6.6 12 7 12.4 7 13C7 13.6 6.6 14 6 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M24 17V19H9.1C9.5 18.4 9.9 17.7 10.2 17H24ZM11.9 9.00001C11 13.7 8.6 19.6 5 22.6C3.8 23.6 2 22.6 2 21.1C2 20.4 2.1 19.7 2.2 19H0V17H2.8C4.3 12.9 7.6 9.10001 10.2 7.60001C10.4 6.10001 10.4 4.80001 10.2 3.90001C9.9 3.30001 9.7 3.00001 9.6 3.00001C9.4 3.00001 7.8 2.90001 3.8 8.70001L2.2 7.60001C5.5 2.80001 7.9 0.700007 9.9 1.00001C12 1.20001 12.5 4.60001 12.2 6.90001C14.3 7.00001 14.8 8.20001 14.9 10.3C16.2 9.10001 18.1 7.90001 19.2 9.20001C20.8 8.90001 22.1 10.4 22.9 11.5L21.3 12.7C20.4 11.4 19.8 11.2 19.6 11.2C19.5 11.2 19.5 11.3 19.4 11.4C19 12 18.6 12.8 18 13.7C17.7 14.1 17.2 14.3 16.7 14.1C15.5 13.5 16.5 12.1 16.8 11.2C15.8 12 14.4 13.4 13.9 14.8C13.8 15.5 13.3 16.3 12.5 16.1C11.6 15.9 11.7 14.9 12 14.2C13.3 9.80001 12.5 9.00001 12.5 9.00001C12.5 8.90001 12.2 8.80001 11.9 9.00001ZM9.5 10.4C6.9 12.8 4.1 17.1 4 20.8C6.6 18.5 8.5 14.3 9.5 10.4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11 5C12.7 5 14 6.3 14 8C14 9.7 12.7 11 11 11H5C3.3 11 2 9.7 2 8C2 6.3 3.3 5 5 5H11ZM11 3H5C2.2 3 0 5.2 0 8C0 10.8 2.2 13 5 13H11C13.8 13 16 10.8 16 8C16 5.2 13.8 3 11 3ZM11 6C9.9 6 9 6.9 9 8C9 9.1 9.9 10 11 10C12.1 10 13 9.1 13 8C13 6.9 12.1 6 11 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11 5C12.7 5 14 6.3 14 8C14 9.7 12.7 11 11 11H5C3.3 11 2 9.7 2 8C2 6.3 3.3 5 5 5H11ZM11 3H5C2.2 3 0 5.2 0 8C0 10.8 2.2 13 5 13H11C13.8 13 16 10.8 16 8C16 5.2 13.8 3 11 3ZM5 6C3.9 6 3 6.9 3 8C3 9.1 3.9 10 5 10C6.1 10 7 9.1 7 8C7 6.9 6.1 6 5 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 7V6C22 4.9 21.1 4 20 4H16C14.9 4 14 4.9 14 6V7C14 8.1 14.9 9 16 9H20C21.1 9 22 8.1 22 7ZM20 7H16V6H20V7ZM2 6V7C2 8.1 2.9 9 4 9H11C12.1 9 13 8.1 13 7V6C13 4.9 12.1 4 11 4H4C2.9 4 2 4.9 2 6ZM4 6H11V7H4V6ZM9 12V13C9 14.1 9.9 15 11 15H20C21.1 15 22 14.1 22 13V12C22 10.9 21.1 10 20 10H11C9.9 10 9 10.9 9 12ZM11 12H20V13H11V12ZM2 18V19C2 20.1 2.9 21 4 21H15C16.1 21 17 20.1 17 19V18C17 16.9 16.1 16 15 16H4C2.9 16 2 16.9 2 18ZM4 18H15V19H4V18ZM2 12V13C2 14.1 2.9 15 4 15H6C7.1 15 8 14.1 8 13V12C8 10.9 7.1 10 6 10H4C2.9 10 2 10.9 2 12ZM4 12H6V13H4V12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 6H4C2.9 6 2 6.9 2 8V16C2 17.1 2.9 18 4 18H20C21.1 18 22 17.1 22 16V8C22 6.9 21.1 6 20 6ZM20 16H4V8H20V16ZM14 13H6V11H14V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M24 21.4201C23.9387 22.1566 23.5894 22.8394 23.0278 23.3202C22.4662 23.8011 21.7376 24.0413 21 23.9888C20.2624 24.0413 19.5338 23.8011 18.9722 23.3202C18.4106 22.8394 18.0613 22.1566 18 21.4201C18 18.8513 21 16.2826 21 14.9932C21 16.2826 24 18.8513 24 21.4201ZM22 12.9942L11 1.99951L8.71 4.2884L10.12 5.70771L11 4.82814L18.17 11.9946L5.64 15.8028L2.83 12.9942L7.71 8.11653L9.29 9.70576C9.38296 9.79944 9.49356 9.8738 9.61542 9.92455C9.73728 9.97529 9.86799 10.0014 10 10.0014C10.132 10.0014 10.2627 9.97529 10.3846 9.92455C10.5064 9.8738 10.617 9.79944 10.71 9.70576C10.8037 9.61284 10.8781 9.5023 10.9289 9.3805C10.9797 9.2587 11.0058 9.12805 11.0058 8.99611C11.0058 8.86416 10.9797 8.73352 10.9289 8.61172C10.8781 8.48992 10.8037 8.37937 10.71 8.28645L3.71 1.28986C3.5217 1.10165 3.2663 0.995911 3 0.995911C2.7337 0.995911 2.4783 1.10165 2.29 1.28986C2.1017 1.47807 1.99591 1.73334 1.99591 1.99951C1.99591 2.26569 2.1017 2.52096 2.29 2.70917L6.29 6.70722L0 12.9942L10 22.9893L18 14.9932L22 12.9942Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21 4H16V2C16 1.46957 15.7893 0.960859 15.4142 0.585786C15.0391 0.210714 14.5304 0 14 0L10 0C9.46957 0 8.96086 0.210714 8.58579 0.585786C8.21071 0.960859 8 1.46957 8 2V4H3C2.46957 4 1.96086 4.21071 1.58579 4.58579C1.21071 4.96086 1 5.46957 1 6V12H2V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V12H23V6C23 5.46957 22.7893 4.96086 22.4142 4.58579C22.0391 4.21071 21.5304 4 21 4ZM10 2H14V4H10V2ZM20 20H4V12H9V16H15V12H20V20ZM11 14V10H13V14H11ZM21 10H15V8H9V10H3V6H21V10Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 8.00001H4.40001L8.40001 4.00001L7.00001 2.60001L0.600006 9.00001L7.00001 15.4L8.40001 14L4.40001 10H17C19.2 10 21 11.8 21 14C21 16.2 19.2 18 17 18H16V20H17C20.3 20 23 17.3 23 14C23 10.7 20.3 8.00001 17 8.00001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C7.2 4 3 7.2 0.5 12C3 16.8 7.2 20 12 20C16.8 20 20.9 16.8 23.5 12C20.9 7.2 16.7 4 12 4ZM12 18C8.5 18 5.1 15.8 2.8 12C5.1 8.2 8.5 6 12 6C15.5 6 18.9 8.2 21.2 12C18.9 15.8 15.5 18 12 18ZM12 7C9.2 7 7 9.2 7 12C7 14.8 9.2 17 12 17C14.8 17 17 14.8 17 12C17 9.2 14.7 7 12 7ZM12 15C10.3 15 9 13.7 9 12C9 11.7 9 11.5 9.1 11.3L12 12L10.3 9.5C10.8 9.2 11.3 9 12 9C13.7 9 15 10.3 15 12C15 13.7 13.6 15 12 15Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.7 16.3C8.1 16.7 8.1 17.3 7.7 17.7L3.7 21.7C3.5 21.9 3.3 22 3 22C2.7 22 2.5 21.9 2.3 21.7C1.9 21.3 1.9 20.7 2.3 20.3L6.3 16.3C6.7 15.9 7.3 15.9 7.7 16.3ZM20.5 10L23 13.7L18.6 14.6L17.7 19L14 16.5L10.3 19L9.4 14.6L5 13.7L7.5 10L5 6.3L9.4 5.4L10.3 1L14 3.5L17.7 1L18.6 5.4L23 6.3L20.5 10ZM18.1 10L18.8 8.9L19.6 7.7L18.1 7.4L16.8 7.1L16.5 5.8L16.2 4.3L15 5.1L14 5.9L12.9 5.2L11.7 4.3L11.4 5.8L11.1 7.1L9.8 7.4L8.3 7.7L9.1 8.9L9.9 10L9.2 11.1L8.4 12.3L9.9 12.6L11.2 12.9L11.5 14.2L11.8 15.7L13 14.9L14.1 14.2L15.2 14.9L16.4 15.7L16.7 14.2L17 12.9L18.3 12.6L19.8 12.3L19 11.1L18.1 10Z"></path></svg>'},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},,function(e,t,o){"use strict";o.r(t),o.d(t,"Version",(function(){return Jn})),o.d(t,"enStrings",(function(){return n})),o.d(t,"editorLocalization",(function(){return G})),o.d(t,"defaultStrings",(function(){return J})),o.d(t,"localization",(function(){return G})),o.d(t,"QuestionConvertMode",(function(){return r})),o.d(t,"settings",(function(){return a})),o.d(t,"EmptySurveyCreatorOptions",(function(){return s})),o.d(t,"CreatorAction",(function(){return hr})),o.d(t,"TabbedMenuItem",(function(){return gr})),o.d(t,"TabbedMenuContainer",(function(){return fr})),o.d(t,"ToolbarActionContainer",(function(){return mr})),o.d(t,"CreatorEvent",(function(){return yr})),o.d(t,"SurveyCreatorModel",(function(){return br})),o.d(t,"CreatorBase",(function(){return vr})),o.d(t,"StylesManager",(function(){return xr})),o.d(t,"initializeDesignTimeSurveyModel",(function(){return wr})),o.d(t,"editableStringRendererName",(function(){return Cr})),o.d(t,"getElementWrapperComponentName",(function(){return Sr})),o.d(t,"getQuestionContentWrapperComponentName",(function(){return Tr})),o.d(t,"getElementWrapperComponentData",(function(){return Pr})),o.d(t,"getItemValueWrapperComponentName",(function(){return Er})),o.d(t,"getItemValueWrapperComponentData",(function(){return Ir})),o.d(t,"isStringEditable",(function(){return Or})),o.d(t,"isTextInput",(function(){return Vr})),o.d(t,"registerAdorner",(function(){return Nr})),o.d(t,"removeAdorners",(function(){return kr})),o.d(t,"CreatorResponsivityManager",(function(){return yo})),o.d(t,"AceJsonEditorModel",(function(){return xe})),o.d(t,"TabJsonEditorAcePlugin",(function(){return we})),o.d(t,"JsonEditorBaseModel",(function(){return be})),o.d(t,"TabJsonEditorBasePlugin",(function(){return ve})),o.d(t,"TextareaJsonEditorModel",(function(){return je})),o.d(t,"TabJsonEditorTextareaPlugin",(function(){return Ce})),o.d(t,"TestSurveyTabViewModel",(function(){return Ee})),o.d(t,"TabTestPlugin",(function(){return Ie})),o.d(t,"updatecoloralphaJSON",(function(){return tr})),o.d(t,"createColor",(function(){return rr})),o.d(t,"updateShadowEffectsJSON",(function(){return Uo})),o.d(t,"createBoxShadow",(function(){return Wo})),o.d(t,"createBoxShadowReset",(function(){return Go})),o.d(t,"parseBoxShadow",(function(){return zo})),o.d(t,"DefaultFonts",(function(){return Ao})),o.d(t,"updateFontSettingsJSON",(function(){return Do})),o.d(t,"fontsettingsToCssVariable",(function(){return Mo})),o.d(t,"fontsettingsFromCssVariable",(function(){return Ro})),o.d(t,"updateBackgroundCornerRadiusJSON",(function(){return Ho})),o.d(t,"backgroundCornerRadiusToCssVariable",(function(){return Bo})),o.d(t,"backgroundCornerRadiusFromCssVariable",(function(){return Qo})),o.d(t,"Themes",(function(){return Vo})),o.d(t,"PredefinedThemes",(function(){return No})),o.d(t,"PredefinedColors",(function(){return ko})),o.d(t,"ThemeTabViewModel",(function(){return Oo})),o.d(t,"ThemeTabPlugin",(function(){return dr})),o.d(t,"themeModelPropertyGridDefinition",(function(){return pr})),o.d(t,"ThemeModelEditorDefinition",(function(){return ur})),o.d(t,"initLogicOperator",(function(){return qe})),o.d(t,"LogicEvent",(function(){return He})),o.d(t,"SurveyLogic",(function(){return Be})),o.d(t,"TranslationItemBase",(function(){return Vt})),o.d(t,"TranslationItemString",(function(){return Nt})),o.d(t,"TranslationItem",(function(){return kt})),o.d(t,"TranslationGroup",(function(){return At})),o.d(t,"Translation",(function(){return _t})),o.d(t,"TranslationForEditor",(function(){return Lt})),o.d(t,"TranslationEditor",(function(){return Dt})),o.d(t,"createImportCSVAction",(function(){return Mt})),o.d(t,"createExportCSVAction",(function(){return Rt})),o.d(t,"translationCss",(function(){return Pt})),o.d(t,"TabTranslationPlugin",(function(){return qt})),o.d(t,"initialSettingsAllowShowEmptyTitleInDesignMode",(function(){return go})),o.d(t,"TabDesignerViewModel",(function(){return fo})),o.d(t,"TabDesignerPlugin",(function(){return mo})),o.d(t,"SurveyLogicUI",(function(){return Kt})),o.d(t,"TabLogicPlugin",(function(){return Yt})),o.d(t,"logicCss",(function(){return Ht})),o.d(t,"ToolboxToolViewModel",(function(){return Ar})),o.d(t,"PageNavigatorViewModel",(function(){return _r})),o.d(t,"PageAdorner",(function(){return Mr})),o.d(t,"RowViewModel",(function(){return Rr})),o.d(t,"QuestionAdornerViewModel",(function(){return qr})),o.d(t,"QuestionDropdownAdornerViewModel",(function(){return Hr})),o.d(t,"QuestionImageAdornerViewModel",(function(){return Br})),o.d(t,"QuestionRatingAdornerViewModel",(function(){return Qr})),o.d(t,"ItemValueWrapperViewModel",(function(){return Ur})),o.d(t,"ImageItemValueWrapperViewModel",(function(){return Wr})),o.d(t,"MatrixCellWrapperEditSurvey",(function(){return Gr})),o.d(t,"MatrixCellWrapperViewModel",(function(){return zr})),o.d(t,"SurveySimulatorModel",(function(){return Se})),o.d(t,"DEFAULT_MONITOR_DPI",(function(){return Te})),o.d(t,"simulatorDevices",(function(){return Pe})),o.d(t,"SurveyResultsItemModel",(function(){return Jr})),o.d(t,"SurveyResultsModel",(function(){return Kr})),o.d(t,"LogoImageViewModel",(function(){return Yr})),o.d(t,"StringItemsNavigatorBase",(function(){return wo})),o.d(t,"StringEditorConnector",(function(){return Eo})),o.d(t,"StringEditorViewModelBase",(function(){return Io})),o.d(t,"QuestionEmbeddedSurveyModel",(function(){return Xr})),o.d(t,"QuestionLinkValueModel",(function(){return $r})),o.d(t,"EditorLocalization",(function(){return W})),o.d(t,"getLocString",(function(){return z})),o.d(t,"SurveyJSON5",(function(){return $})),o.d(t,"QuestionSpinEditorModel",(function(){return en})),o.d(t,"QuestionColorModel",(function(){return tn})),o.d(t,"QuestionFileEditorModel",(function(){return on})),o.d(t,"ResetValueAdorner",(function(){return rn})),o.d(t,"QuestionTextWithResetModel",(function(){return nn})),o.d(t,"QuestionCommentWithResetModel",(function(){return an})),o.d(t,"setSurveyJSONForPropertyGrid",(function(){return Xe})),o.d(t,"PropertyEditorSetupValue",(function(){return $e})),o.d(t,"PropertyGridEditorCollection",(function(){return et})),o.d(t,"PropertyGridTitleActionsCreator",(function(){return tt})),o.d(t,"PropertyJSONGenerator",(function(){return ot})),o.d(t,"PropertyGridModel",(function(){return rt})),o.d(t,"PropertyGridEditor",(function(){return nt})),o.d(t,"PropertyGridEditorBoolean",(function(){return it})),o.d(t,"PropertyGridEditorStringBase",(function(){return at})),o.d(t,"PropertyGridEditorString",(function(){return st})),o.d(t,"PropertyGridEditorDateTime",(function(){return lt})),o.d(t,"PropertyGridLinkEditor",(function(){return ct})),o.d(t,"PropertyGridEditorColor",(function(){return pt})),o.d(t,"PropertyGridEditorColorWithAlpha",(function(){return ut})),o.d(t,"PropertyGridEditorNumber",(function(){return dt})),o.d(t,"PropertyGridEditorSpinEdit",(function(){return ht})),o.d(t,"PropertyGridEditorImageSize",(function(){return gt})),o.d(t,"PropertyGridEditorText",(function(){return ft})),o.d(t,"PropertyGridEditorHtml",(function(){return mt})),o.d(t,"PropertyGridEditorStringArray",(function(){return yt})),o.d(t,"PropertyGridEditorDropdown",(function(){return bt})),o.d(t,"PropertyGridEditorSet",(function(){return vt})),o.d(t,"PropertyGridEditorPage",(function(){return xt})),o.d(t,"PropertyGridEditorQuestion",(function(){return wt})),o.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return jt})),o.d(t,"PropertyGridEditorQuestionCarryForward",(function(){return Ct})),o.d(t,"PropertyGridEditorQuestionValue",(function(){return St})),o.d(t,"PropertyGridEditorExpression",(function(){return sn})),o.d(t,"PropertyGridEditorCondition",(function(){return ln})),o.d(t,"PropertyGridEditorMatrix",(function(){return un})),o.d(t,"PropertyGridEditorMatrixItemValues",(function(){return dn})),o.d(t,"PropertyGridEditorMatrixRateValues",(function(){return hn})),o.d(t,"PropertyGridEditorMatrixColumns",(function(){return gn})),o.d(t,"PropertyGridEditorMatrixPages",(function(){return fn})),o.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return mn})),o.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return yn})),o.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return bn})),o.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return vn})),o.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return xn})),o.d(t,"PropertyGridEditorMatrixValidators",(function(){return wn})),o.d(t,"PropertyGridEditorMatrixTriggers",(function(){return jn})),o.d(t,"PropertyGridEditorBindings",(function(){return Sn})),o.d(t,"PropertyGridViewModel",(function(){return po})),o.d(t,"ObjectSelectorItem",(function(){return ao})),o.d(t,"ObjectSelector",(function(){return so})),o.d(t,"ObjectSelectorModel",(function(){return lo})),o.d(t,"PropertyGridEditorQuestionRestfull",(function(){return Pn})),o.d(t,"PropertyGridEditorFontSettings",(function(){return En})),o.d(t,"PropertyGridEditorBackgroundCornerRadius",(function(){return In})),o.d(t,"PropertyGridEditorShadowEffects",(function(){return On})),o.d(t,"PropertyGridValueEditorBase",(function(){return Dn})),o.d(t,"PropertyGridCellsEditor",(function(){return Mn})),o.d(t,"PropertyGridValueEditor",(function(){return Rn})),o.d(t,"PropertyGridRowValueEditor",(function(){return qn})),o.d(t,"PropertyGridPanelValueEditor",(function(){return Hn})),o.d(t,"PropertyGridTriggerValueEditor",(function(){return Bn})),o.d(t,"PropertyGridTriggerValueInLogicEditor",(function(){return Qn})),o.d(t,"SearchManager",(function(){return co})),o.d(t,"PropertyGridEditorQuestionMaskSettings",(function(){return Un})),o.d(t,"PropertyGridEditorMaskType",(function(){return Wn})),o.d(t,"PropertyGridEditorQuestionHeader",(function(){return zn})),o.d(t,"propertyGridCss",(function(){return Ue})),o.d(t,"QuestionConverter",(function(){return ee})),o.d(t,"svgBundle",(function(){})),o.d(t,"SurveyTextWorkerError",(function(){return ne})),o.d(t,"SurveyTextWorkerParserError",(function(){return ie})),o.d(t,"SurveyTextWorkerJsonError",(function(){return ue})),o.d(t,"SurveyTextWorker",(function(){return de})),o.d(t,"JsonDuplicateNameError",(function(){return he})),o.d(t,"QuestionToolboxCategory",(function(){return ge})),o.d(t,"QuestionToolboxItem",(function(){return fe})),o.d(t,"QuestionToolbox",(function(){return me})),o.d(t,"SidebarModel",(function(){return xo})),o.d(t,"SidebarTabModel",(function(){return bo})),o.d(t,"Switcher",(function(){return lr})),o.d(t,"roundTo2Decimals",(function(){return c})),o.d(t,"getNextItemValue",(function(){return d})),o.d(t,"getNextItemText",(function(){return h})),o.d(t,"getNextValue",(function(){return g})),o.d(t,"findParentNode",(function(){return f})),o.d(t,"focusFirstControl",(function(){return m})),o.d(t,"getFirstNonTextElement",(function(){return y})),o.d(t,"getNodesFromKoComponentInfo",(function(){return b})),o.d(t,"propertyExists",(function(){return v})),o.d(t,"isPropertyVisible",(function(){return x})),o.d(t,"toggleHovered",(function(){return w})),o.d(t,"clearNewLines",(function(){return j})),o.d(t,"select",(function(){return C})),o.d(t,"copyObject",(function(){return S})),o.d(t,"copyCssClasses",(function(){return T})),o.d(t,"assignDefaultV2Classes",(function(){return P})),o.d(t,"wrapTextByCurlyBraces",(function(){return E})),o.d(t,"capitalize",(function(){return I})),o.d(t,"notShortCircuitAnd",(function(){return O})),o.d(t,"imageMimeTypes",(function(){return V})),o.d(t,"getAcceptedTypesByContentMode",(function(){return N})),o.d(t,"getQuestionFromObj",(function(){return k})),o.d(t,"scrollElementIntoView",(function(){return A})),o.d(t,"ingectAlpha",(function(){return _})),o.d(t,"convertRgbaToString",(function(){return L})),o.d(t,"parseRgbaFromString",(function(){return D})),o.d(t,"parseColor",(function(){return M})),o.d(t,"HSBToRGB",(function(){return R})),o.d(t,"RGBToHSB",(function(){return q})),o.d(t,"trimEmptyFields",(function(){return H})),o.d(t,"assign",(function(){return B})),o.d(t,"ColorCalculator",(function(){return Q})),o.d(t,"saveToFileHandler",(function(){return F})),o.d(t,"defaultPropertyGridDefinition",(function(){return Ge})),o.d(t,"SurveyQuestionEditorDefinition",(function(){return ze})),o.d(t,"ObjType",(function(){return X})),o.d(t,"SurveyHelper",(function(){return te})),o.d(t,"ResizeManager",(function(){return vo})),o.d(t,"UndoRedoPlugin",(function(){return ro})),o.d(t,"undoRedoTransaction",(function(){return no})),o.d(t,"ignoreUndoRedo",(function(){return io})),o.d(t,"UndoRedoManager",(function(){return Xt})),o.d(t,"Transaction",(function(){return $t})),o.d(t,"UndoRedoAction",(function(){return eo})),o.d(t,"UndoRedoArrayAction",(function(){return to})),o.d(t,"PagesController",(function(){return uo}));var r,n={survey:{edit:"Edit",externalHelpLink:"Watch and learn how to create surveys",externalHelpLinkUrl:"https://www.youtube.com/channel/UCH2ru9okIcooNZfpIbyq4qQ?view_as=subscriber",dropQuestion:"Please drop a question here from the Toolbox.",addLogicItem:"Create a rule to customize the flow of the survey.",copy:"Copy",duplicate:"Duplicate",addToToolbox:"Add to toolbox",deletePanel:"Delete Panel",deleteQuestion:"Delete Question",convertTo:"Convert to",drag:"Drag element",license:"To use our library, a <a href='https://surveyjs.io/licensing'>developer license</a> is required. If you have an active license, <a href='https://surveyjs.io/remove-alert-banner'>set up your license key</a> and ensure you're using the latest version."},tabs:{preview:"Preview",theme:"Themes",translation:"Translations",designer:"Designer",editor:"JSON Editor",logic:"Logic"},qt:{default:"Default",checkbox:"Checkboxes",comment:"Long Text",imagepicker:"Image Picker",ranking:"Ranking",image:"Image",dropdown:"Dropdown",tagbox:"Multi-Select Dropdown",file:"File Upload",html:"HTML",matrix:"Single-Select Matrix",matrixdropdown:"Multi-Select Matrix",matrixdynamic:"Dynamic Matrix",multipletext:"Multiple Textboxes",panel:"Panel",paneldynamic:"Dynamic Panel",radiogroup:"Radio Button Group",rating:"Rating Scale",text:"Single-Line Input",boolean:"Yes/No (Boolean)",expression:"Expression (read-only)",signaturepad:"Signature",buttongroup:"Button Group"},toolboxCategories:{general:"General",choice:"Choice Questions",text:"Text Input Questions",containers:"Containers",matrix:"Matrix Questions",misc:"Misc"},ed:{defaultLocale:"Default ({0})",survey:"Survey",settings:"Settings",settingsTooltip:"Open settings",surveySettings:"Survey Settings",surveySettingsTooltip:"Survey settings",themeSettings:"Theme Settings",themeSettingsTooltip:"Theme settings",showPanel:"Show Panel",hidePanel:"Hide Panel",prevSelected:"Select previous",nextSelected:"Select next",prevFocus:"Focus previous",nextFocus:"Focus next",surveyTypeName:"Survey",pageTypeName:"Page",panelTypeName:"Panel",questionTypeName:"Question",columnTypeName:"Column",addNewPage:"Add New Page",moveRight:"Scroll to the Right",moveLeft:"Scroll to the Left",deletePage:"Delete Page",editPage:"Edit Page",edit:"Edit",newPageName:"page",newQuestionName:"question",newPanelName:"panel",newTextItemName:"text",defaultV2Theme:"Default",modernTheme:"Modern",defaultTheme:"Default (legacy)",testSurveyAgain:"Preview Survey Again",testSurveyWidth:"Survey width: ",navigateToMsg:"You had to navigate to",saveSurvey:"Save Survey",saveSurveyTooltip:"Save Survey",saveTheme:"Save Theme",saveThemeTooltip:"Save Theme",jsonHideErrors:"Hide errors",jsonShowErrors:"Show errors",undo:"Undo",redo:"Redo",undoTooltip:"Undo last change",redoTooltip:"Redo the change",showMoreChoices:"Show more",showLessChoices:"Show less",copy:"Copy",cut:"Cut",paste:"Paste",copyTooltip:"Copy selection to clipboard",cutTooltip:"Cut selection to clipboard",pasteTooltip:"Paste from clipboard",options:"Options",generateValidJSON:"Generate Valid JSON",generateReadableJSON:"Generate Readable JSON",toolbox:"Toolbox","property-grid":"Properties",propertyGridFilteredTextPlaceholder:"Type to search...",propertyGridNoResultsFound:"No results found",correctJSON:"Please correct JSON.",surveyResults:"Survey Results ",surveyResultsTable:"As Table",surveyResultsJson:"As JSON",resultsTitle:"Question Title",resultsName:"Question Name",resultsValue:"Answer Value",resultsDisplayValue:"Display Value",modified:"Modified",saving:"Saving",saved:"Saved",propertyEditorError:"Error",saveError:"Error! Editor content is not saved.",translationPropertyGridTitle:"Language Settings",themePropertyGridTitle:"Theme Settings",translationLanguages:"Languages",translationDeleteLanguage:"Are you certain you wish to delete all strings for this language?",translationAddLanguage:"Select language to translate",translationShowAllStrings:"All Strings",translationShowUsedStringsOnly:"Used Strings Only",translationShowAllPages:"All Pages",translationNoStrings:"No strings to translate. Please change the filter.",translationExportToSCVButton:"Export to CSV",translationImportFromSCVButton:"Import from CSV",translateUsigAI:"Auto-translate All",translateUsigAIFrom:"Translate from: ",translationDialogTitle:"Untranslated strings",translationMergeLocaleWithDefault:"Merge {0} with default locale",translationPlaceHolder:"Translation...",translationSource:"Source: ",translationTarget:"Target: ",themeExportButton:"Export",themeImportButton:"Import",surveyJsonExportButton:"Export",surveyJsonImportButton:"Import",surveyJsonCopyButton:"Copy to clipboard",themeResetButton:"Reset theme settings to default",themeResetConfirmation:"Do you really want to reset the theme? All your customizations will be lost.",themeResetConfirmationOk:"Yes, reset the theme",bold:"Bold",italic:"Italic",underline:"Underline",addNewQuestion:"Add Question",selectPage:"Select page...",carryForwardChoicesCopied:"Choices are copied from",choicesLoadedFromWebText:"Choices are loaded from a web service.",choicesLoadedFromWebLinkText:"Go to settings",choicesLoadedFromWebPreviewTitle:"Preview of loaded choice options",htmlPlaceHolder:"HTML content will be here.",panelPlaceHolder:"Drop a question from the toolbox here.",surveyPlaceHolder:"The survey is empty. Drag an element from the toolbox or click the button below.",pagePlaceHolder:"The page is empty. Drag an element from the toolbox or click the button below.",imagePlaceHolder:"Drag and drop an image here or click the button below and choose an image to upload",surveyPlaceHolderMobile:'Click the "Add Question" button below to start creating your form.',pagePlaceHolderMobile:'Click the "Add Question" button below to add a new element to the page.',panelPlaceHolderMobile:'Click the "Add Question" button below to add a new element to the panel.',imagePlaceHolderMobile:"Click the button below and choose an image to upload",imageChooseImage:"Choose Image",addNewTypeQuestion:"Add {0}",chooseLogoPlaceholder:"[LOGO]",choices_Item:"Item ",selectFile:"Select a file",removeFile:"Remove the file",lg:{addNewItem:"Add New Rule",empty_tab:"Create a rule to customize the flow of the survey.",page_visibilityName:"Show/hide page",page_enableName:"Enable/disable page",page_requireName:"Make page required",panel_visibilityName:"Show/hide panel",panel_enableName:"Enable/disable panel",panel_requireName:"Make panel required",question_visibilityName:"Show/hide question",question_enableName:"Enable/disable question",question_requireName:"Make question required",question_resetValueName:"Reset question value",question_setValueName:"Set question value",column_visibilityName:"Show/hide column",column_enableName:"Enable/disable column",column_requireName:"Make column required",column_resetValueName:"Reset column value",column_setValueName:"Set column value",trigger_completeName:"Complete survey",trigger_setvalueName:"Set answer",trigger_copyvalueName:"Copy answer",trigger_skipName:"Skip to question",trigger_runExpressionName:"Run expression",completedHtmlOnConditionName:'Set "Thank You" page markup',page_visibilityDescription:"Make the page visible when the logical expression evaluates to true. Otherwise, keep the page invisible.",panel_visibilityDescription:"Make the page visible when the logical expression evaluates to true. Otherwise, keep the panel invisible.",panel_enableDescription:"Make the panel and all elements inside it enabled when the logical expression evaluates to true. Otherwise, keep them disabled.",question_visibilityDescription:"Make the question visible when the logical expression evaluates to true. Otherwise, keep the question invisible.",question_enableDescription:"Make the question enabled when the logical expression evaluates to true. Otherwise, keep the question disabled.",question_requireDescription:"Question becomes required when the logical expression evaluates to true.",trigger_completeDescription:'When the logical expression evaluates to true, the survey ends, and the respondent sees the "Thank you" page.',trigger_setvalueDescription:"When question values used in the logical expression are changed, and the expression evaluates to true, the specified value is assigned to the selected question.",trigger_copyvalueDescription:"When question values used in the logical expression are changed, and the expression evaluates to true, the value of the selected question is copied to another question.",trigger_skipDescription:"When the logical expression evaluates to true, the survey focuses/jumps to the selected question.",trigger_runExpressionDescription:"When the logical expression evaluates to true, the survey evaluates another expression. Optionally, the result of the latter expression can be assigned as a value to the selected question",completedHtmlOnConditionDescription:'If the logical expression evaluates to true, the "Thank You" page displays the specified content.',itemExpressionText:"When expression: '{0}' returns true",itemEmptyExpressionText:"New rule",page_visibilityText:"make page {0} visible",panel_visibilityText:"make panel {0} visible",panel_enableText:"make panel {0} enable",question_visibilityText:"make question {0} visible",question_enableText:"make question {0} enable",question_requireText:"make question {0} required",question_resetValueText:"reset value for question: {0}",question_setValueText:"assign value: {1} to question: {0}",column_visibilityText:"make column {0} of question {1} visible",column_enableText:"make column {0} of question {1} enable",column_requireText:"make column {0} of question {1} required",column_resetValueText:"reset cell value for column: {0}",column_setValueText:"assign cell value: {1} to column: {0}",setValueExpressionPlaceholder:"An expression whose result will be assigned to the target question.",trigger_completeText:"survey becomes completed",trigger_setvalueText:"set into question: {0} value {1}",trigger_setvalueEmptyText:"clear question value: {0}",trigger_copyvalueText:"copy into question: {0} value from question {1}",trigger_skipText:"survey skip to the question {0}",trigger_runExpressionText1:"run expression: '{0}'",trigger_runExpressionText2:" and set its result into question: {0}",completedHtmlOnConditionText:'show custom text for the "Thank You" page.',showAllQuestions:"All Questions",showAllActionTypes:"All Action Types",conditions:"Condition(s)",actions:"Action(s)",expressionEditorTitle:"Define condition(s)",actionsEditorTitle:"Define action(s)",deleteAction:"Delete Action",addNewAction:"Add Action",selectedActionCaption:"Select action...",expressionInvalid:"The logic expression is empty or invalid. Please correct it.",noActionError:"Please add at least one action.",actionInvalid:"Please fix issues in your action(s).",uncompletedRule_title:"Logical rules are incomplete",uncompletedRule_text:"You have not completed some of the logical rules. If you leave the tab now, the changes will be lost. Do you still want to leave the tab without completing the changes?",uncompletedRule_apply:"Yes",uncompletedRule_cancel:"No, I want to complete the rules"}},pe:{panel:{name:"Panel name",title:"Panel title",description:"Panel description",visibleIf:"Make the panel visible if",requiredIf:"Make the panel required if",questionsOrder:"Question order within the panel",page:"Move the panel to page",startWithNewLine:"Display the panel on a new line",state:"Panel collapse state",width:"Inline panel width",minWidth:"Minimum panel width",maxWidth:"Maximum panel width",showNumber:"Number panels"},paneldynamic:{name:"Panel name",title:"Panel title",description:"Panel description",visibleIf:"Make the panel visible if",requiredIf:"Make the panel required if",page:"Move the panel to page",startWithNewLine:"Display the panel on a new line",state:"Panel collapse state",width:"Inline panel width",minWidth:"Minimum panel width",maxWidth:"Maximum panel width",confirmDelete:"Confirm panel deletion",templateDescription:"Panel description pattern",templateTitle:"Panel title pattern",noEntriesText:"Empty panel text",templateTabTitle:"Tab title pattern",templateVisibleIf:"Make an individual panel visible if",hideNumber:"Hide the panel number",titleLocation:"Panel title alignment",descriptionLocation:"Panel description alignment",templateTitleLocation:"Question title alignment",templateErrorLocation:"Error message alignment",newPanelPosition:"New panel location",keyName:"Prevent duplicate responses in the following question"},question:{name:"Question name",title:"Question title",description:"Question description",visibleIf:"Make the question visible if",requiredIf:"Make the question required if",page:"Move the question to page",state:"Question box collapse state",hideNumber:"Hide the question number",titleLocation:"Question title alignment",descriptionLocation:"Question description alignment",errorLocation:"Error message alignment",indent:"Increase the inner indent",width:"Inline question width",minWidth:"Minimum question width",maxWidth:"Maximum question width",textUpdateMode:"Update input field value"},signaturepad:{signatureWidth:"Signature area width",signatureHeight:"Signature area height",signatureAutoScaleEnabled:"Auto-scale the signature area",showPlaceholder:"Show a placeholder within signature area",placeholder:"Placeholder text",placeholderReadOnly:"Placeholder text in read-only or preview mode",allowClear:"Show the Clear button within signature area",penMinWidth:"Minimum stroke width",penMaxWidth:"Maximum stroke width",penColor:"Stroke color"},comment:{rows:"Input field height (in lines)"},showQuestionNumbers:"Question numbering",questionStartIndex:"Question indexing type",expression:{name:"Expression name",title:"Expression title",description:"Expression description",expression:"Expression"},trigger:{expression:"Expression"},calculatedvalue:{expression:"Expression"},survey:{title:"Survey title",description:"Survey description"},page:{name:"Page name",title:"Page title",description:"Page description",visibleIf:"Make the page visible if",requiredIf:"Make the page required if",maxTimeToFinish:"Time limit to complete the page",questionsOrder:"Question order on the page"},matrixdropdowncolumn:{name:"Column name",title:"Column title",isUnique:"Prevent duplicate responses",width:"Column width",minWidth:"Minimum column width",rows:"Input field height (in lines)",visibleIf:"Make the column visible if",requiredIf:"Make the column required if",showInMultipleColumns:"Each option in a separate column"},multipletextitem:{name:"Name",title:"Title"},masksettings:{saveMaskedValue:"Save masked value in survey results"},patternmask:{pattern:"Value pattern"},datetimemask:{min:"Minimum value",max:"Maximum value"},numericmask:{allowNegativeValues:"Allow negative values",thousandsSeparator:"Thousands separator",decimalSeparator:"Decimal separator",precision:"Value precision",min:"Minimum value",max:"Maximum value"},currencymask:{prefix:"Currency prefix",suffix:"Currency suffix"},imageHeight:"Display area height",imageWidth:"Display area width",valueName:"Join identifier",rateDescriptionLocation:"Label alignment",size:"Input field width (in characters)",cellErrorLocation:"Cell error message alignment",apply:"Apply",ok:"OK",save:"Save",clear:"Clear",saveTooltip:"Save",cancel:"Cancel",set:"Set",reset:"Reset",change:"Change",refresh:"Refresh",close:"Close",delete:"Delete",add:"Add",addNew:"Add New",addItem:"Click to add an item...",removeItem:"Click to remove the item...",dragItem:"Drag the item",addOther:"Other",addSelectAll:"Select All",addNone:"None",removeAll:"Remove All",edit:"Edit",back:"Return without saving",backTooltip:"Return without saving",saveAndBack:"Save and return",saveAndBackTooltip:"Save and return",doneEditing:"Done",editChoices:"Edit Choices",showChoices:"Show Choices",move:"Move",empty:"<empty>",emptyValue:"Value is empty",fastEntry:"Manual Entry",fastEntryNonUniqueError:"Value '{0}' is not unique",fastEntryChoicesCountError:"Please limit the number of items from {0} to {1}",fastEntryChoicesMinCountError:"Please enter at least {0} items",fastEntryPlaceholder:"Enter the list of choice options and their IDs in the following format:\n\nid|option\n\nA choice option ID is not visible to respondents and can be used in conditional rules.",formEntry:"Form Entry",testService:"Test the service",itemSelectorEmpty:"Please select the element",conditionActionEmpty:"Please select the action",conditionSelectQuestion:"Select a question...",conditionSelectPage:"Select a page...",conditionSelectPanel:"Select a panel...",conditionValueQuestionTitle:"Please enter/select the value",aceEditorHelp:"Press ctrl+space to get expression completion hint",aceEditorRowTitle:"Current row",aceEditorPanelTitle:"Current panel",showMore:"For more details please check the documentation",assistantTitle:"Available questions",cellsEmptyRowsColumns:"There is should be at least one column or row",showPreviewBeforeComplete:"Review before submit",overridingPropertyPrefix:"Enabled by a condition",resetToDefaultCaption:"Reset",propertyIsEmpty:"Please enter a value",propertyIsNoUnique:"Please enter a unique value",propertyNameIsNotUnique:"Please enter a unique name",propertyNameIsIncorrect:'Do not use reserved words: "item", "choice", "panel", "row".',listIsEmpty:"You don't have any items yet","listIsEmpty@choices":"You don't have any choices yet","listIsEmpty@columns":"You don't have any columns yet","listIsEmpty@rows":"You don't have any rows yet","listIsEmpty@validators":"You don't have any validation rules yet","listIsEmpty@calculatedValues":"You don't have any custom variables yet","listIsEmpty@triggers":"You don't have any triggers yet","listIsEmpty@navigateToUrlOnCondition":"You don't have any links yet","addNew@choices":"Add new choice","addNew@columns":"Add new column","addNew@rows":"Add new row","addNew@validators":"Add new rule","addNew@calculatedValues":"Add new variable","addNew@triggers":"Add new trigger","addNew@navigateToUrlOnCondition":"Add new URL",expressionIsEmpty:"Expression is empty",value:"Value",text:"Text",rowid:"Row ID",imageLink:"Image or video file URL",columnEdit:"Edit column: {0}",itemEdit:"Edit item: {0}",url:"URL",path:"Path to data",choicesbyurl:{url:"Web service URL",valueName:"Get value to store from the following property"},titleName:"Get value to display from the following property",imageLinkName:"Get file URLs from the following property",allowEmptyResponse:"Accept empty response",titlePlaceholder:"Title",surveyTitlePlaceholder:"Survey Title",pageTitlePlaceholder:"Page {num}",descriptionPlaceholder:"Description",surveyDescriptionPlaceholder:"Description",pageDescriptionPlaceholder:"Description",textWrapEnabled:"Wrap choices",showOtherItem:'Enable the "Other" option',otherText:'Rename the "Other" option',showNoneItem:'Enable the "None" option',showRefuseItem:'Enable the "Refuse to Answer" option',showDontKnowItem:'Enable the "Don\'t Know" option',noneText:'Rename the "None" option',showSelectAllItem:'Enable the "Select All" option',selectAllText:'Rename the "Select All" option',choicesMin:"Minimum value for auto-generated items",choicesMax:"Maximum value for auto-generated items",choicesStep:"Step value for auto-generated items",name:"Name",title:"Title",cellType:"Cell input type",colCount:"Column count",choicesOrder:"Choice order",visible:"Visible",isRequired:"Required",markRequired:"Mark as required",removeRequiredMark:"Remove the required mark",isAllRowRequired:"Require an answer in each row",eachRowUnique:"Prevent duplicate responses in rows",requiredErrorText:"Error message for required questions",startWithNewLine:"Display the question on a new line",rows:"Rows",cols:"Columns",placeholder:"Placeholder text within input field",showPreview:"Show preview area",storeDataAsText:"Store file content in JSON result as text",maxSize:"Maximum file size (in bytes)",rowCount:"Row count",columnLayout:"Columns layout",addRowLocation:'"Add Row" button alignment',transposeData:"Transpose rows to columns",addRowText:'"Add Row" button text',removeRowText:'"Remove Row" button text',rateMin:"Minimum rating value",rateMax:"Maximum rating value",rateStep:"Step value",minRateDescription:"Minimum value label",maxRateDescription:"Maximum value label",inputType:"Input type",optionsCaption:"Option placeholder",defaultValue:"Default Answer",cellsDefaultRow:"Default texts",surveyEditorTitle:"Edit survey settings",qEditorTitle:"Edit: {0}",maxLength:"Maximum character limit",buildExpression:"Build",editExpression:"Edit",and:"and",or:"or",remove:"Remove",addCondition:"Add Condition",emptyLogicPopupMessage:"Select a question to start configuring conditions.",if:"If",then:"then",setToName:"Target question",fromName:"Question to copy answer from",gotoName:"Question to skip to",ruleIsNotSet:"Rule is incorrect",includeIntoResult:"Add to the survey results",showTitle:"Make the title and description visible",expandCollapseTitle:"Expand/collapse title",locale:"Select a survey language",simulator:"Select device type",landscapeOrientation:"Switch to landscape orientation",portraitOrientation:"Switch to portrait orientation",mode:"Survey display mode",clearInvisibleValues:"Clear hidden question values",cookieName:"Limit to one response",sendResultOnPageNext:"Auto-save survey progress on page change",storeOthersAsComment:'Save the "Other" option value as a separate property',showPageTitles:"Show page titles",showPageNumbers:"Show page numbers",pagePrevText:'"Previous Page" button text',pageNextText:'"Next Page" button text',completeText:'"Complete Survey" button text',previewText:'"Review Answers" button text',editText:'"Edit Answer" button text',startSurveyText:'"Start Survey" button text',showNavigationButtons:"Show/hide navigation buttons",showPrevButton:'Show the "Previous Page" button',firstPageIsStarted:"First page is a start page",showCompletedPage:'Show the "Thank You" page',goNextPageAutomatic:"Auto-advance to the next page",allowCompleteSurveyAutomatic:"Complete the survey automatically",showProgressBar:"Progress bar alignment",questionTitleLocation:"Question title alignment",requiredText:"Required symbol(s)",questionTitleTemplate:"Question title template, default is: '{no}. {require} {title}'",questionErrorLocation:"Error message alignment",focusFirstQuestionAutomatic:"Focus first question on a new page",questionsOrder:"Question order",maxTimeToFinish:"Time limit to complete the survey",maxTimeToFinishPage:"Time limit to complete one page",showTimerPanel:"Timer alignment",showTimerPanelMode:"Timer mode",renderMode:"Panel display mode",allowAddPanel:"Enable panel addition",allowRemovePanel:"Enable panel removal",panelAddText:'"Add Panel" button text',panelRemoveText:'"Remove Panel" button text',isSinglePage:"Show all elements on one page",html:"HTML markup",setValue:"Answer",dataFormat:"Storage format",allowAddRows:"Enable row addition",allowRemoveRows:"Enable row removal",allowRowsDragAndDrop:"Enable row reordering",responsiveImageSizeHelp:"Does not apply if you specify the exact display area width or height.",minImageWidth:"Minimum display area width",maxImageWidth:"Maximum display area width",minImageHeight:"Minimum display area height",maxImageHeight:"Maximum display area height",minValue:"Minimum value",maxValue:"Maximum value",minLength:"Minimum length (in characters)",allowDigits:"Allow digits",minCount:"Minimum count",maxCount:"Maximum count",regex:"Regular expression",surveyvalidator:{text:"Error message",expression:"Validation expression"},totalText:"Total row header",totalType:"Aggregation method",totalExpression:"Total value expression",totalDisplayStyle:"Total value display format",totalCurrency:"Currency",totalFormat:"Formatted string",logo:"Survey logo",questionsOnPageMode:"Survey layout",maxTextLength:"Restrict answer length",maxOthersLength:"Restrict comment length",autoGrowComment:"Auto-expand text areas",allowResizeComment:"Allow users to resize text areas",textUpdateMode:"Update input field values",maskType:"Input mask type",maskTypes:{none:"None",patternmask:"Pattern",numericmask:"Numeric",datetimemask:"Date and Time",currencymask:"Currency"},focusOnFirstError:"Set focus on the first invalid answer",checkErrorsMode:"Run validation",navigateToUrl:"Redirect to an external link after submission",navigateToUrlOnCondition:"Dynamic external link",completedBeforeHtml:"Markup to show if the user already filled out this survey",completedHtml:'"Thank You" page markup',completedHtmlOnCondition:'Dynamic "Thank You" page markup',loadingHtml:"Markup to show while survey model is loading",commentText:"Comment area text",autocomplete:"Autocomplete type",labelTrue:'Label for "True"',labelFalse:'Label for "False"',allowClear:"Show the Clear button",searchMode:"Search Mode",displayStyle:"Display format",format:"Formatted string",maximumFractionDigits:"Maximum fractional digits",minimumFractionDigits:"Minimum fractional digits",useGrouping:"Display grouping separators",allowMultiple:"Enable multiple file upload",allowImagesPreview:"Preview uploaded images",acceptedTypes:"Accepted file types",waitForUpload:"Wait for upload to complete",needConfirmRemoveFile:"Confirm file deletion",detailPanelMode:"Row expansion alignment",minRowCount:"Minimum row count",maxRowCount:"Maximum row count",confirmDelete:"Confirm row deletion",confirmDeleteText:"Confirmation message",panelCount:"Initial panel count",minPanelCount:"Minimum panel count",maxPanelCount:"Maximum panel count",panelsState:"Inner panel collapse state",panelPrevText:'"Previous Panel" button text',panelNextText:'"Next Panel" button text',showRangeInProgress:"Show the progress bar",panelRemoveButtonLocation:'"Remove Panel" button alignment',hideIfRowsEmpty:"Hide the question if it has no rows",hideColumnsIfEmpty:"Hide columns if there are no rows",rateValues:"Custom rating values",rateCount:"Rating count",autoGenerate:"Rating configuration",hideIfChoicesEmpty:"Hide the question if it has no choices",minWidth:"Minimum width",maxWidth:"Maximum width",width:"Width",showHeader:"Show column headers",horizontalScroll:"Show horizontal scrollbar",columnMinWidth:"Minimum column width",rowTitleWidth:"Row header width",valueTrue:'Value to store when "True" is selected',valueFalse:'Value to store when "False" is selected',minErrorText:'"Value is below minimum" error message',maxErrorText:'"Value exceeds maximum" error message',otherErrorText:'"Empty comment" error message',keyDuplicationError:"Error message for duplicate responses",minSelectedChoices:"Minimum choices to select",maxSelectedChoices:"Maximum choices to select",showClearButton:"Show the Clear button",logoWidth:"Logo width",logoHeight:"Logo height",readOnly:"Read-only",enableIf:"Disable the read-only mode if",emptyRowsText:'"No rows" message',separateSpecialChoices:"Separate special choices",choicesFromQuestion:"Copy choices from the following question",choicesFromQuestionMode:"Which choice options to copy",progressBarShowPageTitles:"Display page titles in progress bar",progressBarShowPageNumbers:"Display page numbers in progress bar",showCommentArea:"Add a comment box",commentPlaceholder:"Placeholder text for the comment box",displayRateDescriptionsAsExtremeItems:"Show the labels as extreme values",rowsOrder:"Row order",columnsLayout:"Column layout",columnColCount:"Nested column count",correctAnswer:"Correct Answer",defaultPanelValue:"Default Values",cells:"Cell Texts",keyName:"Prevent duplicate responses in the following column",itemvalue:{visibleIf:"Make the option visible if",enableIf:"Make the option selectable if"},"itemvalue@rows":{visibleIf:"Make the row visible if",enableIf:"Make the row editable if"},imageitemvalue:{text:"Alt text"},logoPosition:"Logo position",addLogo:"Add logo...",changeLogo:"Change logo...",logoPositions:{none:"Remove logo",left:"Left",right:"Right",top:"On the top",bottom:"In the bottom"},tabs:{panel:{layout:"Panel Layout"},general:"General",fileOptions:"Options",html:"HTML Editor",columns:"Columns",rows:"Rows",choices:"Choice Options",items:"Items",visibleIf:"Visible If",enableIf:"Editable If",requiredIf:"Required If",rateValues:"Rating Values",choicesByUrl:"Choices from a Web Service",matrixChoices:"Default Choices",multipleTextItems:"Text Inputs",numbering:"Numbering",validators:"Validators",navigation:"Navigation",question:"Question Settings",pages:"Pages",timer:"Quiz Mode",calculatedValues:"Calculated Values",triggers:"Triggers",templateTitle:"Title template",totals:"Totals",logic:"Conditions",mask:"Input Mask Settings",layout:{panel:"Panel Layout",question:"Layout",base:"Layout"},data:"Data",validation:"Validation",cells:"Individual Cell Texts",showOnCompleted:'"Thank You" Page',logo:"Logo in the Survey Header",slider:"Slider",expression:"Expression",questionSettings:"Question Settings",header:"Header",background:"Background",appearance:"Appearance",others:"Others"},editProperty:"Edit property '{0}'",items:"Items",choicesVisibleIf:"Make choices visible if",choicesEnableIf:"Make choices selectable if",columnsEnableIf:"Make columns visible if",rowsEnableIf:"Make rows visible if",innerIndent:"Increase the inner indent",defaultValueFromLastRow:"Use answers from the last row as default",defaultValueFromLastPanel:"Use answers from the last panel as default",enterNewValue:"Please enter a value.",noquestions:"There are no questions in the survey.",createtrigger:"Please create a trigger",titleKeyboardAdornerTip:"Press enter button to edit",keyboardAdornerTip:"Press enter button to edit item, press delete button to delete item, press alt plus arrow up or arrow down to move item",triggerOn:"On ",triggerMakePagesVisible:"Make pages visible",triggerMakeQuestionsVisible:"Make elements visible",triggerCompleteText:"Complete the survey if successful.",triggerNotSet:"The trigger is not set",triggerRunIf:"Run if",triggerSetToName:"Change value of: ",triggerFromName:"Copy value from: ",triggerRunExpression:"Run this Expression",triggerSetValue:"to: ",triggerGotoName:"Go to the question",triggerIsVariable:"Do not put the variable into the survey result.",triggerRunExpressionEmpty:"Please enter a valid expression",emptyExpressionPlaceHolder:"Type expression here...",noFile:"No file chosen",clearIfInvisible:"Clear hidden question values",valuePropertyName:"Store values in the following property",searchEnabled:"Enable search-as-you-type",hideSelectedItems:"Hide selected items",closeOnSelect:"Collapse the dropdown upon selection",verticalAlign:"Vertical alignment within cells",alternateRows:"Alternate row colors",columnsVisibleIf:"Make columns visible if",rowsVisibleIf:"Make rows visible if",otherPlaceholder:"Placeholder text for the comment box",filePlaceholder:"Placeholder text for Local file",photoPlaceholder:"Placeholder text for Camera",fileOrPhotoPlaceholder:"Placeholder text for Local file or Camera",rateType:"Rating icon",url_placeholder:"Ex.: https://api.example.com/books",path_placeholder:"Ex.: categories.fiction",questionStartIndex_placeholder:"Ex.: a)",width_placeholder:"Ex.: 6in",minWidth_placeholder:"Ex.: 600px",maxWidth_placeholder:"Ex.: 50%",imageHeight_placeholder:"auto",imageWidth_placeholder:"auto",theme:{themeName:"Theme",isPanelless:"Question appearance",editorPanel:"Background and corner radius",questionPanel:"Background and corner radius",primaryColor:"Accent color",panelBackgroundTransparency:"Panel background opacity",questionBackgroundTransparency:"Question background opacity",fontSize:"Font size",scale:"Scale",cornerRadius:"Corner radius",pageTitle:"Title font",pageDescription:"Description font",questionTitle:"Title font",questionDescription:"Description font",editorFont:"Font",backgroundOpacity:"Opacity","--sjs-font-family":"Font family","--sjs-general-backcolor-dim":"Background color","--sjs-primary-backcolor":"Accent background","--sjs-primary-forecolor":"Accent foreground","--sjs-shadow-small":"Shadow effects","--sjs-shadow-inner":"Shadow effects","--sjs-border-default":"Colors"},"header@header":{headerView:"View",logoPosition:"Logo position",surveyTitle:"Survey title font",surveyDescription:"Survey description font",headerTitle:"Survey title font",headerDescription:"Survey description font",inheritWidthFrom:"Content area width",textAreaWidth:"Text width",backgroundColorSwitch:"Background color",backgroundImage:"Background image",backgroundImageOpacity:"Opacity",overlapEnabled:"Overlap",logoPositionX:"Logo position",titlePositionX:"Title position",descriptionPositionX:"Description position"}},pv:{true:"true",false:"false",file:"Local file",camera:"Camera","file-camera":"Local file or Camera",inherit:"Inherit",show:"Visible",hide:"Hidden",default:"Inherit",initial:"Initial",random:"Random",collapsed:"Collapsed",expanded:"Expanded",none:"None",asc:"Ascending",desc:"Descending",indeterminate:"Indeterminate",selected:"Selected",unselected:"Unselected",decimal:"decimal",currency:"currency",percent:"percent",firstExpanded:"First panel is expanded",off:"Hide question numbers",list:"List",progressTop:"Panel navigator + Progress bar at the top",progressBottom:"Panel navigator + Progress bar at the bottom",progressTopBottom:"Panel navigator + Progress bar at the top and bottom",tab:"Tabs",horizontal:"Horizontal",vertical:"Vertical",top:"Top",bottom:"Bottom",topBottom:"Top and bottom",both:"Both",left:"Left",right:"Right",center:"Center",leftRight:"Left and right",middle:"Middle",color:"color",date:"date",datetime:"datetime","datetime-local":"datetime-local",email:"email",month:"month",number:"number",password:"password",range:"range",tel:"tel",text:"text",time:"time",url:"url",week:"week",hidden:"Hidden",edit:"Editable",display:"Read-only",contain:"Contain",cover:"Cover",fill:"Fill",next:"Next",last:"Last",onComplete:"Upon survey completion",onHidden:"When question gets hidden",onHiddenContainer:"When question or its panel/page gets hidden",clearInvisibleValues:{none:"Never"},clearIfInvisible:{none:"Never"},inputType:{color:"Color",date:"Date","datetime-local":"Date and Time",email:"Email",month:"Month",number:"Number",password:"Password",range:"Range",tel:"Phone Number",text:"Text",time:"Time",url:"URL",week:"Week"},all:"All",page:"Page",survey:"Survey",onNextPage:"When switching to the next page",onValueChanged:"After an answer is changed",onValueChanging:"Before an answer is changed",questionsOnPageMode:{standard:"Original structure",singlePage:"Show all questions on one page",questionPerPage:"Show single question per page"},noPreview:"No preview",showAllQuestions:"Show all questions",showAnsweredQuestions:"Show answered questions only",pages:"Completed pages",questions:"Answered questions",requiredQuestions:"Answered required questions",correctQuestions:"Valid answers",buttons:"Completed pages (button UI)",underInput:"Under the input field",underTitle:"Under the question title",onBlur:"On lost focus",onTyping:"While typing",underRow:"Under the row",underRowSingle:"Under the row, display one row expansion only",auto:"Auto",showNavigationButtons:{none:"Hidden"},showTimerPanel:{none:"Hidden"},showTimerPanelMode:{all:"Both"},addRowLocation:{default:"Based on matrix layout"},panelsState:{default:"Locked",collapsed:"Collapse all",expanded:"Expand all",firstExpanded:"First expanded"},widthMode:{static:"Static",responsive:"Responsive"},contentMode:{image:"Image",video:"Video",youtube:"YouTube"},displayMode:{buttons:"Buttons",dropdown:"Dropdown"},rateColorMode:{default:"Default",scale:"Scale"},scaleColorMode:{monochrome:"Monochrome",colored:"Colored"},autoGenerate:{true:"Auto-generate",false:"Manual"},rateType:{labels:"Labels",stars:"Stars",smileys:"Smileys"},state:{default:"Locked"},showQuestionNumbers:{default:"Auto-numbering",on:"Auto-numbering",onPage:"Reset on each page",onpanel:"Reset on each panel",onPanel:"Reset on each panel",onSurvey:"Continue across the survey",off:"No numbering"},descriptionLocation:{underTitle:"Under the question title",underInput:"Under the input field"},selectToRankAreasLayout:{horizontal:"Next to choices",vertical:"Above choices"},displayStyle:{decimal:"Decimal",currency:"Currency",percent:"Percentage",date:"Date"},totalDisplayStyle:{decimal:"Decimal",currency:"Currency",percent:"Percentage",date:"Date"},rowsOrder:{initial:"Original"},questionsOrder:{initial:"Original"},showProgressBar:{off:"Hidden",topbottom:"Top and bottom",aboveheader:"Above the header",belowheader:"Below the header"},sum:"Sum",count:"Count",min:"Min",max:"Max",avg:"Avg",searchMode:{contains:"Contains",startsWith:"Starts with"},backgroundImageFit:{auto:"Auto",cover:"Cover",contain:"Contain",fill:"Stretch",tile:"Tile"},backgroundImageAttachment:{fixed:"Fixed",scroll:"Scroll"},headerView:{basic:"Basic",advanced:"Advanced"},inheritWidthFrom:{survey:"Same as survey",container:"Fit to container"},backgroundColorSwitch:{none:"None",accentColor:"Accent color",custom:"Custom"},colorPalette:{light:"Light",dark:"Dark"},isPanelless:{false:"Default",true:"Without Panels"}},op:{empty:"Empty",notempty:"Not empty",equal:"Equals",notequal:"Does not equal",contains:"Contains",notcontains:"Does not contain",anyof:"Any of",allof:"All of",greater:"Greater than",less:"Less than",greaterorequal:"Greater than or equal to",lessorequal:"Less than or equal to",and:"and",or:"or"},ew:{angular:"Use Angular version",jquery:"Use jQuery version",knockout:"Use Knockout version",react:"Use React version",vue:"Use Vue version",bootstrap:"For bootstrap framework",modern:"Modern theme",default:"Default theme",orange:"Orange theme",darkblue:"Darkblue theme",darkrose:"Darkrose theme",stone:"Stone theme",winter:"Winter theme",winterstone:"Winter-Stone theme",showOnPage:"Show survey on a page",showInWindow:"Show survey in a window",loadFromServer:"Load Survey JSON from server",titleScript:"Scripts and styles",titleHtml:"HTML",titleJavaScript:"JavaScript"},ts:{selectPage:"Select the page to test it",showInvisibleElements:"Show invisible elements",hideInvisibleElements:"Hide invisible elements"},validators:{answercountvalidator:"Answer count",emailvalidator:"Email",expressionvalidator:"Expression",numericvalidator:"Number",regexvalidator:"Regex",textvalidator:"Text"},triggers:{completetrigger:"Complete survey",setvaluetrigger:"Set answer",copyvaluetrigger:"Copy answer",skiptrigger:"Skip to question",runexpressiontrigger:"Run expression",visibletrigger:"change visibility (deprecated)"},peplaceholder:{patternmask:{pattern:"Ex.: +1(999)-999-99-99"},datetimemask:{pattern:"Ex.: mm/dd/yyyy HH:MM:ss"},currencymask:{prefix:"Ex.: $",suffix:"Ex.: USD"}},pehelp:{panel:{name:"A panel ID that is not visible to respondents.",description:"Type a panel subtitle.",visibleIf:"Use the magic wand icon to set a conditional rule that determines panel visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the panel.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey submission unless at least one nested question has an answer.",questionTitleLocation:'Applies to all questions within this panel. If you want to override this setting, define title alignment rules for individual questions. The "Inherit" option applies the page-level (if set) or survey-level setting ("Top" by default).',questionErrorLocation:'Sets the location of an error message in relation to all questions within the panel. The "Inherit" option applies the page-level (if set) or survey-level setting.',questionsOrder:'Keeps the original order of questions or randomizes them. The "Inherit" option applies the page-level (if set) or survey-level setting.',page:"Repositions the panel to the end of a selected page.",innerIndent:"Adds space or margin between the panel content and the left border of the panel box.",startWithNewLine:"Unselect to display the panel in one line with the previous question or panel. The setting doesn't apply if the panel is the first element in your form.",state:'Choose from: "Expanded" - the panel is displayed in full and can be collapsed; "Collapsed" - the panel displays only the title and description and can be expanded; "Locked" - the panel is displayed in full and cannot be collapsed.',width:"Sets the width of the panel in proportion to other survey elements in the same line. Accepts CSS values (px, %, in, pt, etc.)."},paneldynamic:{name:"A panel ID that is not visible to respondents.",description:"Type a panel subtitle.",visibleIf:"Use the magic wand icon to set a conditional rule that determines panel visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the panel.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey submission unless at least one nested question has an answer.",templateTitleLocation:'Applies to all questions within this panel. If you want to override this setting, define title alignment rules for individual questions. The "Inherit" option applies the page-level (if set) or survey-level setting ("Top" by default).',templateErrorLocation:'Sets the location of an error message in relation to a question with invalid input. Choose between: "Top" - an error text is placed at the top of the question box; "Bottom" - an error text is placed at the bottom of the question box. The "Inherit" option applies the page-level (if set) or survey-level setting ("Top" by default).',errorLocation:'Sets the location of an error message in relation to all questions within the panel. The "Inherit" option applies the page-level (if set) or survey-level setting.',page:"Repositions the panel to the end of a selected page.",innerIndent:"Adds space or margin between the panel content and the left border of the panel box.",startWithNewLine:"Unselect to display the panel in one line with the previous question or panel. The setting doesn't apply if the panel is the first element in your form.",state:'Choose from: "Expanded" - the panel is displayed in full and can be collapsed; "Collapsed" - the panel displays only the title and description and can be expanded; "Locked" - the panel is displayed in full and cannot be collapsed.',width:"Sets the width of the panel in proportion to other survey elements in the same line. Accepts CSS values (px, %, in, pt, etc.).",templateTitle:"Type in a template for dynamic panel titles. Use {panelIndex} for the panel's general position and {visiblePanelIndex} for its order among visible panels. Insert these placeholders into the pattern to add automatic numbering.",templateTabTitle:"Type in a template for tab titles. Use {panelIndex} for a panel's general position and {visiblePanelIndex} for its order among visible panels. Insert these placeholders into the pattern to add automatic numbering.",templateVisibleIf:"This setting allows you to control the visibility of individual panels within the dynamic panel. Use the `{panel}` placeholder to reference the current panel in your expression.",titleLocation:'This setting is automatically inherited by all questions within this panel. If you want to override this setting, define title alignment rules for individual questions. The "Inherit" option applies the page-level (if set) or survey-level setting ("Top" by default).',descriptionLocation:'The "Inherit" option applies the page-level (if set) or survey-level setting ("Under the panel title" by default).',newPanelPosition:'Defines the position of a newly added panel. By default, new panels are added to the end. Select "Next" to insert a new panel after the current one.',defaultValueFromLastPanel:"Duplicates answers from the last panel and assigns them to the next added dynamic panel.",keyName:"Reference a question name to require a user to provide a unique response for this question in each panel."},defaultValueExpression:"This setting allows you to assign a default answer value based on an expression. The expression can include basic calculations - `{q1_id} + {q2_id}`, Boolean expressions, such as `{age} > 60`, and functions: `iif()`, `today()`, `age()`, `min()`, `max()`, `avg()`, etc. The value determined by this expression serves as the initial default value that can be overridden by a respondent's manual input.",resetValueIf:'Use the magic wand icon to set a conditional rule that determines when a respondent\'s input is reset to the value based on the "Default value expression" or "Set value expression" or to the "Default answer" value (if either is set).',setValueIf:'Use the magic wand icon to set a conditional rule that determines when to run the "Set value expression" and dynamically assign the resulting value as a response.',setValueExpression:'Specify an expression that defines the value to be set when the conditions in the "Set value if" rule are met. The expression can include basic calculations - `{q1_id} + {q2_id}`, Boolean expressions, such as `{age} > 60`, and functions: `iif()`, `today()`, `age()`, `min()`, `max()`, `avg()`, etc. The value determined by this expression can be overridden by a respondent\'s manual input.',question:{name:"A question ID that is not visible to respondents.",description:"Type a question subtitle.",visibleIf:"Use the magic wand icon to set a conditional rule that determines question visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the question.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey advancing or submission unless the question received an answer.",startWithNewLine:"Unselect to display the question in one line with the previous question or panel. The setting doesn't apply if the question is the first element in your form.",page:"Repositions the question to the end of a selected page.",state:'Choose from: "Expanded" - the question box is displayed in full and can be collapsed; "Collapsed" - the question box displays only the title and description and can be expanded; "Locked" - the question box is displayed in full and cannot be collapsed.',titleLocation:'Overrides title alignment rules defined on a panel, page or survey level. The "Inherit" option applies any higher-level settings (if set) or survey-level setting ("Top" by default).',descriptionLocation:'The "Inherit" option applies the survey-level setting ("Under the question title" by default).',errorLocation:'Sets the location of an error message in relation to the question with invalid input. Choose between: "Top" - an error text is placed at the top of the question box; "Bottom" - an error text is placed at the bottom of the question box. The "Inherit" option applies the survey-level setting ("Top" by default).',indent:"Adds space or margin between the question content and the left border of the question box.",width:"Sets the width of the question in proportion to other survey elements in the same line. Accepts CSS values (px, %, in, pt, etc.).",surveyvalidator:{expression:"Use the magic wand icon to set a validation rule for the question."},textUpdateMode:'Choose from: "On lost focus" - the value is updated when the input field loses focus; "While typing" - the value is updated in real-time, as users are typing. The "Inherit" option applies the survey-level setting ("On lost focus" by default).',url:"You can use any web service as a data source for multiple-choice questions. To populate choice values, enter the URL of the service providing the data.",searchMode:"A comparison operation used to filter the drop-down list.",textWrapEnabled:"Long texts in choice options will automatically generate line breaks to fit within the drop-down menu. Unselect if you want the texts to clip."},signaturepad:{signatureWidth:"Sets the width of the displayed signature area and the resulting image.",signatureHeight:"Sets the height of the displayed signature area and the resulting image.",signatureAutoScaleEnabled:"Select if you want the signature area to fill all available space within the question box while maintaining the default 3:2 aspect ratio. When custom width and height values are set, the setting will keep the aspect ratio of these dimensions."},file:{imageHeight:"Adjusts the height of the image in the survey results.",imageWidth:"Adjusts the width of the image in the survey results."},image:{contentMode:'The "Auto" option automatically determines the suitable mode for display - Image, Video, or YouTube - based on the source URL provided.'},imagepicker:{imageHeight:"Overrides the minimum and maximum height values.",imageWidth:"Overrides the minimum and maximum width values.",choices:'"Value" serves as an item ID used in conditional rules; "Text" is displayed to respondents.',contentMode:'Choose between "Image" and "Video" to set the content mode of the media selector. If "Image" is selected, ensure that all options provided are image files in the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO. Similarly, if "Video" is selected, ensure that all options are direct links to video files in the following formats: MP4, MOV, WMV, FLV, AVI, MKV. Please note that YouTube links are not supported for video options.'},text:{size:"This setting only resizes the input field and doesn't affect the width of the question box. To limit the accepted input length, go to <b>Validation → Maximum character limit</b>."},comment:{rows:"Sets the number of displayed lines in the input field. If the input takes up more lines, the scroll bar will appear."},survey:{mode:'Choose between: "Editable" - enables respondents to fill out your survey; "Read-only" - disables form editing.'},matrixdropdowncolumn:{name:"A column ID that is not visible to respondents.",isUnique:"When enabled for a column, a respondent is required to provide a unique response for each question within this column.",rows:"Sets the number of displayed lines in the input field. If the input takes up more lines, the scroll bar will appear.",visibleIf:"Use the magic wand icon to set a conditional rule that determines column visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the column.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey submission unless at least one nested question has an answer.",showInMultipleColumns:"When selected, creates an individual column for each choice option."},widthMode:'Choose from: "Static" - sets a fixed width; "Responsive" - makes the survey occupy the full width of the screen; "Auto" - applies either of the two depending on the question types used.',cookieName:"Assign a unique cookie value for your survey. The cookie will be set in a respondent's browser upon survey completion to prevent repetitive survey submissions.",logo:"Paste an image link (no size limits) or click the folder icon to browse a file from your computer (up to 64KB).",logoWidth:"Sets a logo width in CSS units (px, %, in, pt, etc.).",logoHeight:"Sets a logo height in CSS units (px, %, in, pt, etc.).",logoFit:'Choose from: "None" - image maintains its original size; "Contain" - image is resized to fit while maintaining its aspect ratio; "Cover" - image fills the entire box while maintaining its aspect ratio; "Fill" - image is stretched to fill the box without maintaining its aspect ratio.',goNextPageAutomatic:"Select if you want the survey to advance to the next page automatically after a respondent answers all questions on the current page.",allowCompleteSurveyAutomatic:"Select if you want the survey to complete automatically after a respondent answers all questions.",showNavigationButtons:"Sets the visibility and location of navigation buttons on a page.",showProgressBar:'Sets the visibility and location of a progress bar. The "Auto" value displays the progress bar above or below the survey header.',showPreviewBeforeComplete:"Enable the preview page with all or answered questions only.",questionTitleLocation:"Applies to all questions within the survey. This setting can be overridden by title alignment rules at lower levels: panel, page, or question. A lower-level setting will override those on a higher level.",requiredText:"A symbol or a sequence of symbols indicating that an answer is required.",questionStartIndex:"Enter a number or letter with which you want to start numbering.",questionErrorLocation:'Sets the location of an error message in relation to the question with invalid input. Choose between: "Top" - an error text is placed at the top of the question box; "Bottom" - an error text is placed at the bottom of the question box.',focusFirstQuestionAutomatic:"Select if you want the first input field on each page ready for text entry.",questionsOrder:"Keeps the original order of questions or randomizes them. The effect of this setting is only visible in the Preview tab.",maxTextLength:"For text entry questions only.",maxOthersLength:"For question comments only.",autoGrowComment:"Select if you want question comments and Long Text questions to auto-grow in height based on the entered text length.",allowResizeComment:"For question comments and Long Text questions only.",calculatedValues:"Custom variables serve as intermediate or auxiliary variables used in form calculations. They take respondent inputs as source values. Each custom variable has a unique name and an expression it's based on.",includeIntoResult:"Select if you wish the calculated value of the expression to be saved along with survey results.",triggers:'A trigger is an event or condition that is based on an expression. Once the expression is evaluated to "true", a trigger sets off an action. Such an action can optionally have a target question it affects.',clearInvisibleValues:"Choose whether or not to clear values for questions hidden by conditional logic and when to do it.",textUpdateMode:'Choose from: "On lost focus" - the value is updated when the input field loses focus; "While typing" - the value is updated in real-time, as users are typing.',columns:"The left value serves as a column ID used in conditional rules, the right value is displayed to respondents.",rows:"The left value serves as a row ID used in conditional rules, the right value is displayed to respondents.",columnMinWidth:"Accepts CSS values (px, %, in, pt, etc.).",rowTitleWidth:"Accepts CSS values (px, %, in, pt, etc.).",totalText:'Visible only if at least one column displays total values set with "Aggregation method" or "Total value expression".',cellErrorLocation:'Sets the location of an error message in relation to a cell with invalid input. The "Inherit" option applies the setting from the "Error message alignment" property.',keyDuplicationError:'When the "Prevent duplicate responses" property is enabled, a respondent attempting to submit a duplicate entry will receive the following error message.',totalExpression:"Allows you to calculate total values based on an expression. The expression can include basic calculations (`{q1_id} + {q2_id}`), Boolean expressions (`{age} > 60`) and functions ('iif()`, `today()`, `age()`, `min()`, `max()`, `avg()`, etc.).",confirmDelete:"Triggers a prompt asking to confirm the row deletion.",defaultValueFromLastRow:"Duplicates answers from the last row and assigns them to the next added dynamic row.",keyName:"Reference a column ID to require a user to provide a unique response for each question within the specified column.",description:"Type a subtitle.",locale:"Choose a language to begin creating your survey. To add a translation, switch to a new language and translate the original text here or in the Translations tab.",detailPanelMode:'Sets the location of a details section in relation to a row. Choose from: "None" - no expansion is added; "Under the row" - a row expansion is placed under each row of the matrix; "Under the row, display one row expansion only" - an expansion is displayed under a single row only, the remaining row expansions are collapsed.',imageFit:'Choose from: "None" - image maintains its original size; "Contain" - image is resized to fit while maintaining its aspect ratio; "Cover" - image fills the entire box while maintaining its aspect ratio; "Fill" - image is stretched to fill the box without maintaining its aspect ratio.',autoGrow:'Gradually increases the height of the input field as data is being entered. Overrides the "Input field height (in lines)" setting.',allowResize:"The resize handle (or grip) appears in the corner and can be dragged to alter the size of the input field.",maxTimeToFinish:'A time interval in seconds after which the survey auto-advances to the "Thank You" page.',maxTimeToFinishPage:"A time interval in seconds after which the survey auto-advances to the next page.",page:{maxTimeToFinish:"A time interval in seconds after which the survey auto-advances to the next page.",visibleIf:"Use the magic wand icon to set a conditional rule that determines page visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the page.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey submission unless at least one nested question has an answer.",questionTitleLocation:'Applies to all questions within this page. If you want to override this setting, define title alignment rules for individual questions or panels. The "Inherit" option applies the survey-level setting ("Top" by default).',questionErrorLocation:'Sets the location of an error message in relation to the question with invalid input. Choose between: "Top" - an error text is placed at the top of the question box; "Bottom" - an error text is placed at the bottom of the question box. The "Inherit" option applies the survey-level setting ("Top" by default).',questionsOrder:'Keeps the original order of questions or randomizes them. The "Inherit" option applies the survey-level setting ("Original" by default). The effect of this setting is only visible in the Preview tab.',navigationButtonsVisibility:'Sets the visibility of navigation buttons on the page. The "Inherit" option applies the survey-level setting, which defaults to "Visible".'},showTimerPanel:"Sets the visibility and location of a timer on a page.",panelsState:'Choose from: "Locked" - users cannot expand or collapse panels; "Collapse all" - all panels start in a collapsed state; "Expand all" - all panels start in an expanded state; "First expanded" - only the first panel is initially expanded.',imageLinkName:"Enter a shared property name within the array of objects that contains the image or video file URLs you want to display in the choice list.",choices:"The left value serves as an item ID used in conditional rules, the right value is displayed to respondents.",title:"Type a user-friendly title to display.",waitForUpload:"Ensures that users won't complete the survey until files are uploaded.",minWidth:"Accepts CSS values (px, %, in, pt, etc.).",maxWidth:"Accepts CSS values (px, %, in, pt, etc.).",width:"Accepts CSS values (px, %, in, pt, etc.).",valueName:"A join identifier is a custom key that you can assign to several questions to link them together and sync their values. These values will be merged into a single array or object and stored in survey results using the key as the property name.",useDisplayValuesInDynamicTexts:"In single- and multiple-selection question types, each choice option has an ID and display value. When selected, this setting shows a display value instead of an ID value in HTML questions and dynamic titles and descriptions of survey elements.",clearIfInvisible:'Choose whether or not to clear question values hidden by conditional logic and when to do it. The "Inherit" option applies the survey-level setting ("Upon survey completion" by default).',choicesFromQuestionMode:'Choose from: "All" - copies all choice options from the selected question; "Selected" - dynamically copies only selected choice options; "Unselected" - dynamically copies only unselected choice options. The "None" and "Other" options are copied by default if enabled in the source question.',showOtherItem:"When selected, users can include additional input in a separate comment box.",separateSpecialChoices:'Displays each special choice option ("None", "Other", "Select All") on a new line, even when using a multiple-column layout.',path:"Specify the location within the service dataset where the target array of objects is located. Leave empty if the URL already points to the array.",choicesbyurl:{valueName:"Enter a uniform property name within the array of objects whose value will be stored as a response in survey results."},titleName:"Enter a uniform property name within the array of objects that contains the values you want to display in the choice list.",allowEmptyResponse:"Select to allow the service to return an empty response or array.",choicesVisibleIf:"Use the magic wand icon to set a conditional rule that determines the visibility of all choice options.",rateValues:"The left value serves as an item ID used in conditional rules, the right value is displayed to respondents.",rating:{displayMode:'"Auto" selects between the "Buttons" and "Dropdown" modes based on the available width. When the width is insufficient to display buttons, the question displays a dropdown.'},valuePropertyName:"Allows you to connect questions that produce results in different formats. When such questions are linked together using a join identifier, this shared property stores selected question values.",searchEnabled:"Select if you want to update the drop-down menu contents to match the search query that a user is typing in the input field.",valueTrue:"A value to save in survey results when respondents give a positive answer.",valueFalse:"A value to save in survey results when respondents give a negative answer.",showPreview:"It's not recommended that you disable this option as it overrides the Preview image and makes it hard for a user to understand whether the files have been uploaded.",needConfirmRemoveFile:"Triggers a prompt asking to confirm the file deletion.",selectToRankEnabled:"Enable to rank only selected choices. Users will drag selected items from the choice list to order them within the ranking area.",dataList:"Enter a list of choices that will be suggested to the respondent during input.",itemSize:"The setting only resizes the input fields and doesn't affect the width of the question box.",itemTitleWidth:"Sets consistent width for all item labels in pixels",altText:"Serves as a substitute when the image cannot be displayed on a user's device and for accessibility purposes.",rateColorMode:'Defines the color of the selected emoji when the Rating icon type is set to "Smileys". Choose between: "Default" - the selected emoji appears in default survey color; "Scale" - the selected emoji inherits color from the rating scale.',expression:{name:"An expression ID that is not visible to respondents.",description:"Type an expression subtitle.",expression:"An expression can include basic calculations (`{q1_id} + {q2_id}`), conditions (`{age} > 60`), and functions ('iif()`, `today()`, `age()`, `min()`, `max()`, `avg()`, etc.)."},storeOthersAsComment:'Select to store the "Other" option value as a separate property in survey results.',format:"Use {0} as a placeholder for the actual value.",acceptedTypes:"Refer to the [accept](https://www.w3schools.com/tags/att_input_accept.asp) attribute description for more information.",columnColCount:'Applies only if "Cell input type" is set to Radio Button Group or Checkboxes.',autocomplete:"Select the data type that the user's browser can retrieve. This data is sourced either from past values entered by the user or from pre-configured values if any have been saved by the user for autocompletion.",filePlaceholder:'Applies when "File source type" is "Local file" or when camera is unavailable',photoPlaceholder:'Applies when "File source type" is "Camera".',fileOrPhotoPlaceholder:'Applies when "File source type" is "Local file or camera".',masksettings:{saveMaskedValue:"Select if you want to store the question value with an applied mask in survey results."},patternmask:{pattern:"The pattern can contain string literals and the following placeholders: `9` - for a digit; `a` - for an upper- or lower-case letter; `#` - for a digit or an upper- or lower-case letter. Use backslash `\\` to escape a character."},datetimemask:{pattern:"The pattern can contain separator characters and the following placeholders:<br>`m` - Month number.<br>`mm` - Month number, with leading zero for single-digit values.<br>`d` - Day of the month.<br>`dd` - Day of the month, with leading zero for single-digit values.<br>`yy` - The last two digits of the year.<br>`yyyy` - Four-digit year.<br>`H` - Hours in 24-hour format.<br>`HH` - Hours in 24-hour format, with leading zero for single-digit values.<br>`h` - Hours in 12-hour format.<br>`hh` - Hours in 12-hour format, with leading zero for single-digit values.<br>`MM` - Minutes.<br>`ss` - Seconds.<br>`TT` - 12-hour clock period in upper case (AM/PM).<br>`tt` - 12-hour clock period in lower case (am/pm)."},numericmask:{decimalSeparator:"A symbol used to separate the fractional part from the integer part of a displayed number.",thousandsSeparator:"A symbol used to separate the digits of a large number into groups of three.",precision:"Limits how many digits to retain after the decimal point for a displayed number."},currencymask:{prefix:"One or several symbols to be displayed before the value.",suffix:"One or several symbols to be displayed after the value."}},p:{title:{name:"title",title:"Leave it empty, if it is the same as 'Name'"},multiSelect:"Allow multiple selection",showLabel:"Show image and video captions",swapOrder:"Swap the order of Yes and No",value:"Value",tabAlign:"Tab alignment",sourceType:"File source type",fitToContainer:"Fit to container",setValueExpression:"Set value expression",description:"Description",logoFit:"Logo fit",pages:"Pages",questions:"Questions",triggers:"Triggers",calculatedValues:"Custom variables",surveyId:"Survey id",surveyPostId:"Survey post id",surveyShowDataSaving:"Survey show data saving",questionDescriptionLocation:"Question description alignment",progressBarType:"Progress bar type",showTOC:"Show table of contents (TOC)",tocLocation:"TOC alignment",questionTitlePattern:"Question title pattern",widthMode:"Survey width mode",showBrandInfo:"Show brand info",useDisplayValuesInDynamicTexts:"Use display values in dynamic texts",visibleIf:"Visible if",defaultValueExpression:"Default value expression",requiredIf:"Required if",resetValueIf:"Reset value if",setValueIf:"Set value if",validators:"Validation rules",bindings:"Bindings",renderAs:"Render as",attachOriginalItems:"Attach original items",choices:"Choices",choicesByUrl:"Choices by url",currency:"Currency",cellHint:"Cell hint",totalMaximumFractionDigits:"Total maximum fraction digits",totalMinimumFractionDigits:"Total minimum fraction digits",columns:"Columns",detailElements:"Detail elements",allowAdaptiveActions:"Allow adaptive actions",defaultRowValue:"Default row value",detailPanelShowOnAdding:"Detail panel show on adding",choicesLazyLoadEnabled:"Choices lazy load enabled",choicesLazyLoadPageSize:"Choices lazy load page size",inputFieldComponent:"Input field component",itemComponent:"Item component",min:"Min",max:"Max",minValueExpression:"Min value expression",maxValueExpression:"Max value expression",step:"Step",dataList:"Items for auto-suggest",itemSize:"Input field width (in characters)",itemTitleWidth:"Item label width (in px)",elements:"Elements",content:"Content",navigationButtonsVisibility:"Show/hide navigation buttons",navigationTitle:"Navigation title",navigationDescription:"Navigation description",longTap:"Long tap",autoGrow:"Expand input field dynamically",allowResize:"Enable resize handle",acceptCarriageReturn:"Accept carriage return",displayMode:"Display mode",rateType:"Rate type",label:"Label",contentMode:"Content mode",imageFit:"Image and thumbnail fit",altText:"Alt text",height:"Height",penColor:"Pen color",backgroundColor:"Background color",templateElements:"Template elements",operator:"Operator",isVariable:"Is variable",runExpression:"Run expression",showCaption:"Show caption",iconName:"Icon name",iconSize:"Icon size",precision:"Precision",matrixDragHandleArea:"Matrix drag handle area",backgroundImage:"Background image",backgroundImageFit:"Background image fit",backgroundImageAttachment:"Background image attachment",backgroundOpacity:"Background opacity",selectToRankEnabled:"Allow selective ranking",selectToRankAreasLayout:"Ranking area alignment",selectToRankEmptyRankedAreaText:"Text to show if all options are selected",selectToRankEmptyUnrankedAreaText:"Placeholder text for the ranking area",allowCameraAccess:"Allow camera access",scaleColorMode:"Rating icon color mode",rateColorMode:"Smileys color scheme",copyDisplayValue:"Copy display value"},theme:{advancedMode:"Advanced mode",pageTitle:"Page",questionTitle:"Question box",editorPanel:"Input element",lines:"Lines",primaryDefaultColor:"Default",primaryDarkColor:"Hover",primaryLightColor:"Selected",backgroundDimColor:"Background color",cornerRadius:"Corner radius",backcolor:"Default background",hovercolor:"Hover background",borderDecoration:"Border decoration",primaryForecolor:"Default color",primaryForecolorLight:"Disabled color",font:"Font",borderDefault:"Darker",borderLight:"Lighter",fontFamily:"Font family",fontWeightRegular:"Regular",fontWeightHeavy:"Heavy",fontWeightSemiBold:"Semi-bold",fontWeightBold:"Bold",color:"Color",placeholderColor:"Placeholder color",size:"Size",opacity:"Opacity",boxShadowX:"X",boxShadowY:"Y",boxShadowAddRule:"Add Shadow Effect",boxShadowBlur:"Blur",boxShadowSpread:"Spread",boxShadowDrop:"Drop",boxShadowInner:"Inner",names:{default:"Default",sharp:"Sharp",borderless:"Borderless",flat:"Flat",plain:"Plain",doubleborder:"Double Border",layered:"Layered",solid:"Solid",threedimensional:"3D",contrast:"Contrast"},colors:{teal:"Teal",blue:"Blue",purple:"Purple",orchid:"Orchid",tulip:"Tulip",brown:"Brown",green:"Green"}}},i=o(0);!function(e){e[e.AllTypes=0]="AllTypes",e[e.CompatibleTypes=1]="CompatibleTypes"}(r||(r={}));var a={translation:{sortByName:!1,exportPrefix:"",maximumSelectedLocales:7,exportFileName:"survey_translation.csv"},themeEditor:{exportFileName:"survey_theme.json",defaultFontFamily:"Open Sans"},operators:{empty:[],notempty:[],equal:["!file"],notequal:["!file"],contains:["checkbox","text","comment"],notcontains:["checkbox","text","comment"],anyof:["selectbase"],allof:["checkbox"],greater:["!checkbox","!imagepicker","!boolean","!file"],less:["!checkbox","!imagepicker","!boolean","!file"],greaterorequal:["!checkbox","!imagepicker","!boolean","!file"],lessorequal:["!checkbox","!imagepicker","!boolean","!file"]},defaultNewSurveyJSON:{},designer:{defaultAddQuestionType:"text",showAddQuestionButton:!0},logic:{questionSortOrder:"asc",get defaultOperator(){return a.logic.defaultOperators.default},set defaultOperator(e){a.logic.defaultOperators.default=e},defaultOperators:{default:"equal",checkbox:"allof",tagbox:"allof"},visibleActions:[],logicItemTitleMaxChars:50,openBracket:"{",closeBracket:"}",updateExpressionsOnChanging:{questionName:!0,columnName:!0,choiceValue:!0},updateExpressionsOnDeleting:{question:!0}},questionConvertMode:r.AllTypes,propertyGrid:{useButtonGroup:!0,maxCharsInButtonGroup:25,showNavigationButtons:!1,enableSearch:!0,maximumColumnsCount:0,minimumChoicesCount:0,maximumChoicesCount:0,maximumRowsCount:0,maximumRateValues:0,generalTabName:"general",defaultExpandedTabName:"general",allowExpandMultipleCategories:!1},toolbox:{defaultJSON:{dropdown:{choices:["Item 1","Item 2","Item 3"]},tagbox:{choices:["Item 1","Item 2","Item 3"]},checkbox:{choices:["Item 1","Item 2","Item 3"]},radiogroup:{choices:["Item 1","Item 2","Item 3"]},ranking:{choices:["Item 1","Item 2","Item 3"]},imagepicker:{imageFit:"cover",choices:[{value:"Image 1",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"},{value:"Image 2",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/giraffe.jpg"},{value:"Image 3",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/panda.jpg"},{value:"Image 4",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/camel.jpg"}]},image:{imageFit:"cover",imageHeight:"auto",imageWidth:"100%"}}},notifications:{lifetime:2e3},autoSave:{delay:500},dragDrop:{restrictDragQuestionBetweenPages:!1,allowDragToTheSameLine:!0},layout:{showTabs:!0,showToolbar:!0,allowCollapseSidebar:!0},jsonEditor:{indentation:1,exportFileName:"survey.json"}},s=function(){function e(){this.isMobileView=!1,this.allowEditExpressionsInTextEditor=!0,this.maximumColumnsCount=a.propertyGrid.maximumColumnsCount,this.minimumChoicesCount=a.propertyGrid.minimumChoicesCount,this.maximumChoicesCount=a.propertyGrid.maximumChoicesCount,this.maximumRowsCount=a.propertyGrid.maximumRowsCount,this.maximumRateValues=a.propertyGrid.maximumRateValues,this.machineTranslationValue=!1,this.inplaceEditForValues=!1,this.maxNestedPanels=-1,this.translationLocalesOrder=[]}return e.prototype.getProcessedTranslationItemText=function(e,t,o,r){return o},e.prototype.getObjectDisplayName=function(e,t,o,r){return r},e.prototype.onCanShowPropertyCallback=function(e,t,o,r,n){return!0},e.prototype.onPropertyGridSurveyCreatedCallback=function(e,t){},e.prototype.onPropertyEditorCreatedCallback=function(e,t,o){},e.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,o,r){},e.prototype.onPropertyGridShowModalCallback=function(e,t,o,r,n){},e.prototype.onIsPropertyReadOnlyCallback=function(e,t,o,r,n){return o},e.prototype.onCanDeleteItemCallback=function(e,t,o){return o},e.prototype.onCollectionItemDeletingCallback=function(e,t,o,r){return!0},e.prototype.onCollectionItemAllowingCallback=function(e,t,o,r,n){},e.prototype.onItemValueAddedCallback=function(e,t,o,r){},e.prototype.onFastEntryCallback=function(e,t){return e},e.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,o){},e.prototype.onSetPropertyEditorOptionsCallback=function(e,t,o){},e.prototype.onGetErrorTextOnValidationCallback=function(e,t,o){return null},e.prototype.onValueChangingCallback=function(e){},e.prototype.onGetElementEditorTitleCallback=function(e,t){return t},e.prototype.startUndoRedoTransaction=function(){},e.prototype.stopUndoRedoTransaction=function(){},e.prototype.createSurvey=function(e,t,o,r,n){var a=new i.SurveyModel(e);return r&&r(a),a},e.prototype.onConditionQuestionsGetListCallback=function(e,t,o,r){return"asc"},e.prototype.onConditionGetTitleCallback=function(e,t){return t},e.prototype.isConditionOperatorEnabled=function(e,t,o,r){return r},e.prototype.onLogicGetTitleCallback=function(e,t,o,r){return o},e.prototype.getTranslationExportedText=function(e,t,o,r,n){return n},e.prototype.uploadFiles=function(e,t,o){},e.prototype.getHasMachineTranslation=function(){return this.machineTranslationValue},e.prototype.doMachineTranslation=function(e,t,o,r){},e.prototype.chooseFiles=function(e,t,o){},e}();function l(e){if(!e)return"";for(var t="",o=e.length-1;o>=0;o--){if(e[o]>="0"&&e[o]<="9")t=e[o]+t;else if(t)return t;if(10==t.length)break}return t}function c(e){return Math.round(100*e)/100}i.StylesManager.applyTheme("defaultV2");var p={true:"false",True:"False",TRUE:"FALSE",false:"true",False:"True",FALSE:"TRUE",yes:"no",Yes:"No",YES:"NO",no:"yes",No:"Yes",NO:"YES"};function u(e,t){t=t.toString();for(var o=0;o<e.length;o++)if(e[o]&&e[o].toString()===t)return!0;return!1}function d(e,t){return g(e,t.map((function(e){return e.value})))}function h(e){var t=e.length;if(0===t)return"";if(!e[t-1].text||e[t-1].text===e[t-1].value)return"";var o=[];e.forEach((function(e){e.hasText&&o.push(e.text)})),e.map((function(e){return e.text}));var r=g("",o);return r?r.toString():""}function g(e,t){if(t.length>0)var o=function(e){return p[e]?p[e]:null}(t[t.length-1]);if(o&&t.indexOf(o)<0)return o;for(var r,n="",i=-1,a=t.length-1;a>=0;a--)if(t[a]){var s=t[a].toString();if(n=l(s)){i=s.lastIndexOf(n),r=t[a];break}}if(i>-1){var c,d=parseInt(n),h=r===d;do{if(h)c=++d;else{for(var g=(d++).toString();n.length>g.length;)g="0"+g;c=s.substring(0,i)+g+s.substring(i+n.length)}}while(u(t,c));return c}return e||(e=t[t.length-1]),e+1}function f(e,t){for(var o=t;o&&!o.classList.contains(e);)o=o.parentElement;return o}function m(e){for(var t=0;t<e.length;t++)if("function"==typeof e[t].getElementsByClassName){var o=e[t].getElementsByClassName("svd-focusable");if(0===o.length&&-1!==e[t].className.indexOf("svd-focusable")&&(o=[e[t]]),o.length>0){var r=o[0];if("a"!==r.tagName.toLowerCase()){r.focus({preventScroll:!0});break}}}}function y(e){if(e&&e.length){for(var t=0;t<e.length;t++)if("#text"!=e[t].nodeName&&"#comment"!=e[t].nodeName)return e[t];return null}}function b(e){var t=e.element,o=[];if(8!==t.nodeType)return t.childNodes;for(;t=t.nextSibling;)3!==t.nodeType&&o.push(t);return o}function v(e,t){var o=!0;e&&"function"==typeof e.getType&&(o=!!i.Serializer.findProperty(e.getType(),t));return o}function x(e,t){var o=!0;if(e&&"function"==typeof e.getType){var r=i.Serializer.findProperty(e.getType(),t);o=!r||r.visible}return o}function w(e,t,o){void 0===o&&(o=0);function r(e,o){void 0===o&&(o=null);var r=(t.className||"").split(" ");o&&-1==r.indexOf(o)||-1==r.indexOf(e)&&(t.className+=" "+e)}e.__svc_question_processed||"mouseover"!==e.type?(t.className=(t.className||"").replace(" svc-hovered-ready",""),t.className=(t.className||"").replace(" svc-hovered","")):(o?(r("svc-hovered-ready"),setTimeout((function(){r("svc-hovered","svc-hovered-ready")}),o)):r("svc-hovered"),e.__svc_question_processed=!0)}function j(e){return e.replace(new RegExp("(\\r\\n|\\n|\\r)","gm"),"")}function C(e){var t,o;window&&(window.getSelection&&document.createRange?(o=window.getSelection(),(t=document.createRange()).selectNodeContents(e),o.removeAllRanges(),o.addRange(t)):document.selection&&document.body.createTextRange&&((t=document.body.createTextRange()).moveToElementText(e),t.select()))}function S(e,t){for(var o in t){var r=t[o];"object"==typeof r&&S(r={},t[o]),e[o]=r}}function T(e,t){t&&("string"==typeof t||t instanceof String?e.root=t:S(e,t))}function P(e,t){T(e,i.defaultV2Css.question),T(e,i.defaultV2Css[t]),e.hasErrorTop="",e.hasErrorBottom=""}function E(e){return a.logic.openBracket+e+a.logic.closeBracket}function I(e){return e?e=(e=e.replace(/[\s]+/g," ")).replace(/([\s]|^)(\S)/g,(function(e,t,o){return t+o.toUpperCase()})):e}function O(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every((function(e){return!0===e}))}var V="image/png, image/gif, image/jpeg, image/apng, image/avif, image/svg+xml, image/webp";function N(e){return["auto","image"].indexOf(e)>-1?V:"video"==e?"video/*":""}function k(e){return e instanceof i.MatrixDropdownColumn?e.templateQuestion:e}function A(e){if(e&&void 0!==i.settings.environment.root){var t=i.settings.environment.root.getElementById(e);t&&t.scrollIntoView({behavior:"smooth",block:"center",inline:"start"})}}function _(e,t){if(e&&void 0!==t)return"rgba("+parseInt(e.slice(1,3),16)+", "+parseInt(e.slice(3,5),16)+", "+parseInt(e.slice(5,7),16)+", "+t+")"}function L(e,t){return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function D(e){void 0===e&&(e="");var t=e.match(/\((.*)\)/);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function M(e){void 0===e&&(e="");var t=D(e);if(0!==t.length){var o=1;return 4==t.length&&(o=t.pop()),{color:t.reduce((function(e,t){var o=t.toString(16);return e+(1==o.length?"0"+o:o)}),"#"),opacity:c(100*o)}}return{color:e,opacity:100}}function R(e,t,o){t/=100,o/=100;var r=function(t){return(t+e/60)%6},n=function(e){return o*(1-t*Math.max(0,Math.min(r(e),4-r(e),1)))};return[Math.round(255*n(5)),Math.round(255*n(3)),Math.round(255*n(1))]}function q(e,t,o){e/=255,t/=255,o/=255;var r=Math.max(e,t,o),n=r-Math.min(e,t,o),i=0===n?0:n&&r===e?(t-o)/n:r===t?2+(o-e)/n:4+(e-t)/n;return[60*(i<0?i+6:i),r&&n/r*100,100*r]}function H(e){Object.keys(e).forEach((function(t){void 0!==e[t]&&null!==e[t]||delete e[t]}))}function B(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=(e||[]).filter((function(e){return!!e}));if(!(o.length<=1)){if(2==o.length)return Object.keys(o[1]).forEach((function(e){return o[0][e]=o[1][e]})),void H(e[0]);for(var r=1;r<o.length;r++)B(o[0],o[r])}}var Q=function(){function e(){this.colorSettings={baseColorAlpha:1,darkColorAlpha:1,lightColorAlpha:1,deltaDarkColor:0,deltaLightColor:0,newColorLight:"",newColorDark:""}}return e.prototype.initialize=function(e,t,o){var r=D(e),n=D(o),i=D(t);this.colorSettings.baseColorAlpha=r[3],this.colorSettings.darkColorAlpha=n[3],this.colorSettings.lightColorAlpha=i[3];var a=q(r[0],r[1],r[2]),s=q(n[0],n[1],n[2]),l=q(i[0],i[1],i[2]);this.colorSettings.deltaDarkColor=a[2]-s[2],this.colorSettings.deltaLightColor=a[2]-l[2]},e.prototype.calculateColors=function(e){var t=D(e);0===t.length&&(t=D(_(e,1)));var o=q(t[0],t[1],t[2]),r=R(o[0],o[1],o[2]-this.colorSettings.deltaDarkColor),n=R(o[0],o[1],o[2]-this.colorSettings.deltaLightColor);this.colorSettings.newColorLight=L(n,this.colorSettings.lightColorAlpha),this.colorSettings.newColorDark=L(r,this.colorSettings.darkColorAlpha)},e}();function F(e,t){if(window)if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(t,e);else{var o=window.document.createElement("a");o.href=window.URL.createObjectURL(t),o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o)}}var U={"tabs.preview":"ed.testSurvey","tabs.theme":"ed.themeSurvey","tabs.translation":"ed.translation","tabs.designer":"ed.designer","tabs.editor":"ed.jsonEditor","tabs.logic":"ed.logic"},W=function(){function e(){this.defaultLocaleValue="en",this.currentLocaleValue="",this.camelCaseBreaking=!0,this.locales={},this.peByClass={},this.peHelpByClass={},this.pePlaceholderByClass={}}return e.prototype.reset=function(){this.peByClass={},this.peHelpByClass={},this.pePlaceholderByClass={}},Object.defineProperty(e.prototype,"defaultLocale",{get:function(){return this.defaultLocaleValue},set:function(e){e||(e="en"),e!==this.defaultLocale&&(this.defaultLocaleValue=e,this.reset())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentLocale",{get:function(){return this.currentLocaleValue},set:function(e){e||(e=""),e!==this.currentLocale&&(this.currentLocaleValue=e,this.reset())},enumerable:!1,configurable:!0}),e.prototype.getString=function(e,t){void 0===t&&(t=null);var o=this.getOldKeysString(e,t);if(o)return o;var r=e.split(".");return this.getStringByPath(r,t)},e.prototype.getStringByPath=function(e,t){void 0===t&&(t=null),t||(t=this.currentLocale);var o=this.getLocale(t),r=this.getDefaultStrings(),n=[];if(o&&n.push(o),t&&t.indexOf("-")>-1){var i=this.getLocale(t.substring(0,t.indexOf("-")));i&&n.push(i)}0!==n.length&&n[n.length-1]===r||n.push(r);for(var a=0;a<n.length;a++){var s=this.getStringByLocale(e,n[a]);if(s||""===s)return s}return e[e.length-1]},e.prototype.hasString=function(e,t){return void 0===t&&(t=null),void 0!==this.getStringByLocale(e.split("."),this.getLocale(t))},e.prototype.getStringByLocale=function(e,t){for(var o=t,r=0;r<e.length;r++){if("string"==typeof o)return;if(!(o=o[e[r]])&&""!==o)return}return o},e.prototype.getLocaleName=function(e,t){void 0===t&&(t=null);var o=i.surveyLocalization.localeNames;t||(t=i.surveyLocalization.defaultLocale);var r=e?I(o[e]):G.getString("ed.defaultLocale").format(I(o[t]));return r||e},e.prototype.getPropertyName=function(e,t){void 0===t&&(t=null);var o=this.getProperty(e,t),r=o.name;return r?this.stringsDiff(r,e)?r:this.getAutoPropertyName(r,t):o},e.prototype.getPropertyTitle=function(e){var t=this.getProperty(e);return t.title?t.title:""},e.prototype.getPropertyNameInEditor=function(e,t,o){void 0===o&&(o=null);var r=this.getPropertyInfoInEditorByType(e,t,this.peByClass,"pe");return r||(r=this.getStringByPath(["pe",t])),this.stringsDiff(r,t)?r:this.getPropertyName(t,o)},e.prototype.getPropertyHelpInEditor=function(e,t,o){void 0===o&&(o=void 0);var r=this.getPropertyHelpInEditorCore(e,t,this.peHelpByClass,"pehelp");if(r)return r;var n=this.getLocale();return o&&n&&n.pe?n.pe[o+"Help"]:void 0},e.prototype.getPropertyPlaceholder=function(e,t){var o=this.getPropertyHelpInEditorCore(e,t,this.pePlaceholderByClass,"peplaceholder");if(o)return" "===o?null:o;var r=this.getLocale();return r&&r.peplaceholder&&(o=r.peplaceholder[t]),o||(r&&r.pe?r.pe[t+"_placeholder"]:void 0)},e.prototype.getPropertyHelpInEditorCore=function(e,t,o,r){var n=this.getPropertyInfoInEditorByType(e,t,o,r);if(n)return" "===n?null:n;var i=this.getLocale();return i&&i[r]?i[r][t]:void 0},e.prototype.getPropertyInfoInEditorByType=function(e,t,o,r){if(e){var n=o[e];for(void 0===n&&(n=this.getObjInEditorByType(e,o,r));n;){var i=n.props[t];if(i&&"function"!=typeof i)return n.props[t];n=n.parent}}},e.prototype.getObjInEditorByType=function(e,t,o){if(e){t[e];var r=this.getLocale(),n=r?r[o]:void 0;if(n){var a=e.indexOf("@");if(a>-1){var s=this.getObjInEditorByType(e.substring(0,a),t,o);if(!n[e])return t[e]=s,s;var l={props:n[e],parent:s};return t[e]=l,l}for(var c=[],p=i.Serializer.findClass(e),u=void 0;p;){var d=p.name;if(u=t[e])break;if(c.push(d),n[d]){u={props:n[d],parent:this.getObjInEditorByType(p.parentName,t,o)};break}if(!p.parentName)break;p=i.Serializer.findClass(p.parentName)}for(var h=0;h<c.length;h++)t[c[h]]=u;return u}}},e.prototype.getProperty=function(e,t){void 0===t&&(t=null);var o=this.getStringByPath(["p",e]);if(this.stringsDiff(o,e))return o;var r=(e+"").indexOf("_");return r<-1?this.getAutoPropertyName(o,t):(e=(e+"").substring(r+1),o=this.getStringByPath(["p",e]),this.stringsDiff(o,e)?o:this.getAutoPropertyName(o,t))},e.prototype.convertToCamelCase=function(e,t){if(void 0===t&&(t=!1),!e)return e;if((e=e.trim()).indexOf(" ")>-1)return e;for(var o=!1,r=0;r<e.length;r++)if(e[r]!==e[r].toUpperCase()){o=!0;break}if(!o)return e;var n=e[0].toUpperCase(),i=!1,a=function(t){return!(t>=e.length)&&e[t].toUpperCase()===e[t]};for(r=1;r<e.length;r++){!i&&a(r)&&(n+=" "),n+=!i&&!a(r+1)?e[r].toLowerCase():e[r],i=a(r)}return t&&(n=n.toLowerCase()),n},e.prototype.getAutoPropertyName=function(e,t){return void 0===t&&(t=null),t||(e&&this.camelCaseBreaking?this.convertToCamelCase(e):e)},e.prototype.getPropertyValueInEditor=function(e,t){var o=this.getLocale();if(o&&o.pv&&o.pv[e]){var r=o.pv[e][t];if(r)return r}return this.getPropertyValue(t)},e.prototype.getPropertyValue=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"pv",t)},e.prototype.getValidatorName=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"validators",t)},e.prototype.getTriggerName=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"triggers",t)},e.prototype.getLocale=function(e){e||(e=this.currentLocale);var t=e?this.locales[e]:this.getDefaultStrings();return t||(t=this.getDefaultStrings()),t},e.prototype.getValueInternal=function(e,t,o){if(void 0===o&&(o=null),""===e||null==e)return"";e=e.toString();var r=this.getString(t+"."+e,o);return r||(this.camelCaseBreaking?this.convertToCamelCase(e,!1):e)},e.prototype.getLocales=function(){var e=[];for(var t in e.push(""),this.locales)e.push(t);return e},e.prototype.getDefaultStrings=function(){var e=this.defaultLocale;if(e&&"en"!==e){var t=this.getLocale(e);if(t)return t}return J},e.prototype.stringsDiff=function(e,t){return"function"!=typeof e&&"function"!=typeof t&&e!==t},e.prototype.getOldKeysString=function(e,t){void 0===t&&(t=null);var o=U[e];if(o){var r=o.split("."),n=this.getStringByPath(r,t);return n!==r[r.length-1]?n:void 0}},e}(),G=new W;function z(e,t){return void 0===t&&(t=null),G.getString(e,t)}i.surveyLocalization.onGetExternalString=function(e,t){var o=G.getString(e,t);return o!==e?o:""};var J=n,Z=function(e,t,o,r){var n,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,o,a):n(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},K=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e};function Y(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var X,$=function(){function e(e){void 0===e&&(e=0),this.parseType=e}return e.prototype.parse=function(e,t,o,r){var n;return void 0===t&&(t=null),void 0===o&&(o=0),void 0===r&&(r=-1),this.text=String(e),this.at=o,this.endAt=r,this.ch=" ",n=this.value(),this.white(),this.ch&&this.error("Syntax error"),"function"==typeof t?function e(o,r){var n,i,a=o[r];if(a&&"object"==typeof a)for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(void 0!==(i=e(a,n))?a[n]=i:delete a[n]);return t.call(o,r,a)}({"":n},""):n},e.prototype.error=function(e){var t=new SyntaxError;throw t.message=e,t.at=this.at,t},e.prototype.next=function(e){return void 0===e&&(e=null),e&&e!==this.ch&&this.error("Expected '"+e+"' instead of '"+this.ch+"'"),this.ch=this.chartAt(),this.at+=1,this.ch},e.prototype.peek=function(){return this.chartAt()},e.prototype.chartAt=function(){return this.endAt>-1&&this.at>=this.endAt?"":this.text.charAt(this.at)},e.prototype.identifier=function(){var e=this.ch;for("_"!==this.ch&&"$"!==this.ch&&(this.ch<"a"||this.ch>"z")&&(this.ch<"A"||this.ch>"Z")&&this.error("Bad identifier");this.next()&&("_"===this.ch||"$"===this.ch||this.ch>="a"&&this.ch<="z"||this.ch>="A"&&this.ch<="Z"||this.ch>="0"&&this.ch<="9");)e+=this.ch;return e},e.prototype.number=function(){var e,t="",o="",r=10;if("-"!==this.ch&&"+"!==this.ch||(t=this.ch,this.next(this.ch)),"I"===this.ch)return("number"!=typeof(e=this.word())||isNaN(e))&&this.error("Unexpected word for number"),"-"===t?-e:e;if("N"===this.ch)return e=this.word(),isNaN(e)||this.error("expected word to be NaN"),e;switch("0"===this.ch&&(o+=this.ch,this.next(),"x"===this.ch||"X"===this.ch?(o+=this.ch,this.next(),r=16):this.ch>="0"&&this.ch<="9"&&this.error("Octal literal")),r){case 10:for(;this.ch>="0"&&this.ch<="9";)o+=this.ch,this.next();if("."===this.ch)for(o+=".";this.next()&&this.ch>="0"&&this.ch<="9";)o+=this.ch;if("e"===this.ch||"E"===this.ch)for(o+=this.ch,this.next(),"-"!==this.ch&&"+"!==this.ch||(o+=this.ch,this.next());this.ch>="0"&&this.ch<="9";)o+=this.ch,this.next();break;case 16:for(;this.ch>="0"&&this.ch<="9"||this.ch>="A"&&this.ch<="F"||this.ch>="a"&&this.ch<="f";)o+=this.ch,this.next()}if(e="-"===t?-o:+o,isFinite(e))return e;this.error("Bad number")},e.prototype.string=function(){var t,o,r,n,i="";if('"'===this.ch||"'"===this.ch)for(r=this.ch;this.next();){if(this.ch===r)return this.next(),i;if("\\"===this.ch)if(this.next(),"u"===this.ch){for(n=0,o=0;o<4&&(t=parseInt(this.next(),16),isFinite(t));o+=1)n=16*n+t;i+=String.fromCharCode(n)}else if("\r"===this.ch)"\n"===this.peek()&&this.next();else{if("string"!=typeof e.escapee[this.ch])break;i+=e.escapee[this.ch]}else{if("\n"===this.ch)break;i+=this.ch}}this.error("Bad string")},e.prototype.inlineComment=function(){"/"!==this.ch&&this.error("Not an inline comment");do{if(this.next(),"\n"===this.ch||"\r"===this.ch)return void this.next()}while(this.ch)},e.prototype.blockComment=function(){"*"!==this.ch&&this.error("Not a block comment");do{for(this.next();"*"===this.ch;)if(this.next("*"),"/"===this.ch)return void this.next("/")}while(this.ch);this.error("Unterminated block comment")},e.prototype.comment=function(){"/"!==this.ch&&this.error("Not a comment"),this.next("/"),"/"===this.ch?this.inlineComment():"*"===this.ch?this.blockComment():this.error("Unrecognized comment")},e.prototype.white=function(){for(;this.ch;)if("/"===this.ch)this.comment();else{if(!(e.ws.indexOf(this.ch)>=0))return;this.next()}},e.prototype.word=function(){switch(this.ch){case"t":return this.next("t"),this.next("r"),this.next("u"),this.next("e"),!0;case"f":return this.next("f"),this.next("a"),this.next("l"),this.next("s"),this.next("e"),!1;case"n":return this.next("n"),this.next("u"),this.next("l"),this.next("l"),null;case"I":return this.next("I"),this.next("n"),this.next("f"),this.next("i"),this.next("n"),this.next("i"),this.next("t"),this.next("y"),1/0;case"N":return this.next("N"),this.next("a"),this.next("N"),NaN}this.error("Unexpected '"+this.ch+"'")},e.prototype.array=function(){var e=[];if("["===this.ch)for(this.next("["),this.white();this.ch;){if("]"===this.ch)return this.next("]"),e;if(","===this.ch?this.error("Missing array element"):e.push(this.value()),this.white(),","!==this.ch)return this.next("]"),e;this.next(","),this.white()}this.error("Bad array")},e.prototype.object=function(){var t,o,r=!0,n={};if(this.parseType>0&&(n[e.positionName]={start:this.at-1}),"{"===this.ch)for(this.next("{"),this.white(),o=this.at-1;this.ch;){if("}"===this.ch)return this.parseType>0&&(n[e.positionName].end=o),this.next("}"),n;if(t='"'===this.ch||"'"===this.ch?this.string():this.identifier(),this.white(),this.parseType>1&&(n[e.positionName][t]={start:o,valueStart:this.at}),this.next(":"),n[t]=this.value(),this.parseType>1&&(o=this.at-1,n[e.positionName][t].valueEnd=o,n[e.positionName][t].end=o),this.white(),","!==this.ch)return this.parseType>1&&(n[e.positionName][t].valueEnd--,n[e.positionName][t].end--),this.parseType>0&&(n[e.positionName].end=this.at-1),this.next("}"),n;this.parseType>1&&(n[e.positionName][t].valueEnd--,r||n[e.positionName][t].end--),this.next(","),this.white(),r=!1}this.error("Bad object")},e.prototype.value=function(){switch(this.white(),this.ch){case"{":return this.object();case"[":return this.array();case'"':case"'":return this.string();case"-":case"+":case".":return this.number();default:return this.ch>="0"&&this.ch<="9"?this.number():this.word()}},e.prototype.stringify=function(e,t,o){if(void 0===t&&(t=null),void 0===o&&(o=null),t&&"function"!=typeof t&&!this.isArray(t))throw new Error("Replacer must be a function or an array");this.replacer=t,this.indentStr=this.getIndent(o),this.objStack=[];var r={"":e};return void 0===e?this.getReplacedValueOrUndefined(r,"",!0):this.internalStringify(r,"",!0)},e.prototype.getIndent=function(e){if(e){if("string"==typeof e)return e;if("number"==typeof e&&e>=0)return this.makeIndent(" ",e,!0)}return""},e.prototype.getReplacedValueOrUndefined=function(e,t,o){var r=e[t];return r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),"function"==typeof this.replacer?this.replacer.call(e,t,r):this.replacer?o||this.isArray(e)||this.replacer.indexOf(t)>=0?r:void 0:r},e.prototype.isWordChar=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e},e.prototype.isWordStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e},e.prototype.isWord=function(e){if("string"!=typeof e)return!1;if(!this.isWordStart(e[0]))return!1;for(var t=1,o=e.length;t<o;){if(!this.isWordChar(e[t]))return!1;t++}return!0},e.prototype.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},e.prototype.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.prototype.isNaN=function(e){return"number"==typeof e&&e!=e},e.prototype.checkForCircular=function(e){for(var t=0;t<this.objStack.length;t++)if(this.objStack[t]===e)throw new TypeError("Converting circular structure to JSON")},e.prototype.makeIndent=function(e,t,o){if(void 0===o&&(o=!1),!e)return"";e.length>10&&(e=e.substring(0,10));for(var r=o?"":"\n",n=0;n<t;n++)r+=e;return r},e.prototype.escapeString=function(t){return e.escapable.lastIndex=0,e.escapable.test(t)?'"'+t.replace(e.escapable,(function(t){var o=e.meta[t];return"string"==typeof o?o:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},e.prototype.internalStringify=function(e,t,o){var r,n,i=this.getReplacedValueOrUndefined(e,t,o);switch(i&&!this.isDate(i)&&(i=i.valueOf()),typeof i){case"boolean":return i.toString();case"number":return isNaN(i)||!isFinite(i)?"null":i.toString();case"string":return this.escapeString(i.toString());case"object":if(null===i)return"null";if(this.isArray(i)){this.checkForCircular(i),r="[",this.objStack.push(i);for(var a=0;a<i.length;a++)n=this.internalStringify(i,a,!1),r+=this.makeIndent(this.indentStr,this.objStack.length),r+=null==n?"null":n,a<i.length-1?r+=",":this.indentStr&&(r+="\n");this.objStack.pop(),r+=this.makeIndent(this.indentStr,this.objStack.length,!0)+"]"}else{this.checkForCircular(i),r="{";var s=!1;for(var l in this.objStack.push(i),i)if(i.hasOwnProperty(l)){var c=this.internalStringify(i,l,!1);if(o=!1,null!=c)r+=this.makeIndent(this.indentStr,this.objStack.length),s=!0,r+=(this.isWord(l)?l:this.escapeString(l))+":"+(this.indentStr?" ":"")+c+","}this.objStack.pop(),r=s?r.substring(0,r.length-1)+this.makeIndent(this.indentStr,this.objStack.length)+"}":"{}"}return r;default:return}},e.positionName="pos",e.escapee={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},e.ws=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],e.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},e}(),ee=function(){function e(){}return Object.defineProperty(e,"convertInfo",{get:function(){return e.convertInfoValue||(e.convertInfoValue={},e.createDefaultQuestionConverterItems()),e.convertInfoValue},enumerable:!1,configurable:!0}),e.createDefaultQuestionConverterItems=function(){for(var t=i.Serializer.getChildrenClasses("selectbase",!0),o=0;o<t.length;o++)for(var r=0;r<t.length;r++)o!=r&&e.addConvertInfo(t[o].name,t[r].name);e.addConvertInfo("text","comment"),e.addConvertInfo("comment","text")},e.addConvertInfo=function(t,o){e.convertInfo[t]||(e.convertInfo[t]=[]),e.convertInfo[t].push(o)},e.getConvertableClasses=function(t){var o=e.convertInfo[t];return Array.isArray(o)&&o.indexOf(t)<0&&o.unshift(t),o},e.getConvertToClasses=function(t,o,n){void 0===o&&(o=null),void 0===n&&(n=!1);var s=a.questionConvertMode==r.AllTypes?function(e,t){void 0===t&&(t=!1);for(var o=i.Serializer.getChildrenClasses("question",!0),r=[],n=0;n<o.length;n++)(t||o[n].name!==e)&&r.push(o[n].name);(t||"panel"!==e)&&r.push("panel");var a=i.CustomWidgetCollection.Instance.widgets;for(n=0;n<a.length;n++)(t||a[n].name!==e)&&r.push(a[n].name);return r}(t,n):e.getConvertableClasses(t);if(!s)return[];if(Array.isArray(o)&&o.length>0){var l=[];s.forEach((function(e){return l.push(e)})),s=o.filter((function(e){return l.indexOf(e)>=0}))}return s||[]},e.convertObject=function(t,o,r,n){if(void 0===r&&(r=null),void 0===n&&(n=null),!t||!t.parent||o==t.getType())return null;var a=n?void 0:i.QuestionFactory.Instance.createQuestion(o,t.name);a||(a=i.Serializer.createClass(o,{})),a.name=t.name;var s=n?i.Helpers.createCopy(n):a.toJSON(),l=t.toJSON();if(r)for(var c in r)l[c]&&i.Helpers.isTwoValueEquals(l[c],r[c])&&delete l[c];for(var c in l)s[c]=l[c];e.updateJSON(s,o,t.getType()),a.fromJSON(s),e.removeValidators(a);var p=t.parent,u=p.elements.indexOf(t);p.isConverting=!0;var d=u+1<p.elements.length&&!1===p.elements[u+1].startWithNewLine;return p.removeElement(t),p.addElement(a,u),d&&(p.elements[u+1].startWithNewLine=!1),delete p.isConverting,a.onSurveyLoad(),a},e.updateJSON=function(t,o,r){e.updateJSONForRating(t,o),e.updateJSONForMatrices(t,o,r),e.updateJSONForPanels(t,o,r),e.updateJSONForBarrating(t,o)},e.updateJSONForMatrices=function(t,o,r){if(i.Serializer.isDescendantOf(o,"matrix")&&i.Serializer.isDescendantOf(r,"matrixdropdownbase")&&t.columns){var n=0;t.columns=t.columns.map((function(e){var t=e.name?e.name:"string"==typeof e?e:"col"+n++;return e.title?{value:t,text:e.title}:t}))}i.Serializer.isDescendantOf(o,"matrixdropdownbase")&&i.Serializer.isDescendantOf(r,"matrix")&&t.columns&&(t.columns=t.columns.map((function(t){return{name:e.getColumnName(t.name||t.value||t),title:t.text}})))},e.getColumnName=function(e){return i.Helpers.isNumber(e)?"col"+e:e},e.updateJSONForRating=function(e,t){"rating"===t&&e.choices&&(e.rateValues=e.choices),e.rateValues&&!i.Serializer.isDescendantOf(t,"matrixdropdownbase")&&(e.choices=e.rateValues)},e.updateJSONForBarrating=function(e,t){"barrating"===t&&(e.choices=[1,2,3,4,5])},e.updateJSONForPanels=function(e,t,o){i.Serializer.isDescendantOf(t,"paneldynamic")&&i.Serializer.isDescendantOf(o,"panel")&&e.elements&&(e.templateElements=e.elements,delete e.elements),i.Serializer.isDescendantOf(t,"panel")&&i.Serializer.isDescendantOf(o,"paneldynamic")&&e.templateElements&&(e.elements=e.templateElements,delete e.templateElements)},e.removeValidators=function(e){var t=e.validators;if(Array.isArray(t)&&0!==t.length)for(var o=e.getSupportedValidators(),r=t.length-1;r>=0;r--){var n=t[r].getType().replace("validator","");o.indexOf(n)<0&&t.splice(r,1)}},e}();!function(e){e.Unknown="unknown",e.Survey="survey",e.Page="page",e.Panel="panel",e.Question="question",e.Column="column"}(X||(X={}));var te=function(){function e(){}return e.getNewElementName=function(e){var t=e.getSurvey();return t?e.isPage?this.getNewPageName(t.pages):e.isPanel?this.getNewPanelName(t.getAllPanels()):this.getNewQuestionName(t.getAllQuestions(!1,!1,!0)):e.name},e.getNewPageName=function(t){return e.getNewName(t,G.getString("ed.newPageName"))},e.isPageNameAutoGenerated=function(t){return e.isNameAutoGenerated(t,G.getString("ed.newPageName"))},e.isPagePropertiesAreModified=function(t){if(!e.isPageNameAutoGenerated(t.name))return!0;var o=t.toJSON();for(var r in delete o.name,delete o.elements,o)return!0;return!1},e.getNewQuestionName=function(t){return e.getNewName(t,G.getString("ed.newQuestionName"))},e.getNewPanelName=function(t){return e.getNewName(t,G.getString("ed.newPanelName"))},e.generateNewName=function(e){for(var t=e.length;t>0&&e[t-1]>="0"&&e[t-1]<="9";)t--;var o=e.substring(0,t),r=0;return t<e.length&&(r=parseInt(e.substring(t))),o+ ++r},e.getNewName=function(e,t){for(var o={},r=0;r<e.length;r++)o[e[r].name]=!0;for(var n=1;o[t+n.toString()];)n++;return t+n.toString()},e.isNameAutoGenerated=function(e,t){if(!e||e.length<t.length)return!1;var o=e.substring(t.length);return i.Helpers.isNumber(o)},e.getObjectType=function(e){return e&&e.getType?e.isPage?X.Page:e.isPanel?X.Panel:"survey"==e.getType()?X.Survey:"matrixdropdowncolumn"==e.getType()?X.Column:e.isQuestion?X.Question:X.Unknown:X.Unknown},e.getObjectTypeStr=function(t){var o=e.getObjectType(t);return o===X.Survey?"survey":o===X.Page?"page":o===X.Panel?"panel":o===X.Question?"question":o===X.Column?"column":"unknown"},e.getObjectName=function(t,o){return void 0===o&&(o=!1),e.getObjectType(t)===X.Survey?G.getString("ed.surveyTypeName"):o&&t.title?t.title:o&&t.text?t.text:t.name?t.name:""},e.getElements=function(e,t){return void 0===t&&(t=!1),e?e.getElementsInDesign?e.getElementsInDesign(t):e.elements?e.elements:[]:[]},e.addElements=function(t,o,r){for(var n=0;n<t.length;n++)t[n].isPanel===o&&r.push(t[n]),e.addElements(e.getElements(t[n]),o,r)},e.getAllElements=function(t,o){for(var r=[],n=0;n<t.pages.length;n++)e.addElements(t.pages[n].elements,o,r);return r},e.isPropertyVisible=function(e,t,o,r,n,i){if(void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n=null),void 0===i&&(i=null),!t||!t.visible)return!1;if(r&&t.showMode&&r!==t.showMode)return!1;if(t.isVisible&&e.getLayoutType&&!t.isVisible(e.getLayoutType(),null))return!1;var a=o?function(e,t){return o.onCanShowPropertyCallback(e,t,r,n,i)}:null;return!(a&&!a(e,t))},e.scrollIntoViewIfNeeded=function(t){if(t&&t.scrollIntoView){var o=t.getBoundingClientRect(),r=e.getScrollableDiv(t);if(r){var n=r.clientHeight;if(o.top<r.offsetTop)t.scrollIntoView(!0);else{var i=n+r.offsetTop;o.bottom>i&&o.height<n&&t.scrollIntoView(!1)}}}},e.getScrollableDiv=function(e){for(;e;){if(e.id&&e.id.indexOf("scrollableDiv")>-1)return e;if(!e.offsetParent)return null;e=e.offsetParent}return null},e.moveItemInArray=function(t,o,r){if(!t||t.length<2)return!1;if(r<0||r>=t.length)return!1;var n=t.indexOf(o);if(n<0||n==r)return!1;for(var i=0;i<t.length;i++)e.disableSelectingObj(t[i]);t.splice(n,1),t.splice(r,0,o);for(i=0;i<t.length;i++)e.enableSelectingObj(t[i]);return!0},e.applyItemValueArray=function(e,t){if(t&&0!=t.length){if(e.length>t.length&&e.splice(t.length,e.length-t.length),e.length<t.length){for(var o=[],r=e.length;r<t.length;r++)o.push(t[r]);e.splice.apply(e,[e.length,0].concat(o))}for(r=0;r<e.length;r++)e[r].value!=t[r].value&&(e[r].value=t[r].value),e[r].text=t[r].hasText?t[r].text:""}else e.splice(0,e.length)},e.disableSelectingObj=function(e){e.disableSelecting=!0},e.enableSelectingObj=function(e){delete e.disableSelecting},e.canSelectObj=function(e){return!e||!0!==e.disableSelecting},e.warnNonSupported=function(t,o){var r=E(t)+" is not supported in V2.";o&&(r+=" Use the '"+o+"' property instead"),e.warnText(r)},e.warnText=function(e){console.warn(e)},e.deleteConditionProperties=function(e){delete e.visible,delete e.visibleIf,delete e.readOnly,delete e.enableIf,delete e.valueName,delete e.choicesVisibleIf,delete e.choicesEnableIf,delete e.width,delete e.minWidth,delete e.maxWidth},e.updateQuestionJson=function(t){t.storeOthersAsComment=!1,delete t.valuePropertyName,e.deleteConditionProperties(t),e.deleteConditionPropertiesFromArray(t.choices),e.deleteConditionPropertiesFromArray(t.rows),e.deleteConditionPropertiesFromArray(t.columns),e.deleteConditionPropertiesFromArray(t.rates)},e.deleteConditionPropertiesFromArray=function(t){Array.isArray(t)&&t.forEach((function(t){e.deleteConditionProperties(t)}))},e.convertMatrixRowsToText=function(e){return e.filter((function(e){return!e.cells[0].hasError})).map((function(e){return e.cells.map((function(e){return e.value||""})).join(i.ItemValue.Separator).replace(/\|$/,"")})).join("\n")},e.convertItemValuesToText=function(e){var t="";return e.forEach((function(e){t&&(t+="\n"),t+=e.value,e.pureText&&(t+=i.ItemValue.Separator+e.pureText)})),t},e.convertTextToItemValues=function(e,t,o){var r=[];if(!e)return r;for(var n=e.split("\n"),a=0;a<n.length;a++)if(n[a]){var s=n[a].split(i.ItemValue.Separator),l=i.Serializer.createClass(o);t.forEach((function(e,t){l[e.name]=s[t]})),r.push(l)}return r},e.sortItems=function(e,t){void 0===t&&(t="text");var o=function(e,t){for(var o="";t<e.length&&e[t]>="0"&&e[t]<="9";)o+=e[t],t++;return parseFloat(o)};e.sort((function(e,r){for(var n=e[t]?e[t]:"",i=r[t]?r[t]:"",a=0;a<n.length&&a<i.length&&n[a]===i[a];)a++;if(a<n.length&&a<i.length){for(;a>0&&n[a-1]>="0"&&n[a-1]<="9";)a--;var s=o(n,a),l=o(i,a);if(s<l)return-1;if(s>l)return 1}return n.localeCompare(i)}))},e.getQuestionContextIndexInfo=function(e,t){void 0===t&&(t="");for(var o=["row","panel"],r=0;r<o.length;r++){var n=t+o[r]+".",i=e.indexOf(n);if(i>-1)return{index:i,name:n}}},e.isSupportCellEditor=function(e){for(var t=["selectbase","boolean","rating"],o=0;o<t.length;o++)if(i.Serializer.isDescendantOf(e,t[o]))return!0;return!1},e.getElementDeepLength=function(e){for(var t=0;e;)e.isPanel&&t++,e=e.parent;return t},e}(),oe=function(e){function t(t){var o=e.call(this)||this;return o.setDesignMode(!0),o.fromJSON(t),o}return Y(t,e),t}(i.SurveyModel),re=function(){function e(){}return e.prototype.getCorrectAt=function(e,t,o){return t},Object.defineProperty(e.prototype,"isFixable",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.fixError=function(e,t,o){return e},e}(),ne=function(){function e(e,t){this.at=e,this.text=t,this.rowAt=-1,this.columnAt=-1}return Object.defineProperty(e.prototype,"isFixable",{get:function(){return this.fixer.isFixable},enumerable:!1,configurable:!0}),e.prototype.fixError=function(e){return e},Object.defineProperty(e.prototype,"fixer",{get:function(){return this.fixerValue||(this.fixerValue=this.createFixer()),this.fixerValue},enumerable:!1,configurable:!0}),e.prototype.createFixer=function(){return new re},e}(),ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getErrorType=function(){return"parseerror"},t}(ne),ae=function(e){function t(t,o){var r=e.call(this)||this;return r.element=t,r.jsonObj=o,r}return Y(t,e),t.prototype.getNewIndex=function(e,t,o,r){var n=e.indexOf(t,o);return n>-1&&(r<0||n<r)?n:-1},t.prototype.fixError=function(e,t,o){var r=e.substring(t,o+1),n=JSON.parse(r);return this.updatedJsonObjOnFix(n),this.replaceJson(e,t,o,n)},t.prototype.updatedJsonObjOnFix=function(e){},t.prototype.replaceJson=function(e,t,o,r){var n=JSON.stringify(r,null,a.jsonEditor.indentation);return n=this.addLeftIndentIntoContent(e,n,t-1),e.substring(0,t)+n+e.substring(o+1)},t.prototype.addLeftIndentIntoContent=function(e,t,o){if(o<=0)return t;for(var r="";o>0&&(" "===e[o]||"\t"===e[o]);)r+=e[o],o--;if(!r)return t;for(var n=t.split("\n"),i=1;i<n.length;i++)n[i]=r+n[i];return n.join("\n")},t}(re),se=function(e){function t(t,o,r){var n=e.call(this,t,o)||this;return n.element=t,n.jsonObj=o,n.propertyName=r,n}return Y(t,e),t.prototype.getCorrectAt=function(e,t,o){return this.propertyName?this.getNewIndex(e,this.propertyName,t,o):t},t}(ae),le=function(e){function t(t,o,r){var n=e.call(this,t,o,r)||this;return n.element=t,n.jsonObj=o,n.propertyName=r,n}return Y(t,e),Object.defineProperty(t.prototype,"isFixable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.updatedJsonObjOnFix=function(e){var t=e[this.propertyName];t&&!Array.isArray(t)&&(e[this.propertyName]=[t])},t}(se),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),Object.defineProperty(t.prototype,"isFixable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getCorrectAt=function(e,t,o){var r=this.getNewIndex(e,"name:",t,o);return r>t?r:this.getNewIndex(e,'"name":',t,o)},t.prototype.updatedJsonObjOnFix=function(e){e.name=te.getNewElementName(this.element)},t}(ae),pe=function(e){function t(t,o,r){var n=e.call(this,t,o)||this;return n.element=t,n.jsonObj=o,n.propertyName=r,n}return Y(t,e),Object.defineProperty(t.prototype,"isFixable",{get:function(){return"name"===this.propertyName},enumerable:!1,configurable:!0}),t.prototype.updatedJsonObjOnFix=function(e){var t=this.element.name;t||(t=te.getNewElementName(this.element)),e.name=t},t}(ae),ue=function(e){function t(t){var o=e.call(this,t.at,t.getFullDescription())||this;return o.elementStart=t.at,o.elementEnd=t.end,o.element=t.element,o.errorType=t.type,o.propertyName=t.propertyName,o.jsonObj=t.jsonObj,o}return Y(t,e),t.prototype.createFixer=function(){return"unknownproperty"===this.errorType?new se(this.element,this.jsonObj,this.propertyName):"arrayproperty"===this.errorType?new le(this.element,this.jsonObj,this.propertyName):"duplicatename"===this.errorType?new ce(this.element,this.jsonObj):"requiredproperty"===this.errorType?new pe(this.element,this.jsonObj,this.propertyName):e.prototype.createFixer.call(this)},t.prototype.getErrorType=function(){return this.errorType},Object.defineProperty(t.prototype,"isFixable",{get:function(){return this.fixer.isFixable&&this.elementStart>-1&&this.elementEnd>this.elementStart},enumerable:!1,configurable:!0}),t.prototype.correctAt=function(e){var t=this.fixer.getCorrectAt(e,this.at,this.elementEnd);t>-1&&(this.at=t)},t.prototype.fixError=function(e){return this.fixer.fixError(e,this.elementStart,this.elementEnd)},t}(ne),de=function(){function e(e){this.text=e,this.text&&""!=this.text.trim()||(this.text="{}"),this.errors=[],this.process()}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isJsonCorrect",{get:function(){return!!this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isJsonHasErrors",{get:function(){return this.errors.length>0||!this.isJsonCorrect},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e=this;try{this.jsonValue=new $(1).parse(this.text)}catch(r){this.errors.push(new ie(r.at,r.message))}if(null!=this.jsonValue){this.updateJsonPositions(this.jsonValue),this.surveyValue=new oe(this.jsonValue);var t=this.surveyValue.jsonErrors;if(Array.isArray(t))for(var o=0;o<t.length;o++){var r=new ue(t[o]);r.correctAt(this.text),this.errors.push(r)}this.getDuplicatedNamesErrors().forEach((function(t){return e.errors.push(t)}))}this.setErrorsPositionByChartAt()},e.prototype.updateJsonPositions=function(e){for(var t in e.pos.self=e,e){var o=e[t];o&&o.pos&&(e.pos[t]=o.pos,this.updateJsonPositions(o))}},e.prototype.setErrorsPositionByChartAt=function(){if(0!==this.errors.length){this.errors.sort((function(e,t){return e.at>t.at?1:e.at<t.at?-1:0}));for(var e={row:0,column:0},t=0,o=0;o<this.errors.length;o++){var r=this.errors[o].at;e=this.getPostionByChartAt(e,t,r);var n=this.errors[o];r==n.at&&(n.columnAt=e.column,n.rowAt=e.row),t=r}}},e.prototype.getPostionByChartAt=function(t,o,r){for(var n={row:t.row,column:t.column},i=o;i<r;)this.text.charAt(i)==e.newLineChar?(n.row++,n.column=0):n.column++,i++;return n},e.prototype.getDuplicatedNamesErrors=function(){var e=this,t=[];return this.getDuplicatedElements().forEach((function(o){var r=new ue(e.createDuplicatedError(o));r.correctAt(e.text),r&&t.push(r)})),t},e.prototype.getDuplicatedElements=function(){var e=this,t=[],o={};return this.survey.pages.forEach((function(r){return e.checkDuplicatedElement(r,o,t)})),te.getAllElements(this.survey,!0).forEach((function(r){return e.checkDuplicatedElement(r,o,t)})),te.getAllElements(this.survey,!1).forEach((function(r){return e.checkDuplicatedElement(r,o,t)})),t},e.prototype.checkDuplicatedElement=function(e,t,o){var r=e.name;t[r]?o.push(e):t[r]=!0},e.prototype.createDuplicatedError=function(e){var t=e.pos;if(t){var o=new i.JsonError("duplicatename","The name: '"+e.name+"' is duplicated.");return o.at=t.start,o.end=t.end,o.element=e,o}},e.newLineChar="\n",e}(),he=function(e){function t(t){var o=e.call(this,"duplicatename","The name: '"+t.name+"' is duplicated.")||this;return o.element=t,o}return Y(t,e),t}(i.JsonError),ge=function(e){function t(t){var o=e.call(this)||this;return o.toolbox=t,o}return Y(t,e),t.prototype.toggleState=function(){this.toolbox&&this.toolbox.toggleCategoryState(this.name)},Z([Object(i.property)()],t.prototype,"name",void 0),Z([Object(i.property)()],t.prototype,"title",void 0),Z([Object(i.propertyArray)()],t.prototype,"items",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"collapsed",void 0),t}(i.Base),fe=function(e){function t(t){var o=e.call(this,t)||this;return o.item=t,o.id||(o.id=o.name),o}return Y(t,e),t.prototype.toJSON=function(){return this.item},Object.defineProperty(t.prototype,"typeName",{get:function(){return this.json&&this.json.type?this.json.type:this.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPanel",{get:function(){var e=this.typeName;return!!e&&i.Serializer.isDescendantOf(e,"panelbase")},enumerable:!1,configurable:!0}),t}(i.Action),me=function(e){function t(t,o,r){void 0===t&&(t=null),void 0===o&&(o=null),void 0===r&&(r=!1);var n=e.call(this)||this;return n.supportedQuestions=t,n.creator=o,n._orderedQuestions=["radiogroup","rating","checkbox","dropdown","tagbox","boolean","file","imagepicker","ranking","text","comment","multipletext","panel","paneldynamic","matrix","matrixdropdown","matrixdynamic","html","expression","image","signaturepad"],n.copiedItemMaxCount=3,n.allowExpandMultipleCategoriesValue=!1,n.keepAllCategoriesExpandedValue=!1,n.categoriesTitles={},n.updateResponsiveness(n.isCompact,n.overflowBehavior),n.createDefaultItems(t,r),n.initDotsItem(),n}return Y(t,e),t.getQuestionDefaultSettings=function(e){if(a.toolbox&&a.toolbox.defaultJSON)return a.toolbox.defaultJSON[e]},Object.defineProperty(t.prototype,"orderedQuestions",{get:function(){return this._orderedQuestions},set:function(e){this._orderedQuestions=e,this.reorderItems()},enumerable:!1,configurable:!0}),t.prototype.updateResponsiveness=function(e,t){"scroll"!=t||!this.creator||this.creator.isTouch?this.hasCategories&&this.showCategoryTitles?e?(this.isResponsivenessDisabled=!1,this.raiseUpdate(!0)):(this.isResponsivenessDisabled=!0,this.setActionsMode("large")):(this.isResponsivenessDisabled=!1,this.raiseUpdate(!0)):this.isResponsivenessDisabled=!0},t.prototype.initDotsItem=function(){var e=this;this.dotsItem.popupModel.horizontalPosition="right",this.dotsItem.popupModel.verticalPosition="top",this.dragOrClickHelper=new i.DragOrClickHelper((function(t,o,r){var n,i=e.creator.getJSONForNewElement(r.json);e.dotsItem.popupModel.toggleVisibility(),null===(n=e.creator)||void 0===n||n.onDragDropItemStart(),e.dragDropHelper.startDragToolboxItem(t,i,r)})),this.hiddenItemsListModel.onPointerDown=function(t,o){e.creator.readOnly||e.dragOrClickHelper.onPointerDown(t,o)},this.dotsItem.popupModel.cssClass="svc-toolbox-popup"},t.prototype.getDefaultQuestionCategories=function(){var e=this,o={};return Object.keys(t.defaultCategories).forEach((function(r){t.defaultCategories[r].forEach((function(t){e.supportedQuestions&&-1==e.supportedQuestions.indexOf(t)||(o[t]=r)}))})),o},t.prototype.getCategoryTitle=function(e){return this.categoriesTitles[e]?this.categoriesTitles[e]:z("toolboxCategories."+e)},t.prototype.onActiveCategoryChanged=function(e){for(var t=this.categories,o=0;o<t.length;o++){var r=t[o];r.collapsed=r.name!==e}},t.prototype.setLocation=function(e){"sidebar"===e?this.visibleActions.forEach((function(e){return e.mode="small"})):this.dotsItem.popupModel.horizontalPosition="right"==this.creator.toolboxLocation?"left":"right"},Object.defineProperty(t.prototype,"jsonText",{get:function(){return JSON.stringify(this.actions)},set:function(e){this.actions=(e?JSON.parse(e):[]).map((function(e){return new fe(e)})),this.onItemsChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"copiedJsonText",{get:function(){return JSON.stringify(this.copiedItems)},set:function(e){var t=e?JSON.parse(e):[];this.clearCopiedItems();for(var o=0;o<t.length;o++)t[o].isCopied=!0,this.addItem(t[o])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemNames",{get:function(){for(var e=[],t=0;t<this.items.length;t++)e.push(this.items[t].typeName);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"copiedItems",{get:function(){for(var e=[],t=0;t<this.actions.length;t++)this.actions[t].isCopied&&e.push(this.actions[t]);return e},enumerable:!1,configurable:!0}),t.prototype.addItems=function(e,t){void 0===t&&(t=!1),t&&this.clearItems();for(var o=0;o<e.length;o++)this.actions.push(this.getActionByItem(e[o]));this.onItemsChanged()},t.prototype.addCopiedItem=function(e,o){void 0===o&&(o=null),o||(o={});var r=o.name?o.name:e.name,n=o.title?o.title:r,i=o.tooltip?o.tooltip:n,a=o.iconName?o.iconName:t.defaultIconName,s={id:r,name:r,title:n,tooltip:i,className:"svc-toolbox__item svc-toolbox__item--"+a,isCopied:!1!==o.isCopied,iconName:a,json:o.json?o.json:this.getQuestionJSON(e),category:o.category?o.category:""};if(!this.replaceItem(s)){var l=this.copiedItems;this.copiedItemMaxCount>0&&l.length==this.copiedItemMaxCount&&this.removeItem(l[this.copiedItemMaxCount-1].name),this.addItem(s)}},t.prototype.getActionByItem=function(e){return e instanceof fe?e:(e.iconName=e.iconName?e.iconName:t.defaultIconName,new fe(e))},t.prototype.addItem=function(e,t){this.correctItem(e);var o=this.getActionByItem(e);void 0===t?this.actions.push(o):this.actions.splice(t,0,o),this.onItemsChanged()},t.prototype.correctItem=function(e){e.title||(e.title=e.name),e.tooltip||(e.tooltip=e.title)},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),t.prototype.replaceItem=function(e){this.correctItem(e);var t=this.indexOf(e.name);if(!(t<0))return this.actions[t]=this.getActionByItem(e),this.onItemsChanged(),!0},t.prototype.removeItem=function(e){var t=this.indexOf(e);return!(t<0)&&(this.actions.splice(t,1),this.onItemsChanged(),!0)},t.prototype.clearItems=function(){this.actions=[],this.onItemsChanged()},t.prototype.clearCopiedItems=function(){for(var e=this.copiedItems,t=0;t<e.length;t++)this.removeItem(e[t].name)},t.prototype.getItemByName=function(e){if(!e)return null;var t=this.indexOf(e);return t>-1?this.actions[t]:null},Object.defineProperty(t.prototype,"allowExpandMultipleCategories",{get:function(){return this.allowExpandMultipleCategoriesValue},set:function(e){this.allowExpandMultipleCategoriesValue=e,this.updateCategoriesState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepAllCategoriesExpanded",{get:function(){return this.keepAllCategoriesExpandedValue||!this.showCategoryTitlesValue},set:function(e){this.keepAllCategoriesExpandedValue=e,this.canCollapseCategories=!this.keepAllCategoriesExpanded,this.updateCategoriesState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCategoryTitles",{get:function(){return this.showCategoryTitlesValue},set:function(e){this.showCategoryTitlesValue=e,this.updateCategoriesState()},enumerable:!1,configurable:!0}),t.prototype.updateTitles=function(){var e=this;this.actions.forEach((function(t){e.updateActionTitle(t),e.updateActionTitle(t.innerItem)})),Array.isArray(this.categories)&&this.categories.forEach((function(t){t.title=e.getCategoryTitle(t.name)}))},t.prototype.updateActionTitle=function(e){var t=G.getString("qt."+e.id);t&&(e.title=t,e.tooltip=t)},t.prototype.updateCategoriesState=function(){this.allowExpandMultipleCategories||this.keepAllCategoriesExpanded?(this.activeCategory="",this.keepAllCategoriesExpandedValue&&this.expandAllCategories()):this.categories.length>0&&(this.activeCategory=this.categories[0].name)},t.prototype.changeCategory=function(e,t){this.changeCategories([{name:e,category:t}])},t.prototype.changeCategories=function(e){for(var t=0;t<e.length;t++){var o=e[t],r=this.getItemByName(o.name);r&&(r.category=o.category)}this.onItemsChanged()},t.prototype.defineCategories=function(e,t){var o=this;if(void 0===t&&(t=!1),Array.isArray(e)){this.actions.forEach((function(e){e.visible=!1})),this.categoriesTitles={};var r=new Array;e.forEach((function(e){e.category&&e.title&&(o.categoriesTitles[e.category]=e.title),Array.isArray(e.items)&&e.items.forEach((function(t){var n=void 0,i=void 0;"string"==typeof t?n=t:(n=t.name,i=t.title);var a=o.getItemByName(n);a&&(a.category=e.category,a.visible=!0,i&&(a.title=i),r.push(a))}))})),this.actions.forEach((function(e){e.visible||(t&&(e.visible=!0,e.category="misc"),r.push(e))})),this.setItems(r),this.onItemsChanged(!1)}},t.prototype.removeCategories=function(){var e=i.ElementFactory.Instance.getAllTypes();this.changeCategories(e.map((function(e){return{name:e,category:null}}))),this.onItemsChanged()},t.prototype.toggleCategoryState=function(e){if(!this.keepAllCategoriesExpanded)if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!t.collapsed)}else this.activeCategory=e},t.prototype.expandCategory=function(e){if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!1)}else this.canCollapseCategories&&(this.activeCategory=e)},t.prototype.collapseCategory=function(e){if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!0)}},t.prototype.expandAllCategories=function(){this.expandCollapseAllCategories(!1)},t.prototype.collapseAllCategories=function(){this.expandCollapseAllCategories(!0)},t.prototype.expandCollapseAllCategories=function(e){for(var t=this.categories,o=0;o<t.length;o++)t[o].collapsed=e},t.prototype.getCategoryByName=function(e){for(var t=this.categories,o=0;o<t.length;o++){var r=t[o];if(r.name===e)return r}return null},t.prototype.onItemsChanged=function(e){var t=this;void 0===e&&(e=!0);for(var o=new Array,r={},n=this.activeCategory,i=function(e){var i=a.actions[e];if(i.innerItem.action=function(){t.creator.clickToolboxItem(i.json)},!1===i.visible)return"continue";var s=i.category?i.category:"general";if(!r[s]){var l=a.createCategory();l.name=s,l.title=a.getCategoryTitle(s),l.collapsed=s!==n&&!a.keepAllCategoriesExpanded,r[s]=l,o.push(l)}r[s].items.push(i)},a=this,s=0;s<this.actions.length;s++)i(s);if(this.categories=o,this.keepAllCategoriesExpanded||(this.allowExpandMultipleCategories?o.length>0&&(o[0].collapsed=!1):n&&r[n]?this.activeCategory=n:this.activeCategory=o.length>0?o[0].name:""),e){var l=[];this.categories.forEach((function(e){l=l.concat(e.items)})),this.actions=l}this.hasCategories=o.length>1,this.updateItemSeparators(),this.raiseUpdate(!1)},t.prototype.createCategory=function(){return new ge(this)},t.prototype.indexOf=function(e){for(var t=0;t<this.actions.length;t++)if(this.actions[t].name==e)return t;return-1},t.prototype.updateItemSeparators=function(){(this.hasCategories?this.categories:[{items:this.actions}]).forEach((function(e,t){(e.items||[]).forEach((function(e,o){e.needSeparator=0!==t&&0==o,e.innerItem&&(e.innerItem.needSeparator=e.needSeparator)}))}))},t.prototype.reorderItems=function(){var e=this;this.actions.sort((function(t,o){var r=e._orderedQuestions.indexOf(t.name);-1===r&&(r=Number.MAX_VALUE);var n=e._orderedQuestions.indexOf(o.name);return-1===n&&(n=Number.MAX_VALUE),r-n})),this.onItemsChanged()},t.prototype.createDefaultItems=function(e,t){this.clearItems();for(var o=this.getQuestionTypes(e),r=t?this.getDefaultQuestionCategories():{},n=0;n<o.length;n++){var a=o[n],s=i.ElementFactory.Instance.createElement(a,"q1");s||(s=i.Serializer.createClass(a));var l=this.getQuestionJSON(s),c=G.getString("qt."+a),p="icon-"+a,u={id:a,name:a,iconName:p,title:c,tooltip:c,className:"svc-toolbox__item svc-toolbox__item--"+p,json:l,isCopied:!1,category:r[a]||""};this.actions.push(this.getActionByItem(u))}this.registerCustomWidgets(),this.registerComponentQuestions(),this.onItemsChanged()},t.prototype.registerCustomWidgets=function(){var e=i.CustomWidgetCollection.Instance;if(e.getActivatedBy)for(var t=e.widgets,o=0;o<t.length;o++)t[o].canShowInToolbox&&this.addItemFromJSON(t[o].widgetJson)},t.prototype.registerComponentQuestions=function(){for(var e=this.getComponentItems(),t=0;t<e.length;t++)this.addItemFromJSON(e[t].json)},t.prototype.getComponentItems=function(){var e=void 0;if(e||(e=i.ComponentCollection),!e)return[];var t=e.Instance.items;return t||[]},t.prototype.addItemFromJSON=function(e){if(!1!==e.showInToolbox){var o=e.iconName?e.iconName:t.defaultIconName,r=G.getString("qt."+e.name);r&&r!=e.name||(r=e.title),r||(r=e.name);var n=e.defaultJSON?e.defaultJSON:{};n.type||(n.type=e.name);var a=e.category?e.category:"",s=new i.Action({id:e.name,name:e.name,iconName:o,title:r,tooltip:r,className:"svc-toolbox__item svc-toolbox__item--"+o,json:n,isCopied:!1,category:a}),l=this.getActionByItem(s),c=this.getActionById(s.id);if(c)this.actions.splice(this.actions.indexOf(c),1,l);else{var p=Array.isArray(this.supportedQuestions)?this.supportedQuestions.indexOf(s.id):-1;p>-1?this.actions.splice(p,0,l):this.actions.push(l)}}},t.prototype.getQuestionJSON=function(e){var o=(new i.JsonObject).toJsonObject(e);o.type=e.getType();var r=t.getQuestionDefaultSettings(o.type);if(r)for(var n in r)o[n]=r[n];return o},t.prototype.isHiddenCustomWidget=function(e){var t=i.CustomWidgetCollection.Instance.getCustomWidgetByName(e);return!!t&&!t.showInToolbox},t.prototype.getQuestionTypes=function(e){var o=i.ElementFactory.Instance.getAllTypes();e&&0!=e.length||(e=o);for(var r=[],n=0;n<this.orderedQuestions.length;n++){var a=this.orderedQuestions[n];e.indexOf(a)>-1&&o.indexOf(a)>-1&&r.push(a)}for(n=0;n<e.length;n++){var s=e[n];r.indexOf(s)<0&&t.hiddenTypes.indexOf(s)<0&&o.indexOf(s)>-1&&!this.isHiddenCustomWidget(s)&&r.push(s)}return r},t.hiddenTypes=["buttongroup","linkvalue","embeddedsurvey","spinedit","color","fileedit","textwithreset","commentwithreset"],t.defaultIconName="icon-default",t.defaultCategories={choice:["radiogroup","rating","checkbox","dropdown","tagbox","boolean","file","imagepicker","ranking"],text:["text","comment","multipletext"],containers:["panel","paneldynamic"],matrix:["matrix","matrixdropdown","matrixdynamic"],misc:["html","expression","image","signaturepad"]},Z([Object(i.property)({defaultValue:!1})],t.prototype,"showCategoryTitlesValue",void 0),Z([Object(i.propertyArray)()],t.prototype,"categories",void 0),Z([Object(i.property)({defaultValue:"",onSet:function(e,t){t.onActiveCategoryChanged(e)}})],t.prototype,"activeCategory",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"hasCategories",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"canCollapseCategories",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.updateResponsiveness(e,t.overflowBehavior)}})],t.prototype,"isCompact",void 0),Z([Object(i.property)({defaultValue:"scroll",onSet:function(e,t){t.updateResponsiveness(t.isCompact,e)}})],t.prototype,"overflowBehavior",void 0),Z([Object(i.property)()],t.prototype,"forceCompact",void 0),t}(i.AdaptiveActionContainer),ye=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.items=[],o}return Y(t,e),Object.defineProperty(t.prototype,"hasPrev",{get:function(){return this.currentIndex>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasNext",{get:function(){var e=this.currentIndex;return e>-1&&e<this.items.length-1},enumerable:!1,configurable:!0}),t.prototype.hasInHistory=function(e){return this.getIndex(e)>-1},t.prototype.prev=function(){this.selectElement(this.currentIndex-1)},t.prototype.next=function(){this.selectElement(this.currentIndex+1)},t.prototype.reset=function(){this.items=[],this.creator.selectedElement&&this.onObjSelected(this.creator.selectedElement)},t.prototype.selectFromAction=function(e,t){var o=this.currentIndex;o>-1&&o<this.items.length&&(this.items[o].propertyName=t),this.creator.selectElement(e)},t.prototype.onObjSelected=function(e){if(!this.isChangingInternally){var t=this.currentIndex;t>-1&&this.items.splice(t,1),this.items.push({obj:e})}},Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this.getIndex(this.creator.selectedElement)},enumerable:!1,configurable:!0}),t.prototype.getIndex=function(e){if(!e)return-1;this.updateItems();for(var t=0;t<this.items.length;t++)if(this.items[t].obj==e)return t;return-1},t.prototype.selectElement=function(e){if(!(e<0||e>=this.items.length)){this.isChangingInternally=!0;var t=this.items[e];this.creator.selectElement(t.obj,t.propertyName),this.isChangingInternally=!1}},t.prototype.updateItems=function(){for(var e=this.items.length-1;e>=0;e--){var t=this.items[e].obj;!t||!t.isDisposed&&t.inSurvey||this.items.splice(e,1)}},t}(i.Base),be=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.isJSONChanged=!1,o.isProcessingImmediately=!1,o.jsonEditorChangedTimeoutId=-1,o}return Y(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.setText(e)},enumerable:!1,configurable:!0}),t.prototype.onEditorActivated=function(){},t.prototype.onPluginActivate=function(){this.text=this.creator.text,this.onEditorActivated(),this.isJSONChanged=!1},t.prototype.onTextChanged=function(){if(-1!==this.jsonEditorChangedTimeoutId&&clearTimeout(this.jsonEditorChangedTimeoutId),this.isProcessingImmediately)this.jsonEditorChangedTimeoutId=-1;else{var e=this;window&&(this.jsonEditorChangedTimeoutId=window.setTimeout((function(){e.jsonEditorChangedTimeoutId=-1,e.processErrors(e.text)}),t.updateTextTimeout))}},Object.defineProperty(t.prototype,"errorList",{get:function(){var e=this;return this.errorListValue||(this.errorListValue=new i.ListModel([],(function(t){var o=t.data.error;o&&e.gotoError(o.at,o.rowAt,o.columnAt)}),!1),this.errorListValue.searchEnabled=!1,this.errorListValue.cssClasses={item:"svc-json-errors__item",itemBody:"svc-json-error",itemsContainer:"svc-json-errors"},this.errorListValue.hasVerticalScroller=!0),this.errorListValue},enumerable:!1,configurable:!0}),t.prototype.setErrors=function(e){var t=e.length>0;if(t){var o=[];this.createErrorActions(e).forEach((function(e){return o.push(e)})),this.errorList.setItems(o)}this.hasErrors=t},t.prototype.gotoError=function(e,t,o){},t.prototype.createErrorActions=function(e){var t=this,o=[],r=1;return e.forEach((function(e){var n=e.rowAt>-1?"Line: "+(e.rowAt+1)+". ":"",a=e.text;a.length>153&&(a=a.substring(0,150)+"..."),a=n+a;e.at;o.push(new i.Action({id:"error_"+r++,component:"json-error-item",title:a,tooltip:e.text,iconName:"icon-error",iconSize:16,data:{error:e,showFixButton:e.isFixable,fixError:function(){t.text=e.fixError(t.text)},fixButtonIcon:"icon-fix",fixButtonTitle:"Fix error"}}))})),o},t.prototype.processErrors=function(e){var t=new de(e);this.setErrors(t.errors)},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.creator.readOnly},enumerable:!1,configurable:!0}),t.updateTextTimeout=1e3,Z([Object(i.property)()],t.prototype,"hasErrors",void 0),t}(i.Base),ve=function(){function e(e){this.creator=e,this.saveToFileHandler=F,this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.exportToFile=function(e){if(this.model){var t=new Blob([this.model.text],{type:"application/json"});this.saveToFileHandler(e,t)}},e.prototype.importFromFile=function(e,t){var o=this,r=new FileReader;r.onload=function(e){var n=r.result;o.model&&(o.model.text=n,o.model.isJSONChanged=!0),t&&t(n)},r.readAsText(e)},e.prototype.copyToClipboard=function(){this.model&&navigator.clipboard.writeText(this.model.text)},e.prototype.createActions=function(){var e=this,t=[];return this.importAction=new i.Action({id:"svc-json-import",iconName:"icon-load",locTitleName:"ed.surveyJsonImportButton",locTooltipName:"ed.surveyJsonImportButton",visible:new i.ComputedUpdater((function(){return"editor"===e.creator.activeTab})),mode:"small",component:"sv-action-bar-item",needSeparator:!0,action:function(){document&&(e.inputFileElement||(e.inputFileElement=document.createElement("input"),e.inputFileElement.type="file",e.inputFileElement.style.display="none",e.inputFileElement.onchange=function(){e.inputFileElement.files.length<1||(e.importFromFile(e.inputFileElement.files[0]),e.inputFileElement.value="")}),e.inputFileElement.click())}}),t.push(this.importAction),this.exportAction=new i.Action({id:"svc-json-export",iconName:"icon-download",locTitleName:"ed.surveyJsonExportButton",locTooltipName:"ed.surveyJsonExportButton",visible:new i.ComputedUpdater((function(){return"editor"===e.creator.activeTab})),mode:"small",component:"sv-action-bar-item",action:function(){e.exportToFile(a.jsonEditor.exportFileName)}}),t.push(this.exportAction),this.copyAction=new i.Action({id:"svc-json-copy",iconName:"icon-copy",locTitleName:"ed.surveyJsonCopyButton",locTooltipName:"ed.surveyJsonCopyButton",visible:new i.ComputedUpdater((function(){return"editor"===e.creator.activeTab})),mode:"small",component:"sv-action-bar-item",action:function(){e.copyToClipboard()}}),t.push(this.copyAction),t},e.prototype.activate=function(){this.model=this.createModel(this.creator)},e.prototype.deactivate=function(){if(this.model){if(!new de(this.model.text).isJsonCorrect)return!1;!this.model.readOnly&&this.model.isJSONChanged&&(this.creator.selectedElement=void 0,this.creator.text=this.model.text,this.creator.selectedElement=this.creator.survey,this.creator.setModified({type:"JSON_EDITOR"})),this.model.dispose(),this.model=void 0}return!0},e.prototype.defaultAllowingDeactivate=function(){if(!this.model)return!0;var e=new de(this.model.text);return e.isJsonCorrect?!e.isJsonHasErrors:void 0},e}();o(5);var xe=function(e){function t(t){var o=e.call(this,t)||this;return o.aceCanUndo=!1,o.aceCanRedo=!1,o}return Y(t,e),t.prototype.getText=function(){return this.aceEditor?this.aceEditor.getValue():""},t.prototype.setText=function(e){this.isProcessingImmediately=!0,this.aceEditor.setValue(e),this.aceEditor.renderer.updateFull(!0),this.aceEditor.getSession().getUndoManager().reset(),this.processErrors(e),this.isProcessingImmediately=!1},t.prototype.init=function(e){var o,r;this.aceEditor=e;var n=null===(r=null===(o=window.ace)||void 0===o?void 0:o.define)||void 0===r?void 0:r.modules;if(n&&n["ace/ext/searchbox"]||this.aceEditor.commands.removeCommand("find"),this.aceEditor.setReadOnly(this.readOnly),t.aceBasePath)try{window.ace.config.set("basePath",t.aceBasePath),this.aceEditor.session.setMode("ace/mode/json")}catch(e){}var i=this;this.aceEditor.setShowPrintMargin(!1),this.aceEditor.getSession().on("change",(function(){i.onTextChanged()})),this.aceEditor.getSession().setUseWorker(!0),de.newLineChar=this.aceEditor.session.doc.getNewLineCharacter(),this.onPluginActivate()},t.prototype.updateUndoRedoState=function(){var e=this.aceEditor.getSession().getUndoManager();this.aceCanUndo=e.hasUndo(),this.aceCanRedo=e.hasRedo(),!0===this.aceEditor.isFocused()&&(this.isJSONChanged=!e.isClean())},t.prototype.onTextChanged=function(){this.updateUndoRedoState(),e.prototype.onTextChanged.call(this)},t.prototype.createAnnotations=function(e){for(var t=[],o=0;o<e.length;o++){var r=e[o],n={row:r.rowAt,column:r.columnAt,text:r.text,type:"error"};t.push(n)}return t},t.prototype.setErrors=function(t){var o=this;e.prototype.setErrors.call(this,t),this.aceEditor.getSession().setAnnotations(this.createAnnotations(t)),setTimeout((function(){return o.aceEditor.resize()}))},t.prototype.gotoError=function(e,t,o){this.aceEditor.focus(),this.aceEditor.renderer.scrollCursorIntoView({row:t+1,column:o+1},.5),this.aceEditor.gotoLine(t+1,o+1)},t.prototype.onEditorActivated=function(){this.aceEditor.getSession().getUndoManager().markClean(),this.updateUndoRedoState(),this.aceEditor.focus()},t.aceBasePath="",Z([Object(i.property)()],t.prototype,"aceCanUndo",void 0),Z([Object(i.property)()],t.prototype,"aceCanRedo",void 0),t}(be),we=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,void 0,"svc-tab-json-editor-ace"),o}return Y(t,e),t.prototype.createModel=function(e){return new xe(e)},t.hasAceEditor=function(){return void 0!==window.ace},t}(ve);o(6);var je=function(e){function t(t){var o=e.call(this,t)||this;return o.ariaLabel=z("tabs.editor"),o.onPluginActivate(),o}return Y(t,e),t.prototype.checkKey=function(e,t){if("Tab"===t.key){t.preventDefault();var o=t.target,r=o.selectionStart,n=o.selectionEnd;o.value=o.value.substring(0,r)+"\t"+o.value.substring(n),o.selectionStart=o.selectionEnd=r+1,t.stopPropagation()}return!0},t.prototype.getText=function(){return this._text},t.prototype.setText=function(e){this.isProcessingImmediately=!0,this._text=e,this.processErrors(e),this.isProcessingImmediately=!1},t.prototype.gotoError=function(e,t,o){if(this.textElement){var r=this.textElement;r.selectionStart=e,r.selectionEnd=e,r.focus()}},Object.defineProperty(t.prototype,"errorButtonText",{get:function(){return this.canShowErrors?z("ed.jsonHideErrors"):z("ed.jsonShowErrors")},enumerable:!1,configurable:!0}),t.prototype.toggleErrors=function(){this.canShowErrors=!this.canShowErrors},Object.defineProperty(t.prototype,"userFriendlyErrors",{get:function(){if(0===this._errors.length)return[];for(var e=[],t=0;t<this._errors.length-1;t++)e[t]=this._errors[t].text,e[t]+="\n\n";return e[this._errors.length-1]=this._errors[this._errors.length-1].text,e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},enumerable:!1,configurable:!0}),t.prototype.onTextChanged=function(){this.isJSONChanged=!0,e.prototype.onTextChanged.call(this)},t.prototype.setErrors=function(t){this._errors=t,e.prototype.setErrors.call(this,t)},Z([Object(i.property)({defaultValue:"",onSet:function(e,t){return t.onTextChanged()}})],t.prototype,"_text",void 0),Z([Object(i.propertyArray)()],t.prototype,"_errors",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"canShowErrors",void 0),t}(be),Ce=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,void 0,"svc-tab-json-editor-textarea"),o}return Y(t,e),t.prototype.createModel=function(e){return new je(e)},t}(ve);o(7);var Se=function(e){function t(){var t=e.call(this)||this;return t.activateZoom=function(){document.addEventListener("keydown",t.listenTryToZoom),document.addEventListener("wheel",t.listenTryToZoomWithWheel,{passive:!1})},t.deactivateZoom=function(){document.removeEventListener("keydown",t.listenTryToZoom),document.removeEventListener("wheel",t.listenTryToZoomWithWheel)},t.listenTryToZoomWithWheel=function(e){return t.tryToZoomWithWheel(e,e)},t.listenTryToZoom=function(e){return t.tryToZoom(e,e)},t}return Y(t,e),Object.defineProperty(t.prototype,"zoomScale",{get:function(){return this.currZoomScale},enumerable:!1,configurable:!0}),t.prototype.tryToZoomWithWheel=function(e,t){var o=t.deltaY;return(t.ctrlKey||t.metaKey)&&(o<0?this.zoomSimulator("up",t):this.zoomSimulator("down",t)),!0},t.prototype.tryToZoom=function(e,t){return(t.ctrlKey||t.metaKey)&&(107!=t.keyCode&&187!=t.keyCode||this.zoomSimulator("up",t),109!=t.keyCode&&189!=t.keyCode||this.zoomSimulator("down",t),48!=t.keyCode&&96!=t.keyCode||this.zoomSimulator("zero",t)),!0},t.prototype.changeZoomScale=function(e){var t="up"===e?1.01:"down"===e?1/1.01:1;this.currZoomScale="zero"===e?1:this.currZoomScale*t},t.prototype.zoomSimulator=function(e,t){t.preventDefault(),this.changeZoomScale(e);var o=document.getElementById("svd-simulator-wrapper");o&&(o.style.transform="scale("+this.currZoomScale+")"),t.stopPropagation()},t.prototype.resetZoomParameters=function(){this.currZoomScale=1;var e=document.getElementById("svd-simulator-wrapper");e&&(e.style.transform="")},Object.defineProperty(t.prototype,"activeDevice",{get:function(){return this.device},set:function(e){this.device=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"landscapeOrientation",{get:function(){return this.landscape},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasFrame",{get:function(){var e=Pe[this.activeDevice];return this.simulatorEnabled&&"desktop"!==e.deviceType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"simulatorFrame",{get:function(){if(this.hasFrame){var e=Pe[this.activeDevice],t=(this.landscapeOrientation?e.height:e.width)/e.cssPixelRatio,o=(this.landscapeOrientation?e.width:e.height)/e.cssPixelRatio,r=(this.landscapeOrientation?e.height:e.width)/e.cssPixelRatio,n=(this.landscapeOrientation?e.width:e.height)/e.cssPixelRatio,i=1*r+2*(this.landscapeOrientation?64:16),a=1*n+2*(this.landscapeOrientation?16:64);return{scale:(this.simulatorScaleEnabled,1),frameWidth:i,frameHeight:a,landscapedFrameWidth:this.landscapeOrientation?a:i,landscapedFrameHeight:this.landscapeOrientation?i:a,deviceWidth:t,deviceHeight:o,cssClass:e.cssClass+(this.landscapeOrientation?" svd-simulator-frame-landscape":"")}}},enumerable:!1,configurable:!0}),t.prototype.getRootCss=function(){return(new i.CssClassBuilder).append("svd-simulator-main").append("svd-simulator-main--frame",this.hasFrame).append("svd-simulator-main--desktop","desktop"===this.device).append("svd-simulator-main--running",this.isRunning).toString()},Z([Object(i.property)({defaultValue:!0})],t.prototype,"landscape",void 0),Z([Object(i.property)()],t.prototype,"survey",void 0),Z([Object(i.property)({defaultValue:"desktop"})],t.prototype,"device",void 0),Z([Object(i.property)({defaultValue:"l"})],t.prototype,"orientation",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"considerDPI",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isRunning",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"simulatorEnabled",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"simulatorScaleEnabled",void 0),t}(i.Base),Te=96*("undefined"!=typeof window?window.devicePixelRatio:1),Pe={desktop:{deviceType:"desktop",title:"Desktop"},iPhoneSE:{cssPixelRatio:2,ppi:326,width:750,height:1334,deviceType:"phone",title:"iPhone SE",cssClass:"svd-simulator-iphonexmax"},iPhone15:{cssPixelRatio:3,ppi:460,width:1179,height:2556,deviceType:"phone",title:"iPhone 15",cssClass:"svd-simulator-iphonexmax"},iPhone15Plus:{cssPixelRatio:3,ppi:460,width:1290,height:2796,deviceType:"phone",title:"iPhone 15 Plus",cssClass:"svd-simulator-iphonexmax"},iPadMini:{cssPixelRatio:2.5,ppi:326,width:1536,height:2048,deviceType:"tablet",title:"iPad Mini",cssClass:"svd-simulator-ipadmini"},iPad:{cssPixelRatio:2,ppi:264,width:1640,height:2360,deviceType:"tablet",title:"iPad Air",cssClass:"svd-simulator-ipad"},androidPhone:{cssPixelRatio:3,ppi:411,width:1080,height:2048,deviceType:"phone",title:"Android Phone",cssClass:"svd-simulator-androidphone"},androidTablet:{cssPixelRatio:1.5,ppi:149,width:800,height:1280,deviceType:"tablet",title:"Android Tablet",cssClass:"svd-simulator-androidtablet"},msSurface:{cssPixelRatio:1,ppi:148,width:768,height:1366,deviceType:"tablet",title:"MS Surface",cssClass:"svd-simulator-mssurface"},genericPhone:{cssPixelRatio:1,deviceType:"phone",title:"",cssClass:"svd-simulator-genphone"}};o(8);var Ee=function(e){function t(t,o){void 0===o&&(o=i.defaultV2Css);var r=e.call(this)||this;return r.surveyProvider=t,r.startTheme=o,r.enableInvisiblePages=!0,r.pages=new i.ActionContainer,r.simulator=new Se,r}return Y(t,e),Object.defineProperty(t.prototype,"activeLanguage",{get:function(){return this.getPropertyValue("activeLanguage",this.survey.locale||i.surveyLocalization.defaultLocale)},set:function(e){e!==this.activeLanguage&&(this.setPropertyValue("activeLanguage",e),this.survey.locale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.simulator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageActions",{get:function(){return this.pages.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPageToolbarVisible",{get:function(){return this.pages.visibleActions.length>0&&!this.surveyProvider.isMobileView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileView",{get:function(){return this.surveyProvider.isMobileView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showResults",{get:function(){return this.surveyProvider.previewShowResults&&!this.isRunning&&!this.isMobileView},enumerable:!1,configurable:!0}),t.prototype.updateSimulatorSurvey=function(e,t){var o=this,r=this.surveyProvider.createSurvey(e||{},"test",this,(function(e){e.applyTheme(o.surveyProvider.theme),e.setCss(t,!1),e.fitToContainer=!0,e.addLayoutElement({id:"complete-customization",container:"completePage",component:"svc-complete-page",data:o})})),n=!!this.simulator.survey;this.simulator.survey=r,this.onSurveyCreatedCallback&&this.onSurveyCreatedCallback(this.survey),this.survey.onComplete.add((function(e){o.isRunning=!1})),this.survey.onNavigateToUrl&&this.survey.onNavigateToUrl.add((function(e,t){var o=t.url;if(t.url="",o){var r=z("ed.navigateToMsg")+" '"+o+"'.";this.surveyProvider?this.surveyProvider.notify(r):alert(r)}})),this.survey.onStarted.add((function(e){o.setActivePageItem(o.simulator.survey.activePage,!0)})),this.survey.onCurrentPageChanged.add((function(e,t){o.activePage=t.newCurrentPage,o.setActivePageItem(t.oldCurrentPage,!1),o.setActivePageItem(t.newCurrentPage,!0)})),this.survey.onPageVisibleChanged.add((function(e,t){o.updatePageItem(t.page),o.updatePrevNextPageActionState()})),n&&this.show()},t.prototype.setJSON=function(e,t){this.json=e,null!=e&&e.cookieName&&delete e.cookieName,this.updateSimulatorSurvey(e,t)},t.prototype.initialize=function(e,t){this.setJSON(e,this.startTheme),this.updatePageList(),void 0!==t.showPagesInTestSurveyTab&&(this.showPagesInTestSurveyTab=t.showPagesInTestSurveyTab),this.buildActions()},t.prototype.updatePageItem=function(e){var t=this.getPageItemByPage(e);t&&(t.enabled=this.enableInvisiblePages||e.isVisible)},t.prototype.getCurrentPageItem=function(){return this.pageListItems[this.survey.pages.indexOf(this.survey.activePage)]},t.prototype.getSelectPageTitle=function(){return this.activePage&&this.getPageTitle(this.activePage,"preview-tab:selected-page","survey-tester-selected")||z("ts.selectPage")},t.prototype.getPageTitle=function(e,o,r){void 0===o&&(o="preview-tab:page-list"),void 0===r&&(r="survey-tester");var n=e.title.replace(t.tagRegex,""),i=this.surveyProvider.getObjectDisplayName(e,o,r,n);if(i===e.name&&0===i.indexOf("page")){var a=this.survey.pages.indexOf(e);return G.getString("ed.pageTypeName")+" "+(a+1)}return i},t.prototype.updatePageList=function(){for(var e=[],t=0;t<this.survey.pages.length;t++){var o=this.survey.pages[t];e.push({id:o.name,data:o,title:this.getPageTitle(o),enabled:this.enableInvisiblePages||o.isVisible,visible:!0})}this.pageListItems=e},t.prototype.show=function(){this.showInvisibleElements=!1,this.activePage=this.survey.activePage,this.survey.locale=this.activeLanguage,this.isRunning=!0},t.prototype.testAgain=function(){this.setJSON(this.json,this.simulator.survey.css),this.updatePageList(),this.show()},t.prototype.buildActions=function(){var e=this,t=[],o=function(t){var o=e.survey.currentPageNo,r=o+(t?1:-1);"starting"===e.survey.state&&t&&(r=0);var n=e.survey.visiblePages[r];!t&&0===o&&e.survey.firstPageIsStarted&&e.survey.pages.length>0&&(n=e.survey.pages[0]);var i=e.survey.pages.indexOf(n);e.activePage=e.survey.pages[i],e.selectPageAction.data.selectedItem=e.pageListItems[i]};this.prevPageAction&&(this.prevPageAction.visible=new i.ComputedUpdater((function(){var t="running"===e.survey.state;return O(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)&&t})),this.prevPageAction.iconName=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-left":"icon-arrow-left_16x16"})),this.prevPageAction.iconSize=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.prevPageAction.action=function(){return o(!1)},t.push(this.prevPageAction)),this.selectPageAction=Object(i.createDropdownActionModel)({id:"pageSelector",css:"svc-page-selector",title:this.getSelectPageTitle(),visible:this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab},{items:this.pageListItems,allowSelection:!0,selectedItem:this.getCurrentPageItem(),onSelectionChanged:function(t){e.activePage=t.data},verticalPosition:"top",horizontalPosition:"center"}),t.push(this.selectPageAction),this.selectPageAction.visible=new i.ComputedUpdater((function(){return"running"===e.survey.state})),this.nextPageAction&&(this.nextPageAction.visible=new i.ComputedUpdater((function(){var t="running"===e.survey.state;return O(e.isRunning,"test"===e.surveyProvider.activeTab,e.pageListItems.length>1)&&t})),this.nextPageAction.iconName=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-right":"icon-arrow-right_16x16"})),this.nextPageAction.iconSize=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.nextPageAction.action=function(){return o(!0)},t.push(this.nextPageAction)),this.pages.actions=t,this.pages.containerCss="sv-action-bar--pages",this.updatePrevNextPageActionState()},t.prototype.setActivePageItem=function(e,t){var o=this.getPageItemByPage(e);o&&(o.active=t)},t.prototype.getPageItemByPage=function(e){var t=this.selectPageAction.popupModel.contentComponentData.model;if(t&&Array.isArray(t.actions)){for(var o=t.actions,r=0;r<o.length;r++)if(o[r].data===e)return o[r];return null}},t.prototype.updateResultsTemplate=function(e){this.simulator.survey.setCss(e,!1),this.simulator.survey.render()},t.prototype.setTheme=function(e,t){var o=t.filter((function(t){return t.name===e})),r=i.defaultV2Css;o.length>0&&(r=o[0].theme),this.isRunning?this.updateSimulatorSurvey(this.json,r):this.updateResultsTemplate(r)},t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),this.pages.hasActions&&("activePage"===t&&(this.updatePrevNextPageActionState(),this.selectPageAction.title=this.getSelectPageTitle()),"isRunning"!==t&&"pageListItems"!==t&&"showPagesInTestSurveyTab"!==t||(this.selectPageAction.popupModel.contentComponentData.model.items=this.pageListItems,this.selectPageAction.popupModel.contentComponentData.model.selectedItem=this.getCurrentPageItem(),this.selectPageAction.visible=this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab))},t.prototype.updatePrevNextPageActionState=function(){if(this.prevPageAction&&this.survey){var e=this.survey.firstPageIsStarted&&"starting"!==this.survey.state||!this.survey.firstPageIsStarted&&!this.survey.isFirstPage;this.prevPageAction.enabled=e;var t=this.survey&&this.survey.visiblePages.indexOf(this.activePage)!==this.survey.visiblePages.length-1;this.nextPageAction.enabled=t}},t.prototype.onScroll=function(){return this.survey.onScroll(),!0},t.prototype.dispose=function(){this.selectPageAction&&this.selectPageAction.dispose(),this.simulator.dispose(),e.prototype.dispose.call(this)},t.tagRegex=/(<([^>]+)>)/gi,Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.simulator.survey.showInvisibleElements=e}})],t.prototype,"showInvisibleElements",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showPagesInTestSurveyTab",void 0),Z([Object(i.property)({defaultValue:!0,onSet:function(e,t){t.simulator&&(t.simulator.isRunning=e)}})],t.prototype,"isRunning",void 0),Z([Object(i.propertyArray)()],t.prototype,"pageListItems",void 0),Z([Object(i.property)({onSet:function(e,t){if(e){var o=t.simulator.survey;o.firstPageIsStarted&&(e===o.pages[0]?o.clear(!1,!0):"starting"==o.state&&o.setPropertyValue("isStartedState",!1)),"starting"!==o.state&&(o.currentPage=e)}t.updatePrevNextPageActionState()}})],t.prototype,"activePage",void 0),t}(i.Base),Ie=function(){function e(e){this.creator=e,this.simulatorTheme=i.surveyCss[i.defaultV2ThemeName],e.addPluginTab("test",this),this.setPreviewTheme(this.creator.themeForPreview),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.setDevice=function(e){this.model.simulator.device=e,this.model.simulator.resetZoomParameters();var t=Pe[this.model.simulator.device].deviceType;this.orientationSelectorAction.enabled="desktop"!=t,this.deviceSelectorAction.iconName="icon-device-"+t,this.deviceSelectorAction.title=z("pe.simulator")},e.prototype.setDefaultLanguageOption=function(e){var t=this,o=!0===e||"all"===e||"auto"===e&&this.model.survey.getUsedLocales().length>1;this.languageSelectorAction.visible=o;var r=[];o&&(r=this.getLanguages("all"!==e?this.model.survey.getUsedLocales():null)),this.languageSelectorAction.popupModel.contentComponentData.model.setItems(r),this.languageSelectorAction.data.selectedItem=r.filter((function(e){return e.id===t.model.activeLanguage}))[0]},e.prototype.getLanguages=function(e){void 0===e&&(e=null);for(var t=[],o=e&&e.length>1?e:i.surveyLocalization.getLocales(),r=0;r<o.length;r++){var n=o[r];t.push({id:n,title:G.getLocaleName(n)})}return t},e.prototype.updateActions=function(){this.languageSelectorAction.title=G.getLocaleName(this.model.activeLanguage),this.languageSelectorAction.visible=!0,this.creator.showSimulatorInTestSurveyTab&&(this.setDevice(this.model.simulator.device),this.deviceSelectorAction.data.selectedItem={id:this.model.simulator.device},this.orientationSelectorAction.title=z("pe.portraitOrientation")),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction.css=this.model.showInvisibleElements?"sv-action-bar-item--active":"",this.invisibleToggleAction.visible=this.model.isRunning),null!=this.creator.showDefaultLanguageInTestSurveyTab&&this.setDefaultLanguageOption(this.creator.showDefaultLanguageInTestSurveyTab)},e.prototype.setPreviewTheme=function(e){this.simulatorTheme=i.surveyCss[e]||i.surveyCss[i.defaultV2ThemeName]},e.prototype.createVisibleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){return"test"===e.creator.activeTab}))},e.prototype.activate=function(){this.model=new Ee(this.creator,this.simulatorTheme),this.model.simulator.landscape="portrait"!=this.creator.previewOrientation,this.update()},e.prototype.update=function(){var e=this;if(this.model){var t={showPagesInTestSurveyTab:this.creator.showPagesInTestSurveyTab};this.model.testAgainAction=this.testAgainAction,this.model.prevPageAction=this.prevPageAction,this.model.nextPageAction=this.nextPageAction,this.model.initialize(this.creator.JSON,t),this.updateActions(),this.model.show(),this.model.onPropertyChanged.add((function(t,o){"isRunning"===o.name&&(e.invisibleToggleAction&&(e.invisibleToggleAction.visible=e.model.isRunning),e.testAgainAction.visible=!e.model.isRunning)}))}},e.prototype.deactivate=function(){return this.model&&(this.simulatorTheme=this.model.simulator.survey.css,this.model.onSurveyCreatedCallback=void 0,this.model.dispose(),this.model=void 0),this.languageSelectorAction.visible=!1,this.testAgainAction.visible=!1,this.invisibleToggleAction&&(this.invisibleToggleAction.visible=!1),!0},e.prototype.getAvailableThemes=function(e){for(var t=[],o=0;o<e.length;o++){var r=e[o],n=new i.Action({id:r.name+"_themeSwitcher",locTitleName:this.getThemeLocName(r.name)});n.value=r.name,t.push(n)}return t},e.prototype.getThemeLocName=function(e){return"ed."+e+"Theme"},e.prototype.createActions=function(){var e=this,t=[];if(this.testAgainAction=new i.Action({id:"testSurveyAgain",visible:!1,locTitleName:"ed.testSurveyAgain",action:function(){e.model.testAgain()}}),this.creator.showSimulatorInTestSurveyTab){var o=Object.keys(Pe).filter((function(e){return!!Pe[e].title})).map((function(e){var t;return{id:e,title:Pe[e].title,visibleIndex:null!==(t=Pe[e].visibleIndex)&&void 0!==t?t:Number.MAX_VALUE}}));this.deviceSelectorAction=Object(i.createDropdownActionModel)({id:"deviceSelector",iconName:"icon-device-desktop",mode:"small",visible:new i.ComputedUpdater((function(){return O("test"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)}))},{items:o,allowSelection:!0,onSelectionChanged:function(t){e.setDevice(t.id)},horizontalPosition:"center",onHide:function(){e.deviceSelectorAction.enabled=!0},onShow:function(){e.deviceSelectorAction.enabled=!1}}),t.push(this.deviceSelectorAction),this.orientationSelectorAction=new i.Action({id:"orientationSelector",iconName:"icon-device-rotate",mode:"small",visible:new i.ComputedUpdater((function(){return O("test"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)})),action:function(){e.model.simulator.landscape=!e.model.simulator.landscape,e.orientationSelectorAction.title=z(e.model.simulator.landscape?"pe.portraitOrientation":"pe.landscapeOrientation")}}),t.push(this.orientationSelectorAction)}this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction=new i.Action({id:"showInvisible",iconName:"icon-invisible-items",mode:"small",needSeparator:new i.ComputedUpdater((function(){return!e.creator.isMobileView})),locTitleName:"ts.showInvisibleElements",visible:!1,action:function(){e.model.showInvisibleElements=!e.model.showInvisibleElements,e.invisibleToggleAction.css=e.model.showInvisibleElements?"sv-action-bar-item--active":"",e.invisibleToggleAction.title=z(e.model.showInvisibleElements?"ts.hideInvisibleElements":"ts.showInvisibleElements")}}),t.push(this.invisibleToggleAction));var r=i.StylesManager.getIncludedThemeCss(),n=["defaultV2","modern","default"];r=r.sort((function(e,t){return n.indexOf(e.name)>n.indexOf(t.name)?1:-1}));var a,s=this.getAvailableThemes(r);if(this.creator.allowChangeThemeInPreview&&s.length>1&&!this.creator.showThemeTab){this.changeThemeModel=new i.ListModel(s,(function(t){e.model&&e.model.setTheme(t.value,r),e.changeThemeAction.locTitleName=e.getThemeLocName(t.value),e.changeThemeAction.locStrsChanged(),e.changeThemePopupModel.toggleVisibility()}),!0),this.changeThemeModel.locOwner=this.creator,this.changeThemePopupModel=new i.PopupModel("sv-list",{model:this.changeThemeModel},"bottom","center");this.changeThemeAction=new i.Action({id:"themeSwitcher",iconName:"icon-theme",component:"sv-action-bar-item-dropdown",mode:"large",locTitleName:this.getThemeLocName((a=r.filter((function(t){return t.theme.root===e.simulatorTheme.root})),a.length>0?a[0].name:"defaultV2")),needSeparator:!0,visible:new i.ComputedUpdater((function(){return O(e.creator.showSimulatorInTestSurveyTab,"test"===e.creator.activeTab)})),action:function(){e.changeThemePopupModel.toggleVisibility()},popupModel:this.changeThemePopupModel}),t.push(this.changeThemeAction)}return this.languageSelectorAction=Object(i.createDropdownActionModel)({id:"languageSelector",iconName:"icon-language",visible:!1,mode:new i.ComputedUpdater((function(){return e.creator.isMobileView?"small":"large"}))},{items:[],allowSelection:!0,onSelectionChanged:function(t){e.model.activeLanguage=t.id,e.languageSelectorAction.title=G.getLocaleName(t.id)},horizontalPosition:"center",onHide:function(){e.languageSelectorAction.enabled=!0},onShow:function(){e.languageSelectorAction.enabled=!1}}),t.push(this.languageSelectorAction),this.designerAction=new i.Action({id:"svd-designer",iconName:"icon-config",action:function(){e.creator.makeNewViewActive("designer")},visible:this.createVisibleUpdater(),locTitleName:"ed.designer",showTitle:!1}),this.previewAction=new i.Action({id:"svd-preview",iconName:"icon-preview",active:!0,visible:this.createVisibleUpdater(),locTitleName:"tabs.preview",showTitle:!1,action:function(){}}),this.prevPageAction=new i.Action({id:"prevPage",iconName:"icon-arrow-left_16x16",needSeparator:new i.ComputedUpdater((function(){return e.creator.isMobileView})),visible:!1}),this.nextPageAction=new i.Action({id:"nextPage",iconName:"icon-arrow-right_16x16",visible:!1}),t},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.designerAction),this.creator.footerToolbar.actions.push(this.previewAction),this.creator.footerToolbar.actions.push(this.prevPageAction),this.creator.footerToolbar.actions.push(this.nextPageAction),this.invisibleToggleAction&&this.creator.footerToolbar.actions.push(this.invisibleToggleAction)},e}(),Oe=function(){function e(e,t){void 0===t&&(t=null),this.survey=e,this.options=t}return e.prototype.toDisplayText=function(e){if(!this.survey)return e;this.showTitles=!!this.options&&1==this.options.showTitlesInExpressions;var t=(new i.ConditionsParser).parseExpression(e);if(!t)return e;if(t.getType)return this.toDisplayTextCore(t);if(!this.showTitles)return e;var o=[];return t.setVariables(o),this.replaceVariables(e,o)},e.prototype.toExpression=function(e){return this.toDisplayTextCore(e)},e.prototype.toDisplayTextCore=function(e){this.currentQuestion=null;var t=this,o=!0,r=function(e){var n=o;return o=!1,t.showTitles&&"variable"==e.getType()?t.getQuestionText(e):t.showTitles&&"const"==e.getType()?t.getDisplayText(e):"binary"==e.getType()?(t.proceedBinary(e),t.getDisplayBinary(e,n,r)):"unary"==e.getType()?t.getDisplayUnary(e,r):void 0};return e.toString(r)},e.prototype.getQuestionText=function(e){var t=this.getQuestionByName(e.variable);return t&&t.title?E(t.title):e.variable},e.prototype.getDisplayText=function(e){if(this.currentQuestion){var t=this.currentQuestion.getDisplayValue(!0,e.correctValue);return t?new i.Const(t).toString():void 0}},e.prototype.getDisplayOperand=function(e,t){return e?e.toString(t):""},e.prototype.getDisplayOperator=function(t){var o=e.operatorText[t];return o||G.getString("op."+t)},e.prototype.getDisplayBinary=function(e,t,o){return(t?"":"(")+this.getDisplayOperand(e.leftOperand,o)+" "+this.getDisplayOperator(e.operator)+" "+this.getDisplayOperand(e.rightOperand,o)+(t?"":")")},e.prototype.getDisplayUnary=function(e,t){var o=e.expression.toString(t),r=this.getDisplayOperator(e.operator);return"empty"==e.operator||"notempty"==e.operator?o+" "+r:r+" "+o},e.prototype.proceedBinary=function(e){e.isArithmetic||e.isConjunction?this.currentQuestion=null:(this.currentQuestion=this.getQuestionFromOperands(e.leftOperand,e.rightOperand),this.currentQuestion||(this.currentQuestion=this.getQuestionFromOperands(e.rightOperand,e.leftOperand)))},e.prototype.getQuestionFromOperands=function(e,t){if(!e||!t)return null;if("variable"!=e.getType())return null;var o=t.getType();return"const"!=o&&"function"!=o&&"array"!=o?null:this.getQuestionByName(e.variable)},e.prototype.replaceVariables=function(e,t){for(var o=0;o<t.length;o++)e=this.replaceVariable(e,t[o]);return e},e.prototype.replaceVariable=function(e,t){var o=this.getQuestionByName(t);return o&&o.title?e.replace(E(t),E(o.title)):e},e.prototype.getQuestionByName=function(e){return this.survey?this.survey.getQuestionByValueName(e):null},e.operatorText={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",power:"^",mod:"%",negate:"!"},e}(),Ve=function(){function e(){}return e.prototype.remove=function(e,t){var o=(new i.ConditionsParser).parseExpression(e);if(!o)return e;if(this.wasRemoved=!1,o.getType){var r=this.processOperand(o,t);return this.wasRemoved?r?r.toString():"":e}return e},e.prototype.processOperand=function(e,t){return e?"variable"==e.getType()?this.processVariable(e,t):"unary"==e.getType()?this.processUnary(e,t):"binary"==e.getType()?this.proceedBinary(e,t):e:null},e.prototype.processVariable=function(e,t){return e.variable!==t?e:(this.wasRemoved=!0,null)},e.prototype.processUnary=function(e,t){return this.processOperand(e.expression,t)?e:(this.wasRemoved=!0,null)},e.prototype.proceedBinary=function(e,t){var o=this.processOperand(e.leftOperand,t),r=this.processOperand(e.rightOperand,t);if(o&&r)return o!==e.leftOperand||r!==e.rightOperand?new i.BinaryOperand(e.operator,o,r,e.isArithmetic):e;if(!o&&!r)return null;var n=o||r;return"binary"==n.getType()?n:null},e}(),Ne=function(){function e(e){this.constChanges=[],this.operand=(new i.ConditionsParser).parseExpression(e)}return e.prototype.update=function(e,t,o){this.updateOperand(this.operand,e.toLocaleLowerCase(),t,o)},Object.defineProperty(e.prototype,"isModified",{get:function(){return this.constChanges.length>0},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=this,t=!0,o=function(r){var n=t;return t=!1,"const"===r.getType()?e.constToString(r):"binary"===r.getType()?e.binaryToString(r,n,o):void 0};return this.operand.toString(o)},e.prototype.constToString=function(e){for(var t=0;t<this.constChanges.length;t++)if(this.constChanges[t].op===e)return this.constChanges[t].val;return e.toString()},e.prototype.binaryToString=function(e,t,o){return(t?"":"(")+this.operandToString(e.leftOperand,o)+" "+this.operatorToString(e.operator)+" "+this.operandToString(e.rightOperand,o)+(t?"":")")},e.prototype.operandToString=function(e,t){return e?e.toString(t):""},e.prototype.operatorToString=function(t){var o=e.operatorText[t];return o||t},e.prototype.updateOperand=function(e,t,o,r){if("binary"==e.getType()){var n=e;n.isConjunction?(this.updateOperand(n.leftOperand,t,o,r),this.updateOperand(n.rightOperand,t,o,r)):this.hasVarName(n.leftOperand,t)?this.updateOperandConst(n.rightOperand,o,r):this.hasVarName(n.rightOperand,t)&&this.updateOperandConst(n.leftOperand,o,r)}},e.prototype.hasVarName=function(e,t){if(e&&"variable"===e.getType())return e.variable.toLowerCase()===t},e.prototype.updateOperandConst=function(e,t,o){var r=this;if("array"===e.getType()){var n=e;Array.isArray(n.values)&&n.values.forEach((function(e){return r.updateOperandConst(e,t,o)}))}if("const"===e.getType()){var a=e;i.Helpers.isTwoValueEquals(a.correctValue,t)&&(o=this.getCorrectNewValue(a,o),this.constChanges.push({op:e,val:o}))}},e.prototype.getCorrectNewValue=function(e,t){var o=e.toString();return!o||i.Helpers.isTwoValueEquals(e.correctValue,o)||'"'!==o[0]&&"'"!==o[0]?t:o[0]+t+o[0]},e.operatorText={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"=",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",power:"^",mod:"%",negate:"!"},e}();function ke(e,t,o,r){var n=new Ne(e);return n.update(t,o,r),n.isModified?n.toString():e}function Ae(e){return G.getString("ed.lg."+e)}var _e=function(){function e(e,t,o){void 0===o&&(o=null),this.logicType=e,this.survey=t,this.options=o,this.mergeWithBaseClass()}return e.expressionToDisplayText=function(e,t,o){return new Oe(e,t).toDisplayText(o)},e.prototype.mergeWithBaseClass=function(){if(this.logicType.baseClass){var e=Le.baseTypes[this.logicType.baseClass];if(e)for(var t in e)this.logicType[t]||(this.logicType[t]=e[t])}},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseClass",{get:function(){return this.logicType.baseClass},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propertyName",{get:function(){return this.logicType.propertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasVisibleElements",{get:function(){return!0!==this.logicType.isInvisible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dynamicPropertyName",{get:function(){return this.logicType.dynamicPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dependedOnPropertyName",{get:function(){return this.logicType.dependedOnPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return!!this.showInUI&&(!this.logicType.showIf||this.logicType.showIf(this.survey))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showTitlesInExpression",{get:function(){return!!this.options&&this.options.showTitlesInExpressions},enumerable:!1,configurable:!0}),e.prototype.createNewObj=function(e){var t=i.Serializer.createClass(this.baseClass);return e&&t.fromJSON(e.toJSON()),t.survey=this.survey,t.setOwner&&t.setOwner(this.survey),(t instanceof i.ItemValue||t instanceof i.SurveyTrigger)&&(t.isGhost=!0),t},e.prototype.cloneElement=function(e){return this.isTrigger?this.createNewObj(e):e},e.prototype.areElementsEqual=function(e,t){return e===t||!(!this.isTrigger||e.getType()!==t.getType())&&i.Helpers.isTwoValueEquals(e.toJSON(),t.toJSON())},e.prototype.saveNewElement=function(e){var t=this.logicType.getCollection?this.logicType.getCollection(this.survey):null;!t&&this.isTrigger&&(t=this.survey.triggers),t&&t.indexOf(e)<0&&t.push(e)},Object.defineProperty(e.prototype,"showInUI",{get:function(){return!1!==this.logicType.showInUI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUniqueItem",{get:function(){return!0===this.logicType.isUniqueItem},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType.questionNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayName",{get:function(){return Ae(this.name+"Name")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return Ae(this.name+"Description")},enumerable:!1,configurable:!0}),e.prototype.getParentElement=function(e){return this.logicType.getParentElement?this.logicType.getParentElement(e):null},Object.defineProperty(e.prototype,"hasSelectorChoices",{get:function(){return!!this.logicType.getSelectorChoices},enumerable:!1,configurable:!0}),e.prototype.getSelectorChoices=function(e,t){return this.hasSelectorChoices?this.logicType.getSelectorChoices(e,t):null},e.prototype.getDisplayText=function(e){var t=Ae(this.name+"Text");if(this.logicType.getDisplayText)return this.logicType.getDisplayText(e,t,this);this.logicType.getElementName&&(e=this.getElementByName(this.logicType.getElementName(e)));var o=this.getElementDisplayName(e);if(o){var r=this.getParentElement(e),n=this.getElementDisplayName(r);return t.format(o,n)}return t},e.prototype.getElementDisplayName=function(e){if(!e)return"";var t="";return this.showTitlesInExpression&&(t=e.title),t||(t=e.name||""),E(t)},e.prototype.getElementByName=function(e){if(!this.survey)return null;var t=this.survey.getQuestionByName(e);return t||this.survey.getPageByName(e)},e.prototype.formatElName=function(e){var t=this.getElementByName(e);return this.getElementDisplayName(t)},e.prototype.formatExpression=function(t){return e.expressionToDisplayText(this.survey,this.options,t)},e.prototype.supportContext=function(e){return!!this.logicType.supportContext&&this.logicType.supportContext(e)},Object.defineProperty(e.prototype,"isTrigger",{get:function(){return!!this.baseClass&&this.baseClass.indexOf("trigger")>-1},enumerable:!1,configurable:!0}),e}();var Le=function(){function e(){}return e.baseTypes={panel:{showIf:function(e){return e.getAllPanels().length>0},getSelectorChoices:function(e,t){return e.getAllPanels()}},question:{showIf:function(e){return e.getAllQuestions().length>0},supportContext:function(e){return Array.isArray(e.templateElements)||Array.isArray(e.detailElements)&&e.detailElements.length>0},getParentElement:function(e){return e?e.parentQuestion:null},getSelectorChoices:function(e,t){for(var o=new Array,r=e.getAllQuestions(),n=function(e){o.push(e),e.isPanel&&e.elements.forEach((function(e){return n(e)}))},a=0;a<r.length;a++){var s=r[a];t||o.push(s),s instanceof i.QuestionPanelDynamicModel&&(!t||t===s)&&s.templateElements.forEach((function(e){return n(e)})),s instanceof i.QuestionMatrixDropdownModelBase&&(!t||t===s)&&s.detailElements.forEach((function(e){return n(e)}))}return o}},matrixdropdowncolumn:{showIf:function(e){return function(e){for(var t=e.getAllQuestions(),o=0;o<t.length;o++){var r=t[o];if(r instanceof i.QuestionMatrixDropdownModelBase&&r.columns.length>0)return!0}return!1}(e)},supportContext:function(e){return Array.isArray(e.columns)},getParentElement:function(e){return e?e.colOwner:null},getSelectorChoices:function(e,t){for(var o=[],r=e.getAllQuestions(),n=0;n<r.length;n++){var a=r[n];if(a instanceof i.QuestionMatrixDropdownModelBase&&(!t||t===a))for(var s=a.columns,l=0;l<s.length;l++)o.push(s[l])}return o}}},e.types=[{name:"page_visibility",baseClass:"page",propertyName:"visibleIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"page_enable",baseClass:"page",propertyName:"enableIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"page_require",baseClass:"page",propertyName:"requiredIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"panel_visibility",baseClass:"panel",propertyName:"visibleIf"},{name:"panel_enable",baseClass:"panel",propertyName:"enableIf"},{name:"panel_require",baseClass:"panel",propertyName:"requiredIf"},{name:"question_visibility",baseClass:"question",propertyName:"visibleIf"},{name:"question_enable",baseClass:"question",propertyName:"enableIf"},{name:"question_require",baseClass:"question",propertyName:"requiredIf"},{name:"question_resetValue",baseClass:"question",propertyName:"resetValueIf"},{name:"question_setValue",baseClass:"question",propertyName:"setValueIf",getDisplayText:function(e,t,o){return De(e,t,o)}},{name:"question_setValueExpression",baseClass:"question",propertyName:"setValueExpression",showInUI:!1},{name:"column_visibility",baseClass:"matrixdropdowncolumn",propertyName:"visibleIf"},{name:"column_enable",baseClass:"matrixdropdowncolumn",propertyName:"enableIf"},{name:"column_require",baseClass:"matrixdropdowncolumn",propertyName:"requiredIf"},{name:"column_resetValue",baseClass:"matrixdropdowncolumn",propertyName:"resetValueIf"},{name:"column_setValue",baseClass:"matrixdropdowncolumn",propertyName:"setValueIf",getDisplayText:function(e,t,o){return De(e,t,o)}},{name:"column_setValueExpression",baseClass:"matrixdropdowncolumn",propertyName:"setValueExpression",showInUI:!1},{name:"expression_expression",baseClass:"expression",propertyName:"expression",showInUI:!1},{name:"matrixdropdowncolumn_totalExpression",baseClass:"matrixdropdowncolumn",propertyName:"totalExpression",showInUI:!1},{name:"trigger_complete",baseClass:"completetrigger",propertyName:"expression",isUniqueItem:!0,isInvisible:!0},{name:"trigger_setvalue",baseClass:"setvaluetrigger",propertyName:"expression",dynamicPropertyName:"setValue",dependedOnPropertyName:"setToName",questionNames:["setToName"],getDisplayText:function(e,t,o){return i.Helpers.isValueEmpty(e.setValue)&&(t=Ae("trigger_setvalueEmptyText")),t.format(o.formatElName(e.setToName),e.setValue)}},{name:"trigger_copyvalue",baseClass:"copyvaluetrigger",propertyName:"expression",questionNames:["setToName","fromName"],getDisplayText:function(e,t,o){return t.format(o.formatElName(e.setToName),o.formatElName(e.fromName))}},{name:"trigger_skip",baseClass:"skiptrigger",propertyName:"expression",questionNames:["gotoName"],isUniqueItem:!0,getElementName:function(e){return e.gotoName}},{name:"trigger_runExpression",baseClass:"runexpressiontrigger",propertyName:"expression",questionNames:["setToName"],getDisplayText:function(e,t,o){var r=Ae("trigger_runExpressionText1");(r=r.format(o.formatExpression(e.runExpression)),e.setToName)&&(r+=Ae("trigger_runExpressionText2").format(o.formatElName(e.setToName)));return r}},{name:"completedHtmlOnCondition",baseClass:"htmlconditionitem",propertyName:"expression",isUniqueItem:!0,getCollection:function(e){return e.completedHtmlOnCondition}},{name:"trigger_runExpression_Expression",baseClass:"runexpressiontrigger",propertyName:"runExpression",showInUI:!1},{name:"question_expressionValidator",baseClass:"expressionvalidator",propertyName:"expression",showInUI:!1},{name:"matrix_rowsVisibleIf",baseClass:"matrix",propertyName:"rowsVisibleIf",showInUI:!1},{name:"matrix_columnsVisibleIf",baseClass:"matrix",propertyName:"columnsVisibleIf",showInUI:!1},{name:"matrixdropdown_rowsVisibleIf",baseClass:"matrixdropdown",propertyName:"rowsVisibleIf",showInUI:!1},{name:"select_choicesVisibleIf",baseClass:"selectbase",propertyName:"choicesVisibleIf",showInUI:!1},{name:"select_choicesEnableIf",baseClass:"selectbase",propertyName:"choicesEnableIf",showInUI:!1},{name:"itemvalue_visibleIf",baseClass:"itemvalue",propertyName:"visibleIf",showInUI:!1},{name:"itemvalue_enableIf",baseClass:"itemvalue",propertyName:"enableIf",showInUI:!1},{name:"calculatedValue",baseClass:"calculatedvalue",propertyName:"expression",showInUI:!1}],e}();function De(e,t,o){var r=o.formatElName(e.name),n=e.setValueExpression;return n?t.format(r,n):Ae("trigger_setvalueEmptyText").format(r)}var Me=function(){function e(e,t,o){this.surveyValue=o,this.logicTypeValue=e,this.elementValue=t}return Object.defineProperty(e.prototype,"logicType",{get:function(){return this.logicTypeValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.elementValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.element&&this.logicType?this.logicType.getParentElement(this.element):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.apply=function(e,t){if(void 0===t&&(t=!1),this.element&&this.logicType&&(this.element[this.logicType.propertyName]=e,!e&&i.Serializer.isDescendantOf(this.element.getType(),"surveytrigger"))){var o=this.survey.triggers.indexOf(this.element);o>-1&&this.survey.triggers.splice(o,1)}},e.prototype.renameQuestion=function(e,t){if(this.element)for(var o=this.questionNames,r=0;r<o.length;r++){var n=this.element[o[r]];n&&n.toLowerCase()==e.toLowerCase()&&(this.element[o[r]]=t)}},e.prototype.clone=function(){var t=this.logicType.cloneElement(this.element);return new e(this.logicType,t,this.survey)},e.prototype.equals=function(e){return this.logicType===e.logicType&&this.logicType.areElementsEqual(this.element,e.element)},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType?this.logicType.displayName:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeName",{get:function(){return this.logicType?this.logicType.name:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeDescription",{get:function(){return this.logicType?this.logicType.description:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this.logicType?this.logicType.getDisplayText(this.element):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteActionText",{get:function(){return Ae("deleteAction")},enumerable:!1,configurable:!0}),e.prototype.getLocString=function(e){return G.getString(e)},e.prototype.isSuitableByQuestionName=function(e){var t=this.elementName===e||0===this.elementName.indexOf(e+".");return t||(t=this.questionNamesValues.filter((function(t){return t===e||0===t.indexOf(e+".")})).length>0),t},e.prototype.isSuitableByLogicType=function(e){return!this.logicTypeName||e===this.logicTypeName},e.prototype.addQuestionNames=function(e){var t=this.elementOwnerName;this.elementName&&-1===e.indexOf(t)&&e.push(t),this.questionNamesValues.forEach((function(t){t&&-1===e.indexOf(t)&&e.push(t)}))},Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType&&this.logicType.questionNames?this.logicType.questionNames:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementName",{get:function(){if(!this.element)return"";var e="",t=this.getOwnerElement();return t&&t!==this.element&&(e=t.name+"."),e+this.element.name||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementOwnerName",{get:function(){var e=this.getOwnerElement();return e&&e.name||""},enumerable:!1,configurable:!0}),e.prototype.getOwnerElement=function(){if(!this.element)return null;var e=this.parentElement;return e||this.element},Object.defineProperty(e.prototype,"questionNamesValues",{get:function(){var e=this;return this.questionNames.map((function(t){return e.element[t]}))},enumerable:!1,configurable:!0}),e}(),Re=function(){function e(t,o){void 0===o&&(o=""),this.owner=t,this.expression=o,this.idValue=++e.counter,this.isNew=!1,this.isModified=!1,this.actionsValue=[],this.removedActions=[]}return Object.defineProperty(e.prototype,"actions",{get:function(){return this.actionsValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"logicItem"+this.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.owner.survey},enumerable:!1,configurable:!0}),e.prototype.getVisibleLogicTypes=function(){return this.owner.getVisibleLogicTypes()},Object.defineProperty(e.prototype,"expressionText",{get:function(){var e=this.getExpressionAsDisplayText();return e||G.getString("ed.lg.itemEmptyExpressionText")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actionsText",{get:function(){return this.actions.map((function(e){return e.text})).join(", ")},enumerable:!1,configurable:!0}),e.prototype.getDisplayText=function(){var e=this.getExpressionAsDisplayText(),t="";return this.actions.forEach((function(e){t+=", "+e.text})),e&&t?(this.ifText+" "+e+t).replace(new RegExp("({|})","gm"),"'"):G.getString("ed.lg.itemEmptyExpressionText")},e.prototype.edit=function(){this.owner&&this.owner.editItem(this)},e.prototype.remove=function(){this.owner&&this.owner.removeItem(this)},Object.defineProperty(e.prototype,"isReadOnly",{get:function(){return!!this.owner&&this.owner.readOnly},enumerable:!1,configurable:!0}),e.prototype.addNewAction=function(e){this.actions.push(e)},e.prototype.removeAction=function(e){this.replaceActionCore(null,e)},e.prototype.replaceAction=function(e,t){t?this.replaceActionCore(e,t):this.addNewAction(e)},e.prototype.clone=function(){for(var t=new e(this.owner,this.expression),o=0;o<this.actions.length;o++)t.addNewAction(this.actions[o].clone());return t},e.prototype.equals=function(e){if(this.expression!==e.expression)return!1;if(this.actions.length!==e.actions.length)return!1;for(var t=0;t<this.actions.length;t++)if(!this.actions[t].equals(e.actions[t]))return!1;return!0},e.prototype.replaceActionCore=function(e,t){this.removedActions.push(t);var o=this.actions.indexOf(t);o>-1&&(e?this.actions.splice(o,1,e):this.actions.splice(o,1))},e.prototype.apply=function(e){e?this.removeSameActions():this.removeActions();for(var t=0;t<this.removedActions.length;t++)this.removedActions[t].apply("");this.removedActions=[],this.applyExpression(e,!1)},e.prototype.renameQuestion=function(e,t){var o=this;if(e&&t&&e!==t){["","panel.","row."].forEach((function(r){return o.renameQuestionInExpression(r+e,r+t,[a.logic.closeBracket,".","["])}));for(var r=this.actions,n=0;n<r.length;n++)r[n].renameQuestion(e,t)}},e.prototype.renameColumn=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)){this.actions[0].parentElement===e&&this.renameQuestionInExpression("row."+o,"row."+t.name,[a.logic.closeBracket]);var r=e.rows;if(Array.isArray(r)&&this.isQuestionInExpression(e))for(var n=this.getItemValueQuestionName(e)+".",s=0;s<r.length;s++)if(!i.Helpers.isValueEmpty(r[s].value)){var l=r[s].value.toString()+".";this.renameQuestionInExpression(n+l+o,n+l+t.name,[a.logic.closeBracket])}}},e.prototype.renameItemValue=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)&&(!e.parentQuestion||(Array.isArray(e.parentQuestion.rows)&&this.renameDropdownColumnItemValue(e,t,o),this.actions[0].parentElement===e.parentQuestion))&&this.isQuestionInExpression(e)){var r=this.getItemValueQuestionName(e).toLocaleLowerCase(),n=e.rows,a=this.expression;if(Array.isArray(n))for(var s=0;s<n.length;s++){if(!i.Helpers.isValueEmpty(n[s].value))a=ke(a,r+("."+n[s].value.toString()),o,t.value)}else a=ke(a,r,o,t.value);a!=this.expression&&this.applyExpression(a,!0)}},e.prototype.renameDropdownColumnItemValue=function(e,t,o){var r=e.parentQuestion;if(this.isQuestionInExpression(r)){var n="."+e.getValueName();if(this.isStrContainsInExpression(n+a.logic.closeBracket)){for(var s=r.getValueName()+".",l=r.rows,c=this.expression,p=0;p<l.length;p++){if(!i.Helpers.isValueEmpty(l[p].value))c=ke(c,s+l[p].value.toString()+n,o,t.value)}c!=this.expression&&this.applyExpression(c,!0)}}},e.prototype.renameRowValue=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)&&this.isQuestionInExpression(e)){var r=this.getItemValueQuestionName(e);this.renameQuestionInExpression(r+"."+o.toString(),r+"."+t.value.toString(),[a.logic.closeBracket,"."])}},e.prototype.canUpdateExpressionByQuestion=function(e){return!!this.expression&&!!e.name&&this.actions.length>0},e.prototype.isQuestionInExpression=function(e){return this.isStrContainsInExpression(this.getItemValueQuestionName(e).toLocaleLowerCase())},e.prototype.isStrContainsInExpression=function(e){return!!e&&this.expression.toLocaleLowerCase().indexOf(e.toLocaleLowerCase())>-1},e.prototype.getItemValueQuestionName=function(e){var t=e.getValueName();if(e.parentQuestion){if(e.parentQuestion.isDescendantOf("paneldynamic"))return"panel."+t;if(e.parentQuestion.isDescendantOf("matrixdropdownbase"))return"row."+t}return t},e.prototype.removeQuestion=function(e){this.removeQuestionInExpression(e)},e.prototype.getQuestionNames=function(){var e=[];return this.getQuestionNamesFromExpression(e),this.getQuestionNamesFromActions(e),e},e.prototype.getActionTypes=function(){return this.actions.map((function(e){return e.logicTypeName}))},e.prototype.getContext=function(){var e=this.expression;if(!e)return null;if(!te.getQuestionContextIndexInfo(e,"{"))return null;for(var t=0;t<this.actions.length;t++){var o=this.actions[t].parentElement;if(o)return o}return null},e.prototype.getQuestionNamesFromExpression=function(e){new i.ConditionRunner(this.expression).getVariables().forEach((function(t){-1===e.indexOf(t)&&e.push(t)}))},e.prototype.getQuestionNamesFromActions=function(e){this.actions.forEach((function(t){return t.addQuestionNames(e)}))},e.prototype.getExpressionAsDisplayText=function(){return this.owner?this.owner.getExpressionAsDisplayText(this.expression):this.expression},Object.defineProperty(e.prototype,"editText",{get:function(){return G.getString("pe.edit")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteText",{get:function(){return G.getString("pe.delete")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ifText",{get:function(){return G.getString("pe.if")},enumerable:!1,configurable:!0}),e.prototype.isSuitable=function(e,t){return void 0===t&&(t=""),!e&&!t||(e?t?(this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e))&&this.isSuitableByLogicTypeInActions(t):this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e):this.isSuitableByLogicTypeInActions(t))},e.prototype.isSuitableInExpression=function(e){return-1!==this.expression.indexOf(E(e))||-1!==this.expression.indexOf("'"+e+".")},e.prototype.isSuitableByNameInActions=function(e){return this.actions.some((function(t){return t.isSuitableByQuestionName(e)}))},e.prototype.isSuitableByLogicTypeInActions=function(e){return this.actions.some((function(t){return t.isSuitableByLogicType(e)}))},e.prototype.renameQuestionInExpression=function(e,t,o){var r=this;if(this.expression&&(e=e.toLowerCase(),this.isStrContainsInExpression(e))){var n=a.logic.openBracket;e=n+e,t=n+t;var i=this.expression;o.forEach((function(o){i=r.renameQuestionInExpressionCore(i,i.toLocaleLowerCase(),e+o,t+o)})),i!=this.expression&&this.applyExpression(i,!0)}},e.prototype.renameQuestionInExpressionCore=function(e,t,o,r){for(var n=t.lastIndexOf(o,t.length);n>-1;)e=e.substring(0,n)+r+e.substring(n+o.length),n=(t=t.substring(0,n)).lastIndexOf(o,n);return e},e.prototype.removeQuestionInExpression=function(e){if(this.expression){var t=(new Ve).remove(this.expression,e);t!=this.expression&&this.applyExpression(t,!0)}},e.prototype.applyExpression=function(e,t){this.expression=e;for(var o=this.actions,r=0;r<o.length;r++)o[r].apply(e,t)},e.prototype.removeActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)this.removeAction(e[t])},e.prototype.removeSameActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)for(var o=t-1;o>=0;o--)if(e[t].equals(e[o])){this.removeAction(e[t]);break}},e.counter=0,e}();function qe(e){e.popupModel.isFocusedContent=!0,e.popupModel.setWidthByTarget=!1,e.popupModel.positionMode="flex",e.popupModel.showPointer=!0,e.dropdownListModel.listModel.searchEnabled=e.searchEnabled}o(9);var He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t}(i.EventBase),Be=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this)||this;return r.survey=t,r.options=o,r.invisibleItems=[],r.onLogicItemSaved=new He,r.onLogicItemValidation=new He,r.onLogicItemRemoving=new He,r.onLogicItemRemoved=new He,r.options||(r.options=new s),r.readOnly=r.optionsReadOnly,r.update(),r}return Y(t,e),Object.defineProperty(t,"visibleActions",{get:function(){return a.logic.visibleActions},set:function(e){a.logic.visibleActions=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"types",{get:function(){return Le.types},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onEndEditing(),this.survey=void 0},Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this.modeValue},set:function(e){if(this.modeValue!==e){var t=this.mode;this.modeValue=e,this.errorText="","view"!=e||"edit"!=t&&"new"!=t||this.onEndEditing()}},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return G.getString(e)},t.prototype.getTypeByName=function(e){for(var t=0;t<this.logicTypes.length;t++)if(this.logicTypes[t].name==e)return this.logicTypes[t];return null},t.prototype.update=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),e&&(this.survey=e),t&&(this.options=t),this.logicTypes=this.createLogicTypes(),this.updateVisibleItems(),this.invisibleItems=this.buildItems(!1),this.readOnly=this.optionsReadOnly,this.mode="view"},t.prototype.updateVisibleItems=function(){this.items=this.buildItems(!0),this.editableItemValue=null},Object.defineProperty(t.prototype,"optionsReadOnly",{get:function(){return!!this.options&&this.options.readOnly},enumerable:!1,configurable:!0}),t.prototype.saveEditableItem=function(){if(!this.editableItem||this.hasError())return!1;this.options&&this.options.startUndoRedoTransaction(),this.onEditableItemApply();var e=this.items.indexOf(this.editableItem)<0;e&&this.items.push(this.editableItem);var t=!e||this.editableItem.isNew;return this.editableItem.isNew=!1,this.onItemChanged(this.editableItem,t?"new":"modify"),this.options&&this.options.stopUndoRedoTransaction(),this.onLogicItemSaved.fire(this,{item:this.editableItem}),!0},t.prototype.saveEditableItemAndBack=function(){var e=this.saveEditableItem();return e&&(this.mode="view"),e},t.prototype.onEditableItemApply=function(){},t.prototype.onItemChanged=function(e,t){this.onChangedCallback&&this.onChangedCallback(e,t)},t.prototype.renameQuestion=function(e,t){this.items.forEach((function(o){return o.renameQuestion(e,t)})),this.invisibleItems.forEach((function(o){return o.renameQuestion(e,t)}))},t.prototype.renameItemValue=function(e,t){var o=this.getItemValueQuestion(e,t);o&&(this.items.forEach((function(r){return r.renameItemValue(o,e,t)})),this.invisibleItems.forEach((function(r){return r.renameItemValue(o,e,t)})))},t.prototype.renameRowValue=function(e,t){var o=this.getItemValueQuestion(e,t);o&&(this.items.forEach((function(r){return r.renameRowValue(o,e,t)})),this.invisibleItems.forEach((function(r){return r.renameRowValue(o,e,t)})))},t.prototype.renameColumn=function(e,t){var o=e.colOwner;o&&o.isQuestion&&(this.items.forEach((function(r){return r.renameColumn(o,e,t)})),this.invisibleItems.forEach((function(r){return r.renameColumn(o,e,t)})))},t.prototype.getItemValueQuestion=function(e,t){if(!e.locOwner||i.Helpers.isValueEmpty(t)||i.Helpers.isValueEmpty(e.value))return null;var o=e.locOwner;return o.isQuestion?o:null},t.prototype.removeQuestion=function(e){this.removeQuestionCore(e,this.items),this.removeQuestionCore(e,this.invisibleItems)},t.prototype.hasError=function(){if(!this.editableItem)return!1;if(this.hasErrorInUI())return!0;var e=new i.ExpressionRunner(this.getExpressionText()),t={item:this.editableItem,error:"",usedNamesInExpression:e.getVariables(),actions:this.getEditingActions()};this.onLogicItemValidation.fire(this,t),this.errorText=t.error;var o=this.survey.creator;return this.errorText&&o&&o.notify(this.errorText,"error"),!!this.errorText},t.prototype.getUsedQuestions=function(){var e=this,t={};this.items.forEach((function(o){o.getQuestionNames().forEach((function(o){var r=e.survey.getQuestionByName(o);r&&!t[o]&&(t[o]=r)}))}));var o=[];return Object.keys(t).forEach((function(e){t[e]&&o.push(t[e])})),o},t.prototype.getUsedActionTypes=function(){var e=this,t={};this.items.forEach((function(o){o.getActionTypes().forEach((function(o){t[o]||(t[o]=e.logicTypes.filter((function(e){return e.name==o}))[0])}))}));var o=[];return Object.keys(t).forEach((function(e){t[e]&&o.push(t[e])})),o},t.prototype.hasErrorInUI=function(){return!1},t.prototype.getExpressionText=function(){return""},t.prototype.getEditingActions=function(){return[]},t.prototype.onReadOnlyChanged=function(){},t.prototype.removeQuestionCore=function(e,t){for(var o=0;o<t.length;o++)t[o].removeQuestion(e)},t.prototype.addNew=function(){this.options&&this.options.startUndoRedoTransaction();var e=new Re(this);e.isNew=!0,this.items.push(e),this.editItemCore(e),this.options&&this.options.stopUndoRedoTransaction()},t.prototype.editItem=function(e){this.options&&this.options.startUndoRedoTransaction(),this.editItemCore(e),this.options&&this.options.stopUndoRedoTransaction()},t.prototype.editItemCore=function(e){this.editableItemValue=e,this.onStartEditing(),this.mode=e.isNew?"new":"edit"},t.prototype.onStartEditing=function(){},t.prototype.onEndEditing=function(){this.editableItemValue=null},t.prototype.canRemoveItem=function(e){var t={item:e,allowRemove:!0};return this.onLogicItemRemoving.fire(this,t),t.allowRemove},t.prototype.removeItem=function(e,t){if(void 0===t&&(t=!0),!t||this.canRemoveItem(e)){this.options&&this.options.startUndoRedoTransaction(),e.apply("");var o=this.items.indexOf(e);o>-1&&this.items.splice(o,1),this.onItemChanged(e,"delete"),this.options&&this.options.stopUndoRedoTransaction(),this.onLogicItemRemoved.fire(this,{item:e})}},t.prototype.addAction=function(e,t){void 0===t&&(t=null);var o=this.createNewAction(e,t);return this.editableItem.addNewAction(o),o},t.prototype.addNewAction=function(){return this.addAction(null,null)},t.prototype.createNewAction=function(e,t){return new Me(e,t,this.survey)},t.prototype.getVisibleLogicTypes=function(){for(var e=[],t=this.logicTypes,o=0;o<t.length;o++)t[o].visible&&e.push(t[o]);return e},t.prototype.removeAction=function(e){this.editableItem&&(this.editableItem.removeAction(e),0==this.editableItem.actions.length&&this.addNewAction())},t.prototype.getExpressionAsDisplayText=function(e){return _e.expressionToDisplayText(this.survey,this.options,e)},t.prototype.buildItems=function(e){for(var t=[],o={},r=this.getAllElements(),n=0;n<r.length;n++)this.buildItemsByElement(r[n],t,o,e);return t},t.prototype.getAllElements=function(){var e=[];return this.AddElements(this.survey.pages,e),this.AddElements(Le.baseTypes.question.getSelectorChoices(this.survey,null),e),this.AddElements(this.survey.getAllPanels(),e),this.AddElements(this.survey.triggers,e),this.AddElements(this.survey.completedHtmlOnCondition,e),this.AddElements(this.survey.calculatedValues,e),this.AddElements(Le.baseTypes.matrixdropdowncolumn.getSelectorChoices(this.survey,null),e),this.AddElements(this.getValidators(),e),this.AddElements(this.getItemValues(),e),e},t.prototype.getValidators=function(){for(var e=[],t=this.survey.getAllQuestions(),o=0;o<t.length;o++)this.AddElements(t[o].validators,e);return e},t.prototype.getItemValues=function(){for(var e=[],t=this.survey.getAllQuestions(),o=0;o<t.length;o++){var r=t[o],n=r.choices;if(n){var a=i.Serializer.findProperty(r.getType(),"choices");a&&"itemvalue[]"===a.type&&this.AddElements(n,e)}}return e},t.prototype.AddElements=function(e,t){for(var o=0;o<e.length;o++)t.push(e[o])},t.prototype.buildItemsByElement=function(e,t,o,r){for(var n=this.getElementAllTypes(e),a=0;a<this.logicTypes.length;a++){var s=this.logicTypes[a];if(s.showInUI===r){var l=e[s.propertyName];if(n.indexOf(s.baseClass)>-1&&!i.Helpers.isValueEmpty(l)){var c=this.getLogicItemHashKey(l,e),p=o[c];p||(p=new Re(this,l),o[c]=p,t.push(p));var u=this.createNewAction(s,e);p.addNewAction(u)}}}},t.prototype.getLogicItemHashKey=function(e,t){var o=this.getParentQuestion(t);return(o?"@"+o.name:"")+e.replace(" ","").toLowerCase()},t.prototype.getParentQuestion=function(e){var t=e.parentQuestion;return t||(e.isDescendantOf("matrixdropdowncolumn")?e.colOwner:null)},t.prototype.getElementAllTypes=function(e){var t=[],o=e.getType();for(t.push(o);o&&"base"!=o;){var r=i.Serializer.findClass(o);if(!r)break;(o=r.parentName)&&t.push(o)}return t},t.prototype.createLogicTypes=function(){for(var e=[],o=t.visibleActions,r=0;r<t.types.length;r++)o.length>0&&o.indexOf(t.types[r].name)<0||e.push(new _e(t.types[r],this.survey,this.options));return e},Z([Object(i.propertyArray)()],t.prototype,"items",void 0),Z([Object(i.propertyArray)()],t.prototype,"logicTypes",void 0),Z([Object(i.property)()],t.prototype,"errorText",void 0),Z([Object(i.property)({onSet:function(e,t){t.onReadOnlyChanged()}})],t.prototype,"readOnly",void 0),Z([Object(i.property)()],t.prototype,"placeholderHtml",void 0),t}(i.Base),Qe=o(1),Fe=function(){function e(e){this.objValue=e,this.editableObjValue=this.createEditableObj()}return e.isCopyObject=function(e){return!!e&&e.isCopy},e.getSurvey=function(t){if(t instanceof i.SurveyModel||t&&t.getType&&"survey"==t.getType())return e.getOriginalSurvey(t);if(t instanceof i.MatrixDropdownColumn&&t.colOwner)return t.colOwner.survey;if(t){if(t.survey)return e.getOriginalSurvey(t.survey);if(t.owner)return e.getSurvey(t.owner);if(t.errorOwner)return e.getSurvey(t.errorOwner);if(t.locOwner)return e.getSurvey(t.locOwner)}var o=e.getOriginalObject(t);return o&&o!==t?e.getSurvey(o):null},e.getOriginalObject=function(e){return e&&e.originalObj?e.originalObj:e},e.getOriginalSurvey=function(t){return e.getOriginalObject(t)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editableObj",{get:function(){return this.editableObjValue},enumerable:!1,configurable:!0}),e.prototype.isPropertyChanged=function(e){return"pages"!=e&&!i.Helpers.isTwoValueEquals(this.obj[e],this.editableObj[e])},e.prototype.apply=function(e){this.isPropertyChanged(e)&&(this.obj[e]=this.editableObj[e])},e.prototype.reset=function(){this.assignProperties(this.editableObj)},e.prototype.applyAll=function(e){void 0===e&&(e=[]);for(var t=this.getProperties(e),o=0;o<t.length;o++)this.apply(t[o])},e.prototype.getProperties=function(e){var t=[],o=this.getObjJson(this.editableObj),r=this.getObjJson(this.obj);for(var n in o)e.indexOf(n)>-1||t.push(n);for(var n in r)e.indexOf(n)>-1||t.indexOf(n)>-1||t.push(n);return t},e.prototype.createEditableObj=function(){var e=this.obj.getType(),t=i.Serializer.createClass(e);return null==t&&"survey"==e&&(t=new i.SurveyModel),this.assignProperties(t),"matrixdropdowncolumn"==e&&(t.colOwner=this.obj.colOwner),"survey"!=e&&(t.setSurveyImpl?t.setSurveyImpl(this.obj.survey):this.obj.survey&&!t.survey&&(t.survey=this.obj.survey)),this.obj.parent&&(t.parent=this.obj.parent),t.isCopy=!0,t.originalObj=this.obj,t},e.prototype.assignProperties=function(e){(new i.JsonObject).toObject(this.getObjJson(),e)},e.prototype.getObjJson=function(e){void 0===e&&(e=null),e||(e=this.obj);var t=new i.JsonObject;return t.lightSerializing=!0,t.toJsonObject(e)},e}(),Ue={root:"spg-root-modern",container:"spg-container-modern",header:"spg-title spg-container-modern__title",body:"spg-body",bodyEmpty:"spg-body spg-body--empty",footer:"spg-footer spg-body__footer spg-clearfix",title:"",description:"",logo:"spg-logo",logoImage:"spg-logo__image",headerText:"spg-header__text",navigationButton:"",completedPage:"spg-completedpage",navigation:{complete:"spg-btn spg-footer__complete-btn",prev:"spg-btn spg-footer__prev-btn",next:"spg-btn spg-footer__next-btn",start:"spg-btn spg-footer__start-btn",preview:"spg-btn spg-footer__preview-btn",edit:"spg-btn spg-footer__edit-btn"},panel:{title:"spg-title spg-panel__title",titleExpandable:"spg-panel__title--expandable",titleExpanded:"spg-panel__title--expanded",titleCollapsed:"spg-panel__title--collapsed",titleOnError:"spg-panel__title--error",description:"spg-description spg-panel__description",container:"spg-panel spg-row__panel",content:"spg-panel__content",icon:"spg-panel__icon",iconExpanded:"spg-panel__icon--expanded",footer:"spg-panel__footer",requiredText:"spg-panel__required-text"},paneldynamic:{mainRoot:"spg-question spg-row__question",root:"spg-paneldynamic",navigation:"spg-paneldynamic__navigation",title:"spg-title spg-question__title",button:"spg-action-button spg-action-button--text",buttonRemove:"spg-action-button--danger",buttonAdd:"spg-paneldynamic__add-btn",panelsContainer:"",panelWrapper:"spg-paneldynamic__panel-wrapper",panelWrapperList:"",progressTop:"spg-paneldynamic__progress spg-paneldynamic__progress--top",progressBottom:"spg-paneldynamic__progress spg-paneldynamic__progress--bottom",buttonPrev:"spg-paneldynamic__prev-btn",buttonNext:"spg-paneldynamic__next-btn",progressContainer:"spg-paneldynamic__progress-container",progress:"spg-progress",progressBar:"spg-progress__bar",progressText:"spg-paneldynamic__progress-text",panelFooter:"spg-panel__footer",separator:"spg-paneldynamic__separator"},progress:"spg-progress spg-body__progress",progressBar:"spg-progress__bar",progressText:"spg-progress__text",progressTextInBar:"spg-hidden",page:{root:"spg-page spg-body__page",title:"spg-title spg-page__title",description:"spg-description spg-page__description"},pageTitle:"spg-title spg-page__title",pageDescription:"spg-description spg-page__description",row:"spg-row spg-clearfix",rowMultiple:"spg-row--multiple",question:{mainRoot:"spg-question spg-row__question",flowRoot:"spg-question spg-row__question spg-row__question--flow",asCell:"spg-table__cell",header:"spg-question__header",headerLeft:"spg-question__header--location--left",headerTop:"spg-question__header--location--top",headerBottom:"spg-question__header--location--bottom",content:"spg-question__content",contentLeft:"spg-question__content--left",titleLeftRoot:"spg-question--location--left",titleOnAnswer:"spg-question__title--answer",titleOnError:"spg-question__title--error",title:"spg-title spg-question__title",requiredText:"spg-question__required-text",number:"spg-question__num",description:"spg-description spg-question__description",descriptionUnderInput:"spg-description spg-question__description",comment:"spg-comment",required:"spg-question--required",titleRequired:"spg-question__title--required",indent:0,footer:"spg-question__footer",formGroup:"spg-question__form-group",hasError:"",disabled:"spg-question--disabled"},image:{root:"spg-image",image:"sv_image_image"},error:{root:"spg-question__erbox",icon:"spg-question__erbox-icon",item:"",locationTop:"spg-question__erbox--location--top",locationBottom:"spg-question__erbox--location--bottom"},checkbox:{root:"spg-selectbase",item:"spg-item spg-checkbox spg-selectbase__item",itemSelectAll:"spg-checkbox--selectall",itemNone:"spg-checkbox--none",itemDisabled:"spg-item--disabled spg-checkbox--disabled",itemChecked:"spg-checkbox--checked",itemHover:"spg-checkbox--allowhover",itemInline:"spg-selectbase__item--inline",label:"spg-selectbase__label",itemSvgIconId:"#icon-v2check",labelChecked:"",itemControl:"spg-checkbox__control",itemDecorator:"spg-checkbox__svg",controlLabel:"spg-checkbox__caption",materialDecorator:"spg-checkbox__rectangle",other:"spg-comment spg-question__other",column:"spg-selectbase__column"},radiogroup:{root:"spg-selectbase",item:"spg-item spg-radio spg-selectbase__item",itemInline:"spg-selectbase__item--inline",label:"spg-selectbase__label",labelChecked:"",itemDisabled:"spg-item--disabled spg-radio--disabled",itemChecked:"spg-radio--checked",itemHover:"spg-radio--allowhover",itemControl:"spg-visuallyhidden spg-item__control",itemDecorator:"spg-item__svg spg-radio__svg",controlLabel:"spg-item__control-label",materialDecorator:"spg-item__decorator spg-radio__decorator",other:"spg-comment spg-question__other",clearButton:"spg-btn spg-selectbase__clear-btn",column:"spg-selectbase__column"},boolean:{mainRoot:"spg-question spg-row__question spg-question--boolean",rootCheckbox:"spg-selectbase",checkboxItem:"spg-checkbox",checkboxItemChecked:"spg-checkbox--checked",checkboxitemIndeterminate:"spg-checkbox--indeterminate",checkboxItemDisabled:"spg-checkbox--disabled",svgIconId:"#icon-v2check",checkboxLabel:"spg-selectbase__label",controlCheckbox:"spg-checkbox__control",checkboxControlLabel:"spg-checkbox__caption",checkboxItemDecorator:"spg-checkbox__svg",checkboxMaterialDecorator:"spg-checkbox__rectangle"},text:{root:"spg-input spg-text",small:"spg-row__question--small",content:"spg-question__content spg-text__content",remainingCharacterCounter:"spg-remaining-character-counter",onError:"spg-input--error"},multipletext:{root:"spg-multipletext",item:"spg-multipletext__item",itemTitle:"spg-multipletext__item-title",content:"spg-multipletext__content spg-text__content",row:"spg-multipletext__row",cell:"spg-multipletext__cell"},dropdown:{root:"",popup:"spg-dropdown-popup",small:"spg-row__question--small sd-row__question--small",control:"spg-input spg-dropdown sd-input sd-dropdown",filterStringInput:"sd-dropdown__filter-string-input spg-dropdown__filter-string-input",other:"spg-comment spg-question__other",onError:"spg-input--error",selectWrapper:"sv-dropdown_select-wrapper spg-dropdown_select-wrapper",chevronButton:"sd-dropdown_chevron-button spg-dropdown_chevron-button",chevronButtonSvg:"sd-dropdown_chevron-button-svg",chevronButtonIconId:"icon-chevron"},imagepicker:{root:"spg-imagepicker",item:"spg-imagepicker__item",itemInline:"spg-imagepicker__item--inline",itemChecked:"spg-imagepicker__item--checked",itemDisabled:"spg-imagepicker__item--disabled",itemHover:"spg-imagepicker__item--allowhover",label:"spg-imagepicker__label",itemControl:"spg-imagepicker__control",image:"spg-imagepicker__image",itemText:"spg-imagepicker__text",clearButton:"spg-btn",other:"spg-comment spg-question__other"},matrix:{tableWrapper:"spg-matrix spg-table-wrapper",root:"spg-table",rowError:"spg-matrix__row--error",cell:"spg-table__cell spg-matrix__cell",headerCell:"spg-table__cell spg-table__cell--header",label:"spg-item spg-radio spg-matrix__label",itemValue:"spg-visuallyhidden spg-item__control spg-radio__control",itemChecked:"spg-radio--checked",itemDisabled:"spg-item--disabled spg-radio--disabled",itemHover:"spg-radio--allowhover",materialDecorator:"spg-item__decorator spg-radio__decorator",itemDecorator:"spg-item__svg spg-radio__svg",cellText:"spg-matrix__text",cellTextSelected:"spg-matrix__text--checked",cellTextDisabled:"spg-matrix__text--disabled"},matrixdropdown:{tableWrapper:"spg-table-wrapper",root:"spg-table",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header"},matrixdynamic:{tableWrapper:"spg-table-wrapper",root:"spg-table spg-matrixdynamic",content:"spg-matrixdynamic__content spg-text__content",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header",button:"spg-btn",detailRow:"spg-table__row spg-table__row--detail",detailButton:"spg-table__cell--detail-button",detailButtonExpanded:"spg-table__cell--detail-button--expanded",detailIcon:"spg-detail-panel__icon",detailIconExpanded:"spg-detail-panel__icon--expanded",detailPanelCell:"spg-table__cell--detail-panel",actionsCell:"spg-table__cell spg-table__cell--actions",buttonAdd:"spg-matrixdynamic__add-btn spg-action-button spg-action-button--large",buttonRemove:"spg-matrixdynamic__remove-btn",iconAdd:"",iconRemove:"",dragElementDecorator:"spg-drag-element__svg",iconDragElement:"#icon-drag-area-indicator",iconDrag:"spg-matrixdynamic__drag-element",footer:"",dragDropGhostPositionTop:"spg-matrixdynamic__drag-drop-ghost-position-top",dragDropGhostPositionBottom:"spg-matrixdynamic__drag-drop-ghost-position-bottom",emptyRowsSection:"spg-matrixdynamic__placeholder",emptyRowsText:"spg-matrixdynamic__placeholder-text",cellQuestionWrapper:"spg-table__question-wrapper"},rating:{root:"spg-rating",item:"spg-rating__item",selected:"spg-rating__item--selected",minText:"spg-rating__min-text",itemText:"spg-rating__item-text",maxText:"spg-rating__max-text",disabled:"spg-rating--disabled"},comment:{root:"spg-input spg-comment",content:"spg-question__content spg-comment__content",remainingCharacterCounter:"spg-remaining-character-counter",small:"spg-row__question--small",onError:"spg-input--error"},expression:"",file:{root:"spg-file",other:"spg-comment spg-question__other",placeholderInput:"spg-visuallyhidden",preview:"spg-file__preview",fileSign:"spg-hidden",fileSignBottom:"spg-file__sign",fileDecorator:"spg-file__decorator",fileInput:"spg-visuallyhidden",noFileChosen:"spg-description spg-file__no-file-chosen",chooseFile:"spg-btn spg-file__choose-btn",disabled:"spg-file__choose-btn--disabled",removeButton:"spg-hidden",removeButtonBottom:"spg-btn spg-file__clean-btn",removeFile:"spg-hidden",removeFileSvg:"spg-file__remove-svg",wrapper:"spg-file__wrapper"},signaturepad:{root:"spg-signaturepad sjs_sp_container",small:"spg-row__question--small",controls:"sjs_sp_controls",clearButton:"sjs_sp_clear"},propertygrid_bindings:{content:"spg-question__content spg-question__nopadding spg-question-group"},propertygrid_restfull:{content:"spg-question__content spg-question__nopadding spg-restfull"},propertygrid_masksettings:{content:"spg-question__content spg-question__nopadding spg-masksettings"},propertygrid_header:{mainRoot:"spg-header",content:"spg-question__content spg-question__nopadding"},coloralpha:{content:"spg-question__content spg-question__nopadding spg-question__content-coloralpha"},font:{content:"spg-question__content spg-question__nopadding spg-question-composite__content"},backgroundcornerradius:{content:"spg-question__content spg-question__nopadding spg-question-composite__content"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},actionBar:{root:"spg-action-bar",item:"spg-action-button",itemPressed:"spg-action-button--pressed",itemAsIcon:"spg-action-button--icon",itemIcon:"spg-action-button__icon",itemTitle:"spg-action-button__title"},spinedit:{root:"spg-input spg-spin-editor spg-input-container",control:"spg-spin-editor__input spg-input-container__input",buttonsContainer:"spg-input-container__buttons-container",arrowButton:"spg-input__edit-button",increaseButtonIcon:"icon-arrow-up",decreaseButtonIcon:"icon-arrow-down"},color:{root:"spg-input spg-color-editor spg-input-container",swatch:"spg-color-editor__color-swatch",swatchDefault:"spg-color-editor__color-swatch--default",swatchDisabled:"spg-color-editor__color-swatch--disabled",colorInput:"spg-color-editor__color-input",control:"spg-color-editor__input spg-input-container__input",colorDropdown:"spg-input__edit-button",colorDropdownIcon:"icon-drop-down-arrow",colorItem:"spg-color-editor__color-item",swatchIcon:"icon-color-picker"},textwithreset:{root:"spg-input spg-input-container",rootMultiline:"spg-input-container--multiline",control:"spg-input-container__input",controlMultiline:"spg-input-container__input spg-comment",resetButton:"spg-input__edit-button",resetButtonIcon:"icon-reset",content:"spg-question__content spg-text__content",remainingCharacterCounter:"spg-remaining-character-counter",onError:"spg-input--error"},fileedit:{root:"spg-input spg-input-container spg-file-edit",control:"spg-input-container__input",buttonsContainer:"spg-input-container__buttons-container",chooseButtonIcon:"icon-file",clearButtonIcon:"icon-clear",fileInput:"sd-visuallyhidden",clearButton:"spg-input__edit-button",chooseButton:"spg-input__edit-button spg-file-edit__choose-button",chooseButtonDisabled:"spg-input__edit-button--disabled"},linkvalue:{content:"spg-link"}},We={question:{properties:["name","title","description","visible","readOnly","isRequired","showCommentArea","commentText","commentPlaceholder",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"bindings",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"resetValueIf",tab:"logic"},{name:"setValueIf",tab:"logic"},{name:"setValueExpression",tab:"logic"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"hideNumber",tab:"layout"},{name:"state",tab:"layout"},{name:"titleLocation",tab:"layout"},{name:"descriptionLocation",tab:"layout"},{name:"errorLocation",tab:"layout"},{name:"indent",tab:"layout"},{name:"width",tab:"layout"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"},{name:"valueName",tab:"data"},{name:"defaultValue",tab:"data"},{name:"correctAnswer",tab:"data"},{name:"useDisplayValuesInDynamicTexts",tab:"data"},{name:"clearIfInvisible",tab:"data"},{name:"validators",tab:"validation"},{name:"requiredErrorText",tab:"validation"}],tabs:[{name:"layout",index:100},{name:"logic",index:200},{name:"data",index:300},{name:"validation",index:400}]},comment:{properties:[{name:"rows",tab:"layout"},{name:"cols",tab:"layout"},"placeholder",{name:"maxLength",tab:"validation"},{name:"textUpdateMode",tab:"data"},{name:"autoGrow",tab:"layout"},{name:"allowResize",tab:"layout"}]},file:{properties:["sourceType","visible","readOnly","isRequired","showCommentArea","allowMultiple",{name:"showPreview"},"allowImagesPreview","waitForUpload","needConfirmRemoveFile",{name:"storeDataAsText"},"allowCameraAccess","acceptedTypes","maxSize","imageHeight","imageWidth","filePlaceholder","photoPlaceholder","fileOrPhotoPlaceholder"]},signaturepad:{properties:["dataFormat","signatureWidth","signatureHeight","signatureAutoScaleEnabled","showPlaceholder","placeholder","placeholderReadOnly","allowClear","backgroundImage","backgroundColor","penMinWidth","penMaxWidth","penColor","waitForUpload",{name:"storeDataAsText"}]},html:{properties:["html"]},matrixdropdownbase:{properties:["cellType","optionsCaption","detailPanelMode","detailPanelShowOnAdding",{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"verticalAlign",tab:"layout"},{name:"alternateRows",tab:"layout"},{name:"columnsVisibleIf",tab:"logic"},{name:"columnLayout",tab:"layout"},{name:"transposeData",tab:"layout"},{name:"horizontalScroll",tab:"layout"},{name:"columnColCount",tab:"layout"},{name:"columnMinWidth",tab:"layout"},{name:"cellErrorLocation",tab:"layout"},{name:"detailErrorLocation",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"choices",index:12}]},matrixdynamic:{properties:["allowAddRows","allowRemoveRows","allowRowsDragAndDrop","rowCount","minRowCount","maxRowCount","addRowLocation","addRowText","removeRowText","confirmDelete","confirmDeleteText","placeholder",{name:"hideColumnsIfEmpty",tab:"columns"},{name:"emptyRowsText",tab:"columns"},{name:"defaultRowValue",tab:"data"},{name:"defaultValueFromLastRow",tab:"data"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},matrixdropdown:{properties:["totalText","placeholder",{name:"hideIfRowsEmpty",tab:"rows"},{name:"rowsVisibleIf",tab:"logic"},{name:"rowTitleWidth",tab:"layout"},{name:"keyDuplicationError",tab:"validation"}]},matrix:{properties:[{name:"isAllRowRequired",tab:"validation"},{name:"eachRowUnique",tab:"validation"},{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"verticalAlign",tab:"layout"},{name:"alternateRows",tab:"layout"},{name:"rowsOrder",tab:"rows"},{name:"hideIfRowsEmpty",tab:"rows"},{name:"columnsVisibleIf",tab:"logic"},{name:"rowsVisibleIf",tab:"logic"},{name:"columnMinWidth",tab:"layout"},{name:"rowTitleWidth",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"cells",index:500}]},multipletext:{properties:[{name:"colCount",tab:"layout"},{name:"itemSize",tab:"layout"},{name:"itemErrorLocation",tab:"layout"}],tabs:[{name:"items",index:10}]},rating:{properties:[{name:"displayMode",tab:"rateValues"},{name:"rateCount",tab:"rateValues"},{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"rateDescriptionLocation",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:10}]},selectbase:{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"layout"},{name:"textWrapEnabled",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"otherPlaceholder",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"hideIfChoicesEmpty",tab:"logic"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"},{name:"otherErrorText",tab:"validation"},{name:"separateSpecialChoices",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},checkbox:{properties:[{name:"showSelectAllItem",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"minSelectedChoices",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"separateSpecialChoices",tab:"choices"}]},ranking:{properties:[{name:"selectToRankEnabled"},{name:"selectToRankAreasLayout"},{name:"minSelectedChoices",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"}]},radiogroup:{properties:[{name:"showClearButton",tab:"choices"},{name:"separateSpecialChoices",tab:"choices"}]},dropdown:{properties:["placeholder","autocomplete",{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"allowClear",tab:"choices"},{name:"searchMode",tab:"choices"}]},tagbox:{properties:["closeOnSelect","placeholder",{name:"searchEnabled",tab:"choices"},{name:"searchMode",tab:"choices"},{name:"hideSelectedItems",tab:"choices"},{name:"allowClear",tab:"choices"}]},imagepicker:{properties:["contentMode","imageFit","isResponsive","minImageWidth","maxImageWidth","minImageHeight","maxImageHeight","imageHeight","imageWidth","multiSelect","showLabel"]},image:{properties:["imageLink","contentMode","imageFit","imageHeight","imageWidth","text"]},"itemvalue[]@choices":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@rows":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@columns":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},text:{properties:["inputType","min","max","step","placeholder","autocomplete","dataList",{name:"minValueExpression",tab:"logic"},{name:"maxValueExpression",tab:"logic"},{name:"size",tab:"layout"},{name:"maxLength",tab:"validation"},{name:"minErrorText",tab:"validation"},{name:"maxErrorText",tab:"validation"},{name:"textUpdateMode",tab:"data"},{name:"maskType",tab:"mask"},{name:"maskSettings",tab:"mask"}],tabs:[{name:"mask",index:250}]},boolean:{properties:["label","labelTrue","labelFalse","showTitle",{name:"valueTrue",tab:"data"},{name:"valueFalse",tab:"data"}]},expression:{properties:["expression","displayStyle","currency","format","maximumFractionDigits","minimumFractionDigits","useGrouping"]},matrixdropdowncolumn:{properties:["name","title"]},"matrixdropdowncolumn@default":{properties:["name","title","cellType","visible","readOnly","isRequired","isUnique","showInMultipleColumns","width","minWidth",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"resetValueIf",tab:"logic"},{name:"setValueIf",tab:"logic"},{name:"setValueExpression",tab:"logic"},{name:"totalType",tab:"totals"},{name:"totalDisplayStyle",tab:"totals"},{name:"totalCurrency",tab:"totals"},{name:"totalFormat",tab:"totals"},{name:"totalExpression",tab:"totals"}],tabs:[{name:"general",index:5},{name:"logic",index:20},{name:"totals",index:40}]},"matrixdropdowncolumn@checkbox":{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"showSelectAllItem",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"minSelectedChoices",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@radiogroup":{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@dropdown":{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"optionsCaption",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@tagbox":{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"optionsCaption",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@text":{properties:["inputType","min","max","step","placeholder","dataList","maxLength",{name:"maskType",tab:"mask"},{name:"maskSettings",tab:"mask"}],tabs:[{name:"mask",index:20},{name:"validators",index:25}]},"matrixdropdowncolumn@comment":{properties:["rows","placeholder","maxLength"],tabs:[{name:"validators",index:25}]},"matrixdropdowncolumn@boolean":{properties:[{name:"labelTrue",tab:"data"},{name:"labelFalse",tab:"data"},{name:"valueTrue",tab:"data"},{name:"valueFalse",tab:"data"},{name:"defaultValue",tab:"data"}],tabs:[{name:"data",index:25}]},"matrixdropdowncolumn@expression":{properties:["expression","displayStyle","currency"]},"matrixdropdowncolumn@rating":{properties:["rateValues",{name:"displayMode",tab:"rateValues"},{name:"rateType",tab:"rateValues"},{name:"rateCount",tab:"rateValues"},{name:"rateColorMode",tab:"rateValues"},{name:"scaleColorMode",tab:"rateValues"},{name:"autoGenerate",tab:"rateValues"},{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"rateDescriptionLocation",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:5}]},multipletextitem:{properties:["name","title","inputType","isRequired","size","placeholder",{name:"maxLength",tab:"validation"},{name:"requiredErrorText",tab:"validation"},{name:"validators",tab:"validation"},{name:"defaultValueExpression",tab:"logic"},{name:"minValueExpression",tab:"logic"},{name:"maxValueExpression",tab:"logic"},{name:"maskType",tab:"mask"},{name:"maskSettings",tab:"mask"}],tabs:[{name:"logic",index:200},{name:"mask",index:250},{name:"validation",index:300}]},"multipletext@items":{properties:["name","title"]},calculatedvalue:{properties:["name","expression","includeIntoResult"]},"calculatedvalue@items":{properties:["name","expression"]},paneldynamic:{properties:["renderMode","templateTabTitle","tabAlign","panelCount","minPanelCount","maxPanelCount","panelsState",{name:"allowAddPanel"},{name:"allowRemovePanel"},"panelAddText","panelRemoveText","templateTitle","templateDescription","noEntriesText","confirmDelete","confirmDeleteText","panelPrevText","panelNextText","showQuestionNumbers","showRangeInProgress",{name:"defaultPanelValue",tab:"data"},{name:"defaultValueFromLastPanel",tab:"data"},{name:"templateTitleLocation",tab:"questionSettings"},{name:"templateErrorLocation",tab:"questionSettings"},{name:"panelRemoveButtonLocation",tab:"layout"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},panelbase:{properties:["name","title","description","visible","readOnly",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"questionTitleLocation",tab:"questionSettings"},{name:"questionErrorLocation",tab:"questionSettings"}],tabs:[{name:"questionSettings",index:100},{name:"layout",index:150},{name:"logic",index:200},{name:"data",index:300},{name:"validation",index:400}]},panel:{properties:["isRequired",{name:"questionsOrder",tab:"questionSettings"},{name:"innerIndent",tab:"questionSettings"},{name:"requiredErrorText",tab:"validation"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"state",tab:"layout"},{name:"width",tab:"layout"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"},{name:"showNumber",tab:"numbering"},{name:"showQuestionNumbers",tab:"numbering"},{name:"questionStartIndex",tab:"numbering"}],tabs:[{name:"numbering",index:350}]},page:{properties:["navigationTitle","navigationDescription","maxTimeToFinish",{name:"questionsOrder",tab:"questionSettings"},{name:"navigationButtonsVisibility",tab:"navigation"}],tabs:[{name:"navigation",index:350}]},survey:{properties:["title","description","showTitle","locale","mode","cookieName","widthMode","width","fitToContainer",{name:"questionsOnPageMode",tab:"navigation"},{name:"firstPageIsStarted",tab:"navigation"},{name:"goNextPageAutomatic",tab:"navigation"},{name:"allowCompleteSurveyAutomatic",tab:"navigation"},{name:"showNavigationButtons",tab:"navigation"},{name:"showPrevButton",tab:"navigation"},{name:"showProgressBar",tab:"navigation"},{name:"progressBarType",tab:"navigation"},{name:"progressBarShowPageTitles",tab:"navigation"},{name:"progressBarShowPageNumbers",tab:"navigation"},{name:"showTOC",tab:"navigation"},{name:"tocLocation",tab:"navigation"},{name:"showPreviewBeforeComplete",tab:"navigation"},{name:"previewText",tab:"navigation"},{name:"editText",tab:"navigation"},{name:"startSurveyText",tab:"navigation"},{name:"pagePrevText",tab:"navigation"},{name:"pageNextText",tab:"navigation"},{name:"completeText",tab:"navigation"},{name:"questionsOrder",tab:"question"},{name:"questionTitleLocation",tab:"question"},{name:"questionDescriptionLocation",tab:"question"},{name:"showQuestionNumbers",tab:"question"},{name:"questionTitlePattern",tab:"question"},{name:"requiredText",tab:"question"},{name:"questionStartIndex",tab:"question"},{name:"questionErrorLocation",tab:"question"},{name:"focusFirstQuestionAutomatic",tab:"question"},{name:"maxTextLength",tab:"question"},{name:"maxOthersLength",tab:"question"},{name:"autoGrowComment",tab:"question"},{name:"allowResizeComment",tab:"question"},{name:"showPageTitles",tab:"pages"},{name:"showPageNumbers",tab:"pages"},{name:"calculatedValues",tab:"logic"},{name:"triggers",tab:"logic"},{name:"clearInvisibleValues",tab:"data"},{name:"textUpdateMode",tab:"data"},{name:"sendResultOnPageNext",tab:"data"},{name:"storeOthersAsComment",tab:"data"},{name:"focusOnFirstError",tab:"validation"},{name:"checkErrorsMode",tab:"validation"},{name:"navigateToUrl",tab:"showOnCompleted"},{name:"navigateToUrlOnCondition",tab:"showOnCompleted"},{name:"showCompletedPage",tab:"showOnCompleted"},{name:"completedHtml",tab:"showOnCompleted"},{name:"completedHtmlOnCondition",tab:"showOnCompleted"},{name:"loadingHtml",tab:"showOnCompleted"},{name:"completedBeforeHtml",tab:"showOnCompleted"},{name:"maxTimeToFinish",tab:"timer"},{name:"maxTimeToFinishPage",tab:"timer"},{name:"showTimerPanel",tab:"timer"},{name:"showTimerPanelMode",tab:"timer"},{name:"logo",tab:"logo"},{name:"logoPosition",tab:"logo"},{name:"logoWidth",tab:"logo"},{name:"logoHeight",tab:"logo"},{name:"logoFit",tab:"logo"}],tabs:[{name:"logo",index:50},{name:"navigation",index:100},{name:"question",index:200},{name:"pages",index:250},{name:"logic",index:300},{name:"data",index:400},{name:"validation",index:500},{name:"showOnCompleted",index:600},{name:"timer",index:700}]},"page@survey":{properties:["name","title"]},choicesByUrl:{properties:["url","path","valueName","titleName","allowEmptyResponse"]},"patternmask@maskSettings":{properties:["pattern","saveMaskedValue"]},"datetimemask@maskSettings":{properties:["pattern","min","max","saveMaskedValue"]},"numericmask@maskSettings":{properties:["min","max","precision","decimalSeparator","thousandsSeparator","allowNegativeValues","saveMaskedValue"]},"currencymask@maskSettings":{properties:["prefix","suffix","min","max","precision","decimalSeparator","thousandsSeparator","allowNegativeValues","saveMaskedValue"]},patternmask:{properties:["pattern"]},datetimemask:{properties:["pattern"]},currencymask:{properties:["prefix","suffix"]}},Ge={autoGenerateProperties:!0,classes:We},ze=function(){function e(){}return e.definition=We,e}(),Je=function(){function e(){}return Object.defineProperty(e.prototype,"name",{get:function(){return this.property?this.property.name:""},enumerable:!1,configurable:!0}),e}(),Ze=function(){this.visible=!0,this.index=0,this.properties=[]},Ke=function(){function e(e,t,o,r,n,a,s){void 0===t&&(t=null),void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n=null),void 0===a&&(a=null),void 0===s&&(s=null),this.obj=e,this.options=t,this.parentObj=n,this.parentProperty=a,this.propertyGridDefinition=s,this.tabs=[],this.propertyGridDefinition||(this.propertyGridDefinition=Ge),this.showModeValue=r,this.properties=i.Serializer.getPropertiesByObj(this.obj),this.fillPropertiesHash(),this.buildTabs(o)}return e.prototype.getProperty=function(e){var t=this.propertiesHash[e];return t&&t.visible?t.property:null},e.prototype.getPropertyAsCategory=function(e){var t=this.getProperty(e);return!t||t.category&&t.category!==e?null:t},Object.defineProperty(e.prototype,"showMode",{get:function(){return this.showModeValue?this.showModeValue:"form"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){for(var e=0;e<this.tabs.length;e++)if(this.tabs[e].visible&&this.tabs[e].properties.length>0)return!1;return!0},enumerable:!1,configurable:!0}),e.prototype.getClassDefintion=function(e){if(this.propertyGridDefinition&&this.propertyGridDefinition.classes)return this.propertyGridDefinition.classes[e]},e.prototype.fillPropertiesHash=function(){this.propertiesHash={};for(var e=0;e<this.properties.length;e++){var t=this.properties[e];this.propertiesHash[t.name]={property:t,visible:te.isPropertyVisible(this.obj,t,this.options,this.showMode,this.parentObj,this.parentProperty)}}},e.prototype.isJSONPropertyVisible=function(e){var t=this.propertiesHash[e.name];return!!t&&t.visible},e.prototype.getTabByName=function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].name==e)return this.tabs[t];return null},e.prototype.getTabs=function(){return this.tabs},e.prototype.getProperties=function(e){for(var t=[],o=0;o<e.properties.length;o++)t.push(e.properties[o].property);return t},e.prototype.buildTabs=function(e){e||(e=this.obj.getType());for(var t=this.getAllDefinitionsByClass(e),o=[],r=t.length-1;r>=0;r--){for(var n=t[r],i=n.tabs?n.tabs.length-1:-1;i>=0;i--){var a=n.tabs[i];o.indexOf(a.name)>-1?this.setTabProperties(a):this.addPropertyIntoTab(a,!0)&&o.push(a.name)}for(i=n.properties?n.properties.length-1:-1;i>=0;i--){var s=n.properties[i].name||n.properties[i];-1===o.indexOf(s)&&(o.push(s),this.addPropertyIntoTab(n.properties[i]))}}for(r=this.tabs.length-1;r>=0;r--)this.movePropertiesToNextProperties(this.tabs[r].properties),this.tabs[r].visible?this.sortProperties(this.tabs[r].properties):this.tabs.splice(r,1);this.tabs.sort((function(e,t){return e.index<t.index?-1:e.index>t.index?1:0})),this.setParentTabs(),this.tabs.forEach((function(e){var t;null===(t=e.tabs)||void 0===t||t.sort((function(e,t){return e.index-t.index}))}))},e.prototype.setParentTabs=function(){for(var e=this.tabs.length-1;e>=0;e--){var t=this.tabs[e];if(t.parentName){var o=this.getTabByName(t.parentName);o&&(t.parent=o,Array.isArray(o.tabs)||(o.tabs=[]),o.tabs.push(t),this.tabs.splice(e,1))}}},e.prototype.addPropertyIntoTab=function(e,t){void 0===t&&(t=!1),t&&this.setTabProperties(e);var o="string"==typeof e,r=o?e:e.name,n=this.propertiesHash[r];if(!n||t&&!this.getPropertyAsCategory(r))return!1;if(!o&&!1===e.visible)return!1;if(!n.visible&&(o||!o&&!0!==e.visible))return!1;var i=t?e.name:a.propertyGrid.generalTabName;t||o||!e.tab||(i=e.tab);var s=new Je;return s.property=n.property,s.category=!o&&e.category?e.category:"",s.title=!o&&e.title?e.title:"",s.onSameLine=this.isPropertyOnSameLine(n.property.nextToProperty),s.createdFromTabName=t,this.getTabOrCreate(i).properties.unshift(s),!0},e.prototype.setTabProperties=function(e){var t=this.getTabOrCreate(e.name);e.index>0&&(t.index=e.index),t.parentName=e.parent,!1===e.visible&&(t.visible=!1),e.title&&(t.title=e.title)},e.prototype.movePropertiesToNextProperties=function(e){for(var t=[].concat(e),o=0;o<t.length;o++){var r=this.getNextToNameProperty(t[o].property),n=this.getTabByPropertyName(r);if(n){var i=this.getPropertyByNameInTab(n,r),a=n.properties.indexOf(i);n.properties.splice(a+1,0,t[o]),e.splice(e.indexOf(t[o]),1)}}},e.prototype.getTabByPropertyName=function(e){if(!e)return null;this.isPropertyOnSameLine(e)&&(e=e.substring(1));for(var t=0;t<this.tabs.length;t++)if(this.getPropertyByNameInTab(this.tabs[t],e))return this.tabs[t];return null},e.prototype.getNextToNameProperty=function(e){return e.nextToProperty?this.isPropertyOnSameLine(e.nextToProperty)?e.nextToProperty.substring(1):e.nextToProperty:""},e.prototype.isPropertyOnSameLine=function(e){return!!e&&"*"===e[0]},e.prototype.getPropertyByNameInTab=function(e,t){for(var o=e.properties,r=0;r<o.length;r++)if(o[r].name==t)return o[r];return null},e.prototype.getTabOrCreate=function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].name==e)return this.tabs[t];var o=new Ze;return o.name=e,e==a.propertyGrid.generalTabName&&(o.index=-1),this.tabs.unshift(o),o},e.prototype.setUsedProperties=function(e,t){for(var o=0;o<e.length;o++){var r=e[o].properties;if(Array.isArray(r))for(var n=0;n<r.length;n++){t[r[n].name?r[n].name:r[n]]=!0}}},e.prototype.getAllDefinitionsByClass=function(e){var t=[],o={};if(e.indexOf("@")>-1&&this.getClassDefintion(e)){var r=e.substring(0,e.indexOf("@")+1)+"default";return r!=e&&this.getClassDefintion(r)&&t.push(this.getClassDefintion(r)),t.push(this.getClassDefintion(e)),this.setUsedProperties(t,o),this.addNonTabProperties(t,o,!0),t}var n=!1,i=this.obj.isQuestion&&this.obj.getDynamicType?this.obj.getDynamicType():"";return i&&(n=this.getAllDefinitionsByClassCore(i,o,t,e)),this.getAllDefinitionsByClassCore(e,o,t,void 0)&&n||this.addNonTabProperties(t,o),t},e.prototype.getAllDefinitionsByClassCore=function(e,t,o,r){for(var n=!1,a=e;a&&(!r||!i.Serializer.isDescendantOf(r,a));){var s=i.Serializer.findClass(a);if(!s)break;n=this.getAllDefinitionsByClassSingleCore(s.name,t,o),a=s.parentName}return n},e.prototype.getAllDefinitionsByClassSingleCore=function(e,t,o){var r=this.getClassDefintion(e),n=!1;if(!r)return n;if(r.properties)for(var i=0;i<r.properties.length;){var s=r.properties[i],l="string"==typeof s?s:s.name,c=a.propertyGrid.generalTabName;"string"!=typeof s&&s.tab&&(c=s.tab);var p=this.propertiesHash[l]?this.propertiesHash[l].property:null,u=this.getJsonPropertyCategory(p);u&&u!==c?r.properties.splice(i,1):(t[l]=!0,i++)}if(r.tabs)for(i=0;i<r.tabs.length;i++){var d=r.tabs[i].name;n=n||"others"===d,this.getPropertyAsCategory(d)&&(t[d]=!0)}return o.unshift(r),n},e.prototype.getJsonPropertyCategory=function(e){return e&&e.category?e.category:null},e.prototype.addNonTabProperties=function(e,t,o){if(void 0===o&&(o=!1),this.propertyGridDefinition.autoGenerateProperties){for(var r={properties:[],tabs:[]},n=[],i=0;i<this.properties.length;i++){var s=this.properties[i];if(!(!this.isJSONPropertyVisible(s)||t[s.name]||o&&"form"!==s.showMode)){var l=this.getJsonPropertyCategory(s),c=l||(0==e.length||this.parentObj&&"form"===this.showMode?a.propertyGrid.generalTabName:"others");if(n.indexOf(c)<0&&c!=a.propertyGrid.generalTabName&&(n.push(c),r.tabs.push({name:c,index:"others"===c?1e3:10*n.length})),s.categoryIndex>-1&&n.indexOf(c)>-1)for(var p=0;p<r.tabs.length;p++)r.tabs[p].name==c&&(r.tabs[p].index=s.categoryIndex);r.properties.push({name:this.properties[i].name,tab:c})}}r.properties.length>0&&e.push(r)}},e.prototype.sortProperties=function(e){if(Array.isArray(e))for(var t=[].concat(e),o=0;o<t.length;o++){var r=t[o].property.visibleIndex;if(t[o].createdFromTabName&&r<0&&(r=0),!(r<0)){var n=e.indexOf(t[o]);n>-1&&e.splice(n,1),r<e.length?e.splice(r,0,t[o]):e.push(t[o])}}},e}(),Ye=function(){function e(){}return e.prototype.parse=function(t){e.boldRegEx||(e.boldRegEx=/\*{2}(.*?)\*{2}/gm,e.italicRegEx=/\_(.*?)\_/gm,e.codeRegEx=/\`(.*?)\`/gm,e.linkRegEx=/\[(.+)\]\(([^ ]+?)( "(.+)")?\)/);var o=function(e,t,o,n){if(!t)return e;var i=e.indexOf(t);if(r(e,i))return e;var a=t.substring(n.length,t.length),s="<span class='"+o+"'>"+(a=a.substring(0,a.length-n.length))+"</span>";return e.replace(t,s)},r=function(e,t){for(var o=!1,r=t-1;r>0;r--){if(" "===e[r]||"\n"===e[r])return!1;if("]"===e[r]&&o)return!0;o="("===e[r]}return!1};return t=this.replace(e.boldRegEx,t,"spg-bold","**",o),t=this.replace(e.italicRegEx,t,"spg-italic","_",o),t=this.replace(e.codeRegEx,t,"spg-code","`",o),t=this.replace(e.linkRegEx,t,"spg-link","",(function(e,t,o,r){if(!t)return e;var n=t.indexOf("](");if(n<0)return e;var i=t.substring(1,n),a="<a class='"+o+"' target='_blank' href='"+t.substring(n+2,t.length-1)+"'>"+i+"</a>";return e.replace(t,a)})),t=this.addLineBreaks(t)},e.prototype.replace=function(e,t,o,r,n){var i=t.match(e);if(!Array.isArray(i)||0==i.length)return t;for(var a=0;a<i.length;a++)t=n(t,i[a],o,r);return t},e.prototype.addLineBreaks=function(e){return e.indexOf("\n")<0?e:e.split("\n").join("<br/>")},e}();function Xe(e,t,o){void 0===t&&(t=!0),void 0===o&&(o=!0),e.showNavigationButtons="none",e.showPageTitles=!1,e.focusFirstQuestionAutomatic=!1,e.showQuestionNumbers="off",o&&(e.questionTitleLocation="left"),e.showProgressBar="off",t&&(e.textUpdateMode="onTyping"),e.requiredText=""}i.FunctionFactory.Instance.register("propertyVisibleIf",(function(e){if(!this.question)return!1;var t=this.question.obj,o=this.question.property;return!(!t||!o)&&(!!i.Serializer.hasOriginalProperty(t,o.name)&&o.isVisible("",t))})),i.FunctionFactory.Instance.register("propertyEnableIf",(function(e){var t=this.question.property,o=this.question.obj;return!!(this.question&&o&&t)&&(!this.question.obj[t.overridingProperty]&&t.isEnable(o))}));var $e=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!0),this.options=e,this.options||(this.options=new s),t&&this.setupSurvey()}return e.prototype.setupSurvey=function(){this.editSurveyValue=this.createSurvey()},Object.defineProperty(e.prototype,"editSurvey",{get:function(){return this.editSurveyValue},enumerable:!1,configurable:!0}),e.prototype.hasErrors=function(){return this.editSurvey.hasErrors(!0,!0)},e.prototype.createSurvey=function(){var e=this.getSurveyJSON();return Xe(e,!1,!1),this.options.createSurvey(e,this.getSurveyCreationReason(),this)},e.prototype.dispose=function(){this.editSurvey&&this.editSurvey.dispose()},e}(),et={editors:new Array,fitHash:{},clearHash:function(){this.fitHash={}},register:function(e){this.editors.push(e)},getEditor:function(e,t){if(!e)return null;if(t)for(var o=this.editors.length-1;o>=0;o--){var r=this.editors[o];if(r.fit(e,t))return r}var n=this.fitHash[e.id];if(n)return n;var i=this.isEditorFit(e);return i||this.isEditorFit(e,!0)},isEditorFit:function(e,t){void 0===t&&(t=!1);for(var o=this.editors.length-1;o>=0;o--){var r=this.editors[o];if(!t&&r.fit(e)||t&&r.isDefault&&r.isDefault())return this.fitHash[e.id]=r,r}return null},getJSON:function(e,t,o,r,n){var i=this.getEditor(t,r);return i?i.getJSON(e,t,o,n):null},onCreated:function(e,t,o,r,n){var i=this.getEditor(o);i&&i.onCreated&&i.onCreated(e,t,o,r,n)},onSetup:function(e,t,o,r){var n=this.getEditor(o);n&&n.onSetup&&n.onSetup(e,t,o,r)},validateValue:function(e,t,o,r){var n=this.getEditor(o);return n&&n.validateValue?n.validateValue(e,t,o,r):""},onAfterRenderQuestion:function(e,t,o){var r=this.getEditor(t);r&&r.onAfterRenderQuestion&&r.onAfterRenderQuestion(e,t,o)},onMatrixCellCreated:function(e,t,o){var r=this.getEditor(t);r&&r.onMatrixCellCreated&&r.onMatrixCellCreated(o.question.obj,o)},onMatrixCellValueChanged:function(e,t,o){var r=this.getEditor(t);r&&r.onMatrixCellValueChanged&&r.onMatrixCellValueChanged(e,o);var n=o.row;if(n){var i=n.getQuestionByName(o.columnName);i&&n.runCondition({},{question:i})}},onMatrixAllowRemoveRow:function(e,t,o){var r=this.getEditor(t);return!r||!r.onMatrixAllowRemoveRow||r.onMatrixAllowRemoveRow(e,o)},onGetMatrixRowAction:function(e,t,o,r){var n=this.getEditor(t);n&&n.onGetMatrixRowAction&&n.onGetMatrixRowAction(e,o,r)},onUpdateQuestionCssClasses:function(e,t,o){var r=this.getEditor(t);r&&r.onUpdateQuestionCssClasses&&r.onUpdateQuestionCssClasses(e,o)},onGetQuestionTitleActions:function(e,t,o,r){var n=this.getEditor(t);n&&n.onGetQuestionTitleActions&&n.onGetQuestionTitleActions(e,o,r)},onValueChanged:function(e,t,o){var r=this.getEditor(t);r&&r.onValueChanged&&r.onValueChanged(e,t,o)},onValueChanging:function(e,t,o,r){var n=this.getEditor(t);n&&n.onValueChanging&&n.onValueChanging(e,t,o,r)},onMasterValueChanged:function(e,t,o){var r=this.getEditor(t);r&&r.onMasterValueChanged&&r.onMasterValueChanged(e,t,o)}},tt=function(){function e(e,t){this.obj=e,this.options=t}return e.prototype.onGetQuestionTitleActions=function(e){var t=e.question,o=t.property,r=et.getEditor(o);if(r){var n=[],i=!t.isReadOnly;!!r.clearPropertyValue&&(!r.canClearPropertyValue||r.canClearPropertyValue(this.obj,o,t,this.options))&&n.push(this.createClearValueAction(r,o,t,i)),!1!==t.allowBatchEdit&&r.createPropertyEditorSetup&&(r.isPropertyEditorSetupEnabled&&(i=r.isPropertyEditorSetupEnabled(this.obj,o,e.question,this.options)),n.push(this.createEditorSetupAction(r,o,t,i)));var a=this.createPropertyHelpAction(t);a&&(n.unshift(a),t.getTitleToolbar().containerCss+=" spg-title-toolobar--single-help-action",a.iconSize=16),n.length>0&&(e.titleActions=n)}},e.prototype.createClearValueAction=function(e,t,o,r){var n=this;return{id:"property-grid-clear",title:z("pe.clear"),showTitle:!1,iconName:"icon-clear",innerCss:"spg-action-button--danger",enabled:r,visible:new i.ComputedUpdater((function(){var e=o.obj[t.name];return Array.isArray(e)?e.length>0:!!e})),action:function(){e.clearPropertyValue(o.obj,t,o,n.options)}}},e.prototype.showModalPropertyEditor=function(e,t,o){return e.showModalPropertyEditor(e,t,o,this.options)},e.prototype.createEditorSetupAction=function(e,t,o,r){var n=this;return{id:"property-grid-setup",iconName:t.isArray?"icon-fast-entry":"icon-wizard",enabled:r,title:z("pe.edit"),showTitle:!1,action:function(){return n.showModalPropertyEditor(e,t,o)}}},e.prototype.createPropertyHelpAction=function(e){var t=this;if(!e.description)return null;var o=new i.Action({title:"",tooltip:e.description,id:"property-grid-help",iconName:this.getHelpActionIconName(e),css:"spg-help-action",showTitle:!1,action:function(){e.descriptionLocation="hidden"!=e.descriptionLocation?"hidden":"underTitle",o.iconName=t.getHelpActionIconName(e)}});return o},e.prototype.getHelpActionIconName=function(e){return"hidden"!=e.descriptionLocation?"icon-description-hide":"icon-description"},e}(),ot=function(){function e(e,t,o,r,n){void 0===t&&(t=null),void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n=null),this.obj=e,this.options=t,this.parentObj=o,this.parentProperty=r,this.propertyGridDefinition=n}return e.isPropertyReadOnly=function(e,t,o,r,n){var i=e.readOnly;return t&&o&&(i=t.onIsPropertyReadOnlyCallback(o,e,i,r,n)),i},e.getClassNameProperty=function(e){if(e&&e.getClassNameProperty)return e.getClassNameProperty()},e.prototype.toJSON=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=void 0),this.createJSON(e,t)},e.prototype.createColumnsJSON=function(e,t){for(var o=[],r=(e?i.Serializer.createClass(e):this.obj)||this.obj,n=0;n<t.length;n++){var a=this.getColumnPropertyJSON(r,t[n]);a&&o.push(a)}return o},e.prototype.setupObjPanel=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=void 0),e.fromJSON(this.toJSON(t,o)),this.onQuestionsCreated(e)},e.prototype.onQuestionsCreated=function(e){for(var t=i.Serializer.getPropertiesByObj(this.obj),o={},r=0;r<t.length;r++)o[t[r].name]=t[r];var n=e.questions;for(r=0;r<n.length;r++){var a=n[r],s=o[a.name];a.property=s,a.obj=this.obj,a.creatorOptions=this.options;var l=this.getVisibilityOnEvent(s);if(a.readOnly=a.readOnly||this.isPropertyReadOnly(s),a.visible=a.visible&&l,s.visibleIf&&l&&(a.visibleIf="propertyVisibleIf() = true"),a.visible&&(s.overridingProperty||s.enableIf)&&(a.readOnly||(a.enableIf="propertyEnableIf() = true"),s.overridingProperty)){a.onUpdateCssClassesCallback=function(e){e.questionWrapper="spg-boolean-wrapper--overriding"};var c=this.createOverridingQuestion(e,a,s.overridingProperty);a.parent.addElement(c,a.parent.elements.indexOf(a)+1)}a.descriptionLocation="hidden";var p=G.getPropertyHelpInEditor(this.obj.getType(),s.name,s.type);p&&(a.description=p),et.onCreated(this.obj,a,s,this.options,this.propertyGridDefinition),this.options.onPropertyEditorCreatedCallback(this.obj,s,a)}},e.prototype.getVisibilityOnEvent=function(e,t){return void 0===t&&(t=""),this.options.onCanShowPropertyCallback(this.obj,e,t,this.parentObj,this.parentProperty)},e.prototype.isPropertyReadOnly=function(t){return e.isPropertyReadOnly(t,this.options,this.obj,this.parentObj,this.parentProperty)},e.prototype.createOverridingQuestion=function(e,t,o){var r=i.Serializer.createClass("linkvalue");r.name=t.name+"_overridingProperty",r.startWithNewLine=!1,r.property=t.property,r.obj=t.obj,r.visibleIf="propertyEnableIf() = false";var n=e.getQuestionByName(o);return r.linkValueText=G.getString("pe.overridingPropertyPrefix"),r.titleLocation="hidden",r.onUpdateCssClassesCallback=function(e){e.questionWrapper="spg-link-wrapper--overriding"},n&&(r.linkClickCallback=function(){n.focus(!1,!0)}),r},e.prototype.getClasPropName=function(){if(this.parentObj&&this.parentProperty)return this.parentProperty.name;var t=e.getClassNameProperty(this.obj);return t&&this.obj[t]?this.obj[t]:void 0},e.prototype.createJSON=function(e,t){void 0===t&&(t=void 0);var o=void 0,r=this.getClasPropName();r&&("itemvalue"===(o=this.obj.getType())&&(o+="[]"),o+="@"+r);for(var n=new Ke(this.obj,null,o,void 0,this.parentObj,this.parentProperty,this.propertyGridDefinition).getTabs(),i={},s=0;s<n.length;s++)!1!==n[s].visible&&(i[n[s].name]=this.createPanelProps(n[s],t));var l={elements:[]};for(var c in i)if(c==a.propertyGrid.generalTabName&&e){var p=i[c].elements;for(s=0;s<p.length;s++)l.elements.push(p[s])}else l.elements.push(i[c]);return l},e.prototype.createPanelProps=function(e,t,o){var r=this;void 0===o&&(o=!1);for(var n=this.createPanelJSON(e.name,e.title,o),i=0;i<e.properties.length;i++){var a=e.properties[i],s=this.createQuestionJSON(this.obj,a.property,a.title,!1,t);a.onSameLine&&(s.startWithNewLine=!1,this.updateQuestionJSONOnSameLine(s),n.elements.length>0&&this.updateQuestionJSONOnSameLine(n.elements[n.elements.length-1])),s&&n.elements.push(s)}return Array.isArray(e.tabs)&&e.tabs.forEach((function(e){var o=r.createPanelProps(e,t,!0);o.title===e.name&&delete o.title,o&&n.elements.push(o)})),n},e.prototype.updateQuestionJSONOnSameLine=function(e){e.titleLocation="left",e.minWidth="50px"},e.prototype.createPanelJSON=function(e,t,o){var r={type:"panel",name:e,title:this.getPanelTitle(e,t),elements:[]};return o||(r.state="collapsed"),r},e.prototype.createQuestionJSON=function(e,t,o,r,n){if(void 0===r&&(r=!1),!this.isPropertyVisible(t,r?"list":"")&&r)return null;var i=et.getJSON(e,t,this.options,n,this.propertyGridDefinition);if(!i)return null;i.name=t.name,i.title=this.getQuestionTitle(t,e.getType(),o),this.isQuestionTitleHidden(t)&&(i.titleLocation="hidden"),i.visible=t.visible,i.isReadOnly=t.readOnly,i.isRequired=t.isRequired,i.requiredErrorText=G.getString("pe.propertyIsEmpty"),["page","panelbase"].indexOf(t.className)&&"name"===i.name&&(i.isRequired=!0,i.requiredErrorText=G.getString("pe.propertyIsEmpty"));var a=G.getPropertyPlaceholder(e.getType(),t.name);return a&&(i.placeholder=a),i},e.prototype.getColumnPropertyJSON=function(e,t){if(!e)return null;var o=i.Serializer.findProperty(e.getType(),t);if(!o)return null;var r=this.createQuestionJSON(e,o,"",!0,void 0);return r?(o.isUnique&&(r.isUnique=o.isUnique),r.type&&(r.cellType=r.type,delete r.type),"buttongroup"===r.cellType&&(r.cellType="dropdown"),"fileedit"===r.cellType&&(r.cellType="text"),o.visibleIf&&(r.visibleIf="propertyVisibleIf() = true"),r.isReadOnly&&(r.readOnly=r.isReadOnly,delete r.isReadOnly),r):null},e.prototype.isPropertyVisible=function(e,t){return!!e.visible&&(!t||!e.showMode||t==e.showMode)},e.prototype.getPanelTitle=function(e,t){if(t)return t;var o=G.getString("pe.tabs."+e);if("object"==typeof o)for(var r in o)if(i.Serializer.isDescendantOf(this.obj.getType(),r))return o[r];return o},e.prototype.getQuestionTitle=function(e,t,o){if(e.displayName)return e.displayName;if(o&&o!==e.name)return o;var r=t;return this.parentProperty&&(r+="@"+this.parentProperty.name),G.getPropertyNameInEditor(r,e.name)},e.prototype.isQuestionTitleHidden=function(e){return""===e.displayName},e}(),rt=function(){function e(e,t,o){void 0===e&&(e=null),void 0===t&&(t=new s),void 0===o&&(o=null),this.isCellCreating=!1,this.options=t,this.propertyGridDefinition=o,this.options.enableLinkFileEditor&&et.register(new ct),this.obj=e}return e.prototype.refresh=function(){this.setObj(this.objValue)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},set:function(e){this.objValue!==e&&this.setObj(e)},enumerable:!1,configurable:!0}),e.prototype.selectProperty=function(e,t){if(void 0===t&&(t=!0),this.survey){var o=this.survey.getQuestionByName(e);if(o){for(var r=this.survey.getAllPanels(),n=0;n<r.length;n++){var i=r[n];i===o.parent?i.expand():i.collapse()}t&&o.focus()}}},e.prototype.setObjFromAction=function(e,t){this.changedFromActionCallback?this.changedFromActionCallback(e,t):this.setObj(e)},e.prototype.setObj=function(e){var t=this;this.objValue=e,this.classNameProperty=this.obj?ot.getClassNameProperty(this.obj):"",this.classNameValue=this.classNameProperty?this.obj[this.classNameProperty]:void 0,this.titleActionsCreator=this.obj?new tt(this.obj,this.options):void 0;var o=this.getSurveyJSON();this.options.readOnly&&(o.mode="display"),this.surveyValue&&(this.surveyValue.onValidateQuestion.clear(),this.surveyValue.onValueChanging.clear(),this.surveyValue.onValueChanged.clear(),this.surveyValue.onMatrixCellValueChanging.clear(),this.surveyValue.onMatrixCellValidate.clear(),this.surveyValue.onMatrixCellValueChanged.clear(),this.surveyValue.editingObj=void 0,this.surveyValue.data={},this.surveyValue.dispose()),this.surveyValue=this.createSurvey(o,(function(e){e.questionErrorLocation="bottom",e.getCss().list={},e.css=Ue;var o=e.createNewPage("p1");t.obj&&(new ot(t.obj,t.options,null,null,t.propertyGridDefinition).setupObjPanel(o,!1),e.enterKeyAction="loseFocus",e.addPage(o),e.getAllQuestions().forEach((function(e){et.onSetup(t.obj,e,e.property,t.options)})),e.checkErrorsMode="onValueChanging")})),this.obj&&(this.survey.onValueChanged.add((function(e,o){t.onValueChanged(o)})),this.survey.onValueChanging.add((function(e,o){t.onValueChanging(o)})),this.survey.onValidateQuestion.add((function(e,o){t.onValidateQuestion(o)})),this.survey.onGetQuestionTitleActions.add((function(e,o){t.titleActionsCreator.onGetQuestionTitleActions(o),t.onGetQuestionTitleActions(o,t.options);var r=o.question;t.options.onPropertyEditorUpdateTitleActionsCallback(t.obj,r.property,r,o.titleActions)})),this.survey.onGetPanelTitleActions.add((function(e,t){t.titleActions.splice(0,t.titleActions.length)})),this.survey.onMatrixCellCreated.add((function(e,o){t.onMatrixCellCreated(o)})),this.survey.onMatrixCellValueChanging.add((function(e,o){t.onMatrixCellValueChanging(o)})),this.survey.onMatrixCellValidate.add((function(e,o){t.onMatrixCellValidate(o)})),this.survey.onMatrixCellValueChanged.add((function(e,o){t.onMatrixCellValueChanged(o)})),this.survey.onMatrixAllowRemoveRow.add((function(e,o){o.allow=t.getMatrixAllowRemoveRow(o.question,o.row)})),this.survey.onMatrixRowRemoving.add((function(e,o){o.allow=t.getMatrixOnRowRemoving(o.question,o.row)})),this.survey.onMatrixRowAdded.add((function(e,o){t.onMatrixRowAdded(o)})),this.survey.onGetMatrixRowActions.add((function(e,o){t.onGetMatrixRowAction(o)})),this.survey.onUpdateQuestionCssClasses.add((function(e,o){t.onUpdateQuestionCssClasses(o)})),this.survey.onElementContentVisibilityChanged.add((function(e,o){if(!a.propertyGrid.allowExpandMultipleCategories){var r=o.element;r&&r.isPanel&&r.isExpanded&&t.collapseOtherPanels(r)}})),this.survey.onAfterRenderQuestion.add((function(e,o){t.onAfterRenderQuestion(o)})),this.survey.onTextMarkdown.add((function(e,t){var o;"description"===t.name&&(t.html=(o=t.text,(new Ye).parse(o)))})),this.survey.editingObj=this.obj,this.objValueChangedCallback&&this.objValueChangedCallback(),this.updateDependedPropertiesEditors(),this.survey.onFocusInPanel.add((function(e,o){if(t.currentlySelectedPanel!==o.panel){var r=o.panel.getFirstQuestionToFocus(!1,!0);t.currentlySelectedProperty=r?r.name:"",t.currentlySelectedPanel=o.panel}})),this.survey.onFocusInQuestion.add((function(e,o){t.currentlySelectedProperty=o.question.name,t.currentlySelectedPanel=o.question.parent})),this.survey.onUploadFiles.add((function(e,o){var r="survey"==o.question.obj.getType()?void 0:"imageitemvalue"==o.question.obj.getType()?o.question.obj.locOwner:o.question.obj,n="imageitemvalue"==o.question.obj.getType()?o.question.obj:void 0;t.options.uploadFiles(o.files,r,(function(e,t){return o.callback(e,[{content:t,file:o.files[0]}])}),{element:o.question.obj,item:n,elementType:o.question.obj.getType(),propertyName:o.name})})),this.survey.getAllQuestions().map((function(e){return e.allowRootStyle=!1})),this.survey.onQuestionCreated.add((function(e,t){t.question.allowRootStyle=!1})),this.options.onPropertyGridSurveyCreatedCallback(this.obj,this.survey))},Object.defineProperty(e.prototype,"options",{get:function(){return this.optionsValue},set:function(e){this.optionsValue=e||new s},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.validate=function(){if(this.survey)return!this.survey.hasErrors(!0,!0)},e.prototype.collapseCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.collapse()},e.prototype.expandCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.expand()},e.prototype.collapseAllCategories=function(){this.collapseAllCategoriesExcept(null)},e.prototype.expandAllCategories=function(){this.survey.getAllPanels().forEach((function(e){e.parent.isPanel||e.expand()}))},e.prototype.collapseOtherPanels=function(e){this.collapseAllCategoriesExcept(e)},e.prototype.collapseAllCategoriesExcept=function(e){this.survey.getAllPanels().forEach((function(t){t===e||t.parent.isPanel||t.collapse()}))},e.prototype.createSurvey=function(e,t){return this.options.createSurvey(e,"property-grid",this,t)},e.prototype.getSurveyJSON=function(){var e={};return Xe(e,!0,!1),e},e.prototype.validateQuestionValue=function(e,t,o,r){if(t.isRequired&&(i.Helpers.isValueEmpty(r)||t.valueChangingEmpty))return this.getErrorTextOnValidate(G.getString("pe.propertyIsEmpty"),o.name,e,r);if(this.isPropNameInValid(e,o,r)||t.nameHasError)return this.getErrorTextOnValidate(G.getString("pe.propertyNameIsIncorrect"),o.name,e,r);var n=et.validateValue(e,t,o,r);return this.getErrorTextOnValidate(n,o.name,e,r)},e.prototype.getErrorTextOnValidate=function(e,t,o,r){var n=this.options.onGetErrorTextOnValidationCallback(t,o,r);return n||e},e.prototype.onValidateQuestion=function(e){var t=e.question;t&&t.property&&(e.error=this.validateQuestionValue(this.obj,t,t.property,e.value))},e.prototype.onValueChanging=function(e){var t=e.question;if(t&&t.property&&!i.Helpers.isTwoValueEquals(e.value,e.oldValue,!1,!1,!1)){et.onValueChanging(this.obj,t.property,t,e);var o={obj:this.obj,propertyName:t.property.name,value:e.oldValue,newValue:e.value,doValidation:!1};if(this.options.onValueChangingCallback(o),e.value=o.newValue,t.property.isRequired){var r=i.Helpers.isValueEmpty(e.value);t.valueChangingEmpty=r}var n=this.isPropNameInValid(this.obj,t.property,e.value);t.nameHasError=n}},e.prototype.isPropNameInValid=function(e,t,o){return!(!e.isQuestion||"name"!==t.name||!o)&&(o=o.toLowerCase(),["item","choice","row","panel"].indexOf(o)>-1)},e.prototype.onValueChanged=function(e){var t=this,o=e.question;if(o&&o.property&&(o.valueChangingEmpty=!1,o.nameHasError=!1,this.changeDependedProperties(o,(function(e){return t.survey.getQuestionByName(e)}),(function(e){return t.survey.getValue(e)})),et.onValueChanged(this.obj,o.property,o),this.classNameProperty&&e.name===this.classNameProperty&&this.classNameValue!==e.value&&(this.setObj(this.obj),this.survey))){var r=this.survey.getQuestionByName(e.name);r&&r.focus()}},e.prototype.changeDependedProperties=function(e,t,o){var r=e.property;if(r){var n=r.getDependedProperties();if(n)for(var a=0;a<n.length;a++){var s=n[a],l=t(s);if(l){this.updateDependedPropertiesEditor(l);var c=o(s);i.Helpers.isTwoValueEquals(l.value,c,!1,!1,!1)||(l.value=c),et.onMasterValueChanged(e.obj,l.property,l)}}}},e.prototype.updateDependedPropertiesEditor=function(e){var t=e.obj;if(t){var o=e.property;o&&o.onPropertyEditorUpdate&&o.onPropertyEditorUpdate(t,e)}},e.prototype.updateDependedPropertiesEditors=function(){for(var e=this.survey.getAllQuestions(),t=0;t<e.length;t++)this.updateDependedPropertiesEditor(e[t])},e.prototype.onAfterRenderQuestion=function(e){et.onAfterRenderQuestion(this.obj,e.question.property,e)},e.prototype.onMatrixCellCreated=function(e){this.isCellCreating=!0,et.onMatrixCellCreated(this.obj,e.question.property,e),this.isCellCreating=!1;var t=e.row.editingObj;if(t){var o=i.Serializer.findProperty(t.getType(),e.columnName);if(o){var r=this.getMatrixAllowEditRow(e.question,e.row);e.cellQuestion.readOnly=!r||ot.isPropertyReadOnly(o,this.options,t,this.obj,e.question.property)}}},e.prototype.onMatrixCellValueChanging=function(e){if(!this.isCellCreating){var t={obj:e.row.editingObj,propertyName:e.columnName,value:e.oldValue,newValue:e.value,doValidation:!1};this.options.onValueChangingCallback(t),e.value=t.newValue}},e.prototype.onMatrixCellValidate=function(e){if(!this.isCellCreating){var t=e.row.getQuestionByColumnName(e.columnName);t&&t.property&&(e.error=this.validateQuestionValue(e.row.editingObj,t,t.property,e.value))}},e.prototype.onGetMatrixRowAction=function(e){var t=this;et.onGetMatrixRowAction(this.obj,e.question.property,e,(function(o){t.setObjFromAction(o,e.question.name)}))},e.prototype.onUpdateQuestionCssClasses=function(e){et.onUpdateQuestionCssClasses(this.obj,e.question.property,e)},e.prototype.onGetQuestionTitleActions=function(e,t){et.onGetQuestionTitleActions(this.obj,e.question.property,e,t)},e.prototype.onMatrixCellValueChanged=function(e){if(!this.isCellCreating){var t=e.row.getQuestionByName(e.columnName);t&&this.changeDependedProperties(t,(function(t){return e.row.getQuestionByName(t)}),(function(t){return e.row.getValue(t)})),et.onMatrixCellValueChanged(this.obj,e.question.property,e)}},e.prototype.getMatrixAllowRemoveRow=function(e,t){return void 0===t.allowDeleteRow&&this.calculateMatrixAllowOperations(e,t),t.allowDeleteRow},e.prototype.getMatrixOnRowRemoving=function(e,t){return this.options.onCollectionItemDeletingCallback(this.obj,e.property,e.value,t.editingObj)},e.prototype.getMatrixAllowEditRow=function(e,t){return!e.readOnly&&(void 0===t.allowEditRow&&this.calculateMatrixAllowOperations(e,t),t.allowEditRow)},e.prototype.calculateMatrixAllowOperations=function(e,t){var o={allowDelete:this.onMatrixAllowRemoveRow(e,t),allowEdit:!0,allowAdd:void 0};this.options.onCollectionItemAllowingCallback(this.obj,e.property,e.value,t.editingObj,o),t.allowDeleteRow=o.allowDelete,t.allowEditRow=o.allowEdit},e.prototype.onMatrixAllowRemoveRow=function(e,t){var o=et.onMatrixAllowRemoveRow(this.obj,e.property,t);return this.options.onCanDeleteItemCallback(this.obj,t.editingObj,o)},e.prototype.onMatrixRowAdded=function(e){var t=e.row.editingObj;i.Serializer.isDescendantOf(t.getType(),"itemvalue")&&this.options.onItemValueAddedCallback(this.obj,e.question.property.name,e.row.editingObj,e.question.value),i.Serializer.isDescendantOf(t.getType(),"matrixdropdowncolumn")&&this.options.onMatrixDropdownColumnAddedCallback(this.obj,e.row.editingObj,e.question.value)},e}(),nt=function(){function e(){}return e.prototype.showModalPropertyEditor=function(e,t,o,r,n){var a=this,s=o.obj,l=e.createPropertyEditorSetup(s,t,o,r);if(!l)return null;if("condition"!==t.type&&(l.editSurvey.css=i.defaultV2Css),o.isReadOnly&&(l.editSurvey.mode="display"),!i.settings.showDialog)return l;var c=i.surveyLocalization.currentLocale,p=G.currentLocale;i.surveyLocalization.currentLocale=p;var u=i.settings.showDialog({componentName:"survey",data:{survey:l.editSurvey,model:l.editSurvey},onApply:function(){return a.onModalPropertyEditorClosed(e,t,o,r,"apply"),n&&n("apply"),l.apply()},onCancel:function(){a.onModalPropertyEditorClosed(e,t,o,r,"cancel"),n&&n("cancel")},cssClass:"sv-property-editor",title:o.title,displayMode:r.isMobileView?"overlay":"popup"},r.rootElement);if(o.isReadOnly){var d=u.footerToolbar.getActionById("apply");d&&(d.visible=!1)}return u.locale=p,i.surveyLocalization.currentLocale=c,this.onModalPropertyEditorShown(e,t,o,r),r.onPropertyGridShowModalCallback(s,t,o,l,u),l},e.prototype.onModalPropertyEditorShown=function(e,t,o,r){},e.prototype.onModalPropertyEditorClosed=function(e,t,o,r,n){},e.prototype.isSupportGrouping=function(){return!1},e.prototype.hasPreviousElementForGrouping=function(e){if(!e||!e.parent)return!1;var t=e.parent.elements.indexOf(e);if(!(t<1)){var o=e.parent.elements[t-1],r=e.parent.elements[t-2];return o.getType()===e.getType()||t>1&&!o.startWithNewLine&&r.property===o.property&&r.getType()===e.getType()}},e.prototype.onUpdateQuestionCssClasses=function(e,t){this.isSupportGrouping()&&this.hasPreviousElementForGrouping(t.question)&&(t.cssClasses.mainRoot+=" spg-row-narrow__question")},e}(),it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e,t){return"boolean"==e.type||"switch"==e.type},t.prototype.getJSON=function(e,t,o){var r={type:"boolean",default:!1,renderAs:"checkbox",titleLocation:"hidden"},n=t.getChoices(e,(function(e){}));if(Array.isArray(n)&&n.length>=2){for(var i=[],a=0;a<2;a++){var s=n[a].value||n[a];i.push({value:s,text:G.getPropertyValueInEditor(t.name,s)})}var l=(t.getDefaultValue(e)||i[0].value)===n[1].value?1:0,c=0===l?1:0;r.valueTrue=i[l].value,r.valueFalse=i[c].value,r.labelTrue=i[l].text,r.labelFalse=i[c].text}return r},t.prototype.isSupportGrouping=function(){return!0},t}(nt),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.updateMaxLength=function(e,t){return e.maxLength>0&&(t.maxLength=e.maxLength),t},t.prototype.updateType=function(e,t,o){return!o.maxLength&&t.hasDefaultPropertyValue(e.name)&&(o.type=o.type+"withreset",o.renderAs=o.type),o},t.prototype.onCreated=function(e,t,o,r){if(t instanceof i.QuestionTextBase&&(t.onKeyDownPreprocess=function(e){(e.ctrlKey||e.metaKey)&&-1!==[89,90].indexOf(e.keyCode)&&(t.isInputTextUpdate?(r.findSuitableShortcuts(e).forEach((function(e){e.execute(r.selectedElement)})),e.preventDefault()):e.target.value==t.value&&r.findSuitableShortcuts(e).forEach((function(e){e.execute(r.selectedElement)})))}),"title"===o.name&&(t.allowSpaceAsAnswer=!0),"textwithreset"==t.getType()||"commentwithreset"==t.getType()){t.resetValueAdorner.resetValueCallback=function(){e.resetPropertyValue(o.name)},t.resetValueAdorner.caption=G.getString("pe.resetToDefaultCaption");var n=function(){return!o.isDefaultValue(o.getValue(e))};t.resetValueAdorner.allowResetValue=n(),e.registerFunctionOnPropertyValueChanged(o.name,(function(){t.resetValueAdorner.allowResetValue=n()}))}},t}(nt),st=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"string"==e.type},t.prototype.isDefault=function(){return!0},t.prototype.getJSON=function(e,t,o){var r=this.updateType(t,e,this.updateMaxLength(t,{type:"text"}));return t.isRequired&&(r.textUpdateMode="onBlur"),t.dataList&&(r.dataList=t.dataList),r},t}(at),lt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"datetime"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"text",inputType:"date"}},t}(nt),ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"url"===e.type||"file"===e.type},t.prototype.getJSON=function(e,t,o){return{type:"fileedit",storeDataAsText:!1}},t.prototype.onCreated=function(e,t,o,r){if(["image","imageitemvalue"].indexOf(e.getType())>-1){var n="imageitemvalue"==e.getType()?e.locOwner:e;n&&(n.registerFunctionOnPropertyValueChanged("contentMode",(function(e){t.acceptedTypes=N(e)})),t.acceptedTypes=N(n.contentMode))}else t.acceptedTypes=N("image");t.onChooseFilesCallback=function(o,n){r.chooseFiles(o,n,{element:e,elementType:e.getType(),propertyName:t.name})}},t}(nt),pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"color"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"color",allowEmptyValue:!0}},t}(nt),ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"coloralpha"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"coloralpha",descriptionLocation:"hidden"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return e},t.valueToDataCallback=function(e){return e}},t}(nt),dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"number"==e.type||"responsiveImageSize"==e.type},t.prototype.getJSON=function(e,t,o){var r={type:"text",inputType:"number",textUpdateMode:"onBlur"};return void 0!==t.minValue&&(r.min=t.minValue),void 0!==t.maxValue&&(r.max=t.maxValue),r},t.prototype.onValueChanging=function(e,t,o,r){r.value||0===r.value||(void 0!==t.defaultValue?r.value=t.defaultValue:t.isRequired||""!==r.value?r.value=void 0!==t.minValue&&t.minValue>0?t.minValue:0:r.value=void 0)},t}(nt),ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"spinedit"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"spinedit",descriptionLocation:"hidden"}},t}(nt),gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"string"==e.type&&("imageHeight"==e.name||"imageWidth"==e.name)},t.prototype.isDefault=function(){return!1},t.prototype.onCreated=function(t,o,r,n){e.prototype.onCreated.call(this,t,o,r,n);o.valueFromDataCallback=function(e){var o,r,n,a;return(o=t.imageHeight,r=t.imageWidth,n=i.Serializer.findProperty(t.getType(),"imageHeight"),a=i.Serializer.findProperty(t.getType(),"imageWidth"),!(!n&&!a)&&n.isDefaultValue(o)&&a.isDefaultValue(r))?void 0:e}},t}(st),ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"text"===e.type},t.prototype.getJSON=function(e,t,o){return this.updateType(t,e,this.updateMaxLength(t,{type:"comment"}))},t}(at),mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"html"===e.type},t.prototype.getJSON=function(e,t,o){return this.updateMaxLength(t,{type:"comment"})},t}(at),yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"string[]"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return Array.isArray(e)?e.join("\n"):""},t.valueToDataCallback=function(e){return e?Array.isArray(e)&&!e.split?e:e.split("\n"):[]}},t}(nt),bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"boolean"!==e.type&&(this.isLocaleProp(e)||e.hasChoices)},t.prototype.getJSON=function(e,t,o){var r=this.getChoices(e,t),n={type:this.renderAsButtonGroup(t,r)?"buttongroup":"dropdown",choices:r,showOptionsCaption:!1};return this.updateObjBasedOnEmptyValueItem(t,r,n),n},t.prototype.getChoices=function(e,t){return t.getChoices(e,(function(e){}))},t.prototype.updateObjBasedOnEmptyValueItem=function(e,t,o){var r=this.getEmptyJsonItemValue(e,t);r&&(o.showOptionsCaption=!0,o.allowClear=!0,r.text&&(o.optionsCaption=r.text))},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return a.propertyGrid.useButtonGroup},enumerable:!1,configurable:!0}),t.prototype.renderAsButtonGroup=function(e,t){if("dropdown"===e.type)return!1;if("buttongroup"===e.type)return!0;if(this.isLocaleProp(e))return!1;if(!this.canRenderAsButtonGroup||!t||0==t.length||t.length>4)return!1;for(var o=0,r=0;r<t.length;r++){var n=this.getLocalizedText(e,t[r].value?t[r].value:t[r]);o+=n?n.length:0}return o<a.propertyGrid.maxCharsInButtonGroup},t.prototype.onCreated=function(e,t,o){this.setChoices(e,t,o),t.displayValueCallback=function(e){return e||t.optionsCaption}},t.prototype.onMasterValueChanged=function(e,t,o){this.setChoices(e,o,t),o.isEmpty()||i.ItemValue.getItemByValue(o.choices,o.value)||o.clearValue()},t.prototype.setChoicesCore=function(e,t,o){o&&Array.isArray(o)&&0!=o.length&&(this.updateObjBasedOnEmptyValueItem(t,o,e),e.choices=this.choicesFromPropChoices(t,o))},t.prototype.isLocaleProp=function(e){return"locale"===e.name},t.prototype.getLocalizedText=function(e,t){var o;if(this.isLocaleProp(e)&&(o=G.getLocaleName(t)))return o;if("cellType"===e.name&&(o=G.getString("qt."+t)))return o;return null===t?null:G.getPropertyValueInEditor(e.name,t)},t.prototype.choicesFromPropChoices=function(e,t){for(var o=[],r=0;r<t.length;r++){var n=this.getJsonItem(e,t[r]);i.Helpers.isValueEmpty(n.value)||o.push(n)}return o},t.prototype.getJsonItem=function(e,t){var o={value:void 0!==t.value?t.value:t},r=t.text?t.text:"";return r||(r=this.getLocalizedText(e,o.value)),r&&r!=o.value&&(o.text=r),o},t.prototype.setChoices=function(e,t,o){var r=this,n=o.getChoices(e,(function(e){r.setChoicesCore(t,o,e)}));this.setChoicesCore(t,o,n)},t.prototype.getEmptyJsonItemValue=function(e,t){if(!t)return null;for(var o=0;o<t.length;o++){var r=t[o],n=void 0!==r.value?r.value:r;if(i.Helpers.isValueEmpty(n))return this.getJsonItem(e,r)}return null},t}(nt),vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"set"==e.type||"multiplevalues"==e.type},t.prototype.getJSON=function(t,o,r){var n=e.prototype.getJSON.call(this,t,o,r),a=!!i.Serializer.findClass("tagbox");return n.type=a?"tagbox":"checkbox",n.hasSelectAll=!a,n},t}(bt),xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return e.hasChoices&&"page"==e.name},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onCreated=function(t,o,r){e.prototype.onCreated.call(this,t,o,r),o.valueFromDataCallback=function(e){return e?e.name:""},o.valueToDataCallback=function(e){if(e&&t&&t.getSurvey())return t.getSurvey().getPageByName(e)}},t}(bt),wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"question"==e.type},t.prototype.getJSON=function(e,t,o){var r={type:"dropdown",optionsCaption:G.getString("pe.conditionSelectQuestion"),choices:this.getChoices(e,t,o)};return"question"==t.type&&(r.allowClear=!1),r},t.prototype.getChoices=function(e,t,o){var r=this,n=Fe.getSurvey(e);if(!n)return[];var i=this.getQuestions(n,e);i||(i=[]);var s=!!o&&o.showTitlesInExpressions,l=i.map((function(e){var t=s?e.locTitle.renderedHtml:e.name;return o&&(t=o.getObjectDisplayName(e,"property-grid:property-editor","property-editor",t)),{value:r.getItemValue(e),text:t}}));return"asc"===a.logic.questionSortOrder&&te.sortItems(l),l},t.prototype.getQuestions=function(e,t){return e.getAllQuestions()},t.prototype.getItemValue=function(e){return e.name},t}(nt),jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"question_selectbase"==e.type},t.prototype.isQuestionFit=function(e){return i.Serializer.isDescendantOf(e.getType(),"selectbase")},t.prototype.getQuestions=function(t,o){for(var r=e.prototype.getQuestions.call(this,t,o),n=[],i=0;i<r.length;i++){var a=r[i];a!==o&&this.isQuestionFit(a)&&n.push(a)}return n},t}(wt),Ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"question_carryforward"==e.type},t.prototype.isQuestionFit=function(t){return t.isValueArray||e.prototype.isQuestionFit.call(this,t)},t}(jt),St=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"questionvalue"==e.type},t.prototype.getItemValue=function(e){return e.getValueName()},t.prototype.getQuestions=function(t,o){return e.prototype.getQuestions.call(this,t,o).filter((function(e){return!i.Serializer.isDescendantOf(e.getType(),"nonvalue")}))},t}(wt);et.register(new it),et.register(new st),et.register(new dt),et.register(new ht),et.register(new ft),et.register(new mt),et.register(new bt),et.register(new vt),et.register(new xt),et.register(new yt),et.register(new wt),et.register(new St),et.register(new jt),et.register(new Ct),et.register(new gt),et.register(new pt),et.register(new ut),et.register(new lt),i.QuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return new i.QuestionButtonGroupModel(e)}));var Tt,Pt={root:"st-root-modern",container:"st-container-modern",header:"st-title st-container-modern__title",body:"st-body",bodyEmpty:"st-body st-body--empty",footer:"st-footer st-body__footer st-clearfix",title:"",description:"",logo:"st-logo",logoImage:"st-logo__image",headerText:"st-header__text",navigationButton:"",bodyNavigationButton:"st-navigation-btn",completedPage:"st-completedpage",navigation:{complete:"st-btn st-footer__complete-btn",prev:"st-btn st-footer__prev-btn",next:"st-btn st-footer__next-btn",start:"st-btn st-footer__start-btn",preview:"st-btn st-footer__preview-btn",edit:"st-btn st-footer__edit-btn"},panel:{title:"st-title st-panel__title",titleExpandable:"st-panel__title--expandable",titleOnExpand:"st-panel__title--expanded",titleOnError:"st-panel__title--error",description:"st-description st-panel__description",container:"st-element st-panel st-row__panel",content:"st-panel__content",icon:"st-panel__icon",iconExpanded:"st-panel__icon--expanded",footer:"st-panel__footer",requiredText:"st-panel__required-text"},paneldynamic:{root:"st-paneldynamic",navigation:"st-paneldynamic__navigation",title:"st-title st-question__title",button:"st-btn",buttonRemove:"st-paneldynamic__remove-btn",buttonAdd:"st-paneldynamic__add-btn",progressTop:"st-paneldynamic__progress st-paneldynamic__progress--top",progressBottom:"st-paneldynamic__progress st-paneldynamic__progress--bottom",buttonPrev:"st-paneldynamic__prev-btn",buttonNext:"st-paneldynamic__next-btn",progressContainer:"st-paneldynamic__progress-container",progress:"st-progress",progressBar:"st-progress__bar",progressText:"st-paneldynamic__progress-text",separator:"st-paneldynamic__separator",panelWrapper:"st-paneldynamic__panel-wrapper",panelWrapperInRow:"st-paneldynamic__panel-wrapper--in-row"},progress:"st-progress st-body__progress",progressBar:"st-progress__bar",progressText:"st-progress__text",progressTextInBar:"st-hidden",page:{root:"st-page st-body__page",title:"st-title st-page__title",description:"st-description st-page__description"},pageTitle:"st-title st-page__title",pageDescription:"st-description st-page__description",row:"st-row st-clearfix",question:{mainRoot:"st-element st-question st-row__question",flowRoot:"st-element st-question st-row__question st-row__question--flow",asCell:"st-table__cell",header:"st-question__header",headerLeft:"st-question__header--location--left",headerTop:"st-question__header--location--top",headerBottom:"st-question__header--location--bottom",content:"st-question__content",contentLeft:"st-question__content--left",titleLeftRoot:"",titleOnAnswer:"st-question__title--answer",titleOnError:"st-question__title--error",title:"st-title st-question__title",requiredText:"st-question__required-text",number:"st-question__num",description:"st-description st-question__description",descriptionUnderInput:"st-description st-question__description",comment:"st-comment",required:"st-question--required",titleRequired:"st-question__title--required",indent:20,footer:"st-question__footer",formGroup:"st-question__form-group",hasError:"",disabled:"st-question--disabled"},image:{root:"st-image",image:"sv_image_image"},error:{root:"st-question__erbox",icon:"",item:"",locationTop:"st-question__erbox--location--top",locationBottom:"st-question__erbox--location--bottom"},checkbox:{root:"st-selectbase",item:"st-item st-checkbox st-selectbase__item",itemSelectAll:"st-checkbox--selectall",itemNone:"st-checkbox--none",itemDisabled:"st-item--disabled st-checkbox--disabled",itemChecked:"st-item--checked st-checkbox--checked",itemHover:"st-item--allowhover st-checkbox--allowhover",itemInline:"st-selectbase__item--inline",label:"st-selectbase__label",labelChecked:"",itemControl:"st-visuallyhidden st-item__control st-checkbox__control",itemDecorator:"st-item__svg st-checkbox__svg",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-checkbox__decorator",other:"st-comment st-question__other",column:"st-selectbase__column"},radiogroup:{root:"st-selectbase",item:"st-item st-radio st-selectbase__item",itemInline:"st-selectbase__item--inline",label:"st-selectbase__label",labelChecked:"",itemDisabled:"st-item--disabled st-radio--disabled",itemChecked:"st-item--checked st-radio--checked",itemHover:"st-item--allowhover st-radio--allowhover",itemControl:"st-visuallyhidden st-item__control st-radio__control",itemDecorator:"st-item__svg st-radio__svg",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-radio__decorator",other:"st-comment st-question__other",clearButton:"st-btn st-selectbase__clear-btn",column:"st-selectbase__column"},boolean:{mainRoot:"st-question st-row__question st-question--boolean",root:"",item:"st-boolean",control:"st-boolean__control st-visuallyhidden",itemChecked:"st-boolean--checked",itemIndeterminate:"st-boolean--indeterminate",itemDisabled:"st-boolean--disabled",label:"st-boolean__label",switch:"st-boolean__switch",disabledLabel:"st-checkbox__label--disabled",itemDecorator:"st-checkbox__hidden",materialDecorator:"st-checkbox__rectangle",sliderText:"",slider:"st-boolean__thumb"},text:{root:"st-input st-text",small:"st-row__question--small",controlDisabled:"st-input--disabled",onError:"st-input--error"},multipletext:{root:"st-multipletext",item:"st-multipletext__item",itemTitle:"st-multipletext__item-title",row:"st-multipletext__row",cell:"st-multipletext__cell"},dropdown:{root:"st-selectbase",small:"st-row__question--small",control:"st-input st-dropdown",other:"st-comment st-question__other",onError:"st-input--error",label:"st-selectbase__label",item:"st-item st-radio st-selectbase__item",itemDisabled:"st-item--disabled st-radio--disabled",itemChecked:"st-item--checked st-radio--checked",itemHover:"st-item--allowhover st-radio--allowhover",itemControl:"st-visuallyhidden st-item__control st-radio__control",itemDecorator:"st-item__svg st-radio__svg",controlDisabled:"st-input--disabled",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-radio__decorator"},imagepicker:{root:"st-imagepicker",item:"st-imagepicker__item",itemInline:"st-imagepicker__item--inline",itemChecked:"st-imagepicker__item--checked",itemDisabled:"st-imagepicker__item--disabled",itemHover:"st-imagepicker__item--allowhover",label:"st-imagepicker__label",itemControl:"st-imagepicker__control",image:"st-imagepicker__image",itemText:"st-imagepicker__text",clearButton:"st-btn",other:"st-comment st-question__other"},matrix:{mainRoot:"st-question st-row__question st-scrollable",tableWrapper:"st-matrix",root:"st-table",noHeader:"st-table--no-header",rowError:"st-matrix__row--error",cell:"st-table__cell st-matrix__cell",headerCell:"st-table__cell st-table__cell--header",rowTextCell:"st-table__cell st-table__cell--row-text",label:"st-item st-radio st-matrix__label",itemValue:"st-visuallyhidden st-item__control st-radio__control",itemChecked:"st-radio--checked",itemDisabled:"st-item--disabled st-radio--disabled",itemHover:"st-radio--allowhover",materialDecorator:"st-item__decorator st-radio__decorator",itemDecorator:"st-item__svg st-radio__svg",cellText:"st-matrix__text",cellTextSelected:"st-matrix__text--checked",cellTextDisabled:"st-matrix__text--disabled"},matrixdropdown:{mainRoot:"st-question st-row__question st-scrollable",root:"st-table",noHeader:"st-table--no-header",cell:"st-table__cell",headerCell:"st-table__cell st-table__cell--header",rowTextCell:"st-table__cell st-table__cell--row-text"},matrixdynamic:{mainRoot:"st-question st-row__question st-scrollable",root:"st-table st-matrixdynamic",noHeader:"st-table--no-header",cell:"st-table__cell",headerCell:"st-table__cell st-table__cell--header",rowTextCell:"st-table__cell st-table__cell--row-text",button:"st-btn",detailRow:"st-table__row st-table__row--detail",detailButton:"st-table__cell--detail-button",detailButtonExpanded:"st-table__cell--detail-button--expanded",detailIcon:"st-detail-panel__icon",detailIconExpanded:"st-detail-panel__icon--expanded",detailPanelCell:"st-table__cell--detail-panel",actionsCell:"st-table__cell st-table__cell--actions",buttonAdd:"st-matrixdynamic__add-btn",buttonRemove:"st-matrixdynamic__remove-btn",iconAdd:"",iconRemove:""},rating:{root:"st-rating",item:"st-rating__item",itemHover:"st-rating__item--allowhover",selected:"st-rating__item--selected",minText:"st-rating__item-text st-rating__min-text",itemText:"st-rating__item-text",maxText:"st-rating__item-text st-rating__max-text",itemDisabled:"st-rating__item--disabled"},comment:{root:"st-comment",small:"st-row__question--small"},expression:"",file:{root:"st-file",other:"st-comment st-question__other",placeholderInput:"st-visuallyhidden",preview:"st-file__preview",fileSign:"st-hidden",fileSignBottom:"st-file__sign",fileDecorator:"st-file__decorator",fileInput:"st-visuallyhidden",noFileChosen:"st-description st-file__no-file-chosen",chooseFile:"st-btn st-file__choose-btn",disabled:"st-file__choose-btn--disabled",removeButton:"st-hidden",removeButtonBottom:"st-btn st-file__clean-btn",removeFile:"st-hidden",removeFileSvg:"st-file__remove-svg",wrapper:"st-file__wrapper"},signaturepad:{root:"st-signaturepad sjs_sp_container",small:"st-row__question--small",controls:"sjs_sp_controls",placeholder:"sjs_sp_placeholder",clearButton:"sjs_sp_clear"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}}};function Et(e,t){if(!Array.isArray(e))return null;for(var o=0;o<e.length;o++)if(e[o].id===t)return e[o];return null}function It(e,t,o){var r=Et(t,"remove-row");r&&(r.component="sv-action-bar-item",r.iconName="icon-delete",r.innerCss="spg-action-button spg-action-button--danger",r.title=e.removeRowText,r.showTitle=!1,r.visibleIndex=10,r.action=function(){e.removeRowUI(o)})}function Ot(e){e.forEach((function(e){e.innerCss=(e.innerCss||"")+" spg-action-button--muted"}))}o(10),i.FunctionFactory.Instance.register("localeEnableIf",(function(e){if(Tt||!this.question||!this.row)return!1;var t=this.question.parentQuestion;if(!t)return!1;Tt=!0;var o=t.visibleRows.indexOf(this.row);if(Tt=!1,o<=0)return!1;var r=t.value;if(!Array.isArray(r))return!0;var n=r[o];if(!n||n.isSelected)return!0;for(var i=0,s=1;s<r.length;s++)r[s].isSelected&&i++;return i<a.translation.maximumSelectedLocales}));var Vt=function(e){function t(t,o){var r=e.call(this)||this;return r.name=t,r.translation=o,r}return Y(t,e),Object.defineProperty(t.prototype,"isGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.fillLocales=function(e){},t.prototype.mergeLocaleWithDefault=function(e){},t.prototype.makeObservable=function(){this.fireOnObjCreating()},t.prototype.deleteLocaleStrings=function(e){},t.prototype.applyEditLocale=function(e){},t.prototype.fireOnObjCreating=function(e){void 0===e&&(e=null),this.translation&&(e||(e=this),this.translation.fireOnObjCreating(e))},t}(i.Base),Nt=function(e){function t(t,o){var r=e.call(this)||this;return r.locString=t,r.locale=o,r.text=r.locString.getLocaleText(r.locale),r}return Y(t,e),t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),this.isReadOnly||"text"!==t||this.locString.setLocaleText(this.locale,r)},t.prototype.getType=function(){return"translationitemstring"},Z([Object(i.property)()],t.prototype,"text",void 0),Z([Object(i.property)()],t.prototype,"placeholder",void 0),t}(i.Base),kt=function(e){function t(t,o,r,n,i,a){void 0===r&&(r=""),void 0===a&&(a=null);var s=e.call(this,t,n)||this;s.name=t,s.locString=o,s.defaultValue=r,s.context=i,s.property=a,s.translation&&(s.readOnly=s.translation.readOnly),s.hashValues={};var l=s;return s.afterRender=function(e,t){l.translation&&l.translation.translateItemAfterRender(l,e,t.locale)},s.fireOnObjCreating(),s}return Y(t,e),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.property?this.property.maxLength:-1},enumerable:!1,configurable:!0}),t.prototype.makeObservable=function(){for(var t in e.prototype.makeObservable.call(this),this.hashValues)this.fireOnObjCreating(this.hashValues[t])},t.prototype.getType=function(){return"translationitem"},Object.defineProperty(t.prototype,"text",{get:function(){return this.customText?this.customText:this.localizableName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localizableName",{get:function(){var e=this.context&&this.context.getType&&this.context.getType();return G.getPropertyNameInEditor(e,this.name)},enumerable:!1,configurable:!0}),t.prototype.getLocText=function(e){return this.locString.getLocaleText(e)},t.prototype.setLocText=function(e,t){this.locString.setLocaleText(e,t),this.translation.tranlationChangedCallback&&this.translation.tranlationChangedCallback(e,this.name,t,this.context)},t.prototype.applyEditLocale=function(e){var t=this.values(e);t&&t.text&&this.setLocText(e,t.text)},t.prototype.values=function(e){var t;if(!this.hashValues[e]){var o=new Nt(this.locString,e);o.isReadOnly=!!(null===(t=this.translation)||void 0===t?void 0:t.getEditLocale()),e||(o.placeholder=this.defaultValue),this.hashValues[e]=o,this.fireOnObjCreating(o)}return this.hashValues[e]},t.prototype.fillLocales=function(e){for(var t=this.getKeys(),o=0;o<t.length;o++){var r=t[o];r&&e.indexOf(r)<0&&r!==i.LocalizableString.defaultLocale&&e.push(r)}},t.prototype.toJSON=function(){var e=this,t=this.locString.getJson(),o=Object.keys(this.hashValues);return o.length>0&&o.forEach((function(o){var r=e.hashValues[o].text;r&&(t||(t={}),"string"==typeof t&&(t={default:t}),t[o]=r)})),(t=this.correctJSON(t))&&"string"!=typeof t?t:{default:t}},t.prototype.correctJSON=function(e){if(!e||"string"==typeof e)return e;if(Array.isArray(e))return e.join("\n");for(var t in e)Array.isArray(e[t])&&(e[t]=e[t].join("\n"));return e},t.prototype.getKeys=function(){return this.locString.getLocales()},t.prototype.mergeLocaleWithDefault=function(e){var t=this.locString.getLocaleText(e);t&&(this.locString.setLocaleText("",t),this.locString.setLocaleText(e,null))},t.prototype.deleteLocaleStrings=function(e){this.setLocText(e,void 0)},t.prototype.getDefaultLocaleText=function(e){void 0===e&&(e=!1);var t=this.locString.getLocaleText("");return t||(t=this.getPlaceholder("",e)),t},t.prototype.getPlaceholder=function(e,t){void 0===t&&(t=!1);var o=e&&"default"!==e?e:i.surveyLocalization.defaultLocale,r=t?"":G.getString("ed.translationPlaceHolder",o);return this.context instanceof i.SurveyModel?i.surveyLocalization.getString(this.name,e)||r:this.context instanceof i.PageModel||"title"!==this.name?"choices"===this.context.ownerPropertyName&&"itemvalue"===this.context.getType()&&(this.getPlaceholderText(e)||this.getItemValuePlaceholderText())||r:this.getPlaceholderText(e)||this.context.name},t.prototype.getTextForExport=function(e){var t=this.locString.getLocaleText(e);return t||(e.indexOf("-")<0?"":this.getPlaceholderText(e))},t.prototype.getPlaceholderText=function(e){if(!e||"default"===e)return"";var t=this.getRootDialect(e);return this.locString.getLocaleText(t)},t.prototype.getRootDialect=function(e){var t=e.indexOf("-");return t<0||(e=e.substring(0,t))===i.surveyLocalization.defaultLocale?"":e},t.prototype.getItemValuePlaceholderText=function(){var e=this.context.value;return i.Helpers.isValueEmpty(e)?"":e.toString()},Z([Object(i.property)({defaultValue:!1})],t.prototype,"readOnly",void 0),t}(Vt),At=function(e){function t(t,o,r,n,i){void 0===r&&(r=null),void 0===n&&(n=""),void 0===i&&(i=!1);var a=e.call(this,t,r)||this;return a.name=t,a.obj=o,a.text=n,a.hasIndent=i,a.isRootValue=!1,a.removeLocale=function(e){a.translation&&a.translation.removeLocale(e)},a.text||(a.text=t),a.reset(),a.fireOnObjCreating(),a}return Y(t,e),t.prototype.getType=function(){return"translationgroup"},Object.defineProperty(t.prototype,"items",{get:function(){return this.itemValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locItems",{get:function(){return this.itemValues.filter((function(e){return e instanceof kt}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allLocItems",{get:function(){var e=new Array;return this.fillLocItems(e),e},enumerable:!1,configurable:!0}),t.prototype.fillLocItems=function(e){this.itemValues.forEach((function(t){t.isGroup?t.fillLocItems(e):e.push(t)}))},Object.defineProperty(t.prototype,"isRoot",{get:function(){return this.isRootValue},enumerable:!1,configurable:!0}),t.prototype.setAsRoot=function(){this.isRootValue=!0},t.prototype.setParent=function(e){this.parentValue=e},Object.defineProperty(t.prototype,"parent",{get:function(){return this.parentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullName",{get:function(){var e=this.obj.name===this.name||this.isRoot?"_props":"",t=this.name+e;if(this.isRoot||!this.parent)return t;var o=this.parent.getNameForChild();return(o?o+"_":"")+t},enumerable:!1,configurable:!0}),t.prototype.getNameForChild=function(){return this.isRoot?"":this.isFinalNameObj?this.name:this.fullName},Object.defineProperty(t.prototype,"isFinalNameObj",{get:function(){return this.obj.isQuestion||this.obj.isPage||this.obj.isPanel},enumerable:!1,configurable:!0}),t.prototype.getItemByName=function(e){for(var t=0;t<this.itemValues.length;t++)if(this.itemValues[t].name==e)return this.itemValues[t];return null},Object.defineProperty(t.prototype,"groups",{get:function(){return this.itemValues.filter((function(e){return e instanceof t}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGroup",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locales",{get:function(){return this.translation?this.translation.locales:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeLocaleText",{get:function(){return G.getString("pe.remove")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localeCount",{get:function(){return Array.isArray(this.locales)?this.locales.length:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locWidth",{get:function(){var e=this.localeCount;return e<2?"100%":Math.floor(100/e).toString()+"%"},enumerable:!1,configurable:!0}),t.prototype.getLocaleName=function(e){return this.translation?this.translation.getLocaleName(e):G.getLocaleName(e)},t.prototype.reset=function(){this.itemValues=[],this.fillItems()},t.prototype.fillLocales=function(e){for(var t=0;t<this.items.length;t++)this.items[t].fillLocales(e)},t.prototype.makeObservable=function(){e.prototype.makeObservable.call(this);for(var t=0;t<this.items.length;t++)this.items[t].makeObservable()},Object.defineProperty(t.prototype,"showAllStrings",{get:function(){return!this.translation||this.translation.showAllStrings},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){if(this.locItems.length>0)return!0;for(var e=this.groups,t=0;t<e.length;t++)if(e[t].hasItems)return!0;return!1},enumerable:!1,configurable:!0}),t.prototype.mergeLocaleWithDefault=function(e){this.itemValues.forEach((function(t){return t.mergeLocaleWithDefault(e)}))},t.prototype.deleteLocaleStrings=function(e){this.items.forEach((function(t){return t.deleteLocaleStrings(e)}))},t.prototype.applyEditLocale=function(e){this.items.forEach((function(t){return t.applyEditLocale(e)}))},t.prototype.fillItems=function(){if(this.isItemValueArray(this.obj))this.createItemValuesLocale();else if(this.obj&&this.obj.getType){for(var e=this.getLocalizedProperties(this.obj),o=0;o<e.length;o++){var r=e[o],n=this.createTranslationItem(this.obj,e[o]);n&&this.itemValues.push(n)}e=this.getArrayProperties(this.obj);for(o=0;o<e.length;o++){r=e[o];var i=this.obj[r.name];this.isItemValueArray(i)?this.canShowProperty(r,Array.isArray(i)&&i.length>0)&&this.addNewGroup(new t(r.name,i,this.translation,G.getPropertyName(r.name),!0)):this.createGroups(i,r)}this.sortItems()}},t.prototype.sortItems=function(){a.translation.sortByName&&this.itemValues.sort((function(e,t){return e.name?t.name?e.name.localeCompare(t.name):1:-1}))},t.prototype.getLocalizedProperties=function(e){for(var t=[],o=i.Serializer.getPropertiesByObj(e),r=0;r<o.length;r++){var n=o[r];n.isSerializable&&n.isLocalizable&&"url"!==n.type&&"file"!==n.type&&(!n.readOnly&&n.visible&&t.push(n))}return t},t.prototype.getArrayProperties=function(e){for(var t=[],o=i.Serializer.getPropertiesByObj(e),r=0;r<o.length;r++){var n=o[r];if(!1!==n.isSerializable){var a=e[n.name];a&&Array.isArray(a)&&a.length>0&&t.push(n)}}return t},t.prototype.canShowProperty=function(e,t){return!(this.translation&&!this.translation.canShowProperty(this.obj,e,t))},t.prototype.createTranslationItem=function(e,t){var o,r=this.getDefaultValue(e,t),n=e[t.serializationProperty];if(!n)return null;if(!this.showAllStrings&&!r&&n.isEmpty)return null;var i=null===(o=this.translation)||void 0===o?void 0:o.getEditLocale();return i&&n.getLocaleText(i)?null:this.canShowProperty(t,n.isEmpty)?new kt(t.name,n,r,this.translation,e,t):null},t.prototype.getDefaultValue=function(e,t){if("title"==t.name&&t.isLocalizable&&t.serializationProperty){var o=e[t.serializationProperty];if(o&&!e.isPage&&!e.isPanel&&(o.onGetTextCallback||o.onRenderedHtmlCallback))return e.name}return""},t.prototype.isItemValueArray=function(e){return!!e&&Array.isArray(e)&&e.length>0&&!!e[0]&&!!e[0].getType&&!!e[0].setData&&!!e[0].setLocText},t.prototype.createGroups=function(e,o){for(var r=0;r<e.length;r++){var n=e[r];if(n&&n.getType){var i=n.name,a=i;if(!i){var s="["+r.toString()+"]";i=o.name+s,a=G.getPropertyName(o.name)+s}this.addNewGroup(new t(i,n,this.translation,a))}}},t.prototype.addNewGroup=function(e){e.setParent(this),e.hasItems&&this.itemValues.push(e)},t.prototype.createItemValuesLocale=function(){for(var e,t=null===(e=this.translation)||void 0===e?void 0:e.getEditLocale(),o=0;o<this.obj.length;o++){var r=this.obj[o],n=this.showAllStrings||!r.locText.isEmpty||isNaN(r.value);if(t&&r.locText.getLocaleText(t)&&(n=!1),n){var i=new kt(r.value,r.locText,r.value,this.translation,r);this.itemValues.push(i),this.addCustomPropertiesForItemValue(this.obj[o],i)}}},t.prototype.addCustomPropertiesForItemValue=function(e,t){for(var o=this.getLocalizedProperties(e),r=0;r<o.length;r++)if("text"!=o[r].name){var n=this.createTranslationItem(e,o[r]);n&&(n.customText=t.text+" ("+n.localizableName+")",n.name=e.value+"."+n.name,this.itemValues.push(n))}},Z([Object(i.property)({defaultValue:!0})],t.prototype,"showHeader",void 0),t}(Vt),_t=function(e){function t(t,o,r){void 0===o&&(o=null),void 0===r&&(r=!0);var n=e.call(this)||this;n.options=o,n.hasUI=r,n.chooseLanguageActions=[],n.options||(n.options=new s);var i=n;return n.exportToCSVFileUI=function(){i.exportToSCVFile(a.translation.exportFileName)},n.importFromCSVFileUI=function(e){e.files.length<1||(i.importFromCSVFile(e.files[0]),e.value="")},n.settingsSurveyValue=n.createSettingsSurvey(),n.surveyValue=t,n.setupToolbarItems(),n.updateChooseLanguageActions(),n}return Y(t,e),t.prototype.getProcessedTranslationItemText=function(e,t,o,r){return this.options.getProcessedTranslationItemText(e,t,o,r)},t.prototype.getType=function(){return"translation"},t.prototype.getEditLocale=function(){return this.editLocale},t.prototype.setEditMode=function(e){this.editLocale=e,this.addLocale(e)},Object.defineProperty(t.prototype,"isEditMode",{get:function(){return!!this.editLocale},enumerable:!1,configurable:!0}),t.prototype.applyEditLocale=function(){this.isEditMode&&this.root&&this.root.applyEditLocale(this.editLocale)},t.prototype.makeObservable=function(e){this.onBaseObjCreatingCallback=e,this.fireOnObjCreating(this),this.root.makeObservable()},t.prototype.fireOnObjCreating=function(e){this.onBaseObjCreatingCallback&&this.onBaseObjCreatingCallback(e)},Object.defineProperty(t.prototype,"settingsSurvey",{get:function(){return this.settingsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localesQuestion",{get:function(){return this.settingsSurvey.getQuestionByName("locales")},enumerable:!1,configurable:!0}),t.prototype.deleteLocaleStrings=function(e){this.root||this.reset(),this.root&&(this.root.deleteLocaleStrings(e),this.removeLocale(e),this.updateChooseLanguageActions(),this.reset())},t.prototype.createSettingsSurvey=function(){var e=this,t=this.getSettingsSurveyJSON();Xe(t);var o=this.options.createSurvey(t,"translation_settings",this,(function(e){e.css=Ue,e.css.root+=" st-properties",e.rootCss+=" st-properties"}));return o.onValueChanged.add((function(t,o){"locales"==o.name&&e.updateLocales()})),o.getQuestionByName("locales").lockedRowCount=1,o.onMatrixRowRemoving.add((function(t,o){e.removingLocale=o.question.value[o.rowIndex].name})),o.onMatrixRowRemoved.add((function(t,o){e.removingLocale&&e.deleteLocaleStrings(e.removingLocale)})),o.onGetQuestionTitleActions.add((function(t,o){o.titleActions=[e.addLanguageAction]})),o.onGetMatrixRowActions.add((function(t,o){if(It(o.question,o.actions,o.row),e.options.getHasMachineTranslation()&&Et(o.actions,"remove-row")&&Array.isArray(o.question.value)){var r=o.question,n=r.visibleRows.indexOf(o.row);if(n>=0&&n<r.value.length){var a=r.value[n].name;o.actions.splice(0,0,new i.Action({iconName:"icon-language",locTooltipName:"ed.translateUsigAI",location:"end",action:function(){return e.showTranslationEditor(a)}}))}}Ot(o.actions)})),o},t.prototype.calcIsChooseLanguageEnabled=function(){this.isChooseLanguageEnabled=this.chooseLanguageActions.filter((function(e){return e.visible})).length>0},t.prototype.updateLocales=function(){var e=[""],t=this.getSelectedLocales();Array.isArray(t)||(t=[]),this.options.translationLocalesOrder=t,t.forEach((function(t){return e.push(t)})),this.locales=e,this.canMergeLocaleWithDefault=this.hasLocale(this.defaultLocale),this.localesQuestion.allowRowsDragAndDrop=e.length>2},t.prototype.getSettingsSurveyJSON=function(){return{elements:[{type:"matrixdynamic",name:"locales",title:G.getString("ed.translationLanguages"),confirmDelete:!0,titleLocation:"top",confirmDeleteText:G.getString("ed.translationDeleteLanguage"),columns:[{name:"isSelected",cellType:"boolean",renderAs:"checkbox",enableIf:"localeEnableIf()"},{name:"displayName",cellType:"expression",expression:"{row.displayName}"}],showHeader:!1,allowAddRows:!1,rowCount:0}]}},t.prototype.getSurveyLocales=function(){for(var e=new Array,t=i.surveyLocalization.supportedLocales,o=Array.isArray(t)&&t.length>0?t:i.surveyLocalization.getLocales(),r={},n=0;n<o.length;n++)this.addLocaleIntoChoices(o[n],e,r);o=this.getVisibleLocales();for(n=0;n<o.length;n++)this.addLocaleIntoChoices(o[n],e,r);return[e,o]},t.prototype.importFromCSVFileDOM=function(){var e=this;document&&(this.inputFileElement||(this.inputFileElement=document.createElement("input"),this.inputFileElement.type="file",this.inputFileElement.style.display="none",this.inputFileElement.onchange=function(){e.importFromCSVFileUI(e.inputFileElement)}),this.inputFileElement.click())},t.prototype.updateSettingsSurveyLocales=function(){var e=this.getSurveyLocales(),t=(e[0],e[1]),o=[];t||(t=[]);for(var r=0;r<t.length;r++)this.localeInitialVisibleCallback&&!this.localeInitialVisibleCallback(t[r])||o.push(t[r]);var n=a.translation.maximumSelectedLocales;n>0&&o.length>n&&o.splice(n),this.setSelectedLocales(o)},t.prototype.resetStringsSurvey=function(){this.hasUI&&(this.stringsSurvey=this.createStringsSurvey(),this.stringsHeaderSurvey=this.createStringsHeaderSurvey(),this.updateReadOnly())},t.prototype.getSurveyStringsArea=function(){},t.prototype.getSurveyStringsHeaderArea=function(){},t.prototype.onSurveyStringsCreated=function(e){},t.prototype.createStringsSurvey=function(){var e=this,t={autoGrowComment:!0,allowResizeComment:!1};Xe(t,!1);var o=this.options.createSurvey(t,"translation_strings",this,(function(t){t.lazyRendering=!0,t.skeletonComponentName="sd-translation-line-skeleton",t.startLoadingFromJson(),t.css=Pt,t.addNewPage("page"),e.addTranslationGroupIntoStringsSurvey(t.pages[0],e.root),t.data=e.getStringsSurveyData(t),t.endLoadingFromJson(),e.onSurveyStringsCreated(t)}),this.getSurveyStringsArea()),r=function(e,t){var o=i.ItemValue.getItemByValue(e.rows,t);return o?o.translationData:null};return o.onMatrixCellCreated.add((function(t,o){if(o.cell.question instanceof i.QuestionCommentModel){var n=o.cell.question,a=r(o.question,o.row.name);e.setPlaceHolder(n,a,o.columnName);var s=!!a&&a.locString.getIsMultiple();n.acceptCarriageReturn=s,a&&(n.maxLength=a.maxLength),s||(n.rows=1)}})),o.onMatrixCellValueChanging.add((function(t,o){var n=r(o.question,o.row.name);n&&(o.value=e.getProcessedTranslationItemText(o.columnName,n.locString,o.value,n.context))})),o.onMatrixCellValueChanged.add((function(t,o){var n=r(o.question,o.row.name);if(n){n.setLocText(o.columnName,o.value);var i=o.columnName;o.row.cells.forEach((function(t){"default"!==i&&0!==t.column.name.indexOf(i+"-")||e.setPlaceHolder(t.question,n,t.column.name)}))}})),o.onUpdatePanelCssClasses.add((function(e,t){t.panel.__translationHasIndent&&(t.cssClasses.panel.content+=" st-panel-indent")})),o.currentPage=o.pages[0],o},t.prototype.setPlaceHolder=function(e,t,o){e.placeholder=t.getPlaceholder(o)},t.prototype.createStringsHeaderSurvey=function(){var e=this,t={};return Xe(t,!1),this.options.createSurvey(t,"translation_strings_header",this,(function(t){t.css=Pt;var o=t.addNewPage("page"),r=i.Serializer.createClass("matrixdropdown");r.name="stringsHeader",r.titleLocation="hidden",e.addLocaleColumns(r),o.addQuestion(r),t.currentPage=t.pages[0]}),this.getSurveyStringsHeaderArea())},t.prototype.addTranslationGroupIntoStringsSurvey=function(e,t){for(var o=0;o<t.items.length;o++)if(!t.items[o].isGroup){var r=t.items[o],n=i.Serializer.createClass("matrixdropdown");n.cellType="comment",n.titleLocation="hidden",n.name=t.fullName+o,n.showHeader=!1,e.addQuestion(n),this.addLocaleColumns(n);var a=new i.ItemValue(r.name,r.text);a.translationData=r,n.rows.push(a)}for(o=0;o<t.items.length;o++)if(t.items[o].isGroup){r=t.items[o];var s=i.Serializer.createClass("panel");s.name=r.name,e.addElement(s),s.title=r.text,r.hasIndent&&(s.__translationHasIndent=!0),this.addTranslationGroupIntoStringsSurvey(s,r)}},t.prototype.addLocaleColumns=function(e){var t=this.getSelectedLocales();e.addColumn("default",this.getLocaleName("")).readOnly=this.isEditMode;for(var o=0;o<t.length;o++)e.addColumn(t[o],this.getLocaleName(t[o]))},t.prototype.getStringsSurveyData=function(e){for(var t={},o=e.getAllQuestions(),r=0;r<o.length;r++)t[o[r].name]=this.getStringsQuestionData(o[r]);return t},t.prototype.updateStringsSurveyData=function(){var e=this.stringsSurvey;e&&(e.data=this.getStringsSurveyData(e))},t.prototype.getStringsQuestionData=function(e){for(var t={},o=0;o<e.rows.length;o++){var r=e.rows[o],n=r.translationData.toJSON();i.Helpers.isValueEmpty(n)||(t[r.value]=n)}return t},t.prototype.updateHeaderStringsSurveyColumns=function(){if(this.stringsHeaderSurvey){var e=this.stringsHeaderSurvey.getQuestionByName("stringsHeader");e.columns=[],this.addLocaleColumns(e)}},t.prototype.updateStringsSurveyColumns=function(){if(this.stringsSurvey)for(var e=this.stringsSurvey.getAllQuestions(),t=0;t<e.length;t++){var o=e[t];o.beginUpdate(),o.columns=[],this.addLocaleColumns(o),o.endUpdate()}},t.prototype.addLocaleIntoChoices=function(e,t,o){e&&!o[e]&&(o[e]=!0,t.push(new i.ItemValue(e,this.getLocaleName(e))))},t.prototype.addLocaleIntoValue=function(e,t){var o=this.getVisibleLocales();if(o.indexOf(e)<0&&(o.push(e),this.setVisibleLocales(o)),t){var r=this.getSelectedLocales();r.indexOf(e)<0&&r.length<a.translation.maximumSelectedLocales&&(r.push(e),this.setSelectedLocales(r))}},t.prototype.isLocaleVisible=function(e,t){return t!==i.surveyLocalization.defaultLocale&&e.indexOf(t)<0},t.prototype.setupToolbarItems=function(){var e=this;this.chooseLanguageActions=this.getSurveyLocales()[0].map((function(t){return new i.Action({id:t.value,title:e.getLocaleName(t.value),data:t})})),this.addLanguageAction=Object(i.createDropdownActionModel)({id:"svc-translation-choose-language",iconName:"icon-add",enabled:new i.ComputedUpdater((function(){return e.isChooseLanguageEnabled}))},{items:this.chooseLanguageActions,allowSelection:!1,onSelectionChanged:function(t){e.addLocale(t.id)}})},t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),"canMergeLocaleWithDefault"===t&&(this.mergeLocaleWithDefaultText=this.getMergeLocaleWithDefaultText()),"locales"===t&&(this.updateHeaderStringsSurveyColumns(),this.updateStringsSurveyColumns())},t.prototype.getMergeLocaleWithDefaultText=function(){if(!this.canMergeLocaleWithDefault)return"";var e=this.getLocaleName(this.defaultLocale);return G.getString("ed.translationMergeLocaleWithDefault").format(e)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},set:function(e){this.surveyValue=e,this.setVisibleLocales([]),this.reset()},enumerable:!1,configurable:!0}),t.prototype.reset=function(e){if(void 0===e&&(e=!0),e||!this.root){var t=this.filteredPage?this.filteredPage:this.survey,o=this.filteredPage?t.name:"survey";this.root=new At(o,t,this),this.root.setAsRoot(),this.root.reset(),this.resetLocales(),this.isEmpty=!this.root.hasItems,this.updateSettingsSurveyLocales(),this.updateLocales(),this.resetStringsSurvey(),this.updateChooseLanguageActions()}},t.prototype.updateReadOnly=function(){this.stringsSurvey&&(this.stringsSurvey.mode=this.readOnly?"display":"edit")},t.prototype.canShowProperty=function(e,t,o){var r=!o||te.isPropertyVisible(e,t,this.options);return this.translationStringVisibilityCallback?this.translationStringVisibilityCallback(e,t.name,r):r},Object.defineProperty(t.prototype,"defaultLocale",{get:function(){return i.surveyLocalization.defaultLocale},enumerable:!1,configurable:!0}),t.prototype.getLocaleName=function(e){return G.getLocaleName(e,this.defaultLocale)},t.prototype.removeLocale=function(e){if(this.hasLocale(e)){var t=this.locales.indexOf(e),o=this.locales;o.splice(t,1),this.locales=o,this.canMergeLocaleWithDefault=this.hasLocale(this.defaultLocale)}},t.prototype.hasLocale=function(e){return this.locales.indexOf(e)>-1},t.prototype.addLocale=function(e){this.hasLocale(e)||this.addLocaleIntoValue(e,!0),this.updateChooseLanguageActions()},t.prototype.updateChooseLanguageActions=function(){var e=this,t=this.chooseLanguageActions,o=this.getVisibleLocales();Array.isArray(t)&&t.forEach((function(t){return t.visible=e.isLocaleVisible(o,t.data.value)})),this.calcIsChooseLanguageEnabled()},t.prototype.resetLocales=function(){var e=[""];this.root.fillLocales(e);var t=this.options.translationLocalesOrder;if(Array.isArray(t)&&t.length>0){var o=function(e,t,o){var r=o.indexOf(e),n=o.indexOf(t);return r<0&&(r=100),n<0&&(n=100),r<n?-1:r>n?1:0};e.sort((function(r,n){var i=o(r,n,t);return 0===i?o(r,n,e):i}))}this.setSelectedAndVisibleLocales(e,this.getSelectedLocales(),!0)},t.prototype.getSelectedLocales=function(){return this.getSelectedLocalesCore(!0)},t.prototype.setSelectedLocales=function(e){this.setSelectedAndVisibleLocales(this.getVisibleLocales(),e,!0)},t.prototype.getVisibleLocales=function(){return this.getSelectedLocalesCore(!1)},t.prototype.setVisibleLocales=function(e){this.setSelectedAndVisibleLocales(e,this.getSelectedLocales(),!1)},t.prototype.getSelectedLocalesCore=function(e){if(!this.localesQuestion)return[];var t=this.localesQuestion.value;if(!Array.isArray(t)||0===t.length)return[];var o=[];return t.forEach((function(t){!t.name||e&&!t.isSelected||o.push(t.name)})),o},t.prototype.setSelectedAndVisibleLocales=function(e,t,o){var r=this;if(this.localesQuestion){Array.isArray(t)||(t=[]);var n=[];o&&t.forEach((function(t){e.indexOf(t)<0&&e.push(t)}));var i=this.defaultLocale;n.push({isSelected:!0,name:"",displayName:this.getLocaleName("")}),this.getEditLocale()?n.push({isSelected:!0,name:this.getEditLocale()}):e.forEach((function(e){e&&n.push({isSelected:e===i||t.indexOf(e)>-1,name:e,displayName:r.getLocaleName(e)})})),this.localesQuestion.value=n}},Object.defineProperty(t.prototype,"noStringsText",{get:function(){return G.getString("ed.translationNoStrings")},enumerable:!1,configurable:!0}),t.prototype.exportToCSV=function(){this.root||this.reset();var e=[],o=[],r=this.locales;o.push("description ↓ - language →");for(var n=0;n<r.length;n++)o.push(r[n]?r[n]:"default");e.push(o);var i={};for(var s in this.fillItemsHash("",this.root,i),i){var l=[s],c=i[s];for(n=0;n<r.length;n++){var p=r[n],u=c.getTextForExport(p);u=u||0!=n?u:c.defaultValue,u=this.options.getTranslationExportedText(c.context,c.name,c.locString,p,u),l.push(u||0!=n?u:c.defaultValue)}e.push(l)}var d=a.translation.exportPrefix;return d||(d=""),d+Object(Qe.unparse)(e,{quoteChar:'"',escapeChar:'"',delimiter:t.csvDelimiter,header:!0,newline:t.newLineDelimiter,skipEmptyLines:!1,columns:null})},t.prototype.importFromNestedArray=function(e){var o=this,r=e.shift().slice(1);"default"===r[0]&&(r[0]="");var n=new t(this.survey,this.options,!1);n.showAllStrings=!0;var i={};this.fillItemsHash("",n.root,i),e.forEach((function(e){var t=e.shift().trim();if(t){var n=i[t];n&&o.updateItemWithStrings(t,n,e,r)}})),this.reset(),this.importFinishedCallback&&this.importFinishedCallback()},t.prototype.exportToSCVFile=function(e){if(window){var t=this.exportToCSV(),o=new Blob([t],{type:"text/csv"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(o,e);else{var r=window.document.createElement("a");r.href=window.URL.createObjectURL(o),r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}},t.prototype.importFromCSVFile=function(e){var t=this;Object(Qe.parse)(e,{complete:function(e,o){t.importFromNestedArray(e.data)}})},t.prototype.mergeLocaleWithDefault=function(){this.reset(!1),this.hasLocale(this.defaultLocale)&&(this.root.mergeLocaleWithDefault(this.defaultLocale),this.setVisibleLocales([]),this.setSelectedLocales([]),this.reset())},t.prototype.createTranslationEditor=function(e){var t=this,o=new Dt(this.survey,e,this.options);return o.onApply=function(){t.reset()},o},t.prototype.showTranslationEditor=function(e){this.createTranslationEditor(e).showDialog()},t.prototype.translateItemAfterRender=function(e,t,o){if(this.translateItemAfterRenderCallback){if(Array.isArray(t))for(var r=0;r<t.length;r++)if("TEXTAREA"==t[r].tagName){t=t[r];break}this.translateItemAfterRenderCallback(e,t,o)}},t.prototype.updateItemWithStrings=function(e,t,o,r){for(var n=0;n<o.length&&n<r.length;n++){var i=o[n].trim();i&&(this.importItemCallback&&(i=this.importItemCallback(e,r[n],i)),i&&(t.values(r[n]).text=i))}},t.prototype.fillItemsHash=function(e,t,o){var r=this,n=e?e+"."+t.name:t.name;t.locItems.forEach((function(e){o[n+"."+e.name]=e})),t.groups.forEach((function(e){return r.fillItemsHash(n,e,o)}))},t.prototype.dispose=function(){this.isEmpty=!0,this.stringsSurvey&&(this.stringsSurvey.dispose(),this.stringsSurvey=void 0),this.stringsHeaderSurvey&&(this.stringsHeaderSurvey.dispose(),this.stringsHeaderSurvey=void 0),this.settingsSurveyValue&&(this.settingsSurveyValue.dispose(),this.settingsSurveyValue=void 0),this.importFinishedCallback=void 0,this.availableTranlationsChangedCallback=void 0,this.tranlationChangedCallback=void 0,e.prototype.dispose.call(this)},t.csvDelimiter=",",t.newLineDelimiter="\n",Z([Object(i.propertyArray)()],t.prototype,"locales",void 0),Z([Object(i.property)()],t.prototype,"canMergeLocaleWithDefault",void 0),Z([Object(i.property)()],t.prototype,"mergeLocaleWithDefaultText",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.updateReadOnly()}})],t.prototype,"readOnly",void 0),Z([Object(i.property)()],t.prototype,"root",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.reset()}})],t.prototype,"showAllStrings",void 0),Z([Object(i.property)({onSet:function(e,t){t.reset()}})],t.prototype,"filteredPage",void 0),Z([Object(i.property)()],t.prototype,"stringsSurvey",void 0),Z([Object(i.property)()],t.prototype,"stringsHeaderSurvey",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isEmpty",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isChooseLanguageEnabled",void 0),t}(i.Base),Lt=function(e){function t(t,o,r){var n=e.call(this,t,o,!0)||this;return n.surveyStringsCreatedCallback=r,n}return Y(t,e),t.prototype.getSurveyStringsArea=function(){return"translation-tab:table-popup-editor"},t.prototype.getSurveyStringsHeaderArea=function(){return"translation-tab:table-header-popup-editor"},t.prototype.onSurveyStringsCreated=function(e){this.surveyStringsCreatedCallback(e)},t}(_t),Dt=function(){function e(e,t,o){var r=this;this.fromLocales=[],this.survey=e,this.options=o,this.locale=t,this.translationValue=new Lt(this.survey,this.options,(function(e){r.setupNavigationButtons(e)})),this.translation.setEditMode(this.locale),this.translation.reset(),this.fillFromLocales();var n=this.translation.stringsSurvey.navigationBar.getActionById("svc-translation-fromlocale");n&&(n.visible=this.fromLocales.length>0)}return Object.defineProperty(e.prototype,"translation",{get:function(){return this.translationValue},enumerable:!1,configurable:!0}),e.prototype.showDialog=function(){var e=this,t=G.getString("ed.translationDialogTitle")+" ("+this.translation.getLocaleName(this.locale)+")";if(0===this.translation.stringsSurvey.getAllQuestions(!0).length){var o=new i.LocalizableString(this.translation.stringsSurvey);o.text=G.getString("ed.translationNoStrings");var r=i.settings.showDialog({componentName:"sv-string-viewer",data:{locStr:o,locString:o,model:o},onApply:function(){return!0},title:t,displayMode:"popup"},this.options.rootElement).footerToolbar.actions;return r.splice(1,r.length-1),void(r[0].title="OK")}i.settings.showDialog({componentName:"survey",data:{survey:this.translation.stringsSurvey,model:this.translation.stringsSurvey},onApply:function(){return e.apply(),!0},onHide:function(){e.dispose()},cssClass:"sv-property-editor st-translation-dialog",title:t,displayMode:this.options.isMobileView?"overlay":"popup"},this.options.rootElement).locale=G.currentLocale},e.prototype.doMachineTranslation=function(){var e=this,t=this.fromLocale||this.translation.defaultLocale;t||(t="en");var o=this.createStringsToTranslate(),r=[];o.forEach((function(t){r.push(e.getTextToTranslate(t))}));this.options.doMachineTranslation(t,this.locale,r,(function(t){if(Array.isArray(t)){for(var r=0;r<Math.min(o.length,t.length);r++)o[r].values(e.locale).text=t[r];e.translation.updateStringsSurveyData()}}))},e.prototype.apply=function(){this.translation.applyEditLocale(),this.onApply&&this.onApply()},e.prototype.cancel=function(){this.dispose()},e.prototype.dispose=function(){this.translationValue.dispose()},e.prototype.setFromLocale=function(e){this.fromLocale!==e&&(this.fromLocale=e,this.updateMatricesColumns())},e.prototype.updateMatricesColumns=function(){var e=this;this.translation.stringsHeaderSurvey.getAllQuestions().forEach((function(t){return e.updateMatrixColumns(t)}));for(var t=this.translation.stringsSurvey.getAllQuestions(),o=0;o<t.length;o++)this.updateMatrixColumns(t[o],0===o)},e.prototype.updateMatrixColumns=function(e,t){void 0===t&&(t=!1);3===e.columns.length&&e.columns.splice(1,1);var o=this.fromLocale;if(o){var r=new i.MatrixDropdownColumn(o,this.translation.getLocaleName(o));r.readOnly=!0,e.columns.splice(1,0,r)}if(t&&(e.showHeader=e.columns.length>2,e.showHeader)){var n=e.columns;n[0].title=this.translation.getLocaleName(""),n[1].title=this.getHeaderTitle("translationSource",n[1].name),n[2].title=this.getHeaderTitle("translationTarget",n[2].name)}},e.prototype.getHeaderTitle=function(e,t){return G.getString("ed."+e)+this.translation.getLocaleName(t)},e.prototype.fillFromLocales=function(){var e=this;this.fromLocales=[],this.createStringsToTranslate().forEach((function(t){t.fillLocales(e.fromLocales)}))},e.prototype.setupNavigationButtons=function(e){var t=this,o=e.navigationBar.actions;o.splice(0,o.length),this.options.getHasMachineTranslation()&&(e.addNavigationItem(this.createLocaleFromAction()),e.addNavigationItem(new i.Action({id:"svc-translation-machine",iconName:"icon-language",css:"svc-translation-machine",locTitleName:"ed.translateUsigAI",component:"sv-action-bar-item",action:function(){t.doMachineTranslation()}}))),e.addNavigationItem(Mt((function(){t.translation.importFromCSVFileDOM()}),!1,!0)),e.addNavigationItem(Rt((function(){t.translation.exportToCSVFileUI()}),!0)),e.showNavigationButtons="top"},e.prototype.createStringsToTranslate=function(){var e=this,t=new Array;this.fromLocale;return this.translation.root.allLocItems.forEach((function(o){e.getTextToTranslate(o)&&t.push(o)})),t},e.prototype.getTextToTranslate=function(e){var t=this.fromLocale||"",o=e.getLocText(t);return o||t||(o=e.getDefaultLocaleText(!0)),o},e.prototype.createLocaleFromAction=function(){var e=this,t=new i.Action({id:"svc-translation-fromlocale",component:"sv-action-bar-item-dropdown",css:"svc-translation-machine-from"}),o=this.getActionTranslateFromText(""),r=new i.ListModel([{id:null,title:o}],(function(o){var r=o.id||"";e.setFromLocale(r),t.title=e.getActionTranslateFromText(r),n.toggleVisibility()}),!0),n=new i.PopupModel("sv-list",{model:r},"bottom","center");return n.onShow=function(){var t=[{id:null,title:o}];e.fromLocales.forEach((function(o){t.push({id:o,title:e.getActionTranslateFromText(o)})})),n.contentComponentData.model.setItems(t)},t.popupModel=n,t.title=o,t.action=function(){n.toggleVisibility()},t},e.prototype.getActionTranslateFromText=function(e){return e=e||"",G.getString("ed.translateUsigAIFrom")+this.translation.getLocaleName(e)},e}();function Mt(e,t,o){return void 0===o&&(o=!1),new i.Action({id:"svc-translation-import",iconName:"icon-load",locTitleName:"ed.translationImportFromSCVButton",locTooltipName:"ed.translationImportFromSCVButton",mode:o?"large":"small",component:"sv-action-bar-item",needSeparator:t,action:e})}function Rt(e,t){return void 0===t&&(t=!1),new i.Action({id:"svc-translation-export",iconName:"icon-download",locTitleName:"ed.translationExportToSCVButton",locTooltipName:"ed.translationExportToSCVButton",mode:t?"large":"small",component:"sv-action-bar-item",action:e})}var qt=function(){function e(e){this.creator=e,e.addPluginTab("translation",this),this.sidebarTab=this.creator.sidebar.addTab("translation"),this.sidebarTab.caption=G.getString("ed.translationPropertyGridTitle"),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.activate=function(){var e=this;this.model=new _t(this.creator.survey,this.creator),this.model.settingsSurvey.locale=this.creator.locale,this.model.readOnly=this.creator.readOnly,this.model.translationStringVisibilityCallback=function(t,o,r){var n={obj:t,propertyName:o,visible:r};return!e.creator.onTranslationStringVisibility.isEmpty&&e.creator.onTranslationStringVisibility.fire(e.creator,n),n.visible},this.model.localeInitialVisibleCallback=function(t){var o={locale:t,isSelected:!0};return e.creator.onTranslationLocaleInitiallySelected.fire(e.creator,o),o.isSelected},this.model.importItemCallback=function(t,o,r){var n={locale:o,name:t,text:r};return e.creator.onTranslationImportItem.fire(e.creator,n),n.text},this.model.importFinishedCallback=function(){e.creator.onTranslationImported.fire(e.creator,{})},this.sidebarTab.model=this.model.settingsSurvey,this.sidebarTab.componentName="survey-widget",this.creator.sidebar.activeTab=this.sidebarTab.id,this.mergeLocaleWithDefaultAction.title=this.createMergeLocaleWithDefaultActionTitleUpdater(),this.mergeLocaleWithDefaultAction.tooltip=this.createMergeLocaleWithDefaultActionTitleUpdater(),this.mergeLocaleWithDefaultAction.visible=this.model.canMergeLocaleWithDefault,this.filterPageAction.visible=this.creator.survey.pageCount>1,this.updateFilterPageAction(!0),this.filterStringsAction.visible=!0,this.updateFilterStrigsAction(!0),this.importCsvAction.visible=!0,this.exportCsvAction.visible=!0,this.filterPageAction.data.setItems([{id:null,title:this.showAllPagesText}].concat(this.creator.survey.pages.map((function(t){return{id:t.name,title:e.getPageDisplayText(t)}}))),!1),this.model.onPropertyChanged.add((function(t,o){"filteredPage"===o.name&&e.updateFilterPageAction(),"showAllStrings"===o.name&&e.updateFilterStrigsAction(),"canMergeLocaleWithDefault"===o.name&&(e.mergeLocaleWithDefaultAction.visible=e.model.canMergeLocaleWithDefault),"mergeLocaleWithDefaultText"===o.name&&(e.mergeLocaleWithDefaultAction.title=e.model.mergeLocaleWithDefaultText,e.mergeLocaleWithDefaultAction.tooltip=e.model.mergeLocaleWithDefaultText)})),this.model.reset()},e.prototype.update=function(){this.model&&(this.model.survey=this.creator.survey,this.model.filteredPage=null,this.updateFilterPageAction(!0))},e.prototype.deactivate=function(){return this.model&&this.model.dispose(),this.model=void 0,this.sidebarTab.visible=!1,this.filterStringsAction.visible=!1,this.filterPageAction.visible=!1,this.mergeLocaleWithDefaultAction.title=void 0,this.mergeLocaleWithDefaultAction.tooltip=void 0,this.mergeLocaleWithDefaultAction.visible=!1,this.importCsvAction.visible=!1,this.exportCsvAction.visible=!1,!0},e.prototype.createMergeLocaleWithDefaultActionTitleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){var t=e.creator.locale;return t||(t="en"),G.getString("ed.translationMergeLocaleWithDefault").format(i.surveyLocalization.defaultLocale)}))},Object.defineProperty(e.prototype,"selectLanguageOptionsCaption",{get:function(){return G.getString("ed.translationAddLanguage")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllStringsText",{get:function(){return G.getString("ed.translationShowAllStrings")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showUsedStringsOnlyText",{get:function(){return G.getString("ed.translationShowUsedStringsOnly")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllPagesText",{get:function(){return G.getString("ed.translationShowAllPages")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exportToCSVText",{get:function(){return G.getString("ed.translationExportToSCVButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"importFromCSVText",{get:function(){return G.getString("ed.translationImportFromSCVButton")},enumerable:!1,configurable:!0}),e.prototype.createActions=function(){var e=this,t=[];return this.createFilterPageAction(),t.push(this.filterPageAction),this.createFilterStringsAction(),t.push(this.filterStringsAction),this.mergeLocaleWithDefaultAction=new i.Action({id:"svd-translation-merge_locale_withdefault",visible:!1,component:"sv-action-bar-item",mode:"small",needSeparator:!0,action:function(){e.model.mergeLocaleWithDefault()}}),t.push(this.mergeLocaleWithDefaultAction),this.importCsvAction=Mt((function(){e.model.importFromCSVFileDOM()}),!0),this.importCsvAction.visible=!1,t.push(this.importCsvAction),this.exportCsvAction=Rt((function(){e.model.exportToCSVFileUI()})),this.exportCsvAction.visible=!1,t.push(this.exportCsvAction),t},e.prototype.createFilterPageAction=function(){var e=this;this.filterPageAction=Object(i.createDropdownActionModel)({id:"svc-translation-filter-page",title:this.getFilterPageActionTitle(),visible:!1,mode:"small"},{items:[{id:null,title:this.showAllPagesText}],allowSelection:!0,onSelectionChanged:function(t){e.model.filteredPage=t.id?e.creator.survey.getPageByName(t.id):null},horizontalPosition:"center"})},e.prototype.createFilterStringsAction=function(){var e=this;this.filterStringsAction=Object(i.createDropdownActionModel)({id:"svc-translation-show-all-strings",title:this.getFilterStringsActionTitle(),visible:!1,mode:"small"},{items:[{id:"show-all-strings",locTitleName:"ed.translationShowAllStrings"},{id:"show-used-strings-only",locTitleName:"ed.translationShowUsedStringsOnly"}],allowSelection:!0,onSelectionChanged:function(t){e.model.showAllStrings="show-all-strings"===t.id},horizontalPosition:"center"})},e.prototype.updateFilterStrigsAction=function(e){void 0===e&&(e=!1);var t=this.getFilterStringsActionTitle();if(this.filterStringsAction.title=t,e){this.filterStringsAction.needSeparator=this.filterPageAction.visible;var o=this.filterStringsAction.data;o.selectedItem=o.actions.filter((function(e){return e.title===t}))[0]}},e.prototype.updateFilterPageAction=function(e){if(void 0===e&&(e=!1),this.filterPageAction.title=this.getFilterPageActionTitle(),e){var t=this.filterPageAction.data,o=this.model.filteredPage?this.model.filteredPage.name:null;t.selectedItem=t.actions.filter((function(e){return e.id===o}))[0]}},e.prototype.getFilterPageActionTitle=function(){return this.model&&this.model.filteredPage&&this.getPageDisplayText(this.model.filteredPage)||this.showAllPagesText},e.prototype.getFilterStringsActionTitle=function(){return this.model&&!this.model.showAllStrings?this.showUsedStringsOnlyText:this.showAllStringsText},e.prototype.getPageDisplayText=function(e){return this.creator.getObjectDisplayName(e,"translation-tab","survey-translation",e.title)},e}(),Ht={root:"",container:"",header:"",body:"sl-body",bodyEmpty:"",footer:"",title:"",description:"",logo:"",logoImage:"",headerText:"",navigationButton:"",completedPage:"",navigation:{complete:"",prev:"",next:"",start:"",preview:"",edit:""},panel:{title:"",titleExpandable:"",titleOnExpand:"",titleOnError:"",description:"",container:"sl-panel",content:"",icon:"",iconExpanded:"",footer:"sl-panel__footer",requiredText:"sl-panel__required-text"},paneldynamic:{mainRoot:"",root:"",navigation:"",title:"",button:"",buttonRemove:"",buttonAdd:"svc-logic-operator sl-paneldynamic__add-btn",progressTop:"",progressBottom:"",buttonPrev:"",buttonNext:"",progressContainer:"",progress:"",progressBar:"",progressText:"",separator:"sv-hidden",panelWrapper:"",panelsContainer:"",panelWrapperList:"",panelWrapperInRow:"sl-panel-wrapper--in-row"},progress:"",progressBar:"",progressText:"",progressTextInBar:"",page:{root:"",title:"",description:""},pageTitle:"",pageDescription:"",row:"sl-row",rowMultiple:"sl-row--multiple",question:{mainRoot:"sl-question",flowRoot:"",asCell:"",header:"sl-question__header",headerLeft:"sl-question__header--left",headerTop:"",headerBottom:"",content:"",contentLeft:"",titleLeftRoot:"",titleOnAnswer:"",titleOnError:"",title:"sl-question__title",requiredText:"sl-question__required-text",number:"",description:"",descriptionUnderInput:"",comment:"",required:"",titleRequired:"",indent:0,footer:"",formGroup:"",hasError:"",disabled:""},image:{root:""},error:{root:"",icon:"",item:"",locationTop:"",locationBottom:""},checkbox:{root:"",item:"",itemSelectAll:"",itemNone:"",itemDisabled:"",itemChecked:"",itemHover:"",itemInline:"",label:"",labelChecked:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",column:""},radiogroup:{root:"",item:"",itemInline:"",label:"",labelChecked:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",clearButton:"",column:""},boolean:{mainRoot:"",root:"",item:"",control:"",itemChecked:"",itemIndeterminate:"",itemDisabled:"",label:"",switch:"",disabledLabel:"",itemDecorator:"",materialDecorator:"",sliderText:"",slider:""},text:{root:"",small:"",controlDisabled:"",onError:""},multipletext:{root:"",item:"",itemTitle:"",row:"",cell:""},dropdown:{root:"",popup:"",small:"",control:"sl-dropdown",selectWrapper:"",other:"",onError:"",label:"",item:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlDisabled:"",controlLabel:"",materialDecorator:"",controlValue:"sl-dropdown__value",chevronButton:"",chevronButtonSvg:"",chevronButtonIconId:""},imagepicker:{root:"",item:"",itemInline:"",itemChecked:"",itemDisabled:"",itemHover:"",label:"",itemControl:"",image:"",itemText:"",clearButton:"",other:""},matrix:{mainRoot:"",tableWrapper:"",root:"",row:"",rowAdditional:"",rowError:"",cell:"",headerCell:"",label:"",itemValue:"",itemChecked:"",itemDisabled:"",itemHover:"",materialDecorator:"",itemDecorator:"",cellText:"",cellTextSelected:"",cellTextDisabled:""},matrixdropdown:{tableWrapper:"",mainRoot:"",root:"",row:"",rowAdditional:"",cell:"",headerCell:""},matrixdynamic:{tableWrapper:"",mainRoot:"sl-question st-row__question st-scrollable",root:"sl-table st-matrixdynamic",noHeader:"",row:"sl-table__row",rowAdditional:"sl-table__row--additional",cell:"sl-table__cell",headerCell:"sl-table__cell st-table__cell--header",button:"sl-btn",detailRow:"sl-table__row st-table__row--detail",detailButton:"sl-table__cell--detail-button",detailButtonExpanded:"sl-table__cell--detail-button--expanded",detailIcon:"sl-detail-panel__icon",detailIconExpanded:"sl-detail-panel__icon--expanded",detailPanelCell:"sl-table__cell--detail-panel",actionsCell:"sl-table__cell sl-table__cell--actions st-table__cell--actions",buttonAdd:"sl-matrixdynamic__add-btn",buttonRemove:"sl-matrixdynamic__remove-btn",iconAdd:"",iconRemove:""},rating:{root:"",item:"",itemHover:"",selected:"",minText:"",itemText:"",maxText:"",itemDisabled:""},comment:{mainRoot:"",root:"spg-input spg-comment sl-comment",small:""},expression:"",file:{root:"",other:"",placeholderInput:"",preview:"",fileSign:"",fileSignBottom:"",fileDecorator:"",fileInput:"",noFileChosen:"",chooseFile:"",disabled:"",removeButton:"",removeButtonBottom:"",removeFile:"",removeFileSvg:"",wrapper:""},signaturepad:{root:"",small:"",controls:"",placeholder:"",clearButton:""},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"",body:"",header:{root:"",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},list:{root:"sv-list__container sl-list",itemBody:"sv-list__item-body sd-list__item-body sl-list__item-body"},embeddedsurvey:{mainRoot:"sl-embedded-survey"},actionBar:i.defaultActionBarCss},Bt=function(){this.conjunction="and",this.operator=a.logic.defaultOperators.default},Qt=function(e){function t(t){var o=e.call(this)||this;return o.survey=t,o}return Y(t,e),t.prototype.getOperatorText=function(){var e=this.operator;return"equal"==e?"=":"notequal"==e?"<>":"greater"==e?">":"less"==e?"<":"greaterorequal"==e?">=":"lessorequal"==e?"<=":e},t.prototype.getValueText=function(){var e=this.value;if(!e)return e;if(!Array.isArray(e))return this.valToText(e);for(var t="[",o=0;o<e.length;o++)t+=this.valToText(e[o]),o<e.length-1&&(t+=", ");return t+="]"},Object.defineProperty(t.prototype,"isValueRequired",{get:function(){return"empty"!==this.operator&&"notempty"!==this.operator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){return!(!this.questionName||this.isValueRequired&&i.Helpers.isValueEmpty(this.value))},enumerable:!1,configurable:!0}),t.prototype.toExpression=function(){var e=E(this.getQuestionValueByName())+" "+this.getOperatorText();return this.isValueRequired&&(e+=" "+this.getValueText()),e},t.prototype.getQuestionValueByName=function(){var e=this.survey.getQuestionByName(this.questionName);return e&&e.name!=e.getValueName()&&this.questionName!=e.getValueName()?this.questionName.replace(e.name,e.getValueName()):this.questionName},t.prototype.valToText=function(e){return"true"==e||"false"==e||this.isNumeric(e)?e:"["==e[0]?e.replace(/(?!^)(['])(?!$)/g,"\\$1"):(this.isQuote(e[0])||(e="'"+e),this.isQuote(e[e.length-1])||(e+="'"),e.replace(/(?!^)(['"])(?!$)/g,"\\$1"))},t.prototype.isNumeric=function(e){return!("string"==typeof e&&e.length>1&&"0"===e[0]&&"x"!==e[1])&&!isNaN(e)},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t}(Bt),Ft=function(){function e(e){void 0===e&&(e=null),this.hasValue=e}return e.prototype.build=function(e){if(!e)return[];var t;return(t=(new i.ConditionsParser).parseExpression(e))?this.buildEditorItems(t):[]},e.prototype.buildEditorItems=function(e){var t=[];return this.buildEditorItemsCore(e,t,"")||(t=[]),t},e.prototype.buildEditorItemsCore=function(e,t,o){if("unary"==e.getType())return this.buildEditorItemsAddUnaryOperand(e,t);if("binary"!==e.getType())return!1;var r=e;return!(r.isArithmetic&&!r.isConjunction)&&(r.isConjunction?this.buildEditorItemsAddConjunction(r,t,o):this.buildEditorItemsAddBinaryOperand(r,t))},e.prototype.buildEditorItemsAddConjunction=function(e,t,o){var r=e.conjunction;if("or"==r&&o&&o!=r)return!1;if(!this.buildEditorItemsCore(e.leftOperand,t,r))return!1;var n=t.length;return!!this.buildEditorItemsCore(e.rightOperand,t,r)&&(t[n].conjunction=e.conjunction,!0)},e.prototype.buildEditorItemsAddBinaryOperand=function(e,t){var o=this.getOperandByType(e,"variable"),r=this.getArrayValueFromOperand(e),n=r?null:this.getOperandByType(e,"const");if(!o||!n&&!r&&this.canShowValueByOperator(e.operator))return!1;if(!this.isVariableInSurvey(o.variable))return!1;var i=new Bt;return i.questionName=o.variable,i.operator=e.leftOperand!==o?this.getOppositeOperator(e.operator):e.operator,r&&(i.value=r),n&&(i.value=n.correctValue),t.push(i),!0},e.prototype.isVariableInSurvey=function(e){return!this.hasValue||this.hasValue(e)},e.prototype.getArrayValueFromOperand=function(e){var t=this.getOperandByType(e,"array");if(!t||!t.values)return null;var o=t.values;if(!Array.isArray(o)||0==o.length)return null;for(var r=[],n=0;n<o.length;n++){var i=o[n];if(i){if("const"!=i.getType())return null;r.push(i.correctValue)}}return 0==r.length?null:r},e.prototype.buildEditorItemsAddUnaryOperand=function(e,t){var o=e.operator;if("empty"!==o&&"notempty"!=o)return!1;var r=e.expression;if(null==r||"variable"!=r.getType())return!1;var n=r.variable;if(!this.isVariableInSurvey(n))return!1;var i=new Bt;return i.questionName=n,i.operator=o,t.push(i),!0},e.prototype.getOppositeOperator=function(e){return"less"==e?"greater":"greater"==e?"less":"lessorequal"==e?"greaterorequal":"greaterorequal"==e?"lessorequal":e},e.prototype.getOperandByType=function(e,t){return e.rightOperand?e.leftOperand.getType()!==t&&e.rightOperand.getType()!==t||e.leftOperand.getType()==t&&e.rightOperand.getType()==t?null:e.leftOperand.getType()==t?e.leftOperand:e.rightOperand:null},e.prototype.canShowValueByOperator=function(e){return"empty"!=e&&"notempty"!=e},e}();i.FunctionFactory.Instance.register("questionValueVisibleIf",(function(e){return 2===e.length&&(!(!e[0]||!e[1])&&("empty"!==e[1]&&"notempty"!==e[1]))}));var Ut=function(e){function t(t,o,r,n){void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n="");var i=e.call(this,r)||this;return i.propertyName=n,i.addConditionQuestionsHash={},i.isModalValue=!0,i.isSettingPanelValues=!1,i.calculatedValueQuestion=null,i.surveyValue=t,i.objectValue=o,i.panelValue=i.editSurvey.getQuestionByName("panel"),i.textEditorValue=i.editSurvey.getQuestionByName("textEditor"),i.options.maxLogicItemsInCondition&&(i.panel.maxPanelCount=i.options.maxLogicItemsInCondition),i.allConditionQuestions=i.createAllConditionQuestions(),i.editSurvey.onValueChanged.add((function(e,t){i.onValueChanged(t)})),i.editSurvey.onDynamicPanelAdded.add((function(e,t){i.onPanelAdded()})),i.editSurvey.onDynamicPanelRemoved.add((function(e,t){0==t.question.panelCount&&t.question.addPanel(),i.panel.panelCount>0&&(i.panel.panels[0].getQuestionByName("questionName").titleLocation="left")})),i.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){i.onPanelValueChanged(t.panel,t.name)})),i.editSurvey.css=Ht,i.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){i.onUpdateQuestionCssClasses(t)})),i.text=i.object&&i.propertyName?i.object[i.propertyName]:"",i.updatePlaceholderVisibileIf(),i}return Y(t,e),t.canParseExpression=function(e){return!e||!!(new i.ConditionsParser).parseExpression(e)},t.canBuildExpression=function(e){return!e||!!t.canParseExpression(e)&&(new Ft).build(e).length>0},t.isOperatorEnabled=function(e,o){if(!e)return!0;if(!o||0==o.length)return!0;for(var r=[],n=[],i=0;i<o.length;i++){var a=o[i];"!"==a[0]?n.push(a.substring(1)):r.push(a)}return t.isClassContains(e,r,n)},t.isClassContains=function(e,t,o){for(var r=i.Serializer.findClass(e);r;){if(t.indexOf(r.name)>-1)return!0;if(o.indexOf(r.name)>-1)return!1;r=r.parentName?i.Serializer.findClass(r.parentName):null}return 0==t.length},Object.defineProperty(t.prototype,"title",{get:function(){return this.panel.title},set:function(e){this.panel.title=e,this.textEditor.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModal",{get:function(){return this.isModalValue},set:function(e){e!==this.isModalValue&&(this.isModalValue=e,this.updatePlaceholderVisibileIf())},enumerable:!1,configurable:!0}),t.prototype.updatePlaceholderVisibileIf=function(){if(this.panel){var e="";this.isModal&&(e="{panel.questionName} empty and {panelIndex} == 0"),this.panel.template.getQuestionByName("placeholder").visibleIf=e}},t.prototype.getSurveyJSON=function(){return{elements:[{type:"paneldynamic",titleLocation:"hidden",name:"panel",panelRemoveButtonLocation:"right",panelAddText:G.getString("pe.addCondition"),minPanelCount:1,maxPanelCount:1,startWithNewLine:!1,templateElements:[{name:"conjunction",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,titleLocation:"hidden",showOptionsCaption:!1,visibleIf:"{panelIndex} > 0",choices:[{value:"and",text:G.getString("pe.and")},{value:"or",text:G.getString("pe.or")}]},{name:"questionName",type:"dropdown",renderAs:"logicoperator",title:G.getString("pe.if"),titleLocation:"left",showOptionsCaption:!1,startWithNewLine:!1,isRequired:!0},{name:"operator",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,titleLocation:"hidden",startWithNewLine:!1,showOptionsCaption:!1,isRequired:!0,enableIf:"{panel.questionName} notempty"},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"questionValue",type:"text",visible:!1},{name:"placeholder",type:"html",visible:!1,html:"<div class='svc-logic-placeholder'><span class=\"svc-logic-placeholder__text\">"+G.getString("pe.emptyLogicPopupMessage")+"<span></div>"}]},{type:"comment",titleLocation:"hidden",name:"textEditor",textUpdateMode:"onTyping",placeholder:G.getString("pe.emptyExpressionPlaceHolder"),visible:!1}]}},t.prototype.getSurveyCreationReason=function(){return"condition-builder"},Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.isModal||t.canBuildExpression(e)?(this.textEditor.value=e,this.showBuilder(e)):(this.panel.panelCount=0,this.showTextEditor(e))},enumerable:!1,configurable:!0}),t.prototype.isModified=function(e){if(this.textEditor.visible)return e!=this.text;var t=this.getEditorItems(),o=e?(new i.ConditionsParser).parseExpression(e):null;if(!o)return!(1==t.length&&!t[0].questionName);if(!this.isReady)return!0;var r=(new i.ConditionsParser).parseExpression(this.text);return!o.isEqual(r)},Object.defineProperty(t.prototype,"context",{get:function(){return this.contextValue},set:function(e){e!==this.context&&(this.contextValue=e,this.updateNamesOnContextChanged(),this.onContextChanged&&this.onContextChanged(e))},enumerable:!1,configurable:!0}),t.prototype.processText=function(e){this.panel.panelCount=0;var t=(new Ft).build(e);this.buildPanels(t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"object",{get:function(){return this.objectValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textEditor",{get:function(){return this.textEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){if(this.textEditor.visible)return t.canParseExpression(this.textEditor.value);for(var e=0;e<this.panel.panels.length;e++)if(!this.createEditorItemFromPanel(this.panel.panels[e]).isReady)return!1;return!0},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.panel.panels.length||!(this.panel.panels.length>1)&&!this.createEditorItemFromPanel(this.panel.panels[0]).questionName},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return!this.isReady&&(this.hasErrors(),this.errorText=Ae("expressionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.apply=function(){return!this.hasErrorInUI()&&(this.object&&this.propertyName?(this.object[this.propertyName]=this.text,!0):void 0)},t.prototype.setIsFastEntry=function(e){e?this.showTextEditor(this.text):this.panel.visible||this.showBuilder(this.text)},t.prototype.buildPanels=function(e){this.panel.panelCount=e.length;for(var t=0;t<e.length;t++)this.setItemToPanel(e[t],this.panel.panels[t]);0==this.panel.panelCount&&this.panel.addPanel()},t.prototype.setupConditionOperator=function(e,o){var r=this,n=o.getQuestionByName("operator");n.choices=this.getOperators(),n.value=e.operator,n.onOpened.add((function(e,n){var i=o.getQuestionByName("questionName").value,s=r.getQuestionConditionJson(i),l=s?s.type:null,c=r.getConditionQuestion(i);n.choices.forEach((function(e,o){var n=t.isOperatorEnabled(l,a.operators[e.value]);n=r.options.isConditionOperatorEnabled(i,c,e.value,n),e.setIsEnabled(n),e.setIsVisible(n)}))}))},t.prototype.setupConditionQuestionName=function(e,t){var o=t.getQuestionByName("questionName");o.choices=this.getConditionQuestions(),o.titleLocation=0==this.panel.panels.indexOf(t)?"left":"hidden";var r=this.getQuestionNameToPanel(e.questionName);this.getConditionQuestion(r)&&(o.value=r)},t.prototype.setupRemoveQuestion=function(e){var t=e.getQuestionByName("removeAction").parentQuestion,o=e.getQuestionByName("removeAction");o.linkClickCallback=function(){t&&t.removePanelUI(e)},o.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",o.linkValueText=""},t.prototype.setItemToPanel=function(e,t){this.isSettingPanelValues=!0,t.getQuestionByName("conjunction").value=e.conjunction,this.setupConditionOperator(e,t),this.setupConditionQuestionName(e,t),t.getQuestionByName("questionValue")&&(t.getQuestionByName("questionValue").value=e.value,this.updateSurveyVariable(e)),this.setupRemoveQuestion(t),this.isSettingPanelValues=!1},t.prototype.updateSurveyVariable=function(e){this.editSurvey.setVariable(e.questionName,e.value)},t.prototype.getConditionQuestions=function(){if(!this.context)return this.allConditionQuestions;for(var e=[],t=0;t<this.allConditionQuestions.length;t++){var o=this.allConditionQuestions[t];o.context&&o.context!==this.context||e.push(o)}return e},t.prototype.getText=function(){if(this.textEditor.visible)return this.textEditor.value;for(var e="",t=this.getEditorItems(),o=0;o<t.length&&t[o].isReady;o++)e&&(e+=" "+t[o].conjunction+" "),e+=t[o].toExpression();return e},t.prototype.getEditorItems=function(){for(var e=[],t=0;t<this.panel.panels.length;t++)e.push(this.createEditorItemFromPanel(this.panel.panels[t]));return e},t.prototype.createEditorItemFromPanel=function(e){var t=new Qt(this.survey);return t.conjunction=e.getQuestionByName("conjunction").value,t.questionName=this.getQuestionNameFromPanel(e.getQuestionByName("questionName").value),t.operator=e.getQuestionByName("operator").value,e.getQuestionByName("questionValue")&&(t.value=e.getQuestionByName("questionValue").value,this.updateSurveyVariable(t)),t},t.prototype.getQuestionNameFromPanel=function(e){if(!this.context||!e)return e;var t=this.context.getValueName()+".";return e.replace(t,"")},t.prototype.getContextIndexInfo=function(e,t){return void 0===t&&(t=""),te.getQuestionContextIndexInfo(e,t)},t.prototype.getQuestionNameToPanel=function(e){if(!this.context||!e)return e;var t=this.getContextIndexInfo(e);return t&&0===t.index?this.context.getValueName()+"."+e:e},t.prototype.getContextFromPanels=function(){if(this.object)return null;for(var e=0;e<this.panel.panels.length;e++){var t=this.panel.panels[e].getQuestionByName("questionName").value,o=this.getContextByQuestionName(t);if(o)return o}return null},t.prototype.updateNamesOnContextChanged=function(){for(var e=0;e<this.panel.panels.length;e++)this.panel.panels[e].getQuestionByName("questionName").choices=this.getConditionQuestions()},t.prototype.getContextByQuestionName=function(e){if(!e)return null;var t=this.getContextIndexInfo(e,".");return t?(e=e.substring(0,t.index),this.survey.getQuestionByValueName(e)):null},t.prototype.createAllConditionQuestions=function(){if(!this.survey)return[];var e=[],t=this.survey.getAllQuestions(),o=this.getContextObject(),r=a.logic.questionSortOrder;if(t.length>0){for(var n=0;n<t.length;n++){if(o!=(s=t[n])){var i=o||(!this.context||this.context===s);s.addConditionObjectsByContext(e,i)}}r=this.options.onConditionQuestionsGetListCallback(this.propertyName,this.object,this,e);for(n=0;n<e.length;n++){e[n].value=e[n].name;var s=e[n].question?e[n].question:e[n];if(!this.options.showTitlesInExpressions){var l=e[n].name,c=s.valueName;c&&0==l.indexOf(c)&&(l=l.replace(c,s.name));l=l.replace("-unwrapped",""),e[n].text=this.options.getObjectDisplayName(s,"condition-editor","condition",l)}this.addConditionQuestionsHash[e[n].name]=s}}var p=this.survey.getVariableNames();return this.addSurveyCalculatedValues(p),this.addValuesIntoConditionQuestions(p,e),"asc"===r&&te.sortItems(e),e},t.prototype.getContextObject=function(){if(this.object&&this.object.isDescendantOf("itemvalue")){var e=this.object.locOwner;if(e&&e.getType)return e.locOwner&&e.locOwner.isDescendantOf("matrixdropdowncolumn")?e.locOwner:e}return this.object},t.prototype.addValuesIntoConditionQuestions=function(e,t){for(var o=0;o<e.length;o++){var r=e[o].name?e[o].name:e[o];this.addConditionQuestionsHash[r]=this.getCalculatedValueQuestion(),t.push({value:r,text:r,question:this.getCalculatedValueQuestion()})}},t.prototype.addSurveyCalculatedValues=function(e){this.survey.calculatedValues.forEach((function(t){var o=e.indexOf(t.name.toLowerCase());o>-1&&e.splice(o,1),e.push(t.name)}))},t.prototype.getCalculatedValueQuestion=function(){return this.calculatedValueQuestion||(this.calculatedValueQuestion=i.Serializer.createClass("text"),this.calculatedValueQuestion.name="question"),this.calculatedValueQuestion},t.prototype.getOperators=function(){var e=[],t=a.operators;for(var o in t)e.push(new i.ItemValue(o,G.getString("op."+o)));return e},t.prototype.rebuildQuestionValue=function(e){e.getQuestionByName("questionValue")&&e.getQuestionByName("questionValue").clearValue();var t=e.getQuestionByName("questionName").value,o=this.getQuestionConditionJson(t,e.getQuestionByName("operator").value);o||(o={type:"text"}),o.isRequired=!0,te.updateQuestionJson(o),o.enableIf="{panel.questionName} notempty and {panel.operator} != 'empty' and {panel.operator} != 'notempty'";var r=i.Serializer.createClass(o.type);delete o.type,(new i.JsonObject).toObject(o,r),r||(r=i.Serializer.createClass("text",o));var n=e.getQuestionByName("questionValue");if(n&&e.removeElement(n),this.canShowQuestionValue(e)){var a=r.title;if(r.name="questionValue",r.visibleIf="questionValueVisibleIf({panel.questionName}, {panel.operator})",r.title=a,r.description="",r.titleLocation="top",r.hasComment=!1,r.showOtherItem){var s=this.getConditionQuestion(t);if(s&&s.getStoreOthersAsComment&&s.getStoreOthersAsComment()){var l=r.otherItem;r.choices.push(new i.ItemValue(l.value,l.title)),l.value="#"+l.value+"#",r.showOtherItem=!1}}e.addElement(r)}},t.prototype.rebuildQuestionValueOnOperandChanging=function(e){var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value),o=e.getQuestionByName("questionValue");!o||!o.isReadOnly&&o.isVisible||o.clearValue(),!o||t&&t.type==o.getType()||this.rebuildQuestionValue(e)},t.prototype.canShowQuestionValue=function(e){var t=e.getQuestionByName("operator");if(!t)return!1;this.updateOperatorEnables(e);for(var o=t.choices,r=0;r<o.length;r++)if(o[r].isEnabled){var n=o[r].value;if("empty"!==n&&"notempty"!=n)return!0}return!1},t.prototype.getConditionQuestion=function(e){return this.addConditionQuestionsHash[e]},t.prototype.getQuestionConditionJson=function(e,o){var r="",n=this.getConditionQuestion(e);if(!n)return null;o||(o=this.getDefaultOperatorByQuestion(n)),0==e.indexOf(n.getValueName())&&(r=e.substring(n.getValueName().length));var i=this.getContextIndexInfo(e);i&&0==i.index&&(r=e.substring(i.name.length)),r||(r=e),r&&"."==r[0]&&(r=r.substring(1));var a=n&&n.getConditionJson?n.getConditionJson(o,r):null;return a?(a.choicesFromQuestion&&this.updateChoicesFromQuestion(a),"expression"==a.type&&(a.type="text"),"anyof"==o&&(t.isClassContains(a.type,["checkbox"],[])||(a.type="checkbox")),a):null},t.prototype.updateChoicesFromQuestion=function(e){var t=this.getConditionQuestion(e.choicesFromQuestion);if(t){delete e.choicesFromQuestion;var o=t.toJSON();o.choices&&(e.choices=o.choices),o.choicesByUrl&&(e.choicesByUrl=o.choicesByUrl)}},t.prototype.updateOperatorEnables=function(e){var o=e.getQuestionByName("questionName");if(o){var r=this.getQuestionConditionJson(o.value),n=r?r.type:null,i=e.getQuestionByName("operator");if(i){for(var s=i.choices,l=!0,c=i.value,p=0;p<s.length;p++){var u=t.isOperatorEnabled(n,a.operators[s[p].value]);s[p].setIsEnabled(u),s[p].setIsVisible(u),s[p].value==c&&(l=s[p].isEnabled)}l||(i.value=this.getFirstEnabledOperator(s))}}},t.prototype.updateQuestionsWidth=function(e){var t=e.getQuestionByName("questionValue"),o=e.getQuestionByName("conjunction"),r=e.getQuestionByName("questionName"),n=e.getQuestionByName("operator"),i=!!t&&!t.startWithNewLine,a=!o||!o.isVisible;a||(o.minWidth="50px",o.width="15%"),r.minWidth="50px",r.width=a?"40%":"25%",n.minWidth="50px",n.width=i?"25%":"60%",t&&(t.minWidth="50px",t.width=i?"35%":"")},Object.defineProperty(t.prototype,"defaultOperator",{get:function(){return a.logic.defaultOperators.default},enumerable:!1,configurable:!0}),t.prototype.getDefaultOperatorByQuestionName=function(e){return this.getDefaultOperatorByQuestion(this.getConditionQuestion(e))},t.prototype.getDefaultOperatorByQuestion=function(e){if(e){var t=a.logic.defaultOperators;if(t[e.getType()])return t[e.getType()]}return this.defaultOperator},t.prototype.getFirstEnabledOperator=function(e){for(var t=0;t<e.length;t++)if(e[t].isEnabled)return e[t].value;return this.defaultOperator},t.prototype.onPanelAdded=function(){this.setItemToPanel(new Bt,this.panel.panels[this.panel.panels.length-1])},t.prototype.onPanelValueChanged=function(e,t){"questionName"==t&&(this.context=this.getContextFromPanels(),this.rebuildQuestionValue(e),this.isSettingPanelValues||(e.getQuestionByName("operator").value=this.getDefaultOperatorByQuestionName(e.getQuestionByName("questionName").value))),"operator"==t&&this.rebuildQuestionValueOnOperandChanging(e),this.updateOperatorEnables(e),this.updateQuestionsWidth(e)},t.prototype.onUpdateQuestionCssClasses=function(e){var t=e.cssClasses,o=e.question;t.answered="svc-logic-question--answered","conjunction"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--conjunction "),"questionName"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--question",t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),"operator"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--operator"),"removeAction"===o.name&&(o.allowRootStyle=!1,t.mainRoot+=" svc-logic-condition-remove-question"),("questionValue"===o.name||o.isContentElement)&&(P(t,o.getType()),t.mainRoot+=" svc-logic-question-value sd-element--with-frame",t.error.root="svc-logic-operator__error"),"panel"===o.name&&(t.root+=" svc-logic-paneldynamic",t.buttonAdd+=" svc-logic-operator--operator",t.iconRemove="svc-icon-remove",t.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",t.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",t.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onValueChanged=function(e){if("panel"===e.question.name&&e.value.length>0){var t=this.options.maxLogicItemsInCondition>0?this.options.maxLogicItemsInCondition:100;e.question.maxPanelCount=1!==e.value.length||e.value[0].questionName?t:1,this.panel.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))}this.setTitle()},t.prototype.setTitle=function(){var e=this.isReady?this.text:"";this.title=this.options.onConditionGetTitleCallback(e,e||G.getString("pe.ruleIsNotSet"))},t.prototype.showTextEditor=function(e){this.panel.visible=!1,this.textEditor.value=e,this.textEditor.visible=!0},t.prototype.showBuilder=function(e){(this.isModal||this.getCanShowBuilder(e))&&(this.textEditor.visible=!1,this.processText(e),this.panel.visible=!0)},t.prototype.getCanShowBuilder=function(e){return t.canBuildExpression(e)},t}($e),Wt=function(){function e(e,t,o){this.panel=e,this.initialLogicAction=t,this.logicType=o}return e.createActionModel=function(e,t,o,r){return o&&o.hasSelectorChoices?o.name.indexOf("_setValue")>-1?new zt(e,t,o,r):new Gt(e,t,o,r):new Jt(e,t,o)},e.prototype.updateCurrentLogicAction=function(e){return!1},e.prototype.afterUpdateInitialLogicAction=function(){},e.prototype.resetElements=function(){},e.prototype.getSelectedElement=function(){return null},e.prototype.updateInitialLogicAction=function(){this.initialLogicAction=this.currentLogicAction,this.afterUpdateInitialLogicAction&&this.afterUpdateInitialLogicAction()},e.prototype.setInitialElementValue=function(e,t,o){o&&0!==e.choices.filter((function(e){return e.value===o})).length?e.value=o:e.value=t&&t.logicType==this.logicType?t.elementName:void 0},e}(),Gt=function(e){function t(t,o,r,n){var i=e.call(this,t,o,r)||this;return i.selectorElementsHash=n,i}return Y(t,e),t.prototype.getSelectorOptionsText=function(e){var t=e.baseClass,o="page"==t?"pe.conditionSelectPage":"panel"==t?"pe.conditionSelectPanel":"pe.conditionSelectQuestion";return G.getString(o)},t.prototype.getElementBySelectorName=function(e){var t=e.getQuestionByName("elementSelector").value;return t?this.selectorElementsHash[t]:null},t.prototype.updateCurrentLogicAction=function(e){var t=this.getElementBySelectorName(this.panel);return(!this.initialLogicAction||this.initialLogicAction.logicType!=this.logicType||!!t&&this.initialLogicAction.element!=t)&&(this.currentLogicAction=new Me(this.logicType,t,e),!0)},t.prototype.resetElements=function(){this.panel.getQuestionByName("elementSelector").visible=!1},t.prototype.updatePanelElements=function(e,t){var o=this.panel.getQuestionByName("elementSelector");o.visible=!0,o.choices=t,o.allowClear=!1,o.optionsCaption=this.getSelectorOptionsText(this.logicType),this.setInitialElementValue(o,this.initialLogicAction,e)},t.prototype.getSelectedElement=function(){return this.panel.getQuestionByName("elementSelector").value},t}(Wt),zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.updatePanelElements=function(t,o){e.prototype.updatePanelElements.call(this,t,o),this.getValueIfQuestion().placeholder=G.getString("ed.lg.setValueExpressionPlaceholder"),this.getValueIfPanel().visible=!0,this.setValueExpressionValue()},t.prototype.afterUpdateInitialLogicAction=function(){var e=this.getElementBySelectorName(this.panel);e&&(e.setValueExpression=this.panel.getQuestionByName("setValueExpression").value)},t.prototype.setValueExpressionValue=function(){var e=this.getElementBySelectorName(this.panel);e&&(this.getValueIfQuestion().value=e.setValueExpression)},t.prototype.getValueIfPanel=function(){return this.panel.getElementByName("setValueIfPanel")},t.prototype.getValueIfQuestion=function(){return this.panel.getQuestionByName("setValueExpression")},t.prototype.resetElements=function(){e.prototype.resetElements.call(this),this.getValueIfPanel().visible=!1,this.getValueIfQuestion().clearValue()},t}(Gt),Jt=function(e){function t(t,o,r){var n=e.call(this,t,o,r)||this;return n.isTrigger=!0,n}return Y(t,e),t.prototype.recreateQuestion=function(e,t,o,r){var n=o?e.getQuestionByName(o):null;if(n){var a=e.getElementByName("triggerEditorPanel"),s=i.Serializer.createClass("panel");new ot(t,r).setupObjPanel(s,!0,"logic");var l=s.getQuestionByName(o);if(l){var c=a.elements.indexOf(n);a.blockAnimations(),a.addElement(l,c),n.delete(),a.releaseAnimations()}"setValue"===l.name&&this.updateSetValueQuestion(l),this.updateVisibilityPanel(a),s.dispose()}},t.prototype.updateSetValueQuestion=function(e){var t=e.obj,o=t.getSurvey();if(o||(o=t.owner),t.setToName&&o){var r=o.getQuestionByValueName(t.setToName);e.title=r.title,e.titleLocation="top"}},t.prototype.updateRunExpressionQuestion=function(e){e.titleLocation="hidden",e.placeholder=G.getString("pe.emptyExpressionPlaceHolder")},t.prototype.createElementPanelObj=function(){var e=this.initialLogicAction,t=e&&e.logicType==this.logicType?e.element:null,o=this.logicType.createNewObj(t);return this.setPanelObj(o),o},t.prototype.getQuestions=function(){var e=this,t=this.panel.getElementByName("triggerQuestionsPanel");return 0!==t.elements.length&&this.logicType.questionNames?t.elements.filter((function(t){return-1!==e.logicType.questionNames.indexOf(t.name)})):null},t.prototype.resetPanel=function(e){var t=this.panel.getElementByName(e);t.questions.forEach((function(e){e.clearValue()})),t.elements.splice(0,t.elements.length),t.visible=!1},t.prototype.updateVisibilityPanel=function(e){e.elements.length>0?e.visible=e.elements.filter((function(e){return e.visible})).length>0:e.visible=!1},t.prototype.updatePanelQuestionsValue=function(e){var t=this;e.onSurveyLoad(),e.questions.forEach((function(e){i.Helpers.isValueEmpty(t.panelObj[e.getValueName()])||(e.value=t.panelObj[e.getValueName()])}))},t.prototype.afterUpdateInitialLogicAction=function(){this.setPanelObj(this.initialLogicAction.element),this.panelObj&&this.logicType.saveNewElement(this.panelObj)},t.prototype.updateCurrentLogicAction=function(e){if(!(!this.initialLogicAction||this.initialLogicAction.logicType!=this.logicType)){for(var t=this.initialLogicAction.element,o=this.panelObj.toJSON(),r=Object.keys(o),n=Object.keys(t.toJSON()),i=[],a=0;a<n.length;a++){var s=n[a];r.indexOf(s)<0&&i.push(s)}t.fromJSON(o),this.currentLogicAction=this.initialLogicAction;for(a=0;a<i.length;a++)t[i[a]]=void 0;return!1}return this.currentLogicAction=new Me(this.logicType,this.panelObj,e),!0},t.prototype.updatePanel=function(e,t,o,r){this.panelObj&&(this.panelObj[e]=t,this.logicType&&this.logicType.dependedOnPropertyName===e&&this.recreateQuestion(this.panel,this.panelObj,this.logicType.dynamicPropertyName,o),this.panel.runCondition(r.getAllValues(),{survey:r}))},t.prototype.setPanelObj=function(e){var t=this,o=this.panelObj;o&&(o.onPropertyValueChangedCallback=void 0),this.panelObj=e,e&&(e.onPropertyValueChangedCallback=function(e,r,n,i,a){if(t.panel&&!t.panel.isDisposed){var s=t.panel.getQuestionByName(e);s&&(s.value=n)}else o.onPropertyValueChangedCallback=void 0})},t.prototype.resetElements=function(){this.setPanelObj(null),this.resetPanel("triggerQuestionsPanel"),this.resetPanel("triggerEditorPanel")},t.prototype.updatePanelElements=function(e,t){var o=this,r=this.panel.getElementByName("triggerEditorPanel"),n=this.panel.getElementByName("triggerQuestionsPanel"),i=this.createElementPanelObj();new ot(i,t).setupObjPanel(r,!0,"logic"),r.title="";var a=r.getQuestionByName("runExpression");(a&&this.updateRunExpressionQuestion(a),this.logicType.questionNames)&&r.elements.filter((function(e){return-1!==o.logicType.questionNames.indexOf(e.name)})).forEach((function(e){var t=e;"dropdown"===t.getType()&&(t.allowClear=!1,t.renderAs="logicoperator"),n.addQuestion(t)}));r.getElementByName(this.logicType.propertyName).visible=!1,this.updateVisibilityPanel(n),this.updatePanelQuestionsValue(n),this.updateVisibilityPanel(r),this.updatePanelQuestionsValue(r);var s=this.getQuestions();s&&e&&s.forEach((function(t){o.setInitialElementValue(t,o.initialLogicAction,e),e=null}))},t.prototype.getSelectedElement=function(){var e=this.getQuestions();if(e){var t=e[0];return!!t&&t.value}},t}(Wt);i.FunctionFactory.Instance.register("logicTypeVisibleIf",(function(e){if(!this.question||!this.question.parentQuestion||1!=e.length)return!0;var t=this.question.parentQuestion.panels;if(t.length<2)return!0;for(var o=0;o<t.length;o++){var r=t[o].getQuestionByName("logicTypeName");if(r!=this.question&&r.value==e[0])return!1}return!0}));var Zt=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this,o)||this;return r.options=o,r.initialSelectedElements={},r.isModifiedValue=!1,r.selectorElementsHash={},r.options||(r.options=new s),r.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){"logicTypeName"==t.name&&r.onLogicTypeChanged(t.panel);var o=r.getActionModelByPanel(t.panel);o.isTrigger&&o.updatePanel(t.name,t.value,r.options,r.editSurvey)})),r.editSurvey.onDynamicPanelRemoved.add((function(e,t){if(!r.isBuildingPanels){var o=r.getActionModelByPanel(t.panel);o&&o.initialLogicAction&&r.editableItem.removeAction(o.initialLogicAction),0==r.panel.panelCount&&r.panel.addPanel(),r.panel.panelCount>0&&(r.panels[0].getQuestionByName("logicTypeName").title=G.getString("pe.then"))}})),r.editSurvey.onDynamicPanelAdded.add((function(e,t){if(!r.isBuildingPanels){var o=r.panels[r.panel.panelCount-1];r.onPanelAdded(o,null)}})),r.editSurvey.css=Ht,r.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){r.onUpdateQuestionCssClasses(t)})),r.editSurvey.onUpdatePanelCssClasses.add((function(e,t){r.onUpdatePanelCssClasses(t)})),r.editSurvey.onQuestionAdded.add((function(e,t){r.onQuestionAdded(t)})),r.editSurvey.onGetQuestionTitleActions.add((function(e,t){r.onGetQuestionTitleActions(t)})),r.editSurvey.onValueChanged.add((function(e,t){r.onValueChanged(t)})),r.setEditableItem(t),r}return Y(t,e),Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),t.prototype.setEditableItem=function(e){this.editableItemValue=e,this.buildInitialSelectedElements(),this.buildPanels(),this.resetModified()},Object.defineProperty(t.prototype,"survey",{get:function(){return this.editableItem.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModified",{get:function(){return this.isModifiedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.editSurvey.getQuestionByName("panel")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panels",{get:function(){return this.panel.panels},enumerable:!1,configurable:!0}),t.prototype.getActionModelByPanel=function(e){return e.actionModel},t.prototype.setActionModelByPanel=function(e,t){e.actionModel=t},Object.defineProperty(t.prototype,"context",{get:function(){return this.contextValue},set:function(e){e!==this.context&&(this.contextValue=e,this.updatePanelsOnContextChanged())},enumerable:!1,configurable:!0}),t.prototype.getLogicTypeByPanel=function(e){return this.getLogicTypeByName(e.getQuestionByName("logicTypeName").value)},t.prototype.getSurveyJSON=function(){return{clearInvisibleValues:"onHidden",elements:[{type:"paneldynamic",name:"panel",title:Ae("actionsEditorTitle"),titleLocation:"hidden",panelAddText:Ae("addNewAction"),panelRemoveButtonLocation:"right",panelCount:0,minPanelCount:1,maxPanelCount:1,templateElements:[{name:"logicTypeName",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,allowClear:!1,title:G.getString("pe.then"),titleLocation:"left",isRequired:!0,optionsCaption:Ae("selectedActionCaption"),requiredErrorText:this.getLocString("pe.conditionActionEmpty")},{name:"logicTypeDescription",type:"html",startWithNewLine:!1,visible:!1},{name:"elementSelector",type:"dropdown",renderAs:"logicoperator",allowClear:!1,titleLocation:"hidden",isRequired:!0,startWithNewLine:!1,visible:!1},{name:"triggerQuestionsPanel",type:"panel",startWithNewLine:!1,visible:!1},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"triggerEditorPanel",type:"panel",visible:!1},{name:"setValueIfPanel",visible:!1,type:"panel",elements:[{name:"setValueExpression",type:"comment",titleLocation:"hidden"}]}]}]}},t.prototype.getSurveyCreationReason=function(){return"logic-item-editor"},t.prototype.resetModified=function(){this.isModifiedValue=!1},t.prototype.isEmpty=function(){return 0===this.panels.length||!(this.panels.length>1)&&!this.getActionModelByPanel(this.panels[0])},t.prototype.apply=function(){if(this.editSurvey.hasErrors())return!1;for(var e=0;e<this.panels.length;e++)this.applyPanel(this.panels[e]);return this.resetModified(),!0},t.prototype.getEditingActions=function(){var e=this;return this.panels.map((function(t){var o=e.getActionModelByPanel(t);return o.updateCurrentLogicAction(e.survey),o.currentLogicAction||o.initialLogicAction})).filter((function(e){return!!e}))},t.prototype.onUpdateQuestionCssClasses=function(e){var t,o=e.cssClasses,r=e.question;o.answered="svc-logic-question--answered","logicTypeName"===r.name&&(r.allowRootStyle=!1,o.control+=" svc-logic-operator svc-logic-operator--action",o.error.root="svc-logic-operator__error",o.onError="svc-logic-operator--error");var n=["elementSelector","setToName","fromName","gotoName"];n.indexOf(r.name)>-1&&(r.allowRootStyle=!1,"setToName"!==r.name&&"fromName"!==r.name||(r.titleLocation="left",r.startWithNewLine=!1),o.control+=" svc-logic-operator svc-logic-operator--question",o.error.root="svc-logic-operator__error",o.onError="svc-logic-operator--error"),(r.isContentElement||this.isSetValueInternalQuestion(r))&&(P(o,r.getType()),o.mainRoot+=" svc-logic-question-value sd-element--with-frame");var a=null===(t=r.parent)||void 0===t?void 0:t.name;if(n.indexOf(r.name)<0&&("triggerEditorPanel"===a||"setValueIfPanel"===a)){var s=r.getType();P(o,s),!i.defaultV2Css[s]&&Ue[s]&&(T(o,Ue.question),T(o,Ue[s]));var l=r.parent.elements.filter((function(e){return n.indexOf(e.name)<0&&"expression"!==e.name}));("runExpression"!==r.name&&"comment"!==s||Array.isArray(l)&&l.length>1)&&(o.mainRoot+=" svc-logic-question-value sd-element--with-frame")}"removeAction"===r.name&&(r.allowRootStyle=!1,o.mainRoot+=" svc-logic-condition-remove-question"),"panel"===r.name&&(o.root+=" svc-logic-paneldynamic",o.buttonAdd+=" svc-logic-operator--action ",o.iconRemove="svc-icon-remove",o.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",o.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",o.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.isSetValueInternalQuestion=function(e){if(this.isSetValueInternalQuestionCore(e))return!0;if(this.isSetValueInternalQuestionCore(e.parentQuestion))return!0;var t=e.parent;return t&&this.isSetValueInternalQuestionCore(t.parentQuestion)},t.prototype.isSetValueInternalQuestionCore=function(e){return"setValue"===(null==e?void 0:e.name)},t.prototype.onUpdatePanelCssClasses=function(e){var t=e.panel,o=e.cssClasses,r=t.name;"triggerEditorPanel"!==r&&"setValueIfPanel"!==r||(o.panel.container+=" svc-logic_trigger-editor"),"triggerQuestionsPanel"===r&&(t.allowRootStyle=!1,o.panel.container+=" svc-logic_trigger-questions"),this.isSetValueInternalQuestionCore(t.parentQuestion)&&P(o,t.getType())},t.prototype.onValueChanged=function(e){this.isModifiedValue=!0,e.question.maxPanelCount=1!==e.value.length||e.value[0].logicTypeName?100:1,this.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))},t.prototype.onQuestionAdded=function(e){"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.titleLocation="left",e.question.startWithNewLine=!1)},t.prototype.onGetQuestionTitleActions=function(e){"setValue"===e.question.name&&(e.titleActions=[])},t.prototype.applyPanel=function(e){var t=this.getActionModelByPanel(e);t.updateCurrentLogicAction(this.survey)&&(this.editableItem.replaceAction(t.currentLogicAction,t.initialLogicAction),t.updateInitialLogicAction())},t.prototype.buildInitialSelectedElements=function(){if(this.initialSelectedElements={},this.editableItem)for(var e=0;e<this.editableItem.actions.length;e++){var t=this.editableItem.actions[e];if(this.isElementSelectorVisible(t.logicType)){var o=t.logicTypeName;this.initialSelectedElements[o]||(this.initialSelectedElements[o]=[]),this.initialSelectedElements[o].push(t.element)}}},t.prototype.buildPanels=function(){if(this.panel.panelCount=0,this.editableItem){this.logicTypeChoices=this.getLogicTypeChoices();for(var e=0;e<this.editableItem.actions.length;e++)this.onPanelAdded(this.panel.addPanel(),this.editableItem.actions[e]);0==this.panel.panelCount&&this.onPanelAdded(this.panel.addPanel(),null)}},t.prototype.onPanelAdded=function(e,t){var o=e.getQuestionByName("logicTypeName");if(o.title=this.panel.panelCount>1?G.getString("pe.and"):G.getString("pe.then"),o.choices=this.logicTypeChoices,o.allowClear=!1,t){var r=Wt.createActionModel(e,t,this.getLogicTypeByName(t.logicTypeName),this.selectorElementsHash);this.setActionModelByPanel(e,r),o.value=t.logicTypeName}var n=e.getQuestionByName("removeAction"),i=n.parentQuestion;return n.linkClickCallback=function(){i&&i.removePanelUI(e)},n.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",n.linkValueText="",e},t.prototype.updatePanelsOnContextChanged=function(){if(this.logicTypeChoices=this.getLogicTypeChoices(),this.context)for(var e=this.panels.length-1;e>=0;e--){var t=this.panels[e];this.isPanelSupportContext(t)||(0===e&&1===this.panels.length?t.getQuestionByName("logicTypeName").clearValue():this.panel.removePanel(e))}for(e=0;e<this.panels.length;e++)this.updateSelectorOnContextChanged(this.panels[e])},t.prototype.isPanelSupportContext=function(e){var t=this.getLogicTypeByPanel(e);return!!t&&t.supportContext(this.context)},t.prototype.updateSelectorOnContextChanged=function(e){var t=e.getQuestionByName("logicTypeName");t.choices=this.logicTypeChoices,t.allowClear=!1;var o=this.getLogicTypeByPanel(e);if(this.isElementSelectorVisible(o)){var r=e.getQuestionByName("elementSelector");r.choices=this.getSelectorChoices(o),r.allowClear=!1}},t.prototype.getLogicTypeChoices=function(){for(var e=[],t=this.editableItem.getVisibleLogicTypes(),o=0;o<t.length;o++){var r=t[o];if(!this.context||r.supportContext(this.context)){var n=new i.ItemValue(r.name,r.displayName);r.isUniqueItem&&(n.visibleIf="logicTypeVisibleIf({item})"),e.push(n)}}return e},t.prototype.onLogicTypeChanged=function(e){var t=this.getLogicTypeByPanel(e);e.getQuestionByName("logicTypeDescription").html=t?t.description:"";var o,r=this.getActionModelByPanel(e);if(r&&(o=r.getSelectedElement(),r.resetElements()),t){var n=Wt.createActionModel(e,r?r.initialLogicAction:null,t,this.selectorElementsHash);this.setActionModelByPanel(e,n),n.isTrigger?n.updatePanelElements(o,this.options):n.updatePanelElements(o,this.getSelectorChoices(n.logicType))}},t.prototype.getLogicTypeByName=function(e){if(!e)return null;for(var t=this.editableItem.getVisibleLogicTypes(),o=0;o<t.length;o++)if(t[o].name==e)return t[o];return null},t.prototype.isElementSelectorVisible=function(e){return!!e&&e.hasSelectorChoices},t.prototype.getLocString=function(e){return G.getString(e)},t.prototype.getElementText=function(e,t){var o="";return t&&(o=e.locTitle.renderedHtml),o||(o=e.name),e.isQuestion&&(o=this.options.getObjectDisplayName(e,"logic-tab:question-selector","condition",o)),o},t.prototype.getSelectorChoices=function(e){if(!e.hasSelectorChoices)return[];for(var t=e.getSelectorChoices(this.survey,this.context),o=[],r=this.options.showTitlesInExpressions,n=0;n<t.length;n++){var s="",l="",c=t[n],p=e.getParentElement(c);p&&(s=p.name+".",l=this.getElementText(p,r)+".");var u=this.getElementText(c,r),d=s+c.name,h=new i.ItemValue(d,l+u);this.selectorElementsHash[d]=c,c[e.propertyName]&&!this.isElementInInitialSelection(e.name,c)&&(h.enableIf="1=2",h.visibleIf="1=2"),o.push(h)}return"asc"===a.logic.questionSortOrder&&te.sortItems(o),o},t.prototype.isElementInInitialSelection=function(e,t){return!!this.initialSelectedElements[e]&&this.initialSelectedElements[e].indexOf(t)>-1},t}($e);o(11);var Kt=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this,t,o)||this;return r.survey=t,r.options=o,r.itemUIHash={},r.options||(r.options=new s),r.setupToolbarItems(),r.update(),r}return Y(t,e),t.prototype.update=function(t,o){var r=this;void 0===t&&(t=null),void 0===o&&(o=null),e.prototype.update.call(this,t,o);var n=this.options.createSurvey(this.getLogicItemSurveyJSON(),"logic-items",this,(function(e){e.css=Ht}));this.itemsSurveyValue=n,this.itemsSurvey.onMatrixRowRemoving.add((function(e,t){var o=r.visibleItems[t.rowIndex];t.allow=r.canRemoveItem(o)})),this.itemsSurvey.onMatrixRowRemoved.add((function(e,t){var o=r.visibleItems[t.rowIndex],n=o===r.editableItem;r.removeItem(o,!1),n&&(r.mode="view",r.updateNewActionState()),r.expressionEditorCanShowBuilder=!!r.editableItem})),this.itemsSurvey.onGetMatrixRowActions.add((function(e,t){!function(e,t,o){var r=Et(t,"show-detail");if(r){r.component="sv-action-bar-item",r.iconName="icon-logic-expand",r.innerCss="sl-table__action-button sl-table__detail-button",r.iconSize=48,r.showTitle=!1,r.action=function(){o.showHideDetailPanelClick()};var n=function(){r.iconName=o.isDetailPanelShowing?"icon-logic-collapse":"icon-logic-expand"};e.registerFunctionOnPropertyValueChanged("isRowShowing"+o.id,n),n()}}(t.question,t.actions,t.row),function(e,t,o){It(e,t,o);var r=Et(t,"remove-row");r&&(r.css="sl-table__action-button sl-table__remove-button")}(t.question,t.actions,t.row)})),this.updateItemsSurveyData(),this.onReadOnlyChanged()},t.prototype.dispose=function(){for(var t in e.prototype.dispose.call(this),this.itemUIHash){var o=this.itemUIHash[t];o.expressionEditor.dispose(),o.itemEditor.dispose()}this.itemUIHash={}},t.prototype.addNewUI=function(){0!=this.items.length&&this.items[this.items.length-1].isNew||this.addNew();var e=this.matrixItems.visibleRows;e[e.length-1].showDetailPanel()},t.prototype.toggleExpressionEditorIsFastEntry=function(){this.expressionEditorIsFastEntry=!this.expressionEditorIsFastEntry,this.expressionEditor&&this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry)},t.prototype.updateEditableItemIsModifiedState=function(){this.editableItem&&(this.editableItem.isModified=!!this.itemEditor&&!!this.expressionEditor&&(this.itemEditor.isModified||this.expressionEditor.isModified(this.editableItem.expression)))},t.prototype.getUnsavedItems=function(){for(var e=[],t=0;t<this.visibleItems.length;t++){var o=this.visibleItems[t],r=this.findLogicItemUI(o);r&&(o.isNew?r.expressionEditor.isEmpty()&&r.itemEditor.isEmpty()||e.push(o):o.isModified&&e.push(o))}return e},t.prototype.getErroredItem=function(e){for(var t=0;t<e.length;t++){var o=e[t];if(this.isErroredItem(o))return o}return null},t.prototype.isErroredItem=function(e){var t=this.findLogicItemUI(e);return!!t&&(t.expressionEditor.hasErrors()||t.itemEditor.hasErrors())},t.prototype.showErroredItem=function(e){var t=this.visibleItems.indexOf(e),o=this.matrixItems.visibleRows,r=t>-1&&t<o.length?o[t]:null;r&&(o.forEach((function(e){return e.hideDetailPanel()})),this.mode="view",r.showDetailPanel(),this.hasErrorInUI())},t.prototype.saveItem=function(e){this.isErroredItem(e)||(this.options&&this.options.startUndoRedoTransaction(),this.doItemApply(e),this.options&&this.options.stopUndoRedoTransaction())},t.prototype.tryLeaveUI=function(e){var t=this;this.updateEditableItemIsModifiedState();var o=this.getUnsavedItems();if(0===o.length)return e&&e(!0),!0;var r=this.getErroredItem(o),n=function(){o.forEach((function(e){return t.saveItem(e)})),e&&e(!0)};if(!r)return n(),!0;var i=function(){t.showErroredItem(r),e&&e(!1)};return this.confirmLeavingOnError(n,i)?void 0:(i(),!1)},t.prototype.confirmLeavingOnError=function(e,t){if(!i.settings.showDialog)return!1;var o=new i.LocalizableString(void 0);o.text=this.getLocString("ed.lg.uncompletedRule_text");var r=i.settings.showDialog({componentName:"sv-string-viewer",data:{locStr:o,locString:o,model:o},onApply:function(){return e(),!0},onCancel:function(){return t(),!0},title:this.getLocString("ed.lg.uncompletedRule_title"),displayMode:"popup"},this.options.rootElement),n=r.footerToolbar,a=n.getActionById("apply");return n.getActionById("cancel").title=this.getLocString("ed.lg.uncompletedRule_cancel"),a.title=this.getLocString("ed.lg.uncompletedRule_apply"),a.innerCss+=" svc-logic-tab__leave-apply-button",r.width="800px",!0},t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),"items"===t&&this.updateItemsSurveyData()},t.prototype.onReadOnlyChanged=function(){var e=this;this.itemsSurvey&&(this.itemsSurvey.mode=this.readOnly?"display":"edit",Object.keys(this.itemUIHash||{}).forEach((function(t){e.updateEditModeLogicItem(e.itemUIHash[t])})))},Object.defineProperty(t.prototype,"expressionEditor",{get:function(){return this.expressionEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditor",{get:function(){return this.itemEditorValue},enumerable:!1,configurable:!0}),t.prototype.getExpressionEditor=function(e){return this.getLogicItemUI(e).expressionEditor},t.prototype.getLogicItemEditor=function(e){return this.getLogicItemUI(e).itemEditor},t.prototype.updateEditModeLogicItem=function(e){e&&(e.expressionEditor.editSurvey.mode=this.readOnly?"display":"edit",e.itemEditor.editSurvey.mode=this.readOnly?"display":"edit")},t.prototype.getLogicItemUI=function(e){var t=this.findLogicItemUI(e);if(!t){var o=e.getContext();t={expressionEditor:this.createExpressionPropertyEditor(),itemEditor:new Zt(e,this.options)},this.updateEditModeLogicItem(t),t.expressionEditor.context=o,t.itemEditor.context=o,t.expressionEditor.text=e.expression,t.expressionEditor.onContextChanged=function(e){t.itemEditor.context=e},this.itemUIHash[e.id]=t}return t},t.prototype.findLogicItemUI=function(e){return this.itemUIHash[e.id]},Object.defineProperty(t.prototype,"expressionSurvey",{get:function(){return this.expressionEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditorSurvey",{get:function(){return this.itemEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemsSurvey",{get:function(){return this.itemsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.items.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrixItems",{get:function(){return this.itemsSurvey.getQuestionByName("items")},enumerable:!1,configurable:!0}),t.prototype.onStartEditing=function(){e.prototype.onStartEditing.call(this),this.expressionEditorValue=this.getExpressionEditor(this.editableItem),this.itemEditorValue=this.getLogicItemEditor(this.editableItem),this.expressionEditorIsFastEntry=!1,this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry),this.expressionEditorCanShowBuilder=Ut.canBuildExpression(this.expressionEditor.text)},t.prototype.onEndEditing=function(){this.updateEditableItemIsModifiedState(),e.prototype.onEndEditing.call(this),this.expressionEditorValue=null,this.itemEditorValue=null},t.prototype.onEditableItemApply=function(){this.doItemApply(this.editableItem),this.editableItem.isSuitable(this.questionFilter,this.actionTypeFilter)?this.updateItemsSurveyData():(this.questionFilter="",this.actionTypeFilter="")},t.prototype.doItemApply=function(e){var t=this.findLogicItemUI(e);t&&(t.expressionEditor.apply(),t.itemEditor.apply(),e.apply(t.expressionEditor.text),e.actions.length!=t.itemEditor.panels.length&&t.itemEditor.setEditableItem(e),t.itemEditor.resetModified(),e.isNew=!1)},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return this.expressionEditor.hasErrorInUI()?(this.errorText=this.expressionEditor.errorText,!0):!!this.itemEditor.hasErrors()&&(this.errorText=Ae("actionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.getExpressionText=function(){return this.expressionEditor.text},t.prototype.getEditingActions=function(){return this.itemEditor.getEditingActions()},t.prototype.getLogicItemSurveyJSON=function(){var e=this.survey.creator,t=e&&e.useTableViewInLogicTab?this.getTwoColumnsLayout():this.getOneColumnLayout();return Xe(t),t},t.prototype.getTwoColumnsLayout=function(){return{elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,columns:[{cellType:"linkvalue",name:"conditions",title:this.getLocString("ed.lg.conditions")},{cellType:"linkvalue",name:"actions",title:this.getLocString("ed.lg.actions")}]}]}},t.prototype.getOneColumnLayout=function(){return{elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",showColumnHeader:!1,detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,showHeader:!1,columns:[{cellType:"linkvalue",name:"rules",showTooltip:!0,width:"100%"}]}]}},t.prototype.createExpressionPropertyEditor=function(){var e=this,t=new Ut(this.survey,null,this.options);return t.isModal=!1,t.editSurvey.onValueChanged.add((function(t,o){"textEditor"===o.name&&(e.expressionEditorCanShowBuilder=Ut.canBuildExpression(o.value))})),t},t.prototype.getVisibleItems=function(){var e=this;return this.items.filter((function(t){return t.isNew||t.isSuitable(e.questionFilter,e.actionTypeFilter)}))},t.prototype.getDataFromItem=function(e){var t=this.survey.creator;return t&&t.useTableViewInLogicTab?{conditions:e.expressionText,actions:e.actionsText}:{rules:this.getLogicItemDisplayText(e)}},t.prototype.getLogicItemDisplayText=function(e){var t=e.getDisplayText();return this.options?this.options.onLogicGetTitleCallback(e.expression,e.expressionText,t,e):t},t.prototype.updateItemsSurveyData=function(){var e=this;if(this.itemsSurvey){var t=[];this.visibleItems=this.getVisibleItems(),this.visibleItems.forEach((function(o){t.push(e.getDataFromItem(o))})),this.matrixItems.onHasDetailPanelCallback=function(e){return!0},this.matrixItems.onCreateDetailPanelCallback=function(t,o){t.onDetailPanelShowingChanged=function(){if(e.expressionEditorCanShowBuilder=t.isDetailPanelShowing,t.isDetailPanelShowing){if("view"===e.mode){var r=e.visibleItems[t.rowIndex-1];e.editItem(r)}var n=o.getQuestionByName("conditions"),i=o.getQuestionByName("actions");n.embeddedSurvey=e.expressionEditor.editSurvey,i.embeddedSurvey=e.itemEditorValue.editSurvey,e.updateRowIsAdditionalClasses(t.rowIndex-1,!1)}else e.mode="view",e.updateRenderedRows();e.updateNewActionState()},o.addNewQuestion("embeddedsurvey","conditions"),o.addNewQuestion("embeddedsurvey","actions"),o.footerActions.push({id:"saveDetailPanel",innerCss:"sl-panel__done-button",title:e.getLocString("pe.doneEditing"),action:function(){e.saveEditableItem()&&t.hideDetailPanel(!0)}})},this.matrixItems.onCellCreatedCallback=function(e){e.cell.question.linkClickCallback=function(){e.row.isDetailPanelShowing?e.row.hideDetailPanel():e.row.showDetailPanel()},e.cell.question.showClear=!1,e.cell.question.allowClear=!1},this.matrixItems.value=t,this.updateRenderedRows()}},t.prototype.updateRenderedRows=function(){var e=this;this.visibleItems.forEach((function(t,o){e.updateRowIsAdditionalClasses(o,e.visibleItems[o].isModified||e.visibleItems[o].isNew)}))},t.prototype.updateRowIsAdditionalClasses=function(e,t){this.matrixItems.renderedTable&&(this.matrixItems.renderedTable.rows.filter((function(e){return e.visible}))[e].isAdditionalClasses=t)},t.prototype.updateNewActionState=function(){this.addNewButton.enabled="new"!==this.mode},t.prototype.setupToolbarItems=function(){var e=this;this.addNewButton=new i.Action({id:"svd-logic-addNew",title:this.addNewText,tooltip:this.addNewText,component:"sv-action-bar-item",enabled:!0,action:function(){e.addNewUI()}})},Object.defineProperty(t.prototype,"addNewText",{get:function(){return Ae("addNewItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyTabPlaceholder",{get:function(){return Ae("empty_tab")},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"itemsSurveyValue",void 0),Z([Object(i.property)()],t.prototype,"expressionEditorIsFastEntry",void 0),Z([Object(i.property)()],t.prototype,"expressionEditorCanShowBuilder",void 0),Z([Object(i.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"questionFilter",void 0),Z([Object(i.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"actionTypeFilter",void 0),t}(Be),Yt=function(){function e(e){this.creator=e,e.addPluginTab("logic",this),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.activate=function(){var e=this;this.model=new Kt(this.creator.survey,this.creator),this.filterQuestionAction.title=this.createFilterQuestionTitleUpdater(),this.filterQuestionAction.visible=!0,this.filterActionTypeAction.title=this.createFilterTypeTitleUpdater(),this.filterActionTypeAction.visible=!0,this.fastEntryAction&&(this.fastEntryAction.visible=!0,this.fastEntryAction.active=this.model.expressionEditorIsFastEntry,this.fastEntryAction.enabled=!1),this.model.onPropertyChanged.add((function(t,o){e.fastEntryAction&&"expressionEditorIsFastEntry"===o.name&&(e.fastEntryAction.active=e.model.expressionEditorIsFastEntry),e.fastEntryAction&&"expressionEditorCanShowBuilder"===o.name&&(e.fastEntryAction.enabled=e.model.expressionEditorCanShowBuilder)}))},e.prototype.createFilterTypeTitleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){var t=e.creator.locale;t||(t="en");var o=e.model.actionTypeFilter,r=e.showAllActionTypesText;return o?e.model.getTypeByName(o).displayName:r}))},e.prototype.createFilterQuestionTitleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){var t=e.creator.locale;t||(t="en");var o=e.model.questionFilter,r=e.showAllQuestionsText;return o||r}))},e.prototype.update=function(){this.model&&this.model.update(this.creator.survey)},e.prototype.canDeactivateAsync=function(e){var t=this;this.model?this.model.tryLeaveUI((function(o){o?e():t.creator.notify(G.getString("ed.lg.expressionInvalid"),"error")})):e()},e.prototype.deactivate=function(){return this.disposeObjs(),!0},e.prototype.dispose=function(){this.disposeObjs()},e.prototype.disposeObjs=function(){this.filterActionTypeAction.title=void 0,this.filterQuestionAction.title=void 0,this.model&&(this.model.dispose(),this.model=void 0),this.filterQuestionAction.visible=!1,this.filterActionTypeAction.visible=!1,this.fastEntryAction&&(this.fastEntryAction.visible=!1)},e.prototype.createActions=function(){var e=this,t=[],o=new i.ListModel([{id:null,title:this.showAllQuestionsText}],(function(t){e.model.questionFilter=t.id?t.id:"",r.toggleVisibility()}),!0);o.locOwner=this.creator;var r=new i.PopupModel("sv-list",{model:o},"bottom","center");r.onShow=function(){var t=e.model.getUsedQuestions().map((function(t){return{id:t.name,title:e.creator.getObjectDisplayName(t,"logic-tab:question-filter","condition",t.name)}}));te.sortItems(t,"title"),r.contentComponentData.model.setItems([{id:null,title:e.showAllQuestionsText}].concat(t))},this.filterQuestionAction=new i.Action({id:"svc-logic-filter-question",visible:!1,component:"sv-action-bar-item-dropdown",popupModel:r,action:function(){r.toggleVisibility()}}),t.push(this.filterQuestionAction);var n=new i.ListModel([{id:null,title:this.showAllActionTypesText}],(function(t){e.model.actionTypeFilter=t.id?t.id:"",a.toggleVisibility()}),!0);n.locOwner=this.creator;var a=new i.PopupModel("sv-list",{model:n},"bottom","center");return a.onShow=function(){var t=e.model.getUsedActionTypes().map((function(e){return{id:e.name,title:e.displayName}}));te.sortItems(t,"title"),a.contentComponentData.model.setItems([{id:null,title:e.showAllActionTypesText}].concat(t))},this.filterActionTypeAction=new i.Action({id:"svc-logic-filter-actiontype",visible:!1,component:"sv-action-bar-item-dropdown",popupModel:a,action:function(){a.toggleVisibility()}}),t.push(this.filterActionTypeAction),this.creator.allowEditExpressionsInTextEditor&&(this.fastEntryAction=new i.Action({id:"svc-logic-fast-entry",iconName:"icon-fast-entry",locTitleName:"pe.fastEntry",visible:!1,component:"sv-action-bar-item",action:function(){e.model.toggleExpressionEditorIsFastEntry()}}),t.push(this.fastEntryAction)),t},Object.defineProperty(e.prototype,"showAllQuestionsText",{get:function(){return Ae("showAllQuestions")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllActionTypesText",{get:function(){return Ae("showAllActionTypes")},enumerable:!1,configurable:!0}),e}(),Xt=function(){function e(){this._ignoreChanges=!1,this._isExecuting=!1,this._preparingTransaction=null,this._transactions=[],this._currentTransactionIndex=-1,this.transactionCounter=0}return e.prototype.onPropertyValueChanged=function(e,t,o,r,n){if(!Fe.isCopyObject(r)&&!this.isIgnoring&&!0!==r.ignoreUndoRedo){var i=this._preparingTransaction,a=n?new to(e,r,n):new eo(e,t,o,r);if(!i)return(i=new $t(e)).addAction(a),void this._addTransaction(i);i.addAction(a)}},e.prototype.isCorrectProperty=function(e,t){var o=i.Serializer.getOriginalProperty(e,t);return!!o&&o.isSerializable},e.prototype.tryMergeTransaction=function(e,t,o){if("name"===t)return!1;var r=this._getCurrentTransaction();return!(!r||0==r.actions.length)&&r.actions[r.actions.length-1].tryMerge(e,t,o)},e.prototype.isCopyObject=function(e){},e.prototype._cutOffTail=function(){this._currentTransactionIndex+1!==this._transactions.length&&(this._transactions.length=this._currentTransactionIndex+1)},Object.defineProperty(e.prototype,"isIgnoring",{get:function(){return this._ignoreChanges||this._isExecuting},enumerable:!1,configurable:!0}),e.prototype._addTransaction=function(e){e.isEmpty()||(this._cutOffTail(),this._transactions[this._currentTransactionIndex]!==e&&(this._transactions.push(e),this._currentTransactionIndex++),this.canUndoRedoCallback())},e.prototype._getCurrentTransaction=function(){var e=this._currentTransactionIndex;return this._transactions[e]},e.prototype._getNextTransaction=function(){var e=this._currentTransactionIndex;return this._transactions[e+1]},e.prototype.notifyChangesFinished=function(e,t){void 0===t&&(t=!1),e.actions.length>0&&this.changesFinishedCallback&&this.changesFinishedCallback(e.actions,t)},e.prototype.canUndoRedoCallback=function(){},e.prototype.startTransaction=function(e){this.isIgnoring||(this.transactionCounter++,this._preparingTransaction||(this._preparingTransaction=new $t(e)))},e.prototype.stopTransaction=function(){this.isIgnoring||(this.transactionCounter>0&&this.transactionCounter--,!this._preparingTransaction||this.transactionCounter>0||(this._addTransaction(this._preparingTransaction),0===this.transactionCounter&&this.notifyChangesFinished(this._preparingTransaction),this._preparingTransaction=null))},e.prototype.setUndoCallbackForTransaction=function(e){this._preparingTransaction&&(this._preparingTransaction.undoCallback=e)},Object.defineProperty(e.prototype,"isProcessingUndoRedo",{get:function(){return!0===this._isExecuting},enumerable:!1,configurable:!0}),e.prototype.canUndo=function(){return!!this._getCurrentTransaction()},e.prototype.undo=function(){var e=this._getCurrentTransaction();this.canUndo()&&(this._isExecuting=!0,e.rollback(),this._isExecuting=!1,this._currentTransactionIndex--,this.canUndoRedoCallback(),this.notifyChangesFinished(e,!0))},e.prototype.canRedo=function(){return!!this._getNextTransaction()},e.prototype.redo=function(){var e=this._getNextTransaction();this.canRedo()&&(this._isExecuting=!0,e.apply(),this._isExecuting=!1,this._currentTransactionIndex++,this.canUndoRedoCallback(),this.notifyChangesFinished(e))},e.prototype.suspend=function(){this._ignoreChanges=!0},e.prototype.resume=function(){this._ignoreChanges=!1},e}(),$t=function(){function e(e){this._name=e,this._actions=[],this.undoCallback=function(){}}return e.prototype.apply=function(){for(var e=this._actions,t=0;t<e.length;t++){e[t].apply()}},e.prototype.rollback=function(){for(var e=this._actions,t=e.length-1;t>=0;t--){e[t].rollback()}this.undoCallback()},e.prototype.addAction=function(e){this._actions.push(e)},e.prototype.isEmpty=function(){return 0===this._actions.length},Object.defineProperty(e.prototype,"actions",{get:function(){return this._actions},enumerable:!1,configurable:!0}),e}(),eo=function(){function e(e,t,o,r){this._propertyName=e,this._oldValue=t,this._newValue=o,this._sender=r,this.tickCount=(new Date).getTime()}return e.prototype.apply=function(){this._sender[this._propertyName]=this._newValue},e.prototype.rollback=function(){this._sender[this._propertyName]=this._oldValue},e.prototype.getChanges=function(e){return void 0===e&&(e=!1),{object:this._sender,propertyName:this._propertyName,oldValue:e?this._newValue:this._oldValue,newValue:e?this._oldValue:this._newValue}},e.prototype.getDeletedElement=function(e){},e.prototype.getInsertedElement=function(e){},e.prototype.getIndex=function(){return-1},e.prototype.tryMerge=function(t,o,r){if(t!==this._sender||o!==this._propertyName||r==this._oldValue)return!1;var n=i.Serializer.getOriginalProperty(t,o);return!(!n||"string"!==n.type&&"text"!==n.type)&&(!((new Date).getTime()-this.tickCount>e.maximumMergeTime)&&(this._newValue=r,!0))},e.maximumMergeTime=1e3,e}(),to=function(){function e(e,t,o){this._propertyName=e,this._sender=t,this._index=0,this._itemsToAdd=[],this._deletedItems=[],this.survey=t.getSurvey(),this._index=o.index,this._itemsToAdd=o.itemsToAdd,this._deletedItems=o.deletedItems}return e.prototype.apply=function(){this.rollback()},e.prototype.rollback=function(){if(this._sender=this.getSenderElement(),this._sender){var e=this._sender[this._propertyName],t=this._index,o=this._itemsToAdd.length,r=this.getItemsToAdd();this._deletedItems=e.splice.apply(e,[t,o].concat(r)),this._itemsToAdd=[].concat(r)}},e.prototype.getChanges=function(){return{object:this._sender,propertyName:this._propertyName,oldValue:this._deletedItems,newValue:this._itemsToAdd}},e.prototype.getDeletedElement=function(e){return this.getMovedElement(this._deletedItems,this._itemsToAdd,e)},e.prototype.getInsertedElement=function(e){return this.getMovedElement(this._itemsToAdd,this._deletedItems,e)},e.prototype.getIndex=function(){return this._index},e.prototype.getMovedElement=function(e,t,o){var r=o?t:e;if(Array.isArray(r)&&1===r.length)return r[0]},e.prototype.tryMerge=function(e,t,o){return!1},e.prototype.getSenderElement=function(){if(!this._sender.isDisposed||!this.survey)return this._sender;var e=this._sender.name;return!0===this._sender.isPage?this.survey.getPageByName(e):!0===this._sender.isPanel?this.survey.getPanelByName(e):!0===this._sender.isQuestion?this.survey.getQuestionByName(e):this._sender},e.prototype.getItemsToAdd=function(){for(var e=[],t=0;t<this._deletedItems.length;t++){var o=this._deletedItems[t];if(o.isDisposed&&o.getType){var r=o.toJSON();(o=i.Serializer.createClass(o.getType())).fromJSON(r)}e.push(o)}return e},e}(),oo=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.undoRedoManager=void 0,o.onBeforeUndo=new i.EventBase,o.onBeforeRedo=new i.EventBase,o.updateSurvey(),o}return Y(t,e),t.prototype.onSurveyPropertyValueChangedCallback=function(e,t,o,r,n){this.undoRedoManager&&this.undoRedoManager.isCorrectProperty(r,e)&&(this.undoRedoManager.tryMergeTransaction(r,e,o)?this.creator.notifySurveyPropertyChanged({name:e,target:r,oldValue:t,newValue:o}):(this.undoRedoManager.startTransaction(e+" changed"),this.undoRedoManager.onPropertyValueChanged(e,t,o,r,n),this.creator.updateElementsOnLocaleChanged(r,e),this.creator.updateConditionsOnNameChanged(r,e,t),this.undoRedoManager.stopTransaction()))},t.prototype.updateSurvey=function(){var e=this,t=this.creator.survey;t&&(t.onPropertyValueChangedCallback=function(t,o,r,n,i){e.onSurveyPropertyValueChangedCallback(t,o,r,n,i)}),this.undoRedoManager=new Xt,this.undoRedoManager.changesFinishedCallback=function(t,o){if(!e.notifySurveyMoveItem(t,o))for(var r=t.length-1;r>=0;r--){var n=t[r];if(n){var i=n.getChanges(o);e.creator.notifySurveyPropertyChanged({name:i.propertyName,target:i.object,oldValue:i.oldValue,newValue:i.newValue})}}},this.undoRedoManager.canUndoRedoCallback=function(){e.updateUndeRedoActions()}},t.prototype.notifySurveyMoveItem=function(e,t){e.length;var o=e[0],r=e[1];if(!o||!r)return!1;var n=o.getChanges(t),i=r.getChanges(t);if(n.object!==i.object||n.propertyName!==i.propertyName)return!1;var a=o.getDeletedElement(t),s=o.getInsertedElement(t),l=r.getDeletedElement(t),c=r.getInsertedElement(t);if(a===s||a!==c&&s!==l)return!1;var p=a?o.getIndex():r.getIndex(),u=s?o.getIndex():r.getIndex();return this.creator.notifySurveyItemMoved({arrayName:n.propertyName,parent:n.object,element:a||s,indexFrom:t?u:p,indexTo:t?p:u}),!0},t.prototype.selectElementAfterUndo=function(){this.selectElementAfterUndoCore(this.creator.selectedElement)},t.prototype.selectElementAfterUndoCore=function(e){!e||e.isDisposed||!e.getSurvey()||this.creator.isObjQuestion(e)&&!e.parent?this.creator.selectElement(this.creator.survey):this.creator.selectElement(e)},t.prototype.undo=function(){if(this.undoRedoManager){this.undoRedoManager.suspend();var e={canUndo:this.undoRedoManager.canUndo()};this.onBeforeUndo.fire(this.creator,e),this.creator.onBeforeUndo.fire(this.creator,e),e.canUndo&&(this.undoRedoManager.undo(),this.selectElementAfterUndo()),this.undoRedoManager.resume()}},t.prototype.redo=function(){if(this.undoRedoManager){var e={canRedo:this.undoRedoManager.canRedo()};if(this.onBeforeRedo.fire(this.creator,e),this.creator.onBeforeRedo.fire(this.creator,e),e.canRedo){this.undoRedoManager.redo();this.selectElementAfterUndo()}}},t.prototype.startTransaction=function(e){void 0===e&&(e=""),this.undoRedoManager&&this.undoRedoManager.startTransaction(e)},t.prototype.stopTransaction=function(){this.undoRedoManager&&this.undoRedoManager.stopTransaction()},t.prototype.createActions=function(){var e=this,t=[];return this.undoAction=new i.Action({id:"action-undo",iconName:"icon-undo",locTitleName:"ed.undo",showTitle:!1,visible:new i.ComputedUpdater((function(){return"designer"===e.creator.activeTab})),needSeparator:new i.ComputedUpdater((function(){return e.creator.isMobileView})),action:function(){return e.undo()}}),this.redoAction=new i.Action({id:"action-redo",iconName:"icon-redo",locTitleName:"ed.redo",showTitle:!1,visible:new i.ComputedUpdater((function(){return"designer"===e.creator.activeTab})),action:function(){return e.redo()}}),t.push(this.undoAction),t.push(this.redoAction),this.updateUndeRedoActions(),t},t.prototype.updateUndeRedoActions=function(){this.undoAction.enabled=this.undoRedoManager.canUndo(),this.redoAction.enabled=this.undoRedoManager.canRedo()},Z([Object(i.property)()],t.prototype,"undoRedoManager",void 0),t}(i.Base),ro=function(){function e(e){var t=this;this.creator=e,this.model=void 0,this.model=new oo(e),this.model.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),e.registerShortcut("undo",{affectedTab:"designer",hotKey:{ctrlKey:!0,keyCode:90},macOsHotkey:{keyCode:90},execute:function(){return t.model.undo()}}),e.registerShortcut("redo",{affectedTab:"designer",hotKey:{ctrlKey:!0,keyCode:89},macOsHotkey:{keyCode:89},execute:function(){return t.model.redo()}})}return e.prototype.activate=function(){},e.prototype.deactivate=function(){return!0},e.prototype.update=function(){},e.prototype.addFooterActions=function(){this.model.undoAction&&this.creator.footerToolbar.actions.splice(2,0,this.model.undoAction),this.model.redoAction&&this.creator.footerToolbar.actions.splice(3,0,this.model.redoAction)},e}();function no(e,t){return void 0===t&&(t="undoRedoManager"),function(o,r,n){var i=n.value;return n.value=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=this[t];try{a&&a.startTransaction(e||r);var s=i.apply(this,o);return s}finally{a&&a.stopTransaction()}},n}}function io(e){return void 0===e&&(e="undoRedoManager"),function(t,o,r){var n=r.value;return r.value=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var r=this[e];try{r&&r.suspend();var i=n.apply(this,t);return i}finally{r&&r.resume()}},r}}var ao=function(e){function t(t,o,r,n){var i=e.call(this,{id:"sv_item_selector_"+t.toString(),title:r})||this;return i.data=o,i.level=n,i}return Y(t,e),t.prototype.hasText=function(e){return!e||(this.textInLow||(this.textInLow=this.title.toLocaleLowerCase()),this.textInLow.indexOf(e)>-1)},t}(i.Action),so=function(){function e(e,t,o){void 0===o&&(o=void 0),this.creator=e,this.getObjectDisplayName=o,this.surveyValue=t,this.rebuild()}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.itemsValue},enumerable:!1,configurable:!0}),e.prototype.getItemByObj=function(e){for(var t=this.items,o=0;o<t.length;o++)if(t[o].data===e)return t[o];return null},e.prototype.filterByText=function(e){this.filteredTextInLow=e?e.toLocaleLowerCase():"",this.updateItemsVisibility()},e.prototype.rebuild=function(){var e=[];this.deepestLevel=0;var t=this.createItem(this.survey,null);e.push(t);for(var o=0;o<this.survey.pages.length;o++){var r=this.survey.pages[o],n=t;if(!this.creator||"single"!==this.creator.pageEditMode){var i=this.createItem(r,t);e.push(i),n=i}this.buildElements(e,this.getElements(r),n)}this.itemsValue=e},e.prototype.updateItemsVisibility=function(){for(var e=this.deepestLevel;e>=0;e--)this.updateItemsLevelVisibility(e)},e.prototype.updateItemsLevelVisibility=function(e){for(var t=0;t<this.items.length;t++){var o=this.items[t];o.level===e&&(o.visible=this.hasVisibleChildren(t)||o.hasText(this.filteredTextInLow))}},e.prototype.hasVisibleChildren=function(e){for(var t=this.items[e].level,o=e+1;o<this.items.length;o++){if(this.items[o].level<=t)return!1;if(this.items[o].visible)return!0}return!1},e.prototype.getElements=function(e){return te.getElements(e)},e.prototype.buildElements=function(e,t,o){for(var r=0;r<t.length;r++){var n=t[r],i=this.createItem(n,o);e.push(i),this.buildElements(e,this.getElements(n),i)}},e.prototype.createItem=function(t,o){var r=new ao(e.uniqueId++,t,this.getText(t),null!=o?o.level+1:0);return r.level>this.deepestLevel&&(this.deepestLevel=r.level),r},e.prototype.getText=function(e){return this.getObjectDisplayName?this.getObjectDisplayName(e,"property-grid-header:element-list","property-grid",void 0):te.getObjectName(e,!1)},e.uniqueId=0,e}(),lo=function(e){function t(t,o){void 0===o&&(o=void 0);var r=e.call(this)||this;return r.creator=t,r.getObjectDisplayName=o,r}return Y(t,e),Object.defineProperty(t.prototype,"list",{get:function(){return this.listModelValue},enumerable:!1,configurable:!0}),t.prototype.show=function(e,t,o){var r=this;this.selector=new so(this.creator,e,this.getObjectDisplayName);var n=this.selector.getItemByObj(t);this.listModelValue?(this.listModelValue.setItems(this.selector.items),this.listModelValue.selectedItem=n):(this.listModelValue=new i.ListModel(this.selector.items,(function(e){o(e.data)}),!0,n),this.listModelValue.setOnFilterStringChangedCallback((function(e){r.selector.filterByText(e)}))),this.isVisible=!0},t.prototype.refresh=function(){this.listModelValue.refresh()},Z([Object(i.property)()],t.prototype,"isVisible",void 0),t}(i.Base),co=function(e){function t(){var t=e.call(this)||this;return t.highlightedEditorClass=" spg-editor--highlighted",t.searchActionBar=new i.ActionContainer,t.filterStringPlaceholder=z("ed.propertyGridFilteredTextPlaceholder"),t.propertyGridNoResultsFound=z("ed.propertyGridNoResultsFound"),t.allMatches=[],t.initActionBar(),t}return Y(t,e),t.prototype.expandAllParents=function(e){e&&(e.isCollapsed&&e.expand(),this.expandAllParents(e.parent),this.expandAllParents(e.parentQuestion))},t.prototype.switchHighlightedEditor=function(e){var t=this;this.currentMatchIndex=e;var o=this.currentMatch;this.currentMatch=this.allMatches[e],null==o||o.updateElementCss(),this.currentMatch&&o!==this.currentMatch&&(this.currentMatch.updateElementCss(),this.expandAllParents(this.currentMatch),setTimeout((function(){A(t.currentMatch.id)}),10)),this.updatedMatchCounterText(e)},t.prototype.updatedMatchCounterText=function(e){var t=this.allMatches.length;if(1===t)this.matchCounterText="";else if(this.currentMatch){var o=e+1;this.matchCounterText=[o,t].join("/")}else this.matchCounterText=this.filterString?this.propertyGridNoResultsFound:""},t.prototype.navigateToEditor=function(e){e<0&&(e=this.allMatches.length-1),e>=this.allMatches.length&&(e=0),this.switchHighlightedEditor(e)},t.prototype.getAllMatches=function(e){var t=i.settings.comparator.normalizeTextCallback,o=t(e,"search");return o=o.toLocaleLowerCase().trim(),this.survey.getAllQuestions().filter((function(e){return e.isVisible})).filter((function(e){var r=e.name+"|"+e.title+"|"+e.description;return r&&(r=(r=t(r,"search")).toLocaleLowerCase().trim()),-1!==r.indexOf(o)}))},t.prototype.setFiterString=function(e){if(e)if(this.allMatches=this.getAllMatches(e),0!==this.allMatches.length){var t=this.allMatches.indexOf(this.currentMatch);this.switchHighlightedEditor(-1===t?0:t)}else this.reset();else this.reset()},t.prototype.reset=function(){this.allMatches=[],this.currentMatchIndex=-1;var e=this.currentMatch;this.currentMatch=void 0,null==e||e.updateElementCss(),this.updatedMatchCounterText(-1)},t.prototype.initActionBar=function(){var e=this,t=[];t.push(new i.Action({id:"svd-grid-search-prev",iconName:"icon-previous_16x16",component:"sv-action-bar-item",title:z("ed.prevFocus"),showTitle:!1,iconSize:16,innerCss:"spg-search-editor_bar-item",visible:new i.ComputedUpdater((function(){return e.allMatches.length>1})),action:function(){e.allMatches.length>0&&e.navigateToEditor(e.currentMatchIndex-1)}})),t.push(new i.Action({id:"svd-grid-search-next",iconName:"icon-next_16x16",component:"sv-action-bar-item",title:z("ed.nextFocus"),showTitle:!1,iconSize:16,innerCss:"spg-search-editor_bar-item",visible:new i.ComputedUpdater((function(){return e.allMatches.length>1})),action:function(){e.allMatches.length>0&&e.navigateToEditor(e.currentMatchIndex+1)}})),t.push(new i.Action({id:"svd-grid-search-close",iconName:"icon-clear_16x16",component:"sv-action-bar-item",title:z("ed.close"),showTitle:!1,iconSize:16,innerCss:"spg-search-editor_bar-item",visible:new i.ComputedUpdater((function(){return!!e.filterString})),action:function(){e.clearFilterString()}})),this.searchActionBar.setItems(t)},t.prototype.setSurvey=function(e){if(this.clearFilterString(),this.survey=e,this.survey){var t=this;this.survey.onUpdateQuestionCssClasses.add((function(e,o){var r=o.cssClasses;o.question===t.currentMatch&&(r.mainRoot+=t.highlightedEditorClass)}))}},t.prototype.clearFilterString=function(){this.filterString=""},t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),"filterString"===t&&this.setFiterString(r)},t.prototype.dispose=function(){this.searchActionBar.dispose(),e.prototype.dispose.call(this)},Z([Object(i.property)()],t.prototype,"survey",void 0),Z([Object(i.property)()],t.prototype,"isVisible",void 0),Z([Object(i.property)()],t.prototype,"filterString",void 0),Z([Object(i.property)()],t.prototype,"matchCounterText",void 0),Z([Object(i.property)()],t.prototype,"allMatches",void 0),t}(i.Base),po=function(e){function t(t,o){var r=e.call(this)||this;return r.propertyGridModel=t,r.creator=o,r.searchManager=new co,r.searchEnabled=a.propertyGrid.enableSearch,r.selectedElementName=r.getTitle(),r.propertyGridModel.objValueChangedCallback=function(){r.onSurveyChanged()},r.propertyGridModel.changedFromActionCallback=function(e,t){r.selectionController&&r.selectionController.selectFromAction(e,t)},r.initActions(),r.creator.onPropertyChanged.add((function(e,t){"sidebarLocation"===t.name&&(r.selectorPopupModel.horizontalPosition="right"==r.creator.sidebarLocation?"left":"right")})),r.onSurveyChanged(),r}return Y(t,e),t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),this.nextSelectionAction&&"hasNext"===t&&(this.nextSelectionAction.enabled=this.hasNext),this.prevSelectionAction&&"hasPrev"===t&&(this.prevSelectionAction.enabled=this.hasPrev)},Object.defineProperty(t.prototype,"selectionController",{get:function(){return this.creator.selectionHistoryController},enumerable:!1,configurable:!0}),t.prototype.onSurveyChanged=function(){var e=this;this.survey=this.propertyGridModel.survey,this.searchManager.setSurvey(this.survey),this.survey&&this.survey.onValueChanged.add((function(t,o){"name"!=o.name&&"title"!=o.name||e.updateTitle()})),this.updateTitle(),this.selectionController&&(this.hasPrev=this.selectionController.hasPrev,this.hasNext=this.selectionController.hasNext)},t.prototype.updateTitle=function(){var e=this.getTitle();this.selectedElementName=e,this.objectSelectionAction.title=this.selectedElementName},t.prototype.getTitle=function(){var e=this.getSelectedObj();if(!e)return"";var t=te.getObjectName(e,this.propertyGridModel.options.showObjectTitles);return this.propertyGridModel.options.getObjectDisplayName(e,"property-grid-header:selected-element","property-grid-title",t)},t.prototype.getSelectedObj=function(){return this.propertyGridModel.obj},t.prototype.initActions=function(){var e=this;a.propertyGrid.showNavigationButtons&&(this.prevSelectionAction=new i.Action({id:"svd-grid-history-prev",iconName:"icon-arrow-left",component:"sv-action-bar-item",title:z("ed.prevSelected"),showTitle:!1,enabled:this.hasPrev,action:function(){e.selectionController.prev()}}),this.nextSelectionAction=new i.Action({id:"svd-grid-history-next",iconName:"icon-arrow-right",component:"sv-action-bar-item",title:z("ed.nextSelected"),showTitle:!1,enabled:this.hasNext,action:function(){e.selectionController.next()}}));var t=new lo(this.creator,(function(t,o,r,n){return e.propertyGridModel.options.getObjectDisplayName(t,o,r,n)}));this.selectorPopupModel=new i.PopupModel("svc-object-selector",{model:t},"bottom","center"),this.selectorPopupModel.cssClass+=" svc-object-selector",this.selectorPopupModel.displayMode=this.creator.isTouch?"overlay":"popup",this.objectSelectionAction=new i.Action({id:"svd-grid-object-selector",title:this.selectedElementName,css:"sv-action--object-selector sv-action-bar-item--secondary",component:"sv-action-bar-item-dropdown",disableHide:!0,action:function(){t.show(e.selectionController.creator.survey,e.propertyGridModel.obj,(function(t){e.selectionController.selectFromAction(t,"name"),e.selectorPopupModel.toggleVisibility()})),e.selectorPopupModel.toggleVisibility(),t.list.scrollToSelectedItem()},popupModel:this.selectorPopupModel})},t.prototype.dispose=function(){this.searchManager.dispose(),this.nextSelectionAction.dispose(),this.prevSelectionAction.dispose(),this.objectSelectionAction.dispose(),this.selectorPopupModel.dispose(),e.prototype.dispose.call(this)},Z([Object(i.property)()],t.prototype,"hasPrev",void 0),Z([Object(i.property)()],t.prototype,"hasNext",void 0),Z([Object(i.property)()],t.prototype,"survey",void 0),Z([Object(i.property)()],t.prototype,"selectedElementName",void 0),Z([Object(i.property)({onSet:function(e,t){t.searchManager.isVisible=e}})],t.prototype,"searchEnabled",void 0),t}(i.Base),uo=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.onPagesChanged=o.addEvent(),o.onCurrentPageChanged=o.addEvent(),o.currentPageChangedFunc=function(e,t){o.page2Display=o.survey.currentPage,o.onCurrentPageChanged.fire(o,{})},o.onSurveyChanged(),o}return Y(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pages",{get:function(){return this.survey.pages},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e,this.page2Display=e},enumerable:!1,configurable:!0}),t.prototype.selectPage=function(e){this.currentPage=e,this.creator.selectElement(e)},t.prototype.getDisplayName=function(e){return e?this.creator.getObjectDisplayName(e,"page-selector"):""},t.prototype.raisePagesChanged=function(){this.page2Display=this.survey.currentPage,this.onPagesChanged.fire(this,{})},t.prototype.onSurveyChanged=function(){this.removeFunctions(),this.surveyValue=this.creator.survey,this.surveyValue&&(this.raisePagesChanged(),this.page2Display=this.survey.currentPage,this.surveyValue.onCurrentPageChanged.add(this.currentPageChangedFunc))},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.removeFunctions()},t.prototype.removeFunctions=function(){this.surveyValue&&!this.surveyValue.isDisposed&&this.surveyValue.onCurrentPageChanged.remove(this.currentPageChangedFunc)},Z([Object(i.property)()],t.prototype,"page2Display",void 0),t}(i.Base);var ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.insideEmptyContainer=null,t.prevIsEdge=null,t.dragOverIndicatorElement=null,t.isDraggedElementSelected=!1,t.doBanDropHere=function(){t.removeDragOverMarker(t.dragOverIndicatorElement),t.removeDragOverMarker(t.dropTarget)},t.doDrop=function(){var e;if(t.dropTarget){var o=t.parentElement,r=t.draggedElement,n=t.draggedElement,a=n.parent||n.page;a&&(o.survey.startMovingQuestion(),a.removeElement(n));var s=(null===(e=t.dragOverIndicatorElement)||void 0===e?void 0:e.isPanel)?t.dragOverIndicatorElement:t.dropTarget;return(s.isPanel||s.isPage)&&t.dragOverLocation==i.DragTypeOverMeEnum.InsideEmptyPanel?s.insertElement(n):(s.parent||s.page).insertElement(n,s,function(){switch(t.dragOverLocation){case 4:return"top";case 5:return"right";case 6:return"bottom";case 7:return"left";default:return"bottom"}}()),o.survey.stopMovingQuestion(),r}},t}return Y(t,e),Object.defineProperty(t.prototype,"draggedElementType",{get:function(){return"survey-element"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxNestedPanels",{get:function(){return this.onGetMaxNestedPanels?this.onGetMaxNestedPanels():-1},enumerable:!1,configurable:!0}),t.prototype.startDragToolboxItem=function(e,t,o){var r=this.createElementFromJson(t);r.toolboxItemTitle=o.title,r.toolboxItemIconName=o.iconName,this.startDrag(e,r)},t.prototype.startDragSurveyElement=function(e,t,o){this.isDraggedElementSelected=o,this.startDrag(e,t)},t.prototype.getShortcutText=function(t){return t.toolboxItemTitle||e.prototype.getShortcutText.call(this,t)},t.prototype.createDraggedElementShortcut=function(e,t,o){var r=document.createElement("div"),n=document.createElement("span");return n.className="svc-dragged-element-shortcut__text",n.innerText=e,r.appendChild(this.createDraggedElementIcon()),r.appendChild(n),r.className=this.getDraggedElementClass(),r},t.prototype.createDraggedElementIcon=function(){var e=document.createElement("span"),t='<svg class="sv-svg-icon" role="img" style="width: 24px; height: 24px;"><use xlink:href="#'+this.draggedElement.toolboxItemIconName+'"></use></svg>';return e.className="svc-dragged-element-shortcut__icon",e.innerHTML=t,e},t.prototype.getDraggedElementClass=function(){var e="svc-dragged-element-shortcut";return this.isDraggedElementSelected&&(e+=" svc-dragged-element-shortcut--selected"),e},t.prototype.createElementFromJson=function(e){var t=this.createNewElement(e);return t.setSurveyImpl?t.setSurveyImpl(this.survey):t.setData(this.survey),t.renderWidth="100%",t},t.prototype.createNewElement=function(e){var t=i.Serializer.createClass(e.type);return(new i.JsonObject).toObject(e,t),t},t.prototype.findDropTargetNodeByDragOverNode=function(e){if(e.closest(".svc-row--ghost")){var t="[data-sv-drop-target-survey-element='sv-drag-drop-ghost-survey-element-name']",o=e.closest(t)||e.querySelector(t);if(o)return o}return e.closest(this.dropTargetDataAttributeName)},t.prototype.getDropTargetByDataAttributeValue=function(e,o,r){if(this.removeDragOverMarker(this.dragOverIndicatorElement),this.dragOverIndicatorElement=null,!e){var n=o.parentElement.closest(this.dropTargetDataAttributeName);e=this.getDataAttributeValueByNode(n)}if(!e)throw new Error("Can't find drop target survey element name");if(e===t.ghostSurveyElementName)return this.prevDropTarget;if("newGhostPage"===e)return t.newGhostPage;var i,a,s=this.survey.getPageByName(e);if(s)return 0!==s.elements.length?null:s;if(this.survey.pages.forEach((function(t){var o=t.getElementByName(e);o&&(i=o,a=o)})),"paneldynamic"===i.getType()&&this.insideEmptyContainer&&(i=i.template),"matrixdropdown"!==i.getType()&&"matrixdynamic"!==i.getType()||"none"===i.detailPanelMode||!this.insideEmptyContainer?i.isPanel&&(i=this.getPanelDropTarget(o,i,r)):i=i.detailPanel,!i.page){var l=o.parentElement.closest("[data-sv-drop-target-page]");e=l.dataset.svDropTargetPage;var c=this.survey.getPageByName(e);i.__page=c}return this.dragOverIndicatorElement=a,i},t.prototype.isDropTargetValid=function(e,o,r){if(void 0===r&&(r=i.DragTypeOverMeEnum.Top),!e)return!1;if(e===this.draggedElement)return!1;if("paneldynamic"===this.draggedElement.getType()&&e===this.draggedElement.template)return!1;if(this.maxNestedPanels>=0&&this.draggedElement.isPanel){var n=te.getElementDeepLength(e);if(r!==i.DragTypeOverMeEnum.InsideEmptyPanel&&e.isPanel&&n--,this.maxNestedPanels<n)return!1}return!t.restrictDragQuestionBetweenPages||!this.shouldRestricDragQuestionBetweenPages(e)},t.prototype.shouldRestricDragQuestionBetweenPages=function(e){var t=this.draggedElement.page,o=e.isPage?e:e.page;return t&&t!==o},t.prototype.getPanelDropTarget=function(e,t,o){return 0!==t.questions.length&&(e=this.findDeepestDropTargetChild(e),t=this.getDropTargetByNode(e,o)),t},t.prototype.findDeepestDropTargetChild=function(e){for(var t=this.dropTargetDataAttributeName,o=e;e;)o=e,e=e.querySelector(t);return o},t.prototype.isAllowDragOver=function(e,t){if(!this.survey||this.survey.onDragDropAllow.isEmpty)return!0;var o={allow:!0,parent:this.parentElement,source:this.draggedElement,toElement:this.parentElement,draggedElement:this.draggedElement,fromElement:this.draggedElement.parent,target:e,insertAfter:void 0,insertBefore:void 0};return t!==i.DragTypeOverMeEnum.Bottom&&t!==i.DragTypeOverMeEnum.Right||(o.insertAfter=e),t!==i.DragTypeOverMeEnum.Top&&t!==i.DragTypeOverMeEnum.Left||(o.insertBefore=e),this.survey.onDragDropAllow.fire(this.survey,o),o.allow},t.prototype.dragOverCore=function(e,t){if(this.removeDragOverMarker(this.dragOverIndicatorElement),this.removeDragOverMarker(this.dropTarget),this.isSameElement(e))this.allowDropHere=!1;else if(this.dropTarget=e,this.dragOverLocation=t,this.parentElement=this.dropTarget.isPage?this.dropTarget:this.dropTarget.page||this.dropTarget.__page,this.isAllowDragOver(e,t)){var o=this.dragOverIndicatorElement||this.dropTarget;if(t==i.DragTypeOverMeEnum.InsideEmptyPanel)o.dragTypeOverMe=i.DragTypeOverMeEnum.InsideEmptyPanel;else{var r=this.parentElement.dragDropFindRow(o);r&&r.elements.length>1&&(this.dragOverLocation===i.DragTypeOverMeEnum.Top||this.dragOverLocation===i.DragTypeOverMeEnum.Bottom)?(r.dragTypeOverMe=this.dragOverLocation,this.dragOverIndicatorElement=r):o.dragTypeOverMe=this.dragOverLocation}}else this.allowDropHere=!1},t.prototype.isSameElement=function(e){for(;e;){if(e===this.draggedElement)return!0;e=e.parent}return!1},t.prototype.dragOver=function(e){var t=this.findDropTargetNodeFromPoint(e.clientX,e.clientY);if(t){this.insideEmptyContainer=!function(e,t){var o=e.getBoundingClientRect();return t-o.top<=ho.edgeHeight||o.bottom-t<=ho.edgeHeight}(t,e.clientY)&&!function(e,t){var o=e.getBoundingClientRect();return t-o.left<=ho.edgeHeight||o.right-t<=ho.edgeHeight}(t,e.clientX);var o=this.getDropTargetByNode(t,e),r=function(e,t,o){var r=o.getBoundingClientRect(),n=r.height/r.width,s=e-r.x,l=t-r.y;return a.dragDrop.allowDragToTheSameLine?l>=n*s?l>=-n*s+r.height?i.DragTypeOverMeEnum.Bottom:i.DragTypeOverMeEnum.Left:l>=-n*s+r.height?i.DragTypeOverMeEnum.Right:i.DragTypeOverMeEnum.Top:l>=r.height/2?i.DragTypeOverMeEnum.Bottom:i.DragTypeOverMeEnum.Top}(e.clientX,e.clientY,t);o&&(o.isPanel||o.isPage)&&0===o.elements.length&&(o.isPage||this.insideEmptyContainer)&&(r=i.DragTypeOverMeEnum.InsideEmptyPanel),this.isDropTargetValid(o,t,r)?(this.allowDropHere=!0,this.dragOverCore(o,r)):this.banDropHere()}else this.banDropHere()},t.prototype.onStartDrag=function(){this.draggedElement.isDragMe=!0},t.prototype.getElementIndexInPanel=function(e,t){if(!t)return-1;var o=t.elements.indexOf(e);if(0==t.index)return o;var r=t.panel.rows[t.index-1],n=r.elements[r.elements.length-1];return o+t.panel.elements.indexOf(n)+1},t.prototype.moveElementInPanel=function(e,t,o,r){var n=t.parent.elements.indexOf(t);r>n&&r--,t===o&&n===r||(e.removeElement(t),e.addElement(o,r))},t.prototype.removeDragOverMarker=function(e){var t;e&&(e.dragTypeOverMe=null);var o=null===(t=this.parentElement)||void 0===t?void 0:t.dragDropFindRow(e);o&&(o.dragTypeOverMe=null)},t.prototype.clear=function(){this.insideEmptyContainer=null,this.removeDragOverMarker(this.prevDropTarget),this.removeDragOverMarker(this.dropTarget),this.removeDragOverMarker(this.dragOverIndicatorElement),this.draggedElement&&(this.draggedElement.isDragMe=!1),e.prototype.clear.call(this)},t.prototype.getTargetParent=function(e){var t=e.isPage||e.isPanel?e:e.parent;return"paneldynamic"===e.getType()&&(t=e.templateValue),t},t.prototype.getTargetRow=function(e){var t;return this.getTargetParent(e).rows.forEach((function(o){-1!==o.elements.indexOf(e)&&(t=o)})),t},t.newGhostPage=null,t.restrictDragQuestionBetweenPages=!1,t.edgeHeight=30,t.nestedPanelDepth=-1,t.ghostSurveyElementName="sv-drag-drop-ghost-survey-element-name",t}(i.DragDropCore);o(12);var go=i.settings.allowShowEmptyTitleInDesignMode,fo=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.pagesControllerValue=new uo(t),o.initSurvey(),o}return Y(t,e),Object.defineProperty(t.prototype,"displayPageDropTarget",{get:function(){return this.pagesController.page2Display===this.newPage?"newGhostPage":this.pagesController.page2Display.name},enumerable:!1,configurable:!0}),t.prototype.createNewPage=function(){var e=this;if(!this.creator.canAddPage())return null;var t=this.survey.createNewPage("");t.ignoreUndoRedo=!0,this.creator.setNewNames(t),t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0),t.setSurveyImpl(this.survey),t.updateElementCss();var o=function(r,n){"elements"===n.name&&t.elements.length>0&&e.creator.addPage(t,!0,(function(){return t.onPropertyChanged.remove(o),t.showTitle=!0,t.showDescription=!0,delete t.ignoreUndoRedo,!(e.survey.pages.indexOf(t)>-1)}))};return t.num=this.survey.pages.length+1,t.onPropertyChanged.add(o),ho.newGhostPage=t,t},Object.defineProperty(t.prototype,"canShowNewPage",{get:function(){return!(!this.survey||"single"===this.creator.pageEditMode||!this.creator.allowModifyPages)},enumerable:!1,configurable:!0}),t.prototype.isModifiedPage=function(e){return Object.keys(e.toJSON()).filter((function(e){return"name"!==e})).length>0},Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pagesController",{get:function(){return this.pagesControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isToolboxVisible",{get:function(){return this.creator.showToolbox&&("right"===this.creator.toolboxLocation||"left"===this.creator.toolboxLocation)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.creator.isMobileView?z("ed.surveyPlaceHolderMobile"):z("ed.surveyPlaceHolder")},enumerable:!1,configurable:!0}),t.prototype.onDesignerSurveyPropertyChanged=function(e,t){if(e&&!this.isUpdatingNewPage){if(this.isUpdatingNewPage=!0,"elements"===t&&e.isDescendantOf("page")){var o=!1;0===e.elements.length&&(o=this.checkLastPageToDelete()),this.checkNewPage(o)}"pages"===t&&e.isDescendantOf("survey")&&this.checkNewPage(!0),this.isUpdatingNewPage=!1}},t.prototype.calculateDesignerCss=function(){return this.survey.css.container+" "+this.survey.css.container+"--"+this.survey.calculatedWidthMode},t.prototype.initSurvey=function(){var e=this;this.survey&&(this.showNewPage=!1,this.newPage=void 0,this.checkNewPage(!1),this.cssUpdater&&this.cssUpdater.dispose(),this.cssUpdater=new i.ComputedUpdater((function(){return e.calculateDesignerCss()})),this.designerCss=this.cssUpdater,this.pagesController.onSurveyChanged())},t.prototype.checkNewPage=function(e){var t=0===this.survey.getAllQuestions().length&&0===this.survey.pageCount;if(this.showPlaceholder=t,this.pageCount=this.survey.pageCount,this.showPlaceholder||this.canShowNewPage){var o=this.survey.pages;(!this.newPage||o.length>0&&this.newPage===o[o.length-1])&&(this.newPage=this.createNewPage(),this.showNewPage=!!this.newPage),this.newPage&&(this.newPage.showTitle=!t,this.newPage.showDescription=!t)}else this.showNewPage=!1,this.newPage=void 0;e&&(this.newPage&&(this.newPage.num=this.survey.pages.length+1,this.newPage.startLoadingFromJson(),this.newPage.name=te.getNewPageName(this.survey.pages),this.newPage.endLoadingFromJson()),this.pagesController.raisePagesChanged())},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.cssUpdater&&this.cssUpdater.dispose()},t.prototype.checkLastPageToDelete=function(){if(0===this.survey.pageCount||this.survey.isQuestionDragging)return!1;var e=this.survey.pages[this.survey.pageCount-1];return!(e.elements.length>0||e.isConverting)&&(!te.isPagePropertiesAreModified(e)&&(e.delete(),0===this.survey.pageCount&&this.creator.selectElement(this.survey),!0))},t.prototype.clickDesigner=function(){this.creator.selectedElement=this.creator.survey},t.prototype.getRootCss=function(){var e=this.survey.css.root;return(this.creator.showPageNavigator&&this.survey.pageCount>1||"bypage"===this.creator.pageEditMode)&&(e+=" svc-tab-designer--with-page-navigator"),this.showPlaceholder&&(e+=" svc-tab-designer--with-place-holder"),e+=" svc-tab-designer--"+this.creator.pageEditMode+"-mode"},Z([Object(i.property)()],t.prototype,"newPage",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showNewPage",void 0),Z([Object(i.property)()],t.prototype,"pageCount",void 0),Z([Object(i.property)()],t.prototype,"designerCss",void 0),Z([Object(i.property)()],t.prototype,"showPlaceholder",void 0),t}(i.Base),mo=function(){function e(e){var t=this;this.creator=e,e.addPluginTab("designer",this);var o=new rt(e.survey,e);this.propertyGrid=new po(o,e),this.propertyGridTab=this.creator.sidebar.addTab("propertyGrid","svc-property-grid",this.propertyGrid,(function(){var e=[];return t.propertyGrid.prevSelectionAction&&(t.propertyGrid.prevSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.prevSelectionAction)),t.propertyGrid.nextSelectionAction&&(t.propertyGrid.nextSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.nextSelectionAction)),t.propertyGrid.objectSelectionAction&&(t.propertyGrid.objectSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.objectSelectionAction)),e})),this.toolboxTab=this.creator.sidebar.addTab("toolbox","svc-toolbox",e),this.creator.onPropertyChanged.add((function(e,o){"toolboxLocation"===o.name&&(t.toolboxTab.visible&&"sidebar"!==o.newVal&&(t.propertyGridTab.visible=!0),t.toolboxTab.visible="sidebar"===o.newVal)})),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),e.registerShortcut("delete",{affectedTab:"designer",hotKey:{keyCode:46},macOsHotkey:{keyCode:46},execute:function(){return t.creator.deleteCurrentElement()}})}return Object.defineProperty(e.prototype,"isSurveySelected",{get:function(){return this.creator.isElementSelected(this.creator.survey)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSettingsActive",{get:function(){return this.creator.showSidebar&&this.isSurveySelected},enumerable:!1,configurable:!0}),e.prototype.createVisibleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){return"designer"===e.creator.activeTab}))},e.prototype.activate=function(){this.model=new fo(this.creator),this.creator.sidebar.activeTab=this.propertyGridTab.id,this.creator.focusElement(void 0,!0)},e.prototype.deactivate=function(){return this.model&&this.model.dispose(),this.model=void 0,this.propertyGridTab.visible=!1,!0},e.prototype.onDesignerSurveyPropertyChanged=function(e,t){this.model&&this.model.onDesignerSurveyPropertyChanged(e,t)},e.prototype.update=function(){this.model&&this.model.initSurvey()},e.prototype.createActions=function(){var e=this,t=[],o=new i.Action({id:"svd-toolbox",iconName:"icon-toolbox",needSeparator:!0,action:function(){e.creator.showSidebar||e.creator.setShowSidebar(!0,!0),e.creator.sidebar.activeTab="toolbox"},active:new i.ComputedUpdater((function(){return"toolbox"===e.creator.sidebar.activeTab})),visible:new i.ComputedUpdater((function(){return O("designer"===e.creator.activeTab,e.creator.showToolbox,"sidebar"===e.creator.toolboxLocation)})),title:"Toolbox",showTitle:!1});return this.surveySettingsAction=new i.Action({id:"svd-settings",iconName:"icon-settings",needSeparator:new i.ComputedUpdater((function(){return O("sidebar"!==e.creator.toolboxLocation,!e.creator.isMobileView)})),action:function(){e.selectSurvey(),e.creator.isMobileView||e.creator.propertyGrid.getAllQuestions()[0].focus()},active:this.isSettingsActive,pressed:this.isSettingsActive,visible:this.createVisibleUpdater(),locTitleName:"ed.surveySettings",locTooltipName:"ed.surveySettingsTooltip",showTitle:!1}),this.saveSurveyAction=new i.Action({id:"svd-save",iconName:"icon-save",action:function(){return e.creator.saveSurveyActionHandler()},active:!1,enabled:!1,visible:new i.ComputedUpdater((function(){return O("designer"===e.creator.activeTab,e.creator.showSaveButton)})),locTitleName:"ed.saveSurvey",locTooltipName:"ed.saveSurveyTooltip",showTitle:!1}),this.designerAction=new i.Action({id:"svd-designer",iconName:"icon-config",visible:this.createVisibleUpdater(),active:!0,locTitleName:"ed.designer",showTitle:!1,action:function(){}}),this.previewAction=new i.Action({id:"svd-preview",iconName:"icon-preview",action:function(){e.creator.makeNewViewActive(e.creator.showThemeTab?"theme":"test")},visible:this.createVisibleUpdater(),locTitleName:"tabs.preview",showTitle:!1}),t.push(this.saveSurveyAction),t.push(o),t.push(this.surveySettingsAction),this.creator.onSelectedElementChanged.add((function(t,o){e.surveySettingsAction.active=e.isSettingsActive,e.surveySettingsAction.pressed=e.isSettingsActive})),this.creator.onShowSidebarVisibilityChanged.add((function(t,o){e.surveySettingsAction.active=e.isSettingsActive,e.surveySettingsAction.pressed=e.isSettingsActive})),t},e.prototype.selectSurvey=function(){this.creator.showSidebar||this.creator.setShowSidebar(!0,!0),this.creator.selectElement(this.creator.survey),this.creator.sidebar.activeTab=this.propertyGridTab.id},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.designerAction),this.creator.footerToolbar.actions.push(this.previewAction),this.creator.footerToolbar.actions.push(this.surveySettingsAction)},e}();o(13);var yo=function(){function e(e,t){var o=this;this.container=e,this.creator=t,this.resizeObserver=void 0,"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){return o.process()})),this.resizeObserver.observe(this.findCorrectParent(this.container)),this.process(),"xs"!=this.currentWidth&&"s"!=this.currentWidth&&"m"!==this.currentWidth||this.creator.setShowSidebar(!1))}return e.prototype.getScreenWidth=function(){var t,o=this;return Object.keys(e.screenSizeBreakpoints).forEach((function(r){var n=e.screenSizeBreakpoints[r];!t&&o.container&&n&&o.container.offsetWidth>=n&&(t=r)})),t||"xs"},e.prototype.initMobileView=function(){this.creator.showTabs=!1,this.creator.showToolbar=!1,this.creator.isMobileView=!0},e.prototype.resetMobileView=function(){this.creator.showTabs=void 0,this.creator.showToolbar=void 0,this.creator.isMobileView=void 0},e.prototype.procesShowToolbox=function(e){this.creator.allowShowToolbox=e},e.prototype.procesShowPageNavigator=function(e){this.creator.allowShowPageNavigator="bypage"===this.creator.pageEditMode||e},e.prototype.findCorrectParent=function(e){return(null===window||void 0===window?void 0:window.getComputedStyle)&&"inline"===window.getComputedStyle(e.parentElement).display?this.findCorrectParent(e.parentElement):e.parentElement},e.prototype._process=function(e,t,o){this.creator.updateToolboxIsCompact(e),this.procesShowToolbox(t),this.procesShowPageNavigator(t),this.creator.sidebar.flyoutMode=o,this.creator.sidebar.visible&&!o&&(this.creator.sidebar.collapsedManually=!1),this.creator.sidebar.visible&&!this.creator.sidebar.expandedManually&&o&&"right"!=this.creator.toolboxLocation&&this.creator.sidebar.collapseSidebar(),this.creator.sidebar.visible||this.creator.sidebar.collapsedManually||o||"right"==this.creator.toolboxLocation||this.creator.sidebar.expandSidebar()},e.prototype.process=function(){this.currentWidth=this.getScreenWidth(),"xl"===this.currentWidth||"xxl"===this.currentWidth?this._process(!1,!0,!1):"l"===this.currentWidth?this._process(!0,!0,!1):"m"===this.currentWidth?this._process(!0,!0,!0):this._process(!0,!1,!0),"xs"==this.currentWidth?this.initMobileView():this.resetMobileView()},e.prototype.dispose=function(){this.creator.allowShowToolbox=!0,this.creator.allowShowPageNavigator=!0,this.resizeObserver&&this.resizeObserver.disconnect()},e.screenSizeBreakpoints={xxl:1800,xl:1500,l:1200,m:900,s:600},e}(),bo=function(e){function t(t,o,r,n){var i=e.call(this)||this;return i.id=t,i.sidePanel=o,r&&(i.componentName=r),n&&(i.model=n),i}return Y(t,e),Z([Object(i.property)({onSet:function(e,t){t.sidePanel.headerText=t.caption}})],t.prototype,"caption",void 0),Z([Object(i.property)({onSet:function(e,t){t.sidePanel.updateHasVisibleTabs()}})],t.prototype,"visible",void 0),Z([Object(i.property)()],t.prototype,"model",void 0),Z([Object(i.property)()],t.prototype,"componentName",void 0),t}(i.Base),vo=function(){function e(e,t){var o=this;this.container=e,this.events={mousedown:{touch:"touchend",mouse:"mousedown",pointer:"pointerdown"},mouseup:{touch:"touchstart",mouse:"mouseup",pointer:"pointerup"},mousemove:{touch:"touchmove",mouse:"mousemove",pointer:"pointermove"}},this.onMouseDownListener=function(e){window&&(e.preventDefault(),o.originalWidth=o.getStyleValue(o.container,"width"),o.originalMouseX=e.pageX,o.currentResizer=e.target,window.addEventListener(o.getMouseEvent("mousemove"),o.resize),window.addEventListener(o.getMouseEvent("mouseup"),o.stopResize))},this.resize=function(e){var t=o.originalWidth,r=e.pageX-o.originalMouseX;o.currentResizer==o.westResizer?t-=r:t+=r,t>o.maxWidth?t=o.maxWidth:t<o.minWidth&&(t=o.minWidth),o.container.style.width=t+"px"},this.stopResize=function(e){window&&(window.removeEventListener(o.getMouseEvent("mousemove"),o.resize),window.removeEventListener(o.getMouseEvent("mouseup"),o.stopResize))},this.init(e),this.setHandles(t)}return e.prototype.setHandles=function(e){var t=!1,o=!1,r=e.split(",");r.forEach((function(e){return e.trim()})),((r=r.filter((function(e){return!!e})))||[]).forEach((function(e){"w"==e&&(t=!0),"e"==e&&(o=!0)})),this.westResizer.style.display=t?"block":"none",this.eastResizer.style.display=o?"block":"none"},e.prototype.getStyleValue=function(e,t){return window?parseFloat(window.getComputedStyle(e).getPropertyValue(t).replace("px","")):0},e.prototype.isEventSupported=function(e){var t=document.createElement("div"),o=(e="on"+e)in t;return o||(t.setAttribute(e,"return;"),o="function"==typeof t[e]),t=null,o},e.prototype.getEventPrefix=function(){return void 0===this.mouseDevice&&(this.isEventSupported("pointerdown")?this.mouseDevice="pointer":this.isEventSupported("touchstart")?this.mouseDevice="touch":this.isEventSupported("mousedown")&&(this.mouseDevice="mouse")),this.mouseDevice},e.prototype.getMouseEvent=function(e){return this.events[e][this.getEventPrefix()]},e.prototype.init=function(e){this.westResizer=this.createrResizerElement("svc-resizer svc-resizer-west"),this.eastResizer=this.createrResizerElement("svc-resizer svc-resizer-east"),this.minWidth=this.getStyleValue(e,"min-width"),this.maxWidth=this.getStyleValue(e,"max-width"),e.insertBefore(this.westResizer,e.children[0]),e.appendChild(this.eastResizer)},e.prototype.createrResizerElement=function(e){var t=document.createElement("div");return t.className=e,t.addEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),t},e.prototype.dispose=function(){this.eastResizer.removeEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),this.eastResizer.remove(),this.eastResizer=void 0,this.westResizer.removeEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),this.westResizer.remove(),this.westResizer=void 0},e}(),xo=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.toolbar=new i.AdaptiveActionContainer,o.sidebarLocationChangedHandler=function(e,t){"sidebarLocation"===t.name&&o.resizeManager&&o.resizeManager.setHandles(o.getCurrentHandles())},o.onSidebarVisibilityChanged=function(e,t){o.isDisposed||(o.visible=t.show)},o.creator.onShowSidebarVisibilityChanged.add(o.onSidebarVisibilityChanged),o.creator.onPropertyChanged.add(o.sidebarLocationChangedHandler),o.visible=o.creator.showSidebar,o.createActions(),o}return Y(t,e),Object.defineProperty(t.prototype,"flyoutPanelMode",{get:function(){return this.visible&&this.flyoutMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"closeText",{get:function(){return z("pe.close")},enumerable:!1,configurable:!0}),t.prototype.getTabById=function(e){return this.tabs.filter((function(t){return t.id===e}))[0]},t.prototype.createActions=function(){var e=this;this._collapseAction=new i.Action({id:"svd-grid-hide",iconName:"icon-collapse-panel",css:"svd-grid-hide",locTitleName:"ed.hidePanel",showTitle:!1,visible:new i.ComputedUpdater((function(){return O(!O(!e.creator.allowCollapseSidebar,!e.flyoutMode),e.visible)})),action:function(){e.collapseSidebar(),e.flyoutMode?e.creator.focusElement(e.creator.selectedElement,!0):(e.collapsedManually=!0,e.expandedManually=!1)}}),this.toolbar.actions.push(this._collapseAction),this.creator.allowCollapseSidebar&&(this._expandAction=new i.Action({id:"svd-grid-expand",iconName:"icon-expand-panel",css:"svd-grid-expand",needSeparator:!0,action:function(){e.expandSidebar(),e.flyoutMode||(e.collapsedManually=!1,e.expandedManually=e.flyoutMode)},locTitleName:"ed.showPanel",visible:new i.ComputedUpdater((function(){return O(e.hasVisibleTabs,!e.visible)})),showTitle:!1}))},t.prototype.getCurrentHandles=function(){return"right"==this.creator.sidebarLocation?"w":"e"},t.prototype.getExpandAction=function(){return this._expandAction},t.prototype.collapseSidebar=function(){this.creator.setShowSidebar(!1)},t.prototype.expandSidebar=function(){this.creator.setShowSidebar(!0)},t.prototype.addTab=function(e,t,o,r){var n=this,i=new bo(e,this,t,o);return this.tabs.push(i),r&&(r()||[]).forEach((function(e){return n.toolbar.actions.push(e)})),i},t.prototype.updateHasVisibleTabs=function(){this.hasVisibleTabs=(this.tabs||[]).filter((function(e){return e.visible})).length>0},t.prototype.dispose=function(){this.creator&&!this.isDisposed&&(this.creator.onShowSidebarVisibilityChanged.remove(this.onSidebarVisibilityChanged),this.creator.onPropertyChanged.remove(this.sidebarLocationChangedHandler),this.sidebarLocationChangedHandler=void 0),this.resetResizeManager(),e.prototype.dispose.call(this)},t.prototype.initResizeManager=function(e){this.resizeManager=new vo(e,this.getCurrentHandles())},t.prototype.resetResizeManager=function(){this.resizeManager&&(this.resizeManager.dispose(),this.resizeManager=void 0)},Z([Object(i.propertyArray)()],t.prototype,"tabs",void 0),Z([Object(i.property)()],t.prototype,"headerText",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"visible",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"collapsedManually",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"expandedManually",void 0),Z([Object(i.property)()],t.prototype,"hasVisibleTabs",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"flyoutMode",void 0),Z([Object(i.property)({onSet:function(e,t){t.tabs.forEach((function(e){return e.visible=!1})),t._activeTab=t.tabs.filter((function(t){return t.id===e}))[0],t._activeTab&&(t.headerText=t._activeTab.caption,t._activeTab.visible=!0)}})],t.prototype,"activeTab",void 0),t}(i.Base),wo=function(){function e(e){this.question=e}return e.createItemsNavigator=function(e){return e instanceof i.QuestionImagePickerModel?null:e instanceof i.QuestionMultipleTextModel?new Co(e):e instanceof i.QuestionMatrixDropdownModel?new To(e):e instanceof i.QuestionMatrixDynamicModel?new Po(e):e instanceof i.QuestionMatrixModel?new So(e):e instanceof i.QuestionSelectBase?new jo(e):null},e.prototype.addNewItems=function(e,t,o,r){var n=this,a=t.slice();a.splice(o,1),r.forEach((function(t,r){var s,l;a.splice(o+r,0,(s=t,l=e.inplaceEditForValues?s:d(e.getChoicesItemBaseTitle(),a),n.question.createItemValue?n.question.createItemValue(l,s):new i.ItemValue(l,s)))})),this.question[this.getItemsPropertyName(t)]=a},e.prototype.setEventsForItem=function(e,t,o){var r=this,n=Eo.get(this.getItemLocString(t,o));n.onEditComplete.clear(),n.onEditComplete.add((function(){var n=t.indexOf(o);n>=0&&n<t.length-1&&Eo.get(r.getItemLocString(t,t[n+1])).activateEditor(),n==t.length-1&&(r.addNewItem(e,t),Eo.get(r.getItemLocString(t,t[t.length-1])).setAutoFocus(),Eo.get(r.getItemLocString(t,t[t.length-1])).activateEditor())})),n.onBackspaceEmptyString.clear(),n.onBackspaceEmptyString.add((function(){var e=t.indexOf(o),n=null;if(-1!==e){if(0==e&&t.length>=2&&(n=t[1]),e>0&&(n=t[e-1]),n){var i=Eo.get(r.getItemLocString(t,n));i.setAutoFocus(),i.activateEditor()}t.splice(e,1)}})),n.onTextChanging.clear(),n.onTextChanging.add((function(n,i){var a=i.value.split(/\r?\n/).map((function(e){return(e||"").trim()})).filter((function(e){return!!e}));if(!(a.length<=1)){i.cancel=!0;var s=t.indexOf(o);r.addNewItems(e,t,s,a);var l=s+a.length;l>=t.length&&(l=t.length-1),Eo.get(r.getItemLocString(t,t[l])).setAutoFocus(),Eo.get(r.getItemLocString(t,t[l])).activateEditor()}}))},e.setQuestion=function(t){var o=t.element,r=e.createItemsNavigator(o);if(r){var n=t.creator,i=Eo.get(o.locTitle),a=r.getItemSets(),s=a[0];i.hasEditCompleteHandler||(i.onEditComplete.add((function(){s.length&&Eo.get(r.getItemLocString(s,s[0])).activateEditor()})),i.hasEditCompleteHandler=!0),a.forEach((function(e){e.forEach((function(t){r.setEventsForItem(n,e,t)}));var t=r.getItemsPropertyName(e);o.onPropertyChanged.add((function(o,i){i.name==t&&e.forEach((function(t){r.setEventsForItem(n,e,t)}))}))}))}return!!r},e}(),jo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemLocString=function(e,t){return t.locText},t.prototype.getItemSets=function(){return[this.question.choices]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null);var r=e.createNewItemValue(this.question);o&&(r.value=o)},t.prototype.getItemsPropertyName=function(e){return"choices"},t}(wo),Co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemLocString=function(e,t){return t.locTitle},t.prototype.getItemSets=function(){return[this.question.items]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null),this.question.addItem(o||g("text",t.map((function(e){return e.name}))))},t.prototype.getItemsPropertyName=function(e){return"items"},t.prototype.addNewItems=function(e,t,o,r){var n=t.slice(0,o).concat(r.map((function(e){return new i.MultipleTextItemModel(e)}))).concat(t.slice(o+1));this.question[this.getItemsPropertyName(t)]=n},t}(wo),So=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemLocString=function(e,t){return t.locText},t.prototype.getItemSets=function(){return[this.question.columns,this.question.rows]},t.prototype.addNewItem=function(e,t,o){var r,n;void 0===o&&(o=null),t==this.question.columns&&(r="Column ",n="columns"),t==this.question.rows&&(r="Row ",n="rows");var a=new i.ItemValue(g(r,t.map((function(e){return e.value}))));t.push(o||a),e.onItemValueAddedCallback(this.question,n,a,t)},t.prototype.getItemsPropertyName=function(e){return e==this.question.columns?"columns":e==this.question.rows?"rows":void 0},t}(wo),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemLocString=function(e,t){return e==this.question.columns?t.locTitle:t.locText},t.prototype.addNewItem=function(t,o,r){if(void 0===r&&(r=null),o==this.question.columns){var n=new i.MatrixDropdownColumn(r||g("Column ",o.map((function(e){return e.value}))));this.question.columns.push(n),t.onMatrixDropdownColumnAddedCallback(this.question,n,this.question.columns)}o==this.question.rows&&e.prototype.addNewItem.call(this,t,o,r)},t.prototype.addNewItems=function(t,o,r,n){if(o==this.question.columns){var a=o.slice(0,r).concat(n.map((function(e){return new i.MatrixDropdownColumn(e)}))).concat(o.slice(r+1));this.question[this.getItemsPropertyName(o)]=a}else e.prototype.addNewItems.call(this,t,o,r,n)},t}(So),Po=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemSets=function(){return[this.question.columns]},t}(To),Eo=function(){function e(e){this.locString=e,this.hasEditCompleteHandler=!1,this.onDoActivate=new i.EventBase,this.onTextChanging=new i.EventBase,this.onEditComplete=new i.EventBase,this.onBackspaceEmptyString=new i.EventBase}return e.get=function(t){return t._stringEditorConnector||(t._stringEditorConnector=new e(t)),t._stringEditorConnector},e.prototype.setAutoFocus=function(){this.focusOnEditor=!0},e.prototype.activateEditor=function(){this.onDoActivate.fire(this.locString,{})},e}(),Io=function(e){function t(t,o){var r=e.call(this)||this;return r.locString=t,r.creator=o,r.blurredByEscape=!1,r.focusedProgram=!1,r.characterCounter=new i.CharacterCounter,r.activate=function(){var e=r.getEditorElement();return!(!e||null==e.offsetParent)&&(e.focus(),C(e),!0)},r.justFocused=!1,r.locString=t,r.checkMarkdownToTextConversion(r.locString.owner,r.locString.name),r}return Y(t,e),t.prototype.afterRender=function(){this.connector.focusOnEditor&&this.activate()&&(this.connector.focusOnEditor=!1)},t.prototype.detachFromUI=function(){var e;null===(e=this.connector)||void 0===e||e.onDoActivate.remove(this.activate),this.getEditorElement=void 0,this.blurEditor=void 0},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.detachFromUI()},t.prototype.setLocString=function(e){var t;null===(t=this.connector)||void 0===t||t.onDoActivate.remove(this.activate),this.locString=e,this.connector=Eo.get(e),this.connector.onDoActivate.add(this.activate)},t.prototype.checkConstraints=function(e){!this.compostionInProgress&&this.maxLength>0&&e.keyCode>=32&&((e.target.innerText||"").length>=this.maxLength&&e.preventDefault());13!=e.keyCode||this.locString.allowLineBreaks||e.preventDefault(),(e.ctrlKey||e.metaKey)&&-1!==[89,90,66,73].indexOf(e.keyCode)&&(e.stopImmediatePropagation(),e.preventDefault())},t.prototype.onClick=function(e){e.stopPropagation()},t.prototype.onFocus=function(e){this.focusedProgram||(this.valueBeforeEdit=this.locString.hasHtml?e.target.innerHTML:e.target.innerText,this.focusedProgram=!1),this.maxLength>0&&this.characterCounter.updateRemainingCharacterCounter(this.valueBeforeEdit,this.maxLength),this.creator&&(this.creator.selectFromStringEditor=!0),e.target.parentElement.click(),e.target.spellcheck=!0,e.target.setAttribute("tabindex",-1),this.focused=!0,this.justFocused=!0},t.prototype.checkMarkdownToTextConversion=function(e,t){if(this.creator){var o={element:e,text:null,name:t,html:""};this.creator.onHtmlToMarkdown.fire(this.creator,o),this.editAsText=null===o.text}},t.prototype.onCompositionStart=function(e){this.compostionInProgress=!0},t.prototype.onInput=function(e){var t;if(this.maxLength>0){var o=e.target.innerText||"";this.characterCounter.updateRemainingCharacterCounter(o,this.maxLength)}if(this.editAsText&&!this.compostionInProgress){var r={value:null===(t=e.target)||void 0===t?void 0:t.innerText,cancel:null};if(this.connector&&this.connector.onTextChanging.fire(this,r),r.cancel)return;this.maxLength>=0&&e.target.innerText.length>this.maxLength&&(e.target.innerText=e.target.innerText.substring(0,this.maxLength))}},t.prototype.onCompositionEnd=function(e){this.compostionInProgress=!1,this.onInput(e)},t.prototype.onBlur=function(e){var t;if(e.target.removeAttribute("tabindex"),this.blurredByEscape)return this.blurredByEscape=!1,this.locString.hasHtml?e.target.innerHTML=this.valueBeforeEdit:e.target.innerText=this.valueBeforeEdit,this.errorText=null,this.focused=!1,void(null===window||void 0===window||window.getSelection().removeAllRanges());var o=this.getClearedText(e.target);if(this.errorText=this.getErrorTextOnChanged(o),this.locString.text==o||!this.locString.text&&o==this.locString.calculatedText)this.locString.hasHtml?e.target.innerHTML=this.locString.renderedHtml:e.target.innerText=this.locString.renderedHtml,this.locString.strChanged();else{if(this.errorText)return null===(t=this.creator)||void 0===t||t.notify(this.errorText,"error"),this.focusedProgram=!0,e.target.innerText=o,void e.target.focus();this.setValueIntoLocStr(o,null==e?void 0:e.target)}this.focused=!1,null===window||void 0===window||window.getSelection().removeAllRanges()},t.prototype.getClearedText=function(e){var t=e.innerHTML,o=e.innerText;if(!this.creator)return this.locString.hasHtml?t:o;var r,n=null;if(!this.editAsText){var i={element:this.locString.owner,text:null,name:this.locString.name,html:t};this.creator.onHtmlToMarkdown.fire(this.creator,i),n=i.text}if(n)r=n;else{var a=this.locString.hasHtml?t:o;this.locString.allowLineBreaks||(a=j(a)),r=a}var s={obj:this.locString.owner,propertyName:this.locString.name,value:this.locString.text,newValue:r,doValidation:!1};return this.creator.onValueChangingCallback(s),s.newValue},t.prototype.getErrorTextOnChanged=function(e){if(!this.creator)return"";var t=this.locString.owner,o=this.creator.onGetErrorTextOnValidationCallback(this.locString.name,t,e);if(o||e)return o;var r=t.getPropertyByName&&t.getPropertyByName(this.locString.name);return r&&r.isRequired?G.getString("pe.propertyIsEmpty"):""},Object.defineProperty(t.prototype,"isInplaceForEditValues",{get:function(){return!!this.creator&&this.creator.inplaceEditForValues&&this.locString.owner instanceof i.ItemValue&&this.creator.inplaceEditForValues&&-1===["noneText","otherText","selectAllText"].indexOf(this.locString.name)},enumerable:!1,configurable:!0}),t.prototype.setValueIntoLocStr=function(e,t){if(this.isInplaceForEditValues){var o=this.locString.owner;if(o.value!==e){if(o.locOwner&&o.ownerPropertyName){var r=o.locOwner[o.ownerPropertyName];Array.isArray(r)&&i.ItemValue.getItemByValue(r,e)&&(e=d(e,r),t&&(t.innerText=e))}o.value=e}}else{var n=this.locString.storeDefaultText;this.locString.storeDefaultText=!1,this.locString.text=e,this.locString.storeDefaultText=n}},t.prototype.done=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.onPaste=function(e){if(this.editAsText){e.preventDefault();var t=e.clipboardData.getData("text/plain");this.locString.allowLineBreaks||(t=j(t));var o=window.getSelection();if(!o.rangeCount)return;o.deleteFromDocument(),o.getRangeAt(0).insertNode(document.createTextNode(t)),o.collapseToEnd(),e.target.dispatchEvent(new Event("input",{bubbles:!0}))}},t.prototype.onKeyDown=function(e){return 13!==e.keyCode||e.shiftKey||(this.blurEditor(),e.ctrlKey||e.metaKey||this.connector.onEditComplete.fire(this,{}),this.done(e)),27===e.keyCode&&(this.blurredByEscape=!0,this.blurEditor(),this.done(e)),8!==e.keyCode||e.target.innerText||(this.done(e),this.connector.onBackspaceEmptyString.fire(this,{})),this.checkConstraints(e),!0},t.prototype.onKeyUp=function(e){return 9===e.keyCode&&e.target===document.activeElement&&C(e.target),!0},t.prototype.onMouseUp=function(e){return!this.justFocused||(this.justFocused=!1,!!window&&((window.getSelection().focusNode&&window.getSelection().focusNode.parentElement!==e.target||0==window.getSelection().toString().length)&&C(e.target),!1))},t.prototype.findProperty=function(){if(this.locString.owner.getType){var e=this.locString.owner.getType();if(this.locString.name)return i.Serializer.findProperty(e,this.locString.name)}},Object.defineProperty(t.prototype,"maxLength",{get:function(){var e=this.findProperty();return!e||e.maxLength<=0?-1:e.maxLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){var e=this;if(this.placeholderValue)return this.placeholderValue;var t=this.findProperty();if(!t||!t.placeholder)return"";var o=G.getString(t.placeholder);if(o){var r=/\{([^}]+)\}/g;this.placeholderValue=new i.ComputedUpdater((function(){for(var t=o,n=r.exec(t);null!=n;)t=t.replace(r,(function(t){return""+(e.locString.owner&&e.locString.owner[n[1]])})),n=r.exec(t);return t}))}return this.placeholderValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentEditable",{get:function(){return!this.creator||this.creator.isCanModifyProperty(this.locString.owner,this.locString.name)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCharacterCounter",{get:function(){return-1!==this.maxLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getCharacterCounterClass",{get:function(){return"svc-remaining-character-counter"},enumerable:!1,configurable:!0}),t.prototype.className=function(e){return(new i.CssClassBuilder).append("svc-string-editor").append("svc-string-editor--hidden",""==e&&""==this.placeholder).append("svc-string-editor--readonly",!this.contentEditable).append("svc-string-editor--error",!!this.errorText).append("svc-string-editor--multiline",!!this.locString.allowLineBreaks).toString()},Z([Object(i.property)()],t.prototype,"errorText",void 0),Z([Object(i.property)()],t.prototype,"focused",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"editAsText",void 0),Z([Object(i.property)()],t.prototype,"placeholderValue",void 0),t}(i.Base);o(14);var Oo=function(e){function t(t,o){void 0===o&&(o=i.defaultV2Css);var r=e.call(this)||this;return r.surveyProvider=t,r.startThemeClasses=o,r.pages=new i.ActionContainer,r.blockChanges=!0,r.simulator=new Se,r}return Y(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.simulator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageActions",{get:function(){return this.pages.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPageToolbarVisible",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTheme",{get:function(){return this.surveyProvider.theme},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentThemeCssVariables",{get:function(){return this.currentTheme.cssVariables||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileView",{get:function(){return this.surveyProvider.isMobileView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showResults",{get:function(){return!this.isRunning&&!this.isMobileView},enumerable:!1,configurable:!0}),t.prototype.updateSimulatorSurvey=function(e,t){var o=this,r=this.surveyProvider.createSurvey(e||{},"theme",this,(function(r){r.setCss(t,!1),r.fitToContainer=!0,r.addLayoutElement({id:"complete-customization",container:"completePage",component:"svc-complete-page",data:o}),e&&e.locale&&(r.locale=e.locale),r.applyTheme(o.currentTheme)}));this.simulator.survey=r,this.onSurveyCreatedCallback&&this.onSurveyCreatedCallback(this.survey);var n=this;this.survey.onComplete.add((function(e){n.isRunning=!1})),this.survey.onNavigateToUrl&&this.survey.onNavigateToUrl.add((function(e,t){var o=t.url;if(t.url="",o){var r=z("ed.navigateToMsg")+" '"+o+"'.";this.surveyProvider?this.surveyProvider.notify(r):alert(r)}})),this.survey.onStarted.add((function(e){n.setActivePageItem(n.simulator.survey.activePage,!0)})),this.survey.onCurrentPageChanged.add((function(e,t){n.activePage=t.newCurrentPage,n.setActivePageItem(t.oldCurrentPage,!1),n.setActivePageItem(t.newCurrentPage,!0)})),this.survey.onPageVisibleChanged.add((function(e,t){n.updatePageItem(t.page),o.updatePrevNextPageActionState()}))},t.prototype.setJSON=function(e,t){this.json=e,null!=e&&e.cookieName&&delete e.cookieName,this.updateSimulatorSurvey(e,t)},t.prototype.initialize=function(e,t){this.blockChanges=!0;try{this.setJSON(e,this.startThemeClasses),this.updatePageList(),this.buildActions(),void 0!==t.showPagesInTestSurveyTab&&(this.showPagesInTestSurveyTab=t.showPagesInTestSurveyTab)}finally{this.blockChanges=!1}},t.prototype.updatePageItem=function(e){var t=this.getPageItemByPage(e);t&&(t.enabled=e.isVisible)},t.prototype.getCurrentPageItem=function(){return this.pageListItems[this.survey.pages.indexOf(this.survey.activePage)]},t.prototype.getSelectPageTitle=function(){return this.activePage&&this.getPageTitle(this.activePage,"preview-tab:selected-page","survey-tester-selected")||z("ts.selectPage")},t.prototype.getPageTitle=function(e,t,o){void 0===t&&(t="preview-tab:page-list"),void 0===o&&(o="survey-tester");var r=this.surveyProvider.getObjectDisplayName(e,t,o,e.title);if(r===e.name&&0===r.indexOf("page")){var n=this.survey.pages.indexOf(e);return G.getString("ed.pageTypeName")+" "+(n+1)}return r},t.prototype.updatePageList=function(){for(var e=[],t=0;t<this.survey.pages.length;t++){var o=this.survey.pages[t];e.push({id:o.name,data:o,title:this.getPageTitle(o),enabled:o.isVisible,visible:!0})}this.pageListItems=e},t.prototype.show=function(){this.showInvisibleElements=!1,this.activePage=this.survey.activePage,this.isRunning=!0},t.prototype.testAgain=function(){this.setJSON(this.json,this.simulator.survey.css),this.updatePageList(),this.show()},t.prototype.buildActions=function(){var e=this,t=[],o=function(t){var o=e.survey.currentPageNo,r=o+(t?1:-1);"starting"===e.survey.state&&t&&(r=0);var n=e.survey.visiblePages[r];!t&&0===o&&e.survey.firstPageIsStarted&&e.survey.pages.length>0&&(n=e.survey.pages[0]);var i=e.survey.pages.indexOf(n);e.activePage=e.survey.pages[i]};this.prevPageAction&&(this.prevPageAction.visible=new i.ComputedUpdater((function(){var t="running"===e.survey.state,o="theme"===e.surveyProvider.activeTab;return e.surveyProvider.isMobileView&&O(e.isRunning,o,e.pageListItems.length>1)&&t})),this.prevPageAction.iconName=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-left":"icon-arrow-left_16x16"})),this.prevPageAction.iconSize=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.prevPageAction.action=function(){return o(!1)},t.push(this.prevPageAction)),this.nextPageAction&&(this.nextPageAction.visible=new i.ComputedUpdater((function(){var t="running"===e.survey.state,o="theme"===e.surveyProvider.activeTab;return e.surveyProvider.isMobileView&&O(e.isRunning,o,e.pageListItems.length>1)&&t})),this.nextPageAction.iconName=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-right":"icon-arrow-right_16x16"})),this.nextPageAction.iconSize=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.nextPageAction.action=function(){return o(!0)},t.push(this.nextPageAction)),this.pages.actions=t,this.pages.containerCss="sv-action-bar--pages",this.updatePrevNextPageActionState()},t.prototype.updatePrevNextPageActionState=function(){if(this.prevPageAction&&this.survey){var e=this.survey.firstPageIsStarted&&"starting"!==this.survey.state||!this.survey.firstPageIsStarted&&!this.survey.isFirstPage;this.prevPageAction.enabled=e;var t=this.survey&&this.survey.visiblePages.indexOf(this.activePage)!==this.survey.visiblePages.length-1;this.nextPageAction.enabled=t}},t.prototype.setActivePageItem=function(e,t){var o=this.getPageItemByPage(e);o&&(o.active=t)},t.prototype.getPageItemByPage=function(e){for(var t=this.pageListItems,o=0;o<t.length;o++)if(t[o].data===e)return t[o];return null},t.prototype.dispose=function(){this.simulator.dispose(),e.prototype.dispose.call(this)},Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.simulator.survey.showInvisibleElements=e}})],t.prototype,"showInvisibleElements",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showPagesInTestSurveyTab",void 0),Z([Object(i.property)({defaultValue:!0,onSet:function(e,t){t.simulator&&(t.simulator.isRunning=e)}})],t.prototype,"isRunning",void 0),Z([Object(i.propertyArray)()],t.prototype,"pageListItems",void 0),Z([Object(i.property)({onSet:function(e,t){if(e){var o=t.simulator.survey;o.firstPageIsStarted&&(e===o.pages[0]?o.clear(!1,!0):"starting"==o.state&&o.setPropertyValue("isStartedState",!1)),"starting"!==o.state&&(o.currentPage=e)}t.updatePrevNextPageActionState()}})],t.prototype,"activePage",void 0),t}(i.Base),Vo={},No=["default","sharp","borderless","flat","plain","doubleborder","layered","solid","threedimensional","contrast"],ko={light:{teal:"rgba(11, 128, 128, 1)",blue:"rgba(39, 114, 203, 1)",purple:"rgba(122, 70, 187, 1)",orchid:"rgba(178, 61, 153, 1)",tulip:"rgba(191, 76, 97, 1)",brown:"rgba(177, 94, 47, 1)",green:"rgba(11, 134, 75, 1)"},dark:{teal:"rgba(22, 198, 187, 1)",blue:"rgba(109, 183, 252, 1)",purple:"rgba(173, 144, 255, 1)",orchid:"rgba(232, 113, 220, 1)",tulip:"rgba(245, 131, 151, 1)",brown:"rgba(252, 187, 89, 1)",green:"rgba(140, 204, 90, 1)"}},Ao=["Open Sans","Arial, sans-serif","Brush Script MT, cursive","Courier New, monospace","Garamond, serif","Georgia, serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"];function _o(){return[{type:"dropdown",name:"family",title:z("theme.fontFamily"),titleLocation:"left",descriptionLocation:"hidden",choices:[].concat(Ao),allowClear:!1},{type:"buttongroup",name:"weight",titleLocation:"hidden",descriptionLocation:"hidden",choices:[{value:"400",text:z("theme.fontWeightRegular")},{value:"600",text:z("theme.fontWeightSemiBold")},{value:"700",text:z("theme.fontWeightBold")},{value:"800",text:z("theme.fontWeightHeavy")}]},{type:"coloralpha",name:"color",colorTitle:z("theme.color"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"coloralpha",name:"placeholdercolor",colorTitle:z("theme.placeholderColor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"spinedit",name:"size",title:z("theme.size"),titleLocation:"left",descriptionLocation:"hidden",unit:"px",min:0}]}function Lo(e,t,o){var r=e.contentPanel.questions[2];"allowEmptyColorValue"==t&&(r.allowEmptyValue=o)}function Do(){i.ComponentCollection.Instance.getCustomQuestionByName("font").json.elementsJSON=_o()}function Mo(e,t,o){void 0===e&&(e={}),Object.keys(e).forEach((function(r){var n="--sjs-font-"+t.name.toLocaleLowerCase()+"-"+r;t.defaultValue&&e[r]===t.defaultValue[r]?o[n]=void 0:o[n]=e[r]+("size"===r?"px":"")}))}function Ro(e,t,o,r){if(e){e.defaultValue||(e.defaultValue={}),B(e.defaultValue,{color:t[o],placeholdercolor:r?t[r]:void 0}),e.defaultValue.size||(e.defaultValue.size=parseFloat(t["--sjs-font-size"]));var n=K({},e.defaultValue);return Object.keys(t).filter((function(t){return-1!==t.indexOf(e.name.toLocaleLowerCase())})).forEach((function(e){var o=e.split("-").pop();"size"===o&&void 0!==t[e]?n[o]=parseFloat(t[e].toString()):n[o]=t[e]})),n}}function qo(){return[{type:"coloralpha",name:"backcolor",colorTitle:z("theme.backcolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"coloralpha",name:"hovercolor",colorTitle:z("theme.hovercolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"spinedit",name:"cornerRadius",title:z("theme.cornerRadius"),titleLocation:"left",descriptionLocation:"hidden",unit:"px",min:0}]}function Ho(){i.ComponentCollection.Instance.getCustomQuestionByName("backgroundcornerradius").json.elementsJSON=qo()}function Bo(e,t,o){void 0===e&&(e={}),Object.keys(e).forEach((function(r){var n="--sjs-"+t.name.toLocaleLowerCase()+"-"+r;t.defaultValue&&e[r]===t.defaultValue[r]?o[n]=void 0:o[n]=e[r]+("cornerRadius"===r?"px":"")}))}function Qo(e,t,o,r,n){if(void 0===n&&(n=4),e){e.defaultValue||(e.defaultValue={}),B(e.defaultValue,{backcolor:t[o],hovercolor:t[r],cornerRadius:n});var i=K({},e.defaultValue);return Object.keys(t).filter((function(t){return-1!==t.indexOf(e.name.toLocaleLowerCase())})).forEach((function(e){var o=e.split("-").pop();"cornerRadius"===o&&void 0!==t[e]?i[o]=parseFloat(t[e].toString()):i[o]=t[e]})),i}}function Fo(){return{type:"paneldynamic",minPanelCount:1,panelAddText:z("theme.boxShadowAddRule"),templateElements:[{type:"spinedit",name:"x",unit:"px",title:z("theme.boxShadowX"),titleLocation:"left"},{type:"spinedit",name:"y",unit:"px",startWithNewLine:!1,title:z("theme.boxShadowY"),titleLocation:"left"},{type:"spinedit",name:"blur",unit:"px",title:z("theme.boxShadowBlur"),min:0,titleLocation:"left"},{type:"spinedit",name:"spread",unit:"px",min:0,startWithNewLine:!1,title:z("theme.boxShadowSpread"),titleLocation:"left"},{type:"coloralpha",name:"color",titleLocation:"hidden"},{type:"buttongroup",name:"isInset",titleLocation:"hidden",choices:[{text:z("theme.boxShadowDrop"),value:!1},{text:z("theme.boxShadowInner"),value:!0}]}]}}function Uo(){i.ComponentCollection.Instance.getCustomQuestionByName("shadoweffects").json.questionJSON=Fo()}function Wo(e){if(Array.isArray(e)){var t=!1;if(e.forEach((function(e){for(var o in e)t=!0})),t)return e.map((function(e){var t,o,r,n,i;return(1==e.isInset?"inset ":"")+(null!==(t=e.x)&&void 0!==t?t:0)+"px "+(null!==(o=e.y)&&void 0!==o?o:0)+"px "+(null!==(r=e.blur)&&void 0!==r?r:0)+"px "+(null!==(n=e.spread)&&void 0!==n?n:0)+"px "+(null!==(i=e.color)&&void 0!==i?i:"#000000")})).join(", ")}}function Go(e){var t=zo(e);return t.forEach((function(e){e.x=0,e.y=0,e.blur=0,e.spread=0})),Wo(t)}function zo(e){return void 0===e&&(e=""),e.split(/,(?![^(]*\))/).map((function(e){var t=e.match(/#[a-zA-Z0-9]+|rgba?\(.*?\)/),o=e.indexOf("inset")>-1,r={};o&&(e=e.replace("inset","")),t&&(r.color=t[0]);var n=e.replace(/\s+/g," ").replace(/^\s|\s$/g,"").split(" ");return r.x=parseInt(n[0])||0,r.y=parseInt(n[1])||0,r.blur=parseInt(n[2])||0,r.spread=parseInt(n[3])||0,r.isInset=o,r}))}i.ComponentCollection.Instance.getCustomQuestionByName("font")||i.ComponentCollection.Instance.add({name:"font",showInToolbox:!1,internal:!0,elementsJSON:_o(),onInit:function(){i.Serializer.addProperties("font",[{name:"allowEmptyColorValue:boolean",default:!1,visible:!1}])},onLoaded:function(e){Lo(e,"allowEmptyColorValue",e.allowEmptyColorValue)},onPropertyChanged:function(e,t,o){Lo(e,t,o)},onCreated:function(e){e.contentPanel.getQuestionByName("color").visible="surveyTitle"!==e.name&&"surveyDescription"!==e.name,e.contentPanel.getQuestionByName("placeholdercolor").visible="editorFont"===e.name},valueToQuestion:function(e){return JSON.parse(JSON.stringify(e))},onValueChanged:function(e,t,o){}}),i.ComponentCollection.Instance.getCustomQuestionByName("backgroundcornerradius")||i.ComponentCollection.Instance.add({name:"backgroundcornerradius",showInToolbox:!1,internal:!0,elementsJSON:qo(),onInit:function(){},onCreated:function(e){},valueToQuestion:function(e){return JSON.parse(JSON.stringify(e))},onValueChanged:function(e,t,o){}}),i.ComponentCollection.Instance.getCustomQuestionByName("shadoweffects")||i.ComponentCollection.Instance.add({name:"shadoweffects",showInToolbox:!1,internal:!0,questionJSON:Fo(),onCreated:function(e){e.valueFromDataCallback=function(e){return void 0===e?[{}]:"string"==typeof e?zo(e):e},e.valueToDataCallback=function(e){return e?"string"==typeof e?e:Wo(Array.isArray(e)?e:[e]):""},e.contentQuestion.panels.forEach((function(e){return e.questions.forEach((function(e){return e.allowRootStyle=!1}))}))}});var Jo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.owner},t.prototype.fromJSON=function(t,o){e.prototype.fromJSON.call(this,t,o),t.backgroundImageOpacity&&(this.backgroundImageOpacity=100*t.backgroundImageOpacity)},t.prototype.setCssVariables=function(e){e&&(this.surveyTitle=Ro(this.getPropertyByName("surveyTitle"),e),this.surveyDescription=Ro(this.getPropertyByName("surveyDescription"),e),this.headerTitle=Ro(this.getPropertyByName("headerTitle"),e),this.headerDescription=Ro(this.getPropertyByName("headerDescription"),e));var t=e["--sjs-header-backcolor"];t&&(this.backgroundColorSwitch=this.getBackgroundColorSwitchByValue(t),this.backgroundColor="custom"===this.backgroundColorSwitch?t:void 0)},t.prototype.toJSON=function(t){var o=this,r=e.prototype.toJSON.call(this,t);delete r.type,delete r.logoPosition,delete r.headerView,100!==this.backgroundImageOpacity&&(r.backgroundImageOpacity=this.backgroundImageOpacity/100);var n={};return Object.keys(r).forEach((function(e){if("object"==typeof r[e]){var t=o.getPropertyByName(e);"font"===t.type&&(Mo(r[e],t,n),delete r[e])}})),this.setHeaderBackgroundColorCssVariable(n),r.cssVariables=n,delete r.backgroundColorSwitch,delete r.backgroundColor,r},t.prototype.saveToThemeJSON=function(e,t){var o=this.toJSON(t);B(e.cssVariables,o.cssVariables),delete o.cssVariables,Object.keys(o).length>0&&(e.header=o),e.headerView=this.headerView},t.prototype.setHeaderBackgroundColorCssVariable=function(e){var t;"none"===this.backgroundColorSwitch?e["--sjs-header-backcolor"]="transparent":"custom"===this.backgroundColorSwitch&&(e["--sjs-header-backcolor"]=null!==(t=this.backgroundColor)&&void 0!==t?t:"transparent")},t.prototype.getBackgroundColorSwitchByValue=function(e){return e?"transparent"===e?"none":"custom":"accentColor"},t.prototype.getType=function(){return"header"},t}(i.Base);function Zo(){return{family:a.themeEditor.defaultFontFamily,weight:"700",size:32}}function Ko(e){var t={family:a.themeEditor.defaultFontFamily,weight:"400",size:16};return e&&(t.weight="600"),t}function Yo(e,t){return{type:"buttongroup",name:e,visibleIf:function(e){return"advanced"===e.headerView},choices:[{value:"left"},{value:"center"},{value:"right"}],default:t}}function Xo(e,t){return{type:"buttongroup",name:e,displayName:"",visibleIf:function(e){return"advanced"===e.headerView},choices:[{value:"top"},{value:"middle"},{value:"bottom"}],default:t}}i.Serializer.addClass("header",[{type:"buttongroup",name:"headerView",default:"basic",choices:[{value:"basic"},{value:"advanced"}]},{type:"buttongroup",name:"logoPosition",visibleIf:function(e){return"basic"===e.headerView},default:"left",choices:[{value:"left"},{value:"right"}]},{type:"spinedit",name:"height",visibleIf:function(e){return"advanced"===e.headerView},default:256,onPropertyEditorUpdate:function(e,t){t&&(t.unit="px",t.min=0)}},{type:"buttongroup",name:"inheritWidthFrom",visibleIf:function(e){return"advanced"===e.headerView},default:"container",choices:[{value:"survey"},{value:"container"}]},{type:"spinedit",name:"textAreaWidth",visibleIf:function(e){return"advanced"===e.headerView},default:512,onPropertyEditorUpdate:function(e,t){t&&(t.unit="px",t.min=0)}},{type:"buttongroup",name:"backgroundColorSwitch",visibleIf:function(e){return"advanced"===e.headerView},isSerializable:!1,default:"accentColor",choices:[{value:"none"},{value:"accentColor"},{value:"custom"}]},{type:"color",name:"backgroundColor",displayName:"",visibleIf:function(e){return"advanced"===e.headerView},isSerializable:!1,onPropertyEditorUpdate:function(e,t){t&&(t.allowEmptyValue=!0,t.enableIf="{composite.backgroundColorSwitch} = 'custom'")}},{name:"backgroundImage:file",visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.storeDataAsText=!1,t.acceptedTypes="image/*")}},{type:"buttongroup",name:"backgroundImageFit",displayName:"",choices:[{value:"cover"},{value:"fill"},{value:"contain"},{value:"tile"}],default:"cover",visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.enableIf="{composite.backgroundImage} notempty")}},{type:"spinedit",name:"backgroundImageOpacity",visibleIf:function(e){return"advanced"===e.headerView},default:100,onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.max=100,t.step=5,t.titleLocation="left",t.enableIf="{composite.backgroundImage} notempty")}},{type:"boolean",name:"overlapEnabled",displayName:"",visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.renderAs="checkbox")}},Yo("logoPositionX","right"),Xo("logoPositionY","top"),Yo("titlePositionX","left"),Xo("titlePositionY","bottom"),Yo("descriptionPositionX","left"),Xo("descriptionPositionY","bottom")]),i.Serializer.addProperties("header",[{type:"font",name:"surveyTitle",visibleIf:function(e){return"basic"===e.headerView},default:Zo()},{type:"font",name:"surveyDescription",visibleIf:function(e){return"basic"===e.headerView},default:Ko()},{type:"font",name:"headerTitle",default:Zo(),visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.allowEmptyColorValue=!0)}},{type:"font",name:"headerDescription",default:Ko(!0),visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.allowEmptyColorValue=!0)}}]);var $o=o(2);function er(){return[{name:"color",type:"color",titleLocation:"hidden"},{name:"opacity",startWithNewLine:!1,type:"spinedit",title:z("theme.opacity"),min:0,max:100,unit:"%",titleLocation:"left"}]}function tr(){i.ComponentCollection.Instance.getCustomQuestionByName("coloralpha").json.elementsJSON=er()}function or(e,t,o){var r=e.contentPanel.questions[0];r&&("colorTitleLocation"==t&&(r.titleLocation=o),"colorTitle"==t&&(r.title=o),"choices"==t&&(r.choices=o),"allowEmptyValue"==t&&(r.allowEmptyValue=o))}function rr(e){return _(e.color,e.opacity/100)}function nr(e){var t=(e.themeName||sr.DefaultTheme.themeName||"default")+"-"+(e.colorPalette||"light");return!0===e.isPanelless&&(t+="-panelless"),t}function ir(e,t,o,r){var n=Vo[r];if(n)return n;for(var i=Object.keys(Vo).filter((function(t){return 0===t.indexOf(e+"-")})),a=0,s=i;a<s.length;a++){var l=s[a];0===l.indexOf(e+"-"+t)&&(r=e+"-"+t),0===l.indexOf(e+"-"+t+(o?"-panelless":""))&&(r=e+"-"+t+(o?"-panelless":""))}if(n=Vo[i[0]])return n;var c=nr({themeName:sr.DefaultTheme.themeName,colorPalette:t||"light",isPanelless:o});return Vo[c]||sr.DefaultTheme}function ar(e,t){if(!t){var o=nr(e);t=ir(e.themeName,e.colorPalette,e.isPanelless,o)}var r=function e(t,o){void 0===o&&(o={});var r={};return Object.keys(t).forEach((function(n){"object"==typeof t[n]?r[n]=e(t[n],o[n]):void 0!==t[n]&&t[n]!=o[n]&&(r[n]=t[n])})),r}(e,t);return Object.keys(r).forEach((function(e){-1!==e.toLowerCase().indexOf("background")&&(""!==r[e]&&r[e]!==i.Serializer.findProperty("survey",e).defaultValue||delete r[e])})),r.themeName=t.themeName||sr.DefaultTheme.themeName||"default",r.colorPalette=t.colorPalette||"light",r.isPanelless=!!t.isPanelless,r}i.ComponentCollection.Instance.getCustomQuestionByName("coloralpha")||i.ComponentCollection.Instance.add({name:"coloralpha",showInToolbox:!1,internal:!0,elementsJSON:er(),onInit:function(){i.Serializer.addProperties("coloralpha",[{name:"choices:itemvalue[]",visible:!1},{name:"colorTitleLocation:string",default:"hidden",visible:!1},{name:"allowEmptyValue:boolean",default:!1,visible:!1},{name:"colorTitle:string",visible:!1}])},onLoaded:function(e){or(e,"colorTitle",e.colorTitle),or(e,"colorTitleLocation",e.colorTitleLocation),or(e,"choices",e.choices),or(e,"allowEmptyValue",e.allowEmptyValue)},onPropertyChanged:function(e,t,o){or(e,t,o)},valueToQuestion:function(e){return e?rr(e):""},valueFromQuestion:function(e){return"string"==typeof e?M(e):e},onCreated:function(e){e.contentPanel.questions.forEach((function(e){return e.allowRootStyle=!1}))}}),Object.keys($o).forEach((function(e){var t=$o[e],o={},r={};B(o,t.cssVariables),B(r,t,{cssVariables:o});var n=nr(t);Vo[n]=r}));var sr=function(e){function t(){var o=e.call(this)||this;return o.themeCssVariablesChanges={},o.colorCalculator=new Q,o._defaultSessionTheme=t.DefaultTheme,o.onThemeSelected=new i.EventBase,o.onThemePropertyChanged=new i.EventBase,o.onAllowModifyTheme=new i.EventBase,o.blockThemeChangedNotifications=0,Uo(),Do(),tr(),Ho(),o.setNewHeaderProperty(),o.onPropertyValueChangedCallback=function(e,t,r,n,i){o.onThemePropertyValueChangedCallback(e,t,r,n,i)},o}return Y(t,e),t.prototype.getFullThemeName=function(e){return"light"===this.colorPalette?e||this.themeName:(e||this.themeName)+"-"+this.colorPalette},Object.defineProperty(t.prototype,"defaultSessionTheme",{get:function(){return this._defaultSessionTheme},set:function(e){this._defaultSessionTheme=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssVariables",{get:function(){return this.toJSON().cssVariables||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"themeCssCustomizations",{get:function(){var e={};return B(e,this.themeCssVariablesChanges),e},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"theme"},t.prototype.setNewHeaderProperty=function(){var e=new Jo;e.owner=this,this.setPropertyValue("header",e)},t.prototype.hasVariations=function(e){var t,o,r=Object.keys(Vo),n=this.themeName+"-light",i=this.themeName+"-dark";this.isPanelless&&(n+="-panelless",i+="-panelless"),o=-1!==r.indexOf(n)&&-1!==r.indexOf(i);var a=this.themeName+"-"+this.colorPalette,s=a+"-panelless";return t=-1!==r.indexOf(a)&&-1!==r.indexOf(s),e?o:t},t.prototype.initializeColorCalculator=function(e){e["--sjs-primary-backcolor"]&&e["--sjs-primary-backcolor-light"]&&e["--sjs-primary-backcolor-dark"]&&this.colorCalculator.initialize(e["--sjs-primary-backcolor"],e["--sjs-primary-backcolor-light"],e["--sjs-primary-backcolor-dark"])},t.prototype.cssVariablePropertiesChanged=function(e,t,o){if("primaryColor"===e&&(this.setPropertyValue("--sjs-primary-backcolor",t),this.setThemeCssVariablesChanges("--sjs-primary-backcolor",t)),"--sjs-primary-backcolor"===e&&(this.primaryColor=t,this.colorCalculator.calculateColors(t),this.setPropertyValue("--sjs-primary-backcolor-light",this.colorCalculator.colorSettings.newColorLight),this.setPropertyValue("--sjs-primary-backcolor-dark",this.colorCalculator.colorSettings.newColorDark),this.setThemeCssVariablesChanges("--sjs-primary-backcolor-light",this.colorCalculator.colorSettings.newColorLight),this.setThemeCssVariablesChanges("--sjs-primary-backcolor-dark",this.colorCalculator.colorSettings.newColorDark)),"--sjs-shadow-inner"===e||"--sjs-shadow-small"===e){var r=Go(t);this.setPropertyValue(e+"-reset",r),this.setThemeCssVariablesChanges(e+"-reset",r)}if("scale"==e&&this.setThemeCssVariablesChanges("--sjs-base-unit",8*t/100+"px"),"fontSize"==e&&this.setThemeCssVariablesChanges("--sjs-font-size",16*t/100+"px"),"cornerRadius"==e&&this.setThemeCssVariablesChanges("--sjs-corner-radius",t+"px"),"questionBackgroundTransparency"===e||"editorPanel"===e){var n=M(this.getPropertyValue("--sjs-general-backcolor-dim-light")).color,i=this.getPropertyValue("questionBackgroundTransparency");this.setThemeCssVariablesChanges("--sjs-editor-background",_(n,i/100))}if("panelBackgroundTransparency"===e||"questionPanel"===e){n=M(this.getPropertyValue("--sjs-general-backcolor")).color;var a=this.getPropertyValue("panelBackgroundTransparency");this.setThemeCssVariablesChanges("--sjs-question-background",_(n,a/100))}"font"===o.type&&(Mo(t,o,this.themeCssVariablesChanges),this.onThemePropertyChanged.fire(this,{name:e,value:t})),"backgroundcornerradius"===o.type&&(Bo(t,o,this.themeCssVariablesChanges),this.onThemePropertyChanged.fire(this,{name:e,value:t}))},t.prototype.setThemeCssVariablesChanges=function(e,t){this.themeCssVariablesChanges[e]=t,this.onThemePropertyChanged.fire(this,{name:e,value:t})},t.prototype.initialize=function(e,o){void 0===e&&(e={}),this._defaultSessionTheme=t.DefaultTheme,this.backgroundImage="backgroundImage"in e?e.backgroundImage:null==o?void 0:o.backgroundImage,this.backgroundImageFit=void 0!==e.backgroundImageFit?e.backgroundImageFit:null==o?void 0:o.backgroundImageFit,this.backgroundImageAttachment=void 0!==e.backgroundImageAttachment?e.backgroundImageAttachment:null==o?void 0:o.backgroundImageAttachment,this.backgroundOpacity=100*((void 0!==e.backgroundOpacity?e.backgroundOpacity:null==o?void 0:o.backgroundOpacity)||1),this.loadTheme(e),this.header.logoPosition=null==o?void 0:o.logoPosition,this.undoRedoManager=new Xt},Object.defineProperty(t.prototype,"header",{get:function(){return this.getPropertyValue("header")},set:function(e){e&&(this.setNewHeaderProperty(),this.header.fromJSON(e.toJSON()))},enumerable:!1,configurable:!0}),t.prototype.loadTheme=function(e){this.blockThemeChangedNotifications+=1;try{var o=nr(e),r=ir(e.themeName,e.colorPalette,e.isPanelless,o),n=ar(e,r);this.themeName=n.themeName,this.colorPalette=n.colorPalette,this.isPanelless=n.isPanelless,this.backgroundImage=e.backgroundImage||this.backgroundImage,this.backgroundImageFit=e.backgroundImageFit||this.backgroundImageFit,this.backgroundImageAttachment=e.backgroundImageAttachment||this.backgroundImageAttachment;var i={};B(i,t.DefaultTheme.cssVariables||{},r.cssVariables||{}),B(i,e.cssVariables||{},this.themeCssVariablesChanges);var a={backgroundImage:this.backgroundImage||r.backgroundImage||"",backgroundImageFit:this.backgroundImageFit||r.backgroundImageFit,backgroundImageAttachment:this.backgroundImageAttachment||r.backgroundImageAttachment,backgroundOpacity:this.backgroundOpacity/100||r.backgroundOpacity},s={};Object.keys(s).length>0&&(a.header=s),B(a,e,{cssVariables:i,themeName:this.themeName,colorPalette:this.colorPalette,isPanelless:this.isPanelless}),this.initializeColorCalculator(a.cssVariables),this.fromJSON(a)}finally{this.blockThemeChangedNotifications-=1}},t.prototype.resetTheme=function(){this.setTheme({themeName:this.defaultSessionTheme.themeName,isPanelless:this.defaultSessionTheme.isPanelless,colorPalette:this.defaultSessionTheme.colorPalette})},t.prototype.setTheme=function(e){var t=this,o=this.themeCssVariablesChanges["--sjs-header-backcolor"];this.themeCssVariablesChanges={},void 0!==o&&(this.themeCssVariablesChanges["--sjs-header-backcolor"]=o);try{this.blockThemeChangedNotifications+=1,this.iteratePropertiesHash((function(e,o){t.setPropertyValue(o,void 0)})),this.setNewHeaderProperty()}finally{this.blockThemeChangedNotifications-=1}this.loadTheme(e),this.onThemeSelected.fire(this,{theme:this.toJSON()})},t.prototype.selectTheme=function(e,t,o){void 0===t&&(t="light"),void 0===o&&(o="panels"),this.themeName=e,this.colorPalette=t,this.isPanelless="lightweight"===o;var r=this.findSuitableTheme(e);this.setTheme(r)},t.prototype.generalPropertiesChanged=function(e,t){var o;return-1!==["themeName","isPanelless","colorPalette"].indexOf(e)&&("themeName"===e&&this.loadTheme(this.findSuitableTheme(t)||((o={})[e]=t,o.isPanelless=this.isPanelless,o.colorPalette=this.colorPalette,o)),"isPanelless"===e&&this.loadTheme({themeName:this.themeName,isPanelless:t,colorPalette:this.colorPalette}),"colorPalette"===e&&this.loadTheme({themeName:this.themeName,isPanelless:this.isPanelless,colorPalette:t}),this.onThemeSelected.fire(this,{theme:this.toJSON()}),!0)},t.prototype.onThemePropertyValueChangedCallback=function(e,t,o,r,n){var i=this;if(this.undoRedoManager&&(0==this.blockThemeChangedNotifications&&this.undoRedoManager.startTransaction(e+" changed"),this.undoRedoManager.onPropertyValueChanged(e,t,o,r,n)),!(this.blockThemeChangedNotifications>0)){if(this!==r){var a=r.toJSON();a.cssVariables&&Object.keys(a.cssVariables).forEach((function(e){return i.setThemeCssVariablesChanges(e,a.cssVariables[e])})),this.onThemePropertyChanged.fire(this,{name:e,value:o})}if(0===e.indexOf("--")&&this.setThemeCssVariablesChanges(e,o),this.generalPropertiesChanged(e,o))this.undoRedoManager&&0==this.blockThemeChangedNotifications&&this.undoRedoManager.stopTransaction();else{if(this.blockThemeChangedNotifications+=1,-1!==["backgroundImage","backgroundImageFit","backgroundImageAttachment","backgroundOpacity"].indexOf(e))return this[e]=o,this.onThemePropertyChanged.fire(this,{name:e,value:o}),this.blockThemeChangedNotifications-=1,void(this.undoRedoManager&&0==this.blockThemeChangedNotifications&&this.undoRedoManager.stopTransaction());this.cssVariablePropertiesChanged(e,o,r.getPropertyByName(e)),this.blockThemeChangedNotifications-=1,this.undoRedoManager&&0==this.blockThemeChangedNotifications&&this.undoRedoManager.stopTransaction()}}},t.prototype.findSuitableTheme=function(e){var t=nr({themeName:e,colorPalette:this.colorPalette,isPanelless:this.isPanelless});return ir(e,this.colorPalette,this.isPanelless,t)},t.prototype.fromJSON=function(t,o){if(t){e.prototype.fromJSON.call(this,t,o);var r=new Jo;r.fromJSON(t.header||{}),r.owner=this,this.header=r,t.cssVariables&&(this.primaryColor=t.cssVariables["--sjs-primary-backcolor"],e.prototype.fromJSON.call(this,t.cssVariables,o),r.setCssVariables(t.cssVariables),this.scale=this["--sjs-base-unit"]?c(100*parseFloat(this["--sjs-base-unit"])/8):void 0,this.fontSize=this["--sjs-font-size"]?c(100*parseFloat(this["--sjs-font-size"])/16):void 0,this.cornerRadius=this["--sjs-corner-radius"]?c(parseFloat(this["--sjs-corner-radius"])):void 0,t.backgroundOpacity&&(this.backgroundOpacity=100*t.backgroundOpacity),this.questionPanel=Qo(this.getPropertyByName("questionPanel"),t.cssVariables,"--sjs-general-backcolor","--sjs-general-backcolor-dark",this.cornerRadius),this.editorPanel=Qo(this.getPropertyByName("editorPanel"),t.cssVariables,"--sjs-general-backcolor-dim-light","--sjs-general-backcolor-dim-dark",this.cornerRadius),this.pageTitle=Ro(this.getPropertyByName("pageTitle"),t.cssVariables,"--sjs-general-dim-forecolor"),this.pageDescription=Ro(this.getPropertyByName("pageDescription"),t.cssVariables,"--sjs-general-dim-forecolor-light"),this.questionTitle=Ro(this.getPropertyByName("questionTitle"),t.cssVariables,"--sjs-general-forecolor"),this.questionDescription=Ro(this.getPropertyByName("questionDescription"),t.cssVariables,"--sjs-general-forecolor-light"),this.editorFont=Ro(this.getPropertyByName("editorFont"),t.cssVariables,"--sjs-general-forecolor","--sjs-general-forecolor-light"))}},t.prototype.toJSON=function(t){var o=this;void 0!==this.scale&&(this["--sjs-base-unit"]=8*this.scale/100+"px"),void 0!==this.fontSize&&(this["--sjs-font-size"]=16*this.fontSize/100+"px"),void 0!==this.cornerRadius&&(this["--sjs-corner-radius"]=this.cornerRadius+"px");var r=e.prototype.toJSON.call(this,t);r.backgroundImage=this.backgroundImage||"",r.backgroundOpacity=this.backgroundOpacity/100,r.backgroundImageAttachment=this.backgroundImageAttachment,r.backgroundImageFit=this.backgroundImageFit;var n={};return Object.keys(r).forEach((function(e){if(0==e.indexOf("--"))n[e]=r[e],delete r[e];else if("object"==typeof r[e]){var t=o.getPropertyByName(e);"font"===t.type&&(Mo(r[e],t,n),delete r[e]),"backgroundcornerradius"===t.type&&(Bo(r[e],t,n),delete r[e])}})),r.cssVariables=n,this.header.saveToThemeJSON(r,t),r},t.DefaultTheme=Vo["default-light"],Z([Object(i.property)()],t.prototype,"backgroundImage",void 0),Z([Object(i.property)()],t.prototype,"backgroundImageFit",void 0),Z([Object(i.property)()],t.prototype,"backgroundImageAttachment",void 0),Z([Object(i.property)()],t.prototype,"backgroundOpacity",void 0),Z([Object(i.property)()],t.prototype,"themeName",void 0),Z([Object(i.property)()],t.prototype,"colorPalette",void 0),Z([Object(i.property)()],t.prototype,"isPanelless",void 0),Z([Object(i.property)()],t.prototype,"groupAppearanceAdvancedMode",void 0),Z([Object(i.property)({onSet:function(e,t){var o=_(M(t.questionPanel.backcolor).color,e/100);if(t.questionPanel.backcolor!==o){var r=K({},t.questionPanel);r.backcolor=o,t.questionPanel=r}}})],t.prototype,"panelBackgroundTransparency",void 0),Z([Object(i.property)({onSet:function(e,t){var o=_(M(t.editorPanel.backcolor).color,e/100);if(t.editorPanel.backcolor!==o){var r=K({},t.editorPanel);r.backcolor=o,t.editorPanel=r}}})],t.prototype,"questionBackgroundTransparency",void 0),Z([Object(i.property)()],t.prototype,"scale",void 0),Z([Object(i.property)()],t.prototype,"cornerRadius",void 0),Z([Object(i.property)()],t.prototype,"fontSize",void 0),Z([Object(i.property)({onSet:function(e,t){var o=M(e.backcolor).opacity;t.panelBackgroundTransparency!==o&&(t.panelBackgroundTransparency=o)}})],t.prototype,"questionPanel",void 0),Z([Object(i.property)({onSet:function(e,t){var o=M(e.backcolor).opacity;t.questionBackgroundTransparency!==o&&(t.questionBackgroundTransparency=o)}})],t.prototype,"editorPanel",void 0),t}(i.Base);i.Serializer.addClass("theme",[{type:"dropdown",name:"themeName",choices:No.map((function(e){return{value:e,text:z("theme.names."+e)}})),category:"general"},{type:"buttongroup",name:"colorPalette",displayName:"",choices:[{value:"light"},{value:"dark"}],category:"general",enableIf:function(e){return!e||e.hasVariations(!0)}},{type:"buttongroup",name:"isPanelless",choices:[{value:!1},{value:!0}],category:"general",enableIf:function(e){return!e||e.hasVariations(!1)}},{type:"spinedit",isSerializable:!1,name:"scale",onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.step=5)}},{type:"spinedit",isSerializable:!1,name:"cornerRadius",onPropertyEditorUpdate:function(e,t){t&&(t.unit="px",t.min=0)}},{type:"spinedit",isSerializable:!1,name:"fontSize",onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.step=5)}},{type:"spinedit",isSerializable:!1,name:"panelBackgroundTransparency",default:100,onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.max=100,t.step=5)}},{type:"spinedit",isSerializable:!1,name:"questionBackgroundTransparency",default:100,onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.max=100,t.step=5)}},{type:"backgroundcornerradius",name:"editorPanel"},{type:"backgroundcornerradius",name:"questionPanel"}],(function(e){return new sr})),i.Serializer.addProperties("theme",[{name:"backgroundImage:file",onPropertyEditorUpdate:function(e,t){t&&(t.storeDataAsText=!1,t.acceptedTypes="image/*")}},{name:"backgroundImageFit",displayName:"",enableIf:function(e){return!!e.backgroundImage},choices:[{value:"auto"},{value:"contain"},{value:"cover"}],default:"cover"},{name:"backgroundImageAttachment",displayName:"",enableIf:function(e){return!!e.backgroundImage},choices:[{value:"fixed"},{value:"scroll"}],default:"scroll"},{type:"spinedit",isSerializable:!1,name:"backgroundOpacity",enableIf:function(e){return!!e.backgroundImage},default:100,onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.max=100,t.step=5,t.titleLocation="left")}},{type:"header",name:"header",isSerializable:!1,onPropertyEditorUpdate:function(e,t){if(t){var o=t.contentPanel.elements,r=function(e){"panel"===e.getType()&&e.elements.forEach((function(e){r(e)}));var t=e.obj;if(t){var o=e.property;o&&o.onPropertyEditorUpdate&&o.onPropertyEditorUpdate(t,e)}};o.forEach((function(e){r(e)}))}}},{type:"color",isSerializable:!1,name:"primaryColor"},{type:"dropdown",name:"--sjs-font-family",default:a.themeEditor.defaultFontFamily,choices:[].concat(Ao),onPropertyEditorUpdate:function(e,t){t&&(t.allowClear=!1)}},{name:"--sjs-font-size",visible:!1,default:"16px"},{name:"--sjs-corner-radius",visible:!1},{name:"--sjs-base-unit",visible:!1},{name:"--sjs-corner-radius",visible:!1},{type:"font",name:"pageTitle",default:{family:a.themeEditor.defaultFontFamily,weight:"700",size:24}},{type:"font",name:"pageDescription",default:{family:a.themeEditor.defaultFontFamily,weight:"700",size:24}},{type:"shadoweffects",name:"--sjs-shadow-small"},{type:"font",name:"questionTitle",default:{family:a.themeEditor.defaultFontFamily,weight:"600",size:16}},{type:"font",name:"questionDescription",default:{family:a.themeEditor.defaultFontFamily,weight:"400",size:16}},{type:"shadoweffects",name:"--sjs-shadow-inner"},{type:"font",name:"editorFont",default:{family:a.themeEditor.defaultFontFamily,weight:"400",size:16}},{type:"coloralpha",name:"--sjs-border-default",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.borderDefault"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-border-light",displayName:"",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.borderLight"),t.colorTitleLocation="left")}},{name:"--sjs-general-backcolor",visible:!1},{name:"--sjs-general-backcolor-dark",visible:!1},{name:"--sjs-general-backcolor-dim-light",visible:!1},{name:"--sjs-general-backcolor-dim-dark",visible:!1},{name:"--sjs-general-forecolor",visible:!1},{name:"--sjs-general-forecolor-light",visible:!1},{name:"--sjs-general-dim-forecolor",visible:!1},{name:"--sjs-general-dim-forecolor-light",visible:!1},{name:"--sjs-secondary-backcolor",visible:!1},{name:"--sjs-secondary-backcolor-light",visible:!1},{name:"--sjs-secondary-backcolor-semi-light",visible:!1},{name:"--sjs-secondary-forecolor",visible:!1},{name:"--sjs-secondary-forecolor-light",visible:!1},{name:"--sjs-shadow-small-reset",visible:!1},{name:"--sjs-shadow-medium",visible:!1},{name:"--sjs-shadow-large",visible:!1},{name:"--sjs-shadow-inner-reset",visible:!1},{name:"--sjs-border-light",visible:!1},{name:"--sjs-border-default",visible:!1},{name:"--sjs-border-inside",visible:!1},{name:"--sjs-special-red",visible:!1},{name:"--sjs-special-red-light",visible:!1},{name:"--sjs-special-red-forecolor",visible:!1},{name:"--sjs-special-green",visible:!1},{name:"--sjs-special-green-light",visible:!1},{name:"--sjs-special-green-forecolor",visible:!1},{name:"--sjs-special-blue",visible:!1},{name:"--sjs-special-blue-light",visible:!1},{name:"--sjs-special-blue-forecolor",visible:!1},{name:"--sjs-special-yellow",visible:!1},{name:"--sjs-special-yellow-light",visible:!1},{name:"--sjs-special-yellow-forecolor",visible:!1},{name:"--sjs-article-font-xx-large-textDecoration",visible:!1},{name:"--sjs-article-font-xx-large-fontWeight",visible:!1},{name:"--sjs-article-font-xx-large-fontStyle",visible:!1},{name:"--sjs-article-font-xx-large-fontStretch",visible:!1},{name:"--sjs-article-font-xx-large-letterSpacing",visible:!1},{name:"--sjs-article-font-xx-large-lineHeight",visible:!1},{name:"--sjs-article-font-xx-large-paragraphIndent",visible:!1},{name:"--sjs-article-font-xx-large-textCase",visible:!1},{name:"--sjs-article-font-x-large-textDecoration",visible:!1},{name:"--sjs-article-font-x-large-fontWeight",visible:!1},{name:"--sjs-article-font-x-large-fontStyle",visible:!1},{name:"--sjs-article-font-x-large-fontStretch",visible:!1},{name:"--sjs-article-font-x-large-letterSpacing",visible:!1},{name:"--sjs-article-font-x-large-lineHeight",visible:!1},{name:"--sjs-article-font-x-large-paragraphIndent",visible:!1},{name:"--sjs-article-font-x-large-textCase",visible:!1},{name:"--sjs-article-font-large-textDecoration",visible:!1},{name:"--sjs-article-font-large-fontWeight",visible:!1},{name:"--sjs-article-font-large-fontStyle",visible:!1},{name:"--sjs-article-font-large-fontStretch",visible:!1},{name:"--sjs-article-font-large-letterSpacing",visible:!1},{name:"--sjs-article-font-large-lineHeight",visible:!1},{name:"--sjs-article-font-large-paragraphIndent",visible:!1},{name:"--sjs-article-font-large-textCase",visible:!1},{name:"--sjs-article-font-medium-textDecoration",visible:!1},{name:"--sjs-article-font-medium-fontWeight",visible:!1},{name:"--sjs-article-font-medium-fontStyle",visible:!1},{name:"--sjs-article-font-medium-fontStretch",visible:!1},{name:"--sjs-article-font-medium-letterSpacing",visible:!1},{name:"--sjs-article-font-medium-lineHeight",visible:!1},{name:"--sjs-article-font-medium-paragraphIndent",visible:!1},{name:"--sjs-article-font-medium-textCase",visible:!1},{name:"--sjs-article-font-default-textDecoration",visible:!1},{name:"--sjs-article-font-default-fontWeight",visible:!1},{name:"--sjs-article-font-default-fontStyle",visible:!1},{name:"--sjs-article-font-default-fontStretch",visible:!1},{name:"--sjs-article-font-default-letterSpacing",visible:!1},{name:"--sjs-article-font-default-lineHeight",visible:!1},{name:"--sjs-article-font-default-paragraphIndent",visible:!1},{name:"--sjs-article-font-default-textCase",visible:!1},{type:"color",name:"--sjs-general-backcolor-dim"},{type:"coloralpha",name:"--sjs-primary-backcolor",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryDefaultColor"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-primary-backcolor-dark",displayName:"",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryDarkColor"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-primary-backcolor-light",displayName:"",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryLightColor"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-primary-forecolor",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryForecolor"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-primary-forecolor-light",displayName:"",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryForecolorLight"),t.colorTitleLocation="left")}}]),o(15);var lr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getSwitcherIconCss=function(){return(new i.CssClassBuilder).append("svc-switcher__icon").append("svc-switcher__icon--checked",this.checked).toString()},t.prototype.getActionBarItemCss=function(){return"svc-switcher "+e.prototype.getActionBarItemCss.call(this)},Z([Object(i.property)()],t.prototype,"checked",void 0),t}(i.Action),cr={theme:{properties:[{name:"header",tab:"header"},{name:"--sjs-general-backcolor-dim",tab:"background"},{name:"backgroundImage",tab:"background"},{name:"backgroundImageFit",tab:"background"},{name:"backgroundImageAttachment",tab:"background"},{name:"backgroundOpacity",tab:"background"},{name:"primaryColor",tab:"appearancecolor"},{name:"panelBackgroundTransparency",tab:"appearancecolor"},{name:"questionBackgroundTransparency",tab:"appearancecolor"},{name:"--sjs-primary-backcolor",tab:"appearanceprimarycolor"},{name:"--sjs-primary-backcolor-dark",tab:"appearanceprimarycolor"},{name:"--sjs-primary-backcolor-light",tab:"appearanceprimarycolor"},{name:"--sjs-primary-forecolor",tab:"appearanceprimarycolor"},{name:"--sjs-primary-forecolor-light",tab:"appearanceprimarycolor"},{name:"--sjs-font-family",tab:"appearancefont"},{name:"fontSize",tab:"appearancefont"},{name:"scale",tab:"appearanceother"},{name:"cornerRadius",tab:"appearanceother"},{name:"pageTitle",tab:"appearancepage"},{name:"pageDescription",tab:"appearancepage"},{name:"questionPanel",tab:"appearancequestion"},{name:"--sjs-shadow-small",tab:"appearancequestion"},{name:"questionTitle",tab:"appearancequestion"},{name:"questionDescription",tab:"appearancequestion"},{name:"editorPanel",tab:"appearanceinput"},{name:"--sjs-shadow-inner",tab:"appearanceinput"},{name:"editorFont",tab:"appearanceinput"},{name:"--sjs-border-default",tab:"appearancelines"},{name:"--sjs-border-light",tab:"appearancelines"}],tabs:[{name:"header",index:100},{name:"background",index:200},{name:"appearance",index:300},{name:"appearancecolor",parent:"appearance",index:100},{name:"appearancefont",parent:"appearance",index:200},{name:"appearanceother",parent:"appearance",index:300},{name:"appearanceprimarycolor",parent:"appearance",index:400},{name:"appearancepage",parent:"appearance",index:500},{name:"appearancequestion",parent:"appearance",index:600},{name:"appearanceinput",parent:"appearance",index:700},{name:"appearancelines",parent:"appearance",index:800}]},"header@header":{properties:[{name:"headerView"},{name:"logoPosition"},{name:"surveyTitle"},{name:"surveyDescription"},{name:"height",tab:"layout"},{name:"inheritWidthFrom",tab:"layout"},{name:"textAreaWidth",tab:"layout"},{name:"backgroundColorSwitch",tab:"background"},{name:"backgroundColor",tab:"background"},{name:"backgroundImage",tab:"background"},{name:"backgroundImageFit",tab:"background"},{name:"backgroundImageOpacity",tab:"background"},{name:"overlapEnabled",tab:"background"},{name:"headerTitle",tab:"header"},{name:"headerDescription",tab:"header"},{name:"logoPositionX",tab:"positions"},{name:"logoPositionY",tab:"positions"},{name:"titlePositionX",tab:"positions"},{name:"titlePositionY",tab:"positions"},{name:"descriptionPositionX",tab:"positions"},{name:"descriptionPositionY",tab:"positions"}],tabs:[{name:"settings"},{name:"layout",parent:"settings",index:100},{name:"background",parent:"settings",index:200},{name:"header",parent:"settings",index:300},{name:"positions",parent:"settings",index:400}]}},pr={autoGenerateProperties:!0,classes:cr},ur=function(){function e(){}return e.definition=cr,e}(),dr=function(){function e(e){var t=this;this.creator=e,this.allowModifyTheme=!0,this.simulatorCssClasses=i.surveyCss[i.defaultV2ThemeName],this._availableThemes=[].concat(No),this.creatorPropertyChanged=function(e,o){"isMobileView"===o.name&&t.updateVisibilityOfPropertyGridGroups()},this.saveToFileHandler=F,this.autoSaveTimerId=null,this.onThemeSelected=new i.EventBase,this.onThemePropertyChanged=new i.EventBase,this.onAllowModifyTheme=new i.EventBase,e.addPluginTab("theme",this),this.simulatorCssClasses=i.surveyCss[i.defaultV2ThemeName],this.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),this.propertyGrid=new rt(void 0,e,pr);var o=new po(this.propertyGrid,e);this.propertyGridTab=this.creator.sidebar.addTab("theme","svc-property-grid",o),this.propertyGridTab.caption=G.getString("ed.themePropertyGridTitle"),this.themeModel=new sr,e.registerShortcut("undo_theme",{name:"undo",affectedTab:"theme",hotKey:{ctrlKey:!0,keyCode:90},macOsHotkey:{keyCode:90},execute:function(){return t.undo()}}),e.registerShortcut("redo_theme",{name:"redo",affectedTab:"theme",hotKey:{ctrlKey:!0,keyCode:89},macOsHotkey:{keyCode:89},execute:function(){return t.redo()}}),e.onPropertyChanged.add(this.creatorPropertyChanged)}return e.prototype.createVisibleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){return"theme"===e.creator.activeTab}))},e.prototype.createAppearanceAdvancedModeAction=function(){var e=this,t=new lr({id:"advancedMode",component:"svc-switcher",ariaRole:"checkbox",css:"sv-theme-group_title-action",title:z("theme.advancedMode"),visible:!this.creator.isMobileView,action:function(){t.checked=!t.checked,e.propertyGrid.survey.setVariable("advancedmode",t.checked)}});t.checked=!!this.propertyGrid.survey.getVariable("advancedmode"),this.advancedModeSwitcher=t},e.prototype.addSubGroupTitle=function(e,t){if(!e.getQuestionByName(t)){var o=i.Serializer.createClass("html");o.fromJSON({name:t,visibleIf:"{advancedmode} = true",html:"<div class='spg-theme-group-caption'>"+z(t)+"</div>"}),e.addElement(o)}},e.prototype.updateSubGroups=function(e){var t=this;["appearancelines","appearanceinput","appearancequestion","appearancepage","appearanceprimarycolor"].forEach((function(e){return t.setVisibleIf(e,!0)})),["appearancecolor","appearancefont","appearanceother"].forEach((function(e){return t.setVisibleIf(e,!1)})),this.addSubGroupTitle(e.getPanelByName("appearanceprimarycolor"),"theme.pageTitle"),this.addSubGroupTitle(e.getPanelByName("appearancepage"),"theme.questionTitle"),this.addSubGroupTitle(e.getPanelByName("appearancequestion"),"theme.editorPanel"),this.addSubGroupTitle(e.getPanelByName("appearanceinput"),"theme.lines")},e.prototype.updatePropertyGridEditorsAvailability=function(){var e=this.model.simulator.survey,t=this.propertyGrid.survey.pages[0],o=null==t?void 0:t.getElementByName("header");if(o&&o.elements.length>0){var r=o.elements[0].contentPanel;this.setCoverPropertiesFromSurvey(r,e)}var n=this.propertyGrid.survey.getQuestionByName("pageTitle"),i=e.isSinglePage?e.pages[0].elements:e.pages;n&&(n.readOnly=!i.some((function(e){return!!e.title})));var a=this.propertyGrid.survey.getQuestionByName("pageDescription");a&&(a.readOnly=!i.some((function(e){return!!e.description})))},e.prototype.getPredefinedColorsItemValues=function(){var e=this;return Object.keys(ko[this.themeModel.colorPalette]).map((function(t){return new i.ItemValue(ko[e.themeModel.colorPalette][t],z("theme.colors."+t))}))},e.prototype.updatePropertyGridColorEditorWithPredefinedColors=function(){var e=this,t=this.propertyGrid.survey.pages[0],o=null==t?void 0:t.getElementByName("header");if(o&&o.elements.length>0){var r=o.elements[0].contentPanel.getQuestionByName("backgroundColor");r&&(r.choices=this.getPredefinedColorsItemValues())}this.propertyGrid.survey.getAllQuestions().forEach((function(t){-1!==["color","coloralpha"].indexOf(t.getType())&&(t.choices=e.getPredefinedColorsItemValues())}))},e.prototype._setPGEditorPropertyValue=function(e,t,o){e&&(e[t]=o)},e.prototype.setCoverPropertiesFromSurvey=function(e,t){this._setPGEditorPropertyValue(e.getQuestionByName("headerView"),"value",t.headerView),this._setPGEditorPropertyValue(e.getQuestionByName("logoPosition"),"value",t.logoPosition),this._setPGEditorPropertyValue(e.getQuestionByName("surveyTitle"),"readOnly",!t.hasTitle),this._setPGEditorPropertyValue(e.getQuestionByName("surveyDescription"),"readOnly",!t.hasDescription),this._setPGEditorPropertyValue(e.getQuestionByName("headerTitle"),"readOnly",!t.hasTitle),this._setPGEditorPropertyValue(e.getQuestionByName("headerDescription"),"readOnly",!t.hasDescription),this._setPGEditorPropertyValue(e.getQuestionByName("logoPositionX"),"readOnly",!t.logo),this._setPGEditorPropertyValue(e.getQuestionByName("logoPositionY"),"readOnly",!t.logo),this._setPGEditorPropertyValue(e.getQuestionByName("logoPosition"),"readOnly",!t.logo),this._setPGEditorPropertyValue(e.getQuestionByName("titlePositionX"),"readOnly",!t.title),this._setPGEditorPropertyValue(e.getQuestionByName("titlePositionY"),"readOnly",!t.title),this._setPGEditorPropertyValue(e.getQuestionByName("descriptionPositionX"),"readOnly",!t.description),this._setPGEditorPropertyValue(e.getQuestionByName("descriptionPositionY"),"readOnly",!t.description)},e.prototype.updateVisibilityOfPropertyGridGroups=function(){var e=this.propertyGrid.survey.pages[0],t=null==e?void 0:e.getElementByName("header");t&&(t.visible=!this.creator.isMobileView),this.advancedModeSwitcher&&(this.advancedModeSwitcher.visible=!this.creator.isMobileView)},e.prototype.setVisibleIf=function(e,t){var o=this.propertyGrid.survey.getPanelByName(e);o&&(o.visibleIf="{advancedmode} = "+t)},e.prototype.activate=function(){var e,t=this;this.model=new Oo(this.creator,this.simulatorCssClasses),this.themeModel.initialize(this.creator.theme,this.creator.survey),this.update(),this.propertyGrid.survey.onOpenFileChooser.clear(),this.propertyGrid.obj=this.themeModel,this.propertyGrid.survey.mode="edit",this.propertyGrid.survey.getAllQuestions().forEach((function(e){return e.readOnly=!1})),this.onAvailableThemesChanged(this.availableThemes),this.updateAllowModifyTheme(),this.propertyGrid.survey.setVariable("advancedmode",!!(null===(e=this.advancedModeSwitcher)||void 0===e?void 0:e.checked));var o=K({},Ue);o.root+=" spg-theme-builder-root",this.propertyGrid.survey.css=o,this.updateSubGroups(this.propertyGrid.survey),this.propertyGrid.survey.onGetPanelTitleActions.add((function(e,o){o.panel&&"appearance"==o.panel.name&&(t.createAppearanceAdvancedModeAction(),o.titleActions.push(t.advancedModeSwitcher))})),this.propertyGrid.survey.onOpenFileChooser.add((function(e,o){var r,n,i={};if(B(i,o.context,{element:t.themeModel,elementType:"theme"}),o.element){var a=o.element;i.propertyName=a.name,"settings"===(null===(n=null===(r=null==a?void 0:a.parent)||void 0===r?void 0:r.parent)||void 0===n?void 0:n.name)&&(i.elementType="header",i.element=i.element.header)}t.creator.chooseFiles(o.input,o.callback,i)})),this.propertyGrid.survey.onUpdatePanelCssClasses.add((function(e,t){var o,r;if(t.panel.hasParent){var n=null!==(o=t.panel.parent)&&void 0!==o?o:t.panel.parentQuestion;!n||n.hasParent&&"settings"!==n.name&&"settings"!==(null===(r=n.parentQuestion)||void 0===r?void 0:r.name)?(t.cssClasses.panel.container="spg-panel-group",t.cssClasses.panel.content="spg-panel-group__content"):(t.cssClasses.panel.container="spg-nested-panel",t.cssClasses.panel.content="spg-nested-panel__content")}})),this.updatePropertyGridEditorsAvailability(),this.updateVisibilityOfPropertyGridGroups(),this.updatePropertyGridColorEditorWithPredefinedColors(),this.creator.sidebar.activeTab=this.propertyGridTab.id,this.propertyGridTab.visible=!0,this.creator.expandCategoryIfNeeded()},e.prototype.update=function(){var e=this;if(this.model){this.model.simulator.landscape="portrait"!=this.creator.previewOrientation,this.model.testAgainAction=this.testAgainAction,this.model.prevPageAction=this.prevPageAction,this.model.nextPageAction=this.nextPageAction;var t={showPagesInTestSurveyTab:this.creator.showPagesInTestSurveyTab};this.model.initialize(this.creator.JSON,t),this.updateSimulatorTheme(),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction.css=this.model.showInvisibleElements?"sv-action-bar-item--active":"",this.invisibleToggleAction.visible=this.model.isRunning),this.updateUndeRedoActions(),this.themeModel.undoRedoManager.canUndoRedoCallback=function(){e.updateUndeRedoActions()},this.model.show(),this.model.onPropertyChanged.add((function(t,o){"isRunning"===o.name&&(e.invisibleToggleAction&&(e.invisibleToggleAction.visible=e.model.isRunning),e.testAgainAction.visible=!e.model.isRunning)})),this.themeModel.onThemeSelected.add((function(t,o){e.syncTheme(o.theme),e.resetTheme.enabled=nr(t.defaultSessionTheme)!==nr(o.theme),e.saveThemeAction.enabled=!0,e.onThemeSelected.fire(e,o),e.creator.isAutoSave&&e.processAutoSave(),e.propertyGrid.survey.editingObj=void 0,e.propertyGrid.survey.editingObj=t,e.updateAllowModifyTheme(),e.updatePropertyGridColorEditorWithPredefinedColors()})),this.themeModel.onThemePropertyChanged.add((function(t,o){e.syncTheme(),"--sjs-base-unit"==o.name&&e.model.survey.triggerResponsiveness(!0),"logoPosition"==o.name&&(e.creator.survey.logoPosition=o.value),e.resetTheme.enabled=!0,e.saveThemeAction.enabled=!0,e.onThemePropertyChanged.fire(e,o),e.creator.isAutoSave&&e.processAutoSave()})),this.themeModel.onAllowModifyTheme.add((function(t,o){e.onAllowModifyTheme.fire(e,o)})),this.resetTheme.enabled=nr(this.themeModel.defaultSessionTheme)!==nr(this.creator.theme)||this.isModified}},e.prototype.updateAllowModifyTheme=function(){var e=this,t={theme:this.themeModel,allow:!this.creator.readOnly};this.onAllowModifyTheme.fire(this,t),this.propertyGrid.survey.getAllQuestions().forEach((function(o){-1===["themeName","colorPalette","isPanelless"].indexOf(o.name)&&(o.readOnly=e.creator.onIsPropertyReadOnlyCallback(e.themeModel,e.themeModel.getPropertyByName(o.name),!t.allow,void 0,void 0,!1))}))},e.prototype.deactivate=function(){return this.model&&(this.simulatorCssClasses=this.model.simulator.survey.css,this.model.onPropertyChanged.clear(),this.themeModel.onThemeSelected.clear(),this.themeModel.onThemePropertyChanged.clear(),this.themeModel.onAllowModifyTheme.clear(),this.model.onSurveyCreatedCallback=void 0,this.model.dispose(),this.model=void 0),this.propertyGridTab.visible=!1,this.testAgainAction.visible=!1,this.invisibleToggleAction&&(this.invisibleToggleAction.visible=!1),!0},e.prototype.exportToFile=function(e){var t=JSON.parse(JSON.stringify(this.themeModel.toJSON())),o=JSON.stringify(t,null,4),r=new Blob([o],{type:"application/json"});this.saveToFileHandler(e,r)},e.prototype.importFromFile=function(e,t){var o=this,r=new FileReader;r.onload=function(e){var n=JSON.parse(r.result);o.themeModel&&o.themeModel.setTheme(n),t&&t(n)},r.readAsText(e)},e.prototype.createActions=function(){var e=this,t=[];return this.designerAction=new i.Action({id:"svd-designer",iconName:"icon-config",action:function(){e.creator.makeNewViewActive("designer")},visible:this.createVisibleUpdater(),locTitleName:"ed.designer",showTitle:!1}),this.prevPageAction=new i.Action({id:"prevPage",iconName:"icon-arrow-left_16x16",needSeparator:new i.ComputedUpdater((function(){return e.creator.isMobileView})),visible:!1}),this.nextPageAction=new i.Action({id:"nextPage",iconName:"icon-arrow-right_16x16",visible:!1}),this.previewAction=new i.Action({id:"svd-preview",iconName:"icon-preview",active:!0,visible:this.createVisibleUpdater(),locTitleName:"tabs.preview",showTitle:!1,action:function(){}}),this.testAgainAction=new i.Action({id:"testSurveyAgain",visible:!1,locTitleName:"ed.testSurveyAgain",action:function(){e.model.testAgain()}}),this.undoAction=new i.Action({id:"action-undo-theme",iconName:"icon-undo",locTitleName:"ed.undo",showTitle:!1,visible:this.createVisibleUpdater(),action:function(){return e.undo()}}),this.redoAction=new i.Action({id:"action-redo-theme",iconName:"icon-redo",locTitleName:"ed.redo",showTitle:!1,visible:this.createVisibleUpdater(),action:function(){return e.redo()}}),t.push(this.undoAction),t.push(this.redoAction),this.saveThemeAction=new i.Action({id:"svd-save-theme",iconName:"icon-save",action:function(){e.creator.saveThemeActionHandler(),e.saveThemeAction.enabled=!1},active:!1,enabled:!1,visible:new i.ComputedUpdater((function(){return O("theme"===e.creator.activeTab,e.creator.showSaveButton)})),locTitleName:"ed.saveTheme",locTooltipName:"ed.saveThemeTooltip",showTitle:!1}),t.push(this.saveThemeAction),this.resetTheme=new i.Action({id:"svc-reset-theme",iconName:"icon-reset",locTitleName:"ed.themeResetButton",locTooltipName:"ed.themeResetButton",mode:"small",visible:this.createVisibleUpdater(),action:function(){i.settings.confirmActionAsync(z("ed.themeResetConfirmation"),(function(t){t&&e.themeModel.resetTheme()}),z("ed.themeResetConfirmationOk"),G.currentLocale)}}),t.push(this.resetTheme),this.themeSettingsAction=new i.Action({id:"svc-theme-settings",iconName:"icon-theme",action:function(){e.creator.showSidebar||e.creator.setShowSidebar(!0,!0)},visible:this.createVisibleUpdater(),active:new i.ComputedUpdater((function(){return e.creator.showSidebar})),pressed:new i.ComputedUpdater((function(){return e.creator.showSidebar})),locTitleName:"ed.themeSettings",locTooltipName:"ed.themeSettingsTooltip",showTitle:!1}),t.push(this.themeSettingsAction),this.importAction=new i.Action({id:"svc-theme-import",iconName:"icon-load",locTitleName:"ed.themeImportButton",locTooltipName:"ed.themeImportButton",visible:this.createVisibleUpdater(),mode:"small",component:"sv-action-bar-item",needSeparator:!0,action:function(){document&&(e.inputFileElement||(e.inputFileElement=document.createElement("input"),e.inputFileElement.type="file",e.inputFileElement.style.display="none",e.inputFileElement.onchange=function(){e.inputFileElement.files.length<1||(e.importFromFile(e.inputFileElement.files[0]),e.inputFileElement.value="")}),e.inputFileElement.click())}}),t.push(this.importAction),this.exportAction=new i.Action({id:"svc-theme-export",iconName:"icon-download",locTitleName:"ed.themeExportButton",locTooltipName:"ed.themeExportButton",visible:this.createVisibleUpdater(),mode:"small",component:"sv-action-bar-item",action:function(){e.exportToFile(a.themeEditor.exportFileName)}}),t.push(this.exportAction),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction=new i.Action({id:"showInvisible",iconName:"icon-invisible-items",mode:"small",locTitleName:"ts.showInvisibleElements",visible:!1,action:function(){e.model.showInvisibleElements=!e.model.showInvisibleElements,e.invisibleToggleAction.css=e.model.showInvisibleElements?"sv-action-bar-item--active":"",e.invisibleToggleAction.title=z(e.model.showInvisibleElements?"ts.hideInvisibleElements":"ts.showInvisibleElements")}})),t},e.prototype.undo=function(){var e=this.model&&this.themeModel.undoRedoManager;e&&(e.suspend(),e.canUndo()&&e.undo(),e.resume())},e.prototype.redo=function(){var e=this.model&&this.themeModel.undoRedoManager;e&&(e.suspend(),e.canRedo()&&e.redo(),e.resume())},e.prototype.updateUndeRedoActions=function(){var e=this.themeModel.undoRedoManager;this.undoAction.enabled=e.canUndo(),this.redoAction.enabled=e.canRedo()},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.designerAction),this.creator.footerToolbar.actions.push(this.previewAction),this.creator.footerToolbar.actions.push(this.prevPageAction),this.creator.footerToolbar.actions.push(this.nextPageAction),this.invisibleToggleAction&&this.creator.footerToolbar.actions.push(this.invisibleToggleAction),this.creator.footerToolbar.actions.push(this.themeSettingsAction)},e.prototype.syncTheme=function(e){var t=e||this.themeModel.toJSON();this.creator.theme=t,this.updateSimulatorTheme(t)},e.prototype.updateSimulatorTheme=function(e){this.model.survey&&this.model.survey.applyTheme(e||this.themeModel.toJSON())},Object.defineProperty(e.prototype,"saveThemeFunc",{get:function(){return this._saveThemeFuncValue},set:function(e){this._saveThemeFuncValue=e},enumerable:!1,configurable:!0}),e.prototype.processAutoSave=function(){var e=this,t=this.saveThemeFunc;!t&&this.creator.saveThemeFunc&&(t=function(){return e.creator.saveTheme()}),t&&(this.creator.autoSaveDelay<=0?t():(this.autoSaveTimerId&&clearTimeout(this.autoSaveTimerId),this.autoSaveTimerId=setTimeout((function(){clearTimeout(e.autoSaveTimerId),e.autoSaveTimerId=null,t&&t()}),this.creator.autoSaveDelay)))},Object.defineProperty(e.prototype,"availableThemes",{get:function(){return[].concat(this._availableThemes)},set:function(e){this._availableThemes=e||[],this.onAvailableThemesChanged(e),this.updateAllowModifyTheme()},enumerable:!1,configurable:!0}),e.prototype.onAvailableThemesChanged=function(e){var t=this.propertyGrid.survey.getQuestionByName("themeName");t&&(t.choices=e.map((function(e){return{value:e,text:z("theme.names."+e)}})),-1===e.indexOf(t.value)&&this.themeModel.setTheme(this.themeModel.defaultSessionTheme)),this.propertyGrid.survey.runExpressions()},e.prototype.addTheme=function(e,t){void 0===t&&(t=!1);var o=nr(e);return Vo[o]=e,-1===this._availableThemes.indexOf(e.themeName)?t?(this.availableThemes=[e.themeName].concat(this.availableThemes),sr.DefaultTheme=e):this.availableThemes=this.availableThemes.concat([e.themeName]):this.availableThemes=this.availableThemes,o},e.prototype.removeTheme=function(e,t){void 0===t&&(t=!1);var o="string"==typeof e?Vo[e]:e,r="string"==typeof e?e:nr(o);if(o){delete Vo[r],sr.DefaultTheme===o&&(sr.DefaultTheme=Vo["default-light"]||Vo[Object.keys(Vo)[0]],this.themeModel.defaultSessionTheme=sr.DefaultTheme);var n=Object.keys(Vo).filter((function(e){return 0===e.indexOf(o.themeName+"-")}));if(t&&n.length>0&&n.forEach((function(e){return delete Vo[e]})),t||0===n.length){var i=this._availableThemes.indexOf(o.themeName);if(-1!==i){var a=this.availableThemes;a.splice(i,1),this.availableThemes=a}}}},e.prototype.getCurrentTheme=function(e){return void 0===e&&(e=!1),e?this.getThemeChanges():this.creator.theme},e.prototype.getThemeChanges=function(){return ar(this.creator.theme)},Object.defineProperty(e.prototype,"isModified",{get:function(){var e=this.getThemeChanges(),t=Object.keys(e.cssVariables).length>0,o=Object.keys(e).some((function(e){return-1!==e.toLowerCase().indexOf("background")})),r=!!e.header&&0===Object.keys(e.header).length;return t||o||r},enumerable:!1,configurable:!0}),e.DefaultTheme=Vo["default-light"],e}();o(16),o(17),o(18);var hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t}(i.Action),gr=function(e){function t(t){return e.call(this,t)||this}return Y(t,e),t}(i.Action),fr=function(e){function t(){var t=e.call(this)||this;return t.dotsItem.popupModel.horizontalPosition="center",t.minVisibleItemsCount=1,t}return Y(t,e),t}(i.AdaptiveActionContainer),mr=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o}return Y(t,e),t.prototype.getRenderedActions=function(){var e=this.actions,t=this.creator.sidebar.getExpandAction(),o=e.indexOf(t);return-1!==o&&(e.splice(o,1),e.push(t)),e},t}(i.ActionContainer),yr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t}(i.EventBase),br=function(e){function t(t,o){var r=e.call(this)||this;r.options=t,r.startEditTitleOnQuestionAddedValue=!0,r.isRTLValue=!1,r.alwaySaveTextInPropertyEditorsValue=!1,r.pageEditModeValue="standard",r.newQuestions=[],r.newPanels=[],r.plugins={},r.onElementDeleting=r.addCreatorEvent(),r.onGetPropertyReadOnly=r.addCreatorEvent(),r.onSurveyInstanceCreated=r.addCreatorEvent(),r.onGetObjectDisplayName=r.addCreatorEvent(),r.onHtmlToMarkdown=r.addCreatorEvent(),r.onElementAllowOperations=r.addCreatorEvent(),r.onDefineElementMenuItems=r.addCreatorEvent(),r.onShowingProperty=r.addCreatorEvent(),r.onCanShowProperty=r.onShowingProperty,r.onPropertyGridSurveyCreated=r.addCreatorEvent(),r.onPropertyEditorCreated=r.addCreatorEvent(),r.onPropertyEditorUpdateTitleActions=r.addCreatorEvent(),r.onPropertyGridShowModal=r.addCreatorEvent(),r.onCanDeleteItem=r.addCreatorEvent(),r.onCollectionItemDeleting=r.addCreatorEvent(),r.onCollectionItemAllowOperations=r.addCreatorEvent(),r.onItemValueAdded=r.addCreatorEvent(),r.onFastEntryFinished=r.addCreatorEvent(),r.onMatrixColumnAdded=r.addCreatorEvent(),r.onSetPropertyEditorOptions=r.addCreatorEvent(),r.onGenerateNewName=r.addCreatorEvent(),r.onPropertyValidationCustomError=r.addCreatorEvent(),r.onPropertyValueChanging=r.addCreatorEvent(),r.onSurveyPropertyValueChanged=r.addCreatorEvent(),r.onConditionQuestionsGetList=r.addCreatorEvent(),r.onConditionGetTitle=r.addCreatorEvent(),r.onGetConditionOperator=r.addCreatorEvent(),r.onLogicItemDisplayText=r.addCreatorEvent(),r.onModified=r.addCreatorEvent(),r.onQuestionAdded=r.addCreatorEvent(),r.onPanelAdded=r.addCreatorEvent(),r.onPageAdded=r.addCreatorEvent(),r.onGetPageActions=r.addCreatorEvent(),r.onDesignerSurveyCreated=r.addCreatorEvent(),r.onPreviewSurveyCreated=r.addCreatorEvent(),r.onTestSurveyCreated=r.onPreviewSurveyCreated,r.onNotify=r.addCreatorEvent(),r.onSelectedElementChanging=r.addCreatorEvent(),r.onSelectedElementChanged=r.addCreatorEvent(),r.onOpenFileChooser=r.addCreatorEvent(),r.onUploadFile=r.addCreatorEvent(),r.onTranslationStringVisibility=r.addCreatorEvent(),r.onTranslationLocaleInitiallySelected=r.addCreatorEvent(),r.onTranslationImportItem=r.addCreatorEvent(),r.onTranslationImported=r.addCreatorEvent(),r.onTranslationExportItem=r.addCreatorEvent(),r.onMachineTranslate=r.addCreatorEvent(),r.onTranslationItemChanging=r.addCreatorEvent(),r.onDragDropAllow=r.addCreatorEvent(),r.onCreateCustomMessagePanel=r.addCreatorEvent(),r.maxLogicItemsInCondition=-1,r.showObjectTitles=!1,r.maxVisibleChoices=10,r.showTitlesInExpressions=!1,r.allowEditExpressionsInTextEditor=!0,r.maximumColumnsCount=a.propertyGrid.maximumColumnsCount,r.maximumChoicesCount=a.propertyGrid.maximumChoicesCount,r.minimumChoicesCount=a.propertyGrid.minimumChoicesCount,r.maximumRowsCount=a.propertyGrid.maximumRowsCount,r.maximumRateValues=a.propertyGrid.maximumRateValues,r.maxNestedPanels=-1,r.showPagesInTestSurveyTab=!0,r.showSimulatorInTestSurveyTab=!0,r.themeForPreview="defaultV2",r.hasPendingThemeChanges=!1,r._theme={cssVariables:{}},r._allowModifyPages=!0,r.showDefaultLanguageInTestSurveyTab="auto",r.showInvisibleElementsInTestSurveyTab=!0,r.allowChangeThemeInPreview=!0,r.showErrorOnFailedSave=!0,r.onActiveTabChanging=r.addCreatorEvent(),r.onActiveTabChanged=r.addCreatorEvent(),r.showSidebarValue=!0,r.onShowSidebarVisibilityChanged=r.addCreatorEvent(),r.onShowPropertyGridVisiblityChanged=r.addCreatorEvent(),r.onBeforeUndo=r.addCreatorEvent(),r.onBeforeRedo=r.addCreatorEvent(),r.onPageAdding=r.addCreatorEvent(),r.onDragStart=new i.EventBase,r.onBeforeDrop=r.onDragStart,r.onDragEnd=new i.EventBase,r.onAfterDrop=r.onDragEnd,r.onStateChanged=r.addCreatorEvent(),r.notifier=new i.Notifier({root:"svc-notifier",rootWithButtons:"",info:"svc-notifier--info",error:"svc-notifier--error",success:"svc-notifier--success",button:"",shown:"svc-notifier--shown"}),r.onKeyDownHandler=function(e){r.findSuitableShortcuts(e).forEach((function(t){(e.keyCode<48||89==e.keyCode||90==e.keyCode)&&Vr(e.target)||t.execute(r.selectedElement)}))},r.shortcuts={},r.translationLocalesOrder=[],r.autoSaveDelay=a.autoSave.delay,r.autoSaveTimerId=null,r.saveNo=0,r._syncSaveActions=function(e,t){var o=r._findAction("svd-save"),n=r._findAction("svd-save-theme");o&&n&&(e===r?n.enabled=o.enabled:o.enabled=n.enabled)},(o||"string"==typeof r.options||r.options instanceof String)&&(r.options=o||{},te.warnText("Creator constructor has one parameter, as creator options, in V2.")),r.previewOrientation=t.previewOrientation,r.toolbarValue=new mr(r),r.toolbarValue.locOwner=r,r.tabbedMenu=new fr,r.tabbedMenu.locOwner=r,r.selectionHistoryControllerValue=new ye(r),r.sidebar=new xo(r),r.setOptions(r.options),r.patchMetadata(),r.initSurveyWithJSON(void 0,!1),r.toolbox=new me(r.options&&r.options.questionTypes?r.options.questionTypes:null,r,!0),r.updateToolboxIsCompact(),r.initTabs(),r.initDragDrop(),r.syncSaveButtons=void 0!==r.options.saveSurveyAndTheme?r.options.saveSurveyAndTheme:r.options.syncSaveButtons,r.isTouch=i.IsTouch;var n=r.sidebar.getExpandAction();return n&&r.toolbar.actions.push(n),r}return Y(t,e),t.prototype.getMarkdownHtml=function(e,t){return null},t.prototype.getRenderer=function(e){return null},t.prototype.getRendererContext=function(e){return e},t.prototype.getProcessedText=function(e){return e},t.prototype.getLocale=function(){return this.locale},Object.defineProperty(t.prototype,"showPreviewTab",{get:function(){return this.showTestSurveyTab},set:function(e){this.showTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditSurveyTitle",{get:function(){return this.getPropertyValue("allowEditSurveyTitle",!0)},set:function(e){this.setPropertyVisibility("survey",e,"title","description","logo","logoFit","showTitle","logoWidth","logoHeight"),this.setPropertyValue("allowEditSurveyTitle",e),this.designerPropertyGrid&&this.designerPropertyGrid.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSurveyTitle",{get:function(){return this.allowEditSurveyTitle},set:function(e){this.allowEditSurveyTitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"haveCommercialLicense",{get:function(){return!!i.hasLicense&&Object(i.hasLicense)(1)},set:function(e){console.warn("As of v1.9.101, the haveCommercialLicense property is not supported. To activate your license, use the setLicenseKey(key) method as shown on the following page: https://surveyjs.io/remove-alert-banner")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"licenseText",{get:function(){return this.getLocString("survey.license")},enumerable:!1,configurable:!0}),t.prototype.slk=function(e){Object(i.slk)(e)},Object.defineProperty(t.prototype,"startEditTitleOnQuestionAdded",{get:function(){return!this.isMobileView&&this.startEditTitleOnQuestionAddedValue},set:function(e){this.startEditTitleOnQuestionAddedValue=e},enumerable:!1,configurable:!0}),t.prototype.changePageModifications=function(e){void 0===e&&(e=!1),this.setPropertyVisibility("survey",e,"pages"),this.setPropertyVisibility("question",e,"page"),this.setPropertyVisibility("panel",e,"page"),this.showJSONEditorTab=!0===this.options.showJSONEditorTab},Object.defineProperty(t.prototype,"pageEditMode",{get:function(){return this.pageEditModeValue},set:function(e){this.pageEditModeValue=e;var t="single"!==this.pageEditModeValue;this.changePageModifications(t),i.settings.allowShowEmptyTitleInDesignMode=t,i.settings.allowShowEmptyDescriptionInDesignMode=t,"bypage"===this.pageEditModeValue&&(this.showPageNavigator=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbarItems",{get:function(){return this.toolbarValue.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbar",{get:function(){return this.toolbarValue},enumerable:!1,configurable:!0}),t.prototype._findAction=function(e){return this.toolbarItems.filter((function(t){return t.id===e}))[0]},Object.defineProperty(t.prototype,"showingViewName",{get:function(){return this.activeTab},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDesignerShowing",{get:function(){return"designer"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showDesigner=function(){this.activeTab="designer"},Object.defineProperty(t.prototype,"isTestSurveyShowing",{get:function(){return this.isPreviewShowing},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPreviewShowing",{get:function(){return"test"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showTestSurvey=function(){this.showPreview()},t.prototype.showPreview=function(){this.activeTab="test"},t.prototype.addPluginTab=function(e,t,o,r,n){var i=this,a="test"===e?"preview":e,s=o?0==o.indexOf("ed.")?o:"":"tabs."+a;s&&(o=void 0);var l=new gr({id:e,locTitleName:s,title:o,componentContent:r||"svc-tab-"+e,data:t,action:function(){i.makeNewViewActive(e)},active:this.viewType===e,disableHide:this.viewType===e});n>=0&&n<this.tabs.length?this.tabs.splice(n,0,l):this.tabs.push(l),this.addPlugin(e,t)},t.prototype.addPlugin=function(e,t){this.plugins[e]=t},t.prototype.getPlugin=function(e){return this.plugins[e]},Object.defineProperty(t.prototype,"showPagesInPreviewTab",{get:function(){return this.showPagesInTestSurveyTab},set:function(e){this.showPagesInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSimulatorInPreviewTab",{get:function(){return this.showSimulatorInTestSurveyTab},set:function(e){this.showSimulatorInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"themeEditor",{get:function(){return this.getPlugin("theme")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"saveThemeFunc",{get:function(){return this.saveThemeFuncValue},set:function(e){this.saveThemeFuncValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"theme",{get:function(){return this._theme},set:function(e){this._theme=e,this.hasPendingThemeChanges=!0,"theme"!==this.activeTab&&this.updatePlugin(this.activeTab)},enumerable:!1,configurable:!0}),t.prototype._doSaveThemeCore=function(e){var t=this;this.setState("saving"),this.saveThemeFunc&&(this.saveNo++,this.saveThemeFunc(this.saveNo,(function(o,r){t.saveNo===o&&(r?(t.setState("saved"),t.hasPendingThemeChanges=!1):(t.setState("modified"),t.showErrorOnFailedSave&&t.notify(t.getLocString("ed.saveError"),"error")),e&&e())})))},t.prototype.saveTheme=function(){this._doSaveThemeCore()},t.prototype.saveThemeActionHandler=function(){this.syncSaveButtons?this.save():this.saveTheme()},Object.defineProperty(t.prototype,"allowModifyPages",{get:function(){return this._allowModifyPages},set:function(e){this._allowModifyPages=e,this.changePageModifications(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDefaultLanguageInPreviewTab",{get:function(){return this.showDefaultLanguageInTestSurveyTab},set:function(e){this.showDefaultLanguageInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showInvisibleElementsInPreviewTab",{get:function(){return this.showInvisibleElementsInTestSurveyTab},set:function(e){this.showInvisibleElementsInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabs",{get:function(){return this.tabbedMenu.actions},set:function(e){this.tabbedMenu.actions=e},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return G.getString(e)},t.prototype.onSetReadOnly=function(e){},Object.defineProperty(t.prototype,"locale",{get:function(){return this.getPropertyValue("locale",G.currentLocale)},set:function(e){if(G.currentLocale!==e){G.currentLocale=e,this.setPropertyValue("locale",e),this.toolbox.updateTitles(),this.refreshPlugin();var t=this.selectedElement;t&&(this.selectElement(null),this.selectElement(t)),this.locStrsChanged()}},enumerable:!1,configurable:!0}),t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.tabbedMenu.locStrsChanged(),this.toolbar.locStrsChanged()},t.prototype.refreshPlugin=function(){var e=this.currentPlugin;if(e){e.deactivate&&e.deactivate();var t=this.viewType;this.viewType="",e.activate(),this.viewType=t}},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.getPropertyValue("readOnly",!1)},set:function(e){var t=this.text;this.setPropertyValue("readOnly",e),this.onSetReadOnly(e),this.text=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRTL",{get:function(){return this.isRTLValue},set:function(e){this.isRTLValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeTab",{get:function(){return this.viewType},set:function(e){this.makeNewViewActive(e)},enumerable:!1,configurable:!0}),t.prototype.makeNewViewActive=function(e){var t=this;if(e==this.viewType)return!1;var o=this.currentPlugin;if(!o||!o.canDeactivateAsync)return this.switchViewType(e);o.canDeactivateAsync((function(){t.switchViewType(e)}))},t.prototype.switchViewType=function(e){var t,o,r=!0;if((null===(t=this.currentPlugin)||void 0===t?void 0:t.defaultAllowingDeactivate)&&void 0===(r=this.currentPlugin.defaultAllowingDeactivate()))return!1;var n={tabName:e,allow:r,model:null===(o=this.currentPlugin)||void 0===o?void 0:o.model};if(this.onActiveTabChanging.fire(this,n),n.allow){if(!this.canSwitchViewType())return!1;var i=this.activatePlugin(e);return this.viewType=e,this.onActiveTabChanged.fire(this,{tabName:e,plugin:i,model:i?i.model:void 0}),!0}},t.prototype.canSwitchViewType=function(){var e=this.currentPlugin;return!e||!e.deactivate||e.deactivate()},t.prototype.activatePlugin=function(e){var t=this.getPlugin(e);return t&&t.activate(),t},Object.defineProperty(t.prototype,"currentPlugin",{get:function(){return this.getPlugin(this.activeTab)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxCategories",{get:function(){return this.toolbox.categories},enumerable:!1,configurable:!0}),t.prototype.addCreatorEvent=function(){return this.addEvent()},t.prototype.updateToolboxIsCompact=function(e){if(this.toolbox){var t=null!=e&&null!=e;void 0!==this.toolbox.forceCompact?this.toolbox.isCompact=this.toolbox.forceCompact:"right"==this.toolboxLocation?this.toolbox.isCompact=this.showSidebar||t&&e:t&&(this.toolbox.isCompact=e)}},Object.defineProperty(t.prototype,"showToolbox",{get:function(){return this.showToolboxValue&&this.allowShowToolbox},set:function(e){!0!==e&&!1!==e&&te.warnText("showToolbox is a boolean property now."),"none"===e||!1===e||"top"===e?this.showToolboxValue=!1:(!0===e||(this.toolboxLocation=e),this.showToolboxValue=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSidebar",{get:function(){return this.showSidebarValue},set:function(e){!0===e||!1===e?this.showSidebar!==e&&(this.setShowSidebar(e,!0),this.onShowPropertyGridVisiblityChanged.isEmpty||(te.warnNonSupported("onShowPropertyGridVisiblityChanged","onShowSidebarVisibilityChanged"),this.onShowPropertyGridVisiblityChanged.fire(this,{show:e}))):te.warnText("showSidebar is a boolean property now.")},enumerable:!1,configurable:!0}),t.prototype.setShowSidebar=function(e,t){void 0===t&&(t=!1),this.showSidebarValue=e,t&&(e?this.sidebar.expandedManually=!0:this.sidebar.collapsedManually=!0),this.updateToolboxIsCompact(),this.onShowSidebarVisibilityChanged.fire(this,{show:e})},Object.defineProperty(t.prototype,"showPropertyGrid",{get:function(){return te.warnNonSupported("showPropertyGrid","showSidebar"),this.showSidebar},set:function(e){te.warnNonSupported("showPropertyGrid","showSidebar"),!0===e||!1===e?this.showSidebar=e:te.warnText("showSidebar is a boolean property.")},enumerable:!1,configurable:!0}),t.prototype.rightContainerActiveItem=function(e){te.warnNonSupported("rightContainerActiveItem")},t.prototype.leftContainerActiveItem=function(e){te.warnNonSupported("leftContainerActiveItem")},Object.defineProperty(t.prototype,"undoRedoManager",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model.undoRedoManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoRedoController",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model},enumerable:!1,configurable:!0}),t.prototype.startUndoRedoTransaction=function(e){void 0===e&&(e=""),this.undoRedoController&&this.undoRedoController.startTransaction(e)},t.prototype.stopUndoRedoTransaction=function(){this.undoRedoController&&this.undoRedoController.stopTransaction()},Object.defineProperty(t.prototype,"isProcessingUndoRedo",{get:function(){return this.undoRedoManager&&this.undoRedoManager.isProcessingUndoRedo},enumerable:!1,configurable:!0}),t.prototype.undo=function(){this.undoRedoController&&this.undoRedoController.undo()},t.prototype.redo=function(){this.undoRedoController&&this.undoRedoController.redo()},Object.defineProperty(t.prototype,"selectionHistoryController",{get:function(){return this.selectionHistoryControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e},enumerable:!1,configurable:!0}),t.prototype.canAddPage=function(e){var t={page:e,allow:!0};return this.onPageAdding.fire(this,t),t.allow},t.prototype.addPage=function(e,t,o){if(void 0===t&&(t=!0),!this.canAddPage(e))return null;if(void 0===o||o()){var r=e;return r?this.survey.addPage(r):r=this.addNewPageIntoSurvey(),t&&this.selectElement(r),r}},t.prototype.addNewPageIntoSurvey=function(){var e=te.getNewPageName(this.survey.pages);return this.survey.addNewPage(e)},t.prototype.initTabs=function(){this.initPlugins(),this.initFooterToolbar(),this.tabs.length>0&&this.makeNewViewActive(this.tabs[0].id)},t.prototype.initPlugins=function(){this.addPlugin("undoredo",new ro(this)),this.showDesignerTab&&new mo(this),this.showPreviewTab&&new Ie(this),this.showThemeTab&&new dr(this),this.showLogicTab&&new Yt(this),this.showJSONEditorTab&&(we.hasAceEditor()?new we(this):new Ce(this)),this.showTranslationTab&&new qt(this)},t.prototype.initFooterToolbar=function(){var e=this;this.footerToolbar||(this.footerToolbar=new i.ActionContainer,["designer","undoredo","test","theme"].forEach((function(t){var o=e.getPlugin(t);o&&o.addFooterActions&&o.addFooterActions()})))},t.prototype.getOptions=function(){return this.options||{}},t.prototype.setOptions=function(e){e||(e={});var t={showTestSurveyTab:"showPreviewTab",showDefaultLanguageInTestSurveyTab:"showDefaultLanguageInPreviewTab",showInvisibleElementsInPreviewTab:"showInvisibleElementsInTestSurveyTab"};for(var o in t)if(void 0!==e[o]){var r=t[o];void 0===e[r]&&(e[r]=e[o],delete e[o])}for(var o in this.options=e,e)this[o]=e[o]},t.prototype.setPropertyPlaceHolder=function(e,t,o){var r=i.Serializer.findProperty(e,t);r&&(r.placeholder=o)},t.prototype.setPropertyVisibility=function(e,t){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];if(Array.isArray(o))for(var n=0;n<o.length;n++){var a=i.Serializer.findProperty(e,o[n]);a&&(a.visible=t)}},t.prototype.patchMetadata=function(){this.setPropertyPlaceHolder("survey","title","pe.surveyTitlePlaceholder"),this.setPropertyPlaceHolder("survey","description","pe.surveyDescriptionPlaceholder"),this.setPropertyVisibility("survey",!1,"logoPosition"),"single"!==this.pageEditMode&&(this.setPropertyPlaceHolder("page","title","pe.pageTitlePlaceholder"),this.setPropertyPlaceHolder("page","description","pe.pageDescriptionPlaceholder"))},t.prototype.isCanModifyProperty=function(e,t){var o,r,n=i.Serializer.findProperty(e.getType(),t);if(e instanceof i.ItemValue){o=e.locOwner,r=i.Serializer.findProperty(o.getType(),e.ownerPropertyName||t);var a=!0;if(o instanceof i.QuestionSelectBase&&(a=o.isItemInList(e)),!1===this.getElementAllowOperations(o).allowEdit)return!1;var s={allowDelete:!0,allowEdit:a,allowAdd:!0};if(this.onCollectionItemAllowingCallback(o,n,o.getPropertyValue(null==r?void 0:r.name),e,s),!1===s.allowEdit)return!1;if(this.onIsPropertyReadOnlyCallback(o,r,null==r?void 0:r.readOnly,null,null))return!1}if(e instanceof i.SurveyElement&&!1===this.getElementAllowOperations(e).allowEdit)return!1;return!n||!this.onIsPropertyReadOnlyCallback(e,n,n.readOnly,o,r)},t.prototype.onIsPropertyReadOnlyCallback=function(e,t,o,r,n,i){if(!t)return!1;void 0===i&&(i=this.readOnly);var a=i||o;if(this.onGetPropertyReadOnly.isEmpty)return a;var s={obj:e,property:t,readOnly:a,propertyName:t.name,parentObj:r,parentProperty:n};return this.onGetPropertyReadOnly.fire(this,s),s.readOnly},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),t.prototype.addCollectionItemsJson=function(e,t){var o=new i.SurveyModel(e);this.updateAddingSurvey(o),this.addSurveyPages(o,t)},t.prototype.updateAddingSurvey=function(e){this.updateAddingPages(e),this.updateAddingPanels(e),this.updateAddingQuestions(e),this.updateAddingCalculatedValules(e),this.updateAddingArrays(e)},t.prototype.updateAddingPages=function(e){this.updateAddingElements(e,e.pages,this.survey.pages,(function(e,t){e.name=te.getNewPageName(t)}))},t.prototype.updateAddingExistingElements=function(){return[].concat(this.survey.getAllQuestions(!1,!0)).concat(this.survey.getAllPanels())},t.prototype.updateAddingPanels=function(e){this.updateAddingElements(e,e.getAllPanels(),this.updateAddingExistingElements(),(function(e,t){e.name=te.getNewPanelName(t)}))},t.prototype.updateAddingQuestions=function(e){var t=new Be(e,this);this.updateAddingElements(e,e.getAllQuestions(!1,!0),this.updateAddingExistingElements(),(function(e,o){var r=e.name;e.name=te.getNewQuestionName(o),t.renameQuestion(r,e.name)}))},t.prototype.updateAddingCalculatedValules=function(e){var t=new Be(e,this);this.updateAddingElements(e,e.calculatedValues,this.survey.calculatedValues,(function(e,o){var r=e.name;e.name=te.getNewName(o,"var"),t.renameQuestion(r,e.name)}))},t.prototype.updateAddingArrays=function(e){var t=this;e.triggers.forEach((function(e){return t.survey.triggers.push(e)})),e.completedHtmlOnCondition.forEach((function(e){return t.survey.completedHtmlOnCondition.push(e)})),e.calculatedValues.forEach((function(e){return t.survey.calculatedValues.push(e)}))},t.prototype.updateAddingElements=function(e,t,o,r){var n=[],i={};o.forEach((function(e){e.name&&(i[e.name]=e)})),t.forEach((function(e){e.name&&i[e.name]&&n.push(e)}));var a=o.concat(t);n.forEach((function(e){r(e,a)}))},t.prototype.addSurveyPages=function(e,t){(void 0===t||t>=this.survey.pages.length)&&(t=-1);for(var o=0;o<e.pages.length;o++)t<0?this.survey.pages.push(e.pages[o]):this.survey.pages.splice(t+o,0,e.pages[o])},t.prototype.initSurveyWithJSON=function(e,t){var o=this;e||(e={logoPosition:"right"}),this.existingPages={};var r=this.createSurvey({},"designer",void 0,(function(t){t.css=i.defaultV2Css,t.setIsMobile(!!o.isMobileView),t.setDesignMode(!0),t.lazyRendering=!0,t.setJsonObject(e),t.isEmpty&&t.setJsonObject(o.getDefaultSurveyJson())}));r.pages.forEach((function(e){o.existingPages[e.id]=!0})),r.onQuestionAdded.add((function(e,t){o.doOnQuestionAdded(t.question,t.parentPanel)})),r.onPanelAdded.add((function(e,t){o.doOnPanelAdded(t.panel,t.parentPanel)})),r.onPageAdded.add((function(e,t){o.existingPages[t.page.id]||(o.existingPages[t.page.id]=!0,o.doOnPageAdded(t.page))})),r.onDragDropAllow.add((function(e,t){t.survey=e,o.onDragDropAllow.fire(o,t)})),this.setSurvey(r),this.updatePlugin(this.activeTab),"designer"!==this.activeTab&&this.updatePlugin("designer"),this.undoRedoController&&this.undoRedoController.updateSurvey()},t.prototype.updatePlugin=function(e){var t=this.getPlugin(this.activeTab);t&&t.update&&t.update()},t.prototype.initDragDrop=function(){this.initDragDropSurveyElements(),this.initDragDropChoices()},t.prototype.initDragDropSurveyElements=function(){var e=this;ho.restrictDragQuestionBetweenPages=a.dragDrop.restrictDragQuestionBetweenPages,this.dragDropSurveyElements=new ho(null,this),this.dragDropSurveyElements.onGetMaxNestedPanels=function(){return e.maxNestedPanels};var t=!1;this.dragDropSurveyElements.onDragStart.add((function(o,r){t=!o.draggedElement.parent,e.onDragStart.fire(o,r),e.startUndoRedoTransaction("drag drop")})),this.dragDropSurveyElements.onDragEnd.add((function(o,r){e.stopUndoRedoTransaction();var n=t&&e.startEditTitleOnQuestionAdded;e.selectElement(r.draggedElement,void 0,!1,n),t=!1,e.onDragEnd.fire(o,r)}))},t.prototype.initDragDropChoices=function(){var e=this;this.dragDropChoices=new i.DragDropChoices(null,this),this.dragDropChoices.onDragStart.add((function(t,o){e.startUndoRedoTransaction("drag drop")})),this.dragDropChoices.onDragEnd.add((function(t,o){e.stopUndoRedoTransaction(),e.selectElement(o.draggedElement,void 0,!1)}))},t.prototype.updateElementsOnLocaleChanged=function(e,t){if("survey"===e.getType()&&"locale"===t)for(var o=this.survey.pages,r=0;r<o.length;r++)o[r].locStrsChanged()},t.prototype.updateConditionsOnNameChanged=function(e,t,o){if(this.isObjQuestion(e)){if("name"!==t||e.valueName||this.updateLogicOnQuestionNameChanged(o,e.name),"valueName"===t){var r=o||e.name,n=e.valueName?e.valueName:e.name;this.updateLogicOnQuestionNameChanged(r,n)}"name"===t&&e.isDescendantOf("selectbase")&&this.updateChoicesFromQuestionOnColumnNameChanged(o,e.name)}"name"===t&&e.isDescendantOf("matrixdropdowncolumn")&&this.updateLogicOnColumnNameChanged(e,o,e.name)},t.prototype.getSurveyLogicForUpdate=function(){return this.surveyLogicForUpdate&&this.surveyLogicForUpdate.survey!==this.survey&&(this.surveyLogicForUpdate=void 0),this.surveyLogicForUpdate||(this.surveyLogicForUpdate=this.createSurveyLogicForUpdate()),this.surveyLogicForUpdate},t.prototype.clearSurveyLogicForUpdate=function(e,t,o){!this.surveyLogicRenaming&&this.surveyLogicForUpdate&&e&&t&&this.needClearSurveyLogicForUpdate(e,t,o)&&(this.surveyLogicForUpdate=void 0)},t.prototype.needClearSurveyLogicForUpdate=function(e,t,o){if(Array.isArray(o))return!0;var r=i.Serializer.findProperty(e.getType(),t);return!!r&&["expression","condition","questionvalue","question"].indexOf(r.type)>-1},t.prototype.updateSurveyLogicValues=function(e,t,o){e&&t&&!i.Helpers.isValueEmpty(o)&&"value"===t&&e.isDescendantOf("itemvalue")&&this.updateSurveyLogicItemValue(e,o)},t.prototype.updateSurveyLogicItemValue=function(e,t){if(e.locOwner&&a.logic.updateExpressionsOnChanging.choiceValue&&!(["choices","rateValues","columns","rows"].indexOf(e.ownerPropertyName)<0)){this.surveyLogicRenaming=!0;var o=this.getSurveyLogicForUpdate();"rows"===e.ownerPropertyName?o.renameRowValue(e,t):o.renameItemValue(e,t),this.surveyLogicRenaming=!1}},t.prototype.createSurveyLogicForUpdate=function(){return new Be(this.survey,this)},t.prototype.updateLogicOnQuestionNameChanged=function(e,t){e!==t&&a.logic.updateExpressionsOnChanging.questionName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameQuestion(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateLogicOnColumnNameChanged=function(e,t,o){t&&t!==o&&a.logic.updateExpressionsOnChanging.columnName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameColumn(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateChoicesFromQuestionOnColumnNameChanged=function(e,t){this.getAllQuestions().forEach((function(o){o.choicesFromQuestion===e&&(o.choicesFromQuestion=t)}))},t.prototype.isObjQuestion=function(e){return this.isObjThisType(e,"question")},t.prototype.isObjPage=function(e){return this.isObjThisType(e,"page")},t.prototype.isObjThisType=function(e,t){for(var o=i.Serializer.findClass(e.getType());o&&o.parentName;){if(o.name===t)return!0;o=i.Serializer.findClass(o.parentName)}return!!o&&o.name===t},t.prototype.onDragDropItemStart=function(){this.addNewElementReason="DROPPED_FROM_TOOLBOX"},t.prototype.doOnQuestionAdded=function(e,t){e.name=this.generateUniqueName(e,e.name);var o={question:e,page:this.getPageByElement(e),reason:this.addNewElementReason};this.addNewElementReason=void 0,this.onQuestionAdded.fire(this,o)},t.prototype.doOnPanelAdded=function(e,t){var o={panel:e,page:this.getPageByElement(e),reason:this.addNewElementReason};this.onPanelAdded.fire(this,o),this.addNewElementReason=void 0},t.prototype.doOnPageAdded=function(e){var t={page:e};this.onPageAdded.fire(this,t),this.setModified({type:"PAGE_ADDED",newValue:t.page})},t.prototype.getPageByElement=function(e){return this.survey.getPageByElement(e)},t.prototype.getDefaultSurveyJson=function(){var e=a.defaultNewSurveyJSON;return e.pages&&e.pages.length>0&&e.pages[0].name&&(e.pages[0].name=G.getString("ed.newPageName")+"1"),e},t.prototype.setSurvey=function(e){this.surveyValue&&this.surveyValue.dispose(),this.surveyValue=e,this.selectElement(e),this.selectionHistoryController.reset()},t.prototype.getSurveyTextFromDesigner=function(){if(!this.survey)return"";var e=this.survey.toJSON();e=this.singlePageJSON(e);var t=a.jsonEditor.indentation;return this.generateValidJSON?JSON.stringify(e,null,t):(new $).stringify(e,null,t)},t.prototype.setTextValue=function(e){this.setSurveyJSONTextCallback&&this.setSurveyJSONTextCallback(e)},t.prototype.changeText=function(e,t){if(void 0===t&&(t=!1),this.setTextValue(e),e){var o=new de(e);o.isJsonCorrect||o.survey?this.initSurveyWithJSON(o.survey.toJSON(),t):this.viewType="editor"}else this.initSurveyWithJSON(void 0,t)},Object.defineProperty(t.prototype,"text",{get:function(){return this.getSurveyJSONTextCallback?this.getSurveyJSONTextCallback().text:this.getSurveyTextFromDesigner()},set:function(e){this.changeText(e,!0)},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){if("editor"!=this.viewType)return(new i.JsonObject).toJsonObject(this.survey);var e=this.text,t=new de(e);return t.isJsonCorrect?(new i.JsonObject).toJsonObject(t.survey):null},t.prototype.getObjectDisplayName=function(e,t,o,r){void 0===o&&(o=void 0),void 0===r&&(r=void 0),r||(r=te.getObjectName(e,this.showObjectTitles));var n={obj:e,displayName:r,area:t,reason:o};return this.onGetObjectDisplayName.fire(this,n),n.displayName},t.prototype.createSurvey=function(e,t,o,r,n){var i,a=this.createSurveyCore(e,t);return"designer"!==t&&"test"!==t&&(a.fitToContainer=!1),"designer"!==t&&"modal-question-editor"!==t||wr(a,this),a.needRenderIcons=!1,"designer"!=t&&"test"!=t&&(a.locale=G.currentLocale,e.clearInvisibleValues||(a.clearInvisibleValues="onComplete")),r&&r(a),n=n||this.getSurveyInstanceCreatedArea(t),this.onSurveyInstanceCreated.fire(this,{survey:a,reason:t,area:n,model:o||(null===(i=this.currentPlugin)||void 0===i?void 0:i.model)}),"designer"===t&&this.onDesignerSurveyCreated.fire(this,{survey:a}),"test"===t&&this.onPreviewSurveyCreated.fire(this,{survey:a}),a},t.prototype.getSurveyInstanceCreatedArea=function(e){var t={designer:"designer-tab",test:"preview-tab","property-grid":"property-grid","default-value":"default-value-popup-editor","condition-builder":"logic-rule:condition-editor","logic-item-editor":"logic-rule:action-editor","logic-items":"logic-tab:condition-list",theme:"theme-tab",theme_editor:"theme-tab:property-grid",translation_settings:"translation-tab:language-list",translation_strings:"translation-tab:table",translation_strings_header:"translation-tab:table-header","cells-editor":"matrix-cell-values-popup-editor","fast-entry":"table-values-popup-editor","modal-question-editor":"matrix-cell-question-popup-editor"},o=t[e];return o||"internal-use"},t.prototype.createSurveyCore=function(e,t){return void 0===e&&(e={}),new i.SurveyModel(e)},Object.defineProperty(t.prototype,"state",{get:function(){return this._stateValue?this._stateValue:""},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){this._stateValue=e,this.onStateChanged.fire(this,{val:e}),e&&(this.notify(this.getLocString("ed."+e)),this._updateSaveActions())},t.prototype.setModified=function(e){void 0===e&&(e=null),this.setState("modified"),this.onModified.fire(this,e),this.isAutoSave&&this.doAutoSave()},t.prototype.notifySurveyPropertyChanged=function(e){this.clearSurveyLogicForUpdate(e.target,e.name,e.newValue),this.updateSurveyLogicValues(e.target,e.name,e.oldValue);var t=this.currentPlugin;t&&t.onDesignerSurveyPropertyChanged&&t.onDesignerSurveyPropertyChanged(e.target,e.name),this.onSurveyPropertyValueChanged.isEmpty||(e.propertyName=e.name,e.obj=e.target,e.value=e.newValue,this.onSurveyPropertyValueChanged.fire(this,e)),e.type="PROPERTY_CHANGED",this.setModified(e)},t.prototype.notifySurveyItemMoved=function(e){e.type="ELEMENT_REORDERED",this.setModified(e)},t.prototype.notify=function(e,t){void 0===t&&(t="info"),this.onNotify.isEmpty?this.notifier.notify(e,t):this.onNotify.fire(this,{message:e,type:t})},t.prototype.convertQuestion=function(e,t){var o=ee.convertObject(e,t,this.getDefaultElementJSON(e.getType()),this.getDefaultElementJSON(t));return this.setModified({type:"QUESTION_CONVERTED",className:t,oldValue:e,newValue:o}),o},t.prototype.getDefaultElementJSON=function(e){var t;if(!this.toolbox)return null;var o=null===(t=this.toolbox.getItemByName(e))||void 0===t?void 0:t.json;return o?i.Helpers.createCopy(o):null},t.prototype.singlePageJSON=function(e){if("single"===this.pageEditMode){var t=e.pages;Array.isArray(t)&&t.length>0&&(void 0!==t[0].elements&&(e.elements=t[0].elements),delete e.pages)}return e},Object.defineProperty(t.prototype,"JSON",{get:function(){var e=this.survey.toJSON();return this.singlePageJSON(e)},set:function(e){"editor"==this.viewType?this.setTextValue(JSON.stringify(e)):this.initSurveyWithJSON(e,!0)},enumerable:!1,configurable:!0}),t.prototype.loadSurvey=function(e){var t=this;(new i.dxSurveyService).loadSurvey(e,(function(e,o,r){e&&o&&(t.JSON=o)}))},t.prototype.doClickQuestionCore=function(e,t,o,r){void 0===t&&(t="ADDED_FROM_TOOLBOX"),void 0===o&&(o=-1),void 0===r&&(r=null),0==this.survey.pageCount&&this.addNewPageIntoSurvey();var n=this.currentPage;"bypage"===this.pageEditMode&&(n=this.getPlugin("designer").model.pagesController.page2Display);var i=this.getSelectedSurveyElement();if(i&&i.parent&&i.page==n&&i!==r){if(!r)for(;i.parent&&i.parent.isPanel;)i=i.parentQuestion?i.parentQuestion:i.parent;n=i.parent,o<0&&(o=n.elements.indexOf(i))>-1&&o++}r&&(n=r),this.addNewElementReason=t;var a=this.findRowByElement(i,n);e.setVisibleIndex(-1),a&&this.isRowMultiline(a)?this.addElemenMultiline(n,e,o,a):n.addElement(e,o),this.addNewElementReason="",this.setModified({type:t,question:e})},t.prototype.isRowMultiline=function(e){return e.elements.length>1},t.prototype.findRowByElement=function(e,t){return e?e.isPage?e.rows[e.rows.length-1]:t.rows.find((function(t){return-1!==t.elements.indexOf(e)})):null},t.prototype.addElemenMultiline=function(e,t,o,r){var n=r.elements.length,i=r.elements[n-1];i.startWithNewLine=!0,e.addElement(t,o),i.startWithNewLine=!1},t.prototype.setNewNames=function(e){this.newQuestions=[],this.newPanels=[],this.newQuestionChangedNames={},this.setNewNamesCore(e),this.updateNewElementExpressions(e)},t.prototype.updateNewElementExpressions=function(e){var t=this.createSurvey({},"updateNewElementExpressions",void 0,(function(t){t.setDesignMode(!0),e.isPage?t.addPage(e):(t.addNewPage("p1"),t.pages[0].addElement(e))})),o=new Be(t);for(var r in this.newQuestionChangedNames)o.renameQuestion(r,this.newQuestionChangedNames[r])},t.prototype.getAllQuestions=function(e){return void 0===e&&(e=!0),this.getAllElements(!1,e)},t.prototype.getAllPanels=function(e){return void 0===e&&(e=!0),this.getAllElements(!0,e)},t.prototype.getAllElements=function(e,t){var o=te.getAllElements(this.survey,e);return t&&(te.addElements(this.newPanels,e,o),te.addElements(this.newQuestions,e,o)),o},t.prototype.getNewName=function(e,t){return"page"==e?te.getNewPageName(this.survey.pages):t?this.getNewPanelName():this.getNewQuestionName()},t.prototype.getNewQuestionName=function(){return te.getNewQuestionName(this.getAllQuestions())},t.prototype.getNewPanelName=function(){return te.getNewPanelName(this.getAllPanels())},t.prototype.setNewNamesCore=function(e){var t=this,o=e.getType(),r=this.getNewName(o,e.isPanel);if(r!=e.name&&(this.newQuestionChangedNames[e.name]=r,e.name=r),e.isPanel||e.isPage){e.isPanel&&this.newPanels.push(e),e.elements.forEach((function(e){return t.setNewNamesCore(e)}))}else{this.newQuestions.push(e);var n=Array.isArray(e.templateElements)?e.templateElements:Array.isArray(e.detailElements)?e.detailElements:void 0;n&&n.forEach((function(e){return t.setNewNamesCore(e)}))}},t.prototype.createNewElement=function(e){var t=i.Serializer.createClass(e.type);return(new i.JsonObject).toObject(e,t),this.setNewNames(t),t},t.prototype.copyElement=function(e){var t=(new i.JsonObject).toJsonObject(e);return t.type=e.getType(),this.createNewElement(t)},t.prototype.fastCopyQuestion=function(e){var t=this.copyElement(e),o=e.parent?e.parent.elements.indexOf(e)+1:-1;if(o>-1){var r=e.parent.elements;o<r.length&&!1===r[o].startWithNewLine&&(t.startWithNewLine=!1)}return this.doClickQuestionCore(t,"ELEMENT_COPIED",o,e.parent),t},Object.defineProperty(t.prototype,"selectedElement",{get:function(){return this.selectedElementValue},set:function(e){this.selectElement(e)},enumerable:!1,configurable:!0}),t.prototype.refreshDesigner=function(){"designer"===this.activeTab&&this.changeText(this.text)},t.prototype.deleteCurrentObject=function(){this.deleteCurrentElement()},t.prototype.deleteCurrentElement=function(){this.deleteObject(this.selectedElement)},t.prototype.deleteElement=function(e){this.deleteObject(e)},t.prototype.copyPage=function(e){var t=this,o=this.copyElement(e),r=this.survey.pages.indexOf(e);r>-1?this.survey.pages.splice(r+1,0,o):this.survey.pages.push(o),o.questions.forEach((function(e){t.addNewElementReason="ELEMENT_COPIED",t.doOnQuestionAdded(e,e.parent)}));var n=o.getPanels();return Array.isArray(n)&&n.forEach((function(e){return t.doOnPanelAdded(e,e.parent)})),this.addNewElementReason="",o},t.prototype.deleteObjectCore=function(e){if(e.isPage){var t=this.getNextPage(e);this.survey.removePage(e),this.selectElement(t||this.survey)}else{if(1===this.survey.pageCount){var o=this.survey.pages[0];if(1===o.elements.length&&e===o.elements[0]&&!te.isPagePropertiesAreModified(o))return void this.deleteObjectCore(o)}this.deletePanelOrQuestion(e)}this.setModified({type:"OBJECT_DELETED",target:e}),this.updateConditionsOnRemove(e)},t.prototype.getNextPage=function(e){var t=this.survey.pages.indexOf(e);return t<0||1==this.survey.pages.length?null:(t==this.survey.pages.length-1?t--:t++,t<0||t>this.survey.pages.length-1?null:this.survey.pages[t])},t.prototype.deleteObject=function(e){this.checkOnElementDeleting(e)&&this.deleteObjectCore(e)},t.prototype.updateConditionsOnRemove=function(e){if(a.logic.updateExpressionsOnDeleting.question){if(te.getObjectType(e)==X.Question)t=[e];else var t=e.questions;if(t)for(var o=new Be(this.survey,this),r=0;r<t.length;r++)o.removeQuestion(t[r].getValueName())}},t.prototype.checkOnElementDeleting=function(e){var t={element:e,elementType:te.getObjectType(e),allowing:!0};return this.onElementDeleting.fire(this,t),t.allowing},t.prototype.isElementSelected=function(e){return!(!e||e.isDisposed)&&e.getPropertyValue("isSelectedInDesigner")},t.prototype.selectElement=function(e,t,o,r){if(void 0===o&&(o=!0),void 0===r&&(r=!1),!e||!e.isDisposed&&e.getSurvey()&&(!e.isQuestion&&!e.isPanel||e.parent)){var n=this.selectedElement;n!==e&&(this.selectedElementValue=this.onSelectingElement(e),n!==this.selectedElementValue&&(n&&!n.isDisposed&&n.setPropertyValue("isSelectedInDesigner",!1),this.selectedElementValue&&this.selectedElementValue.setPropertyValue("isSelectedInDesigner",!0))),(n!==e||t)&&this.selectionChanged(this.selectedElement,t,!!o);var i=this.getSelectedSurveyElement();n!==e&&document&&i&&this.focusElement(e,o,i,t,r)}},t.prototype.focusElement=function(e,t,o,r,n){var i=this;void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n=null),o||(o=this.getSelectedSurveyElement()),setTimeout((function(){if(o&&(t||n&&(!o.hasTitle||o.isPanel))){var a=document.getElementById(o.id);if(a){var s=!i.rootElement||i.rootElement.clientHeight-64>a.clientHeight?"center":"start";if(a.scrollIntoView({block:s}),!r&&a.parentElement){var l="string"==typeof t?a.parentElement.querySelector(t):a.parentElement;l&&l.focus()}}}n&&e&&Eo.get(e.locTitle).activateEditor()}),100)},t.prototype.getSelectedSurveyElement=function(){var e=this.selectedElement;return e&&"survey"!=e.getType()&&e.isInteractiveDesignElement&&e.id?e:null},t.prototype.onSelectingElement=function(e){var t={newSelectedElement:e};return this.onSelectedElementChanging.fire(this,t),t.newSelectedElement},Object.defineProperty(t.prototype,"designerPropertyGrid",{get:function(){var e=this.sidebar.getTabById(this.sidebar.activeTab);return e&&e.model?e.model.propertyGridModel:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyGrid",{get:function(){return this.designerPropertyGrid.survey},enumerable:!1,configurable:!0}),t.prototype.collapsePropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.collapseCategory(e)},t.prototype.expandPropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.expandCategory(e)},t.prototype.collapseAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.collapseAllCategories()},t.prototype.expandAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.expandAllCategories()},t.prototype.collapseAllPropertyTabs=function(){this.collapseAllPropertyGridCategories()},t.prototype.expandAllPropertyTabs=function(){this.expandAllPropertyGridCategories()},t.prototype.expandPropertyTab=function(e){this.expandPropertyGridCategory(e)},t.prototype.collapsePropertyTab=function(e){this.collapsePropertyGridCategory(e)},t.prototype.validateSelectedElement=function(){var e=!0;return this.selectedElement?(this.designerPropertyGrid&&(e=this.designerPropertyGrid.validate()),e):e},t.prototype.deleteLocaleStrings=function(e){new _t(this.survey).deleteLocaleStrings(e)},t.prototype.getPropertyGridExpandedCategory=function(){if(this.designerPropertyGrid){for(var e=this.designerPropertyGrid.survey.getAllPanels(),t=0;t<e.length;t++)if(e[t].isExpanded)return e[t].name;return""}},t.prototype.expandCategoryIfNeeded=function(){var e=a.propertyGrid.defaultExpandedTabName;if(e&&!this.getPropertyGridExpandedCategory()&&!this.survey.isEmpty){var t=this.designerPropertyGrid.survey.getPanelByName(e);t&&t.expand()}},t.prototype.selectionChanged=function(e,t,o){void 0===o&&(o=!0),this.survey.currentPage=this.getCurrentPageByElement(e),this.selectionHistoryController.onObjSelected(e),this.designerPropertyGrid&&(this.designerPropertyGrid.obj=e,t||(t=this.designerPropertyGrid.currentlySelectedProperty),t&&this.designerPropertyGrid.selectProperty(t,o||!this.selectFromStringEditor),this.expandCategoryIfNeeded(),this.selectFromStringEditor=!1);var r={newSelectedElement:e};this.onSelectedElementChanged.fire(this,r)},t.prototype.getCurrentPageByElement=function(e){if(e)return e.isPage?e:e.page?e.page:e.parentQuestion?this.getCurrentPageByElement(e.parentQuestion):void 0},t.prototype.clickToolboxItem=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o="ADDED_FROM_TOOLBOX"),this.readOnly||(void 0===e.getType&&(e=this.createNewElement(e)),this.survey.lazyRendering=!1,this.doClickQuestionCore(e,o,-1,t),this.selectElement(e,null,!0,this.startEditTitleOnQuestionAdded))},t.prototype.getJSONForNewElement=function(e){var t=this.createNewElement(e);return(e=t.toJSON()).type=t.getType(),e},t.prototype.chooseFiles=function(e,t,o){this.onOpenFileChooser.isEmpty?Object(i.chooseFiles)(e,t):this.onOpenFileChooser.fire(this,{input:e,element:o&&o.element||this.survey,elementType:o&&o.elementType,item:o&&o.item,propertyName:o&&o.propertyName,callback:t,context:o})},t.prototype.uploadFiles=function(e,t,o,r){if(this.onUploadFile.isEmpty){var n=new FileReader;n.onload=function(e){o("success",n.result)},n.readAsDataURL(e[0])}else this.onUploadFile.fire(this,{question:t,files:e||[],callback:o,element:r&&r.element||this.survey,elementType:r&&r.elementType,propertyName:r&&r.propertyName,context:r})},Object.defineProperty(t.prototype,"rootElement",{get:function(){return this._rootElementValue},enumerable:!1,configurable:!0}),t.prototype.setRootElement=function(e){this._rootElementValue=e,this.initKeyboardShortcuts(e),this.initResponsivityManager(e)},t.prototype.unsubscribeRootElement=function(){this.removeKeyboardShortcuts(this._rootElementValue),this.resetResponsivityManager()},t.prototype.initKeyboardShortcuts=function(e){e&&e.addEventListener("keydown",this.onKeyDownHandler)},t.prototype.removeKeyboardShortcuts=function(e){e&&e.removeEventListener("keydown",this.onKeyDownHandler)},t.prototype.findSuitableShortcuts=function(e){var t=this,o=[];return Object.keys(this.shortcuts||{}).map((function(e){return t.shortcuts[e]})).filter((function(e){return!e.affectedTab||e.affectedTab===t.activeTab})).forEach((function(t){var r=e.metaKey?t.macOsHotkey:t.hotKey;r&&!!r.ctrlKey==!!e.ctrlKey&&!!r.shiftKey==!!e.shiftKey&&r.keyCode===e.keyCode&&o.push(t)})),o},t.prototype.registerShortcut=function(e,t){this.shortcuts[e]=t},t.prototype.unRegisterShortcut=function(e){delete this.shortcuts[e]},t.prototype.deletePanelOrQuestion=function(e){var t=this,o=e.parent,r=o.elements,n=r.indexOf(e);n==r.length-1&&n--,e.questions&&e.questions.forEach((function(e){return t.updateConditionsOnRemove(e)})),e.delete(!1),!o.isPage||"single"!==this.pageEditMode&&0!==r.length||(o=this.survey),this.selectElement(n>-1?r[n]:o)},t.prototype.onCanShowObjectProperty=function(e,t,o,r,n){var i={obj:e,property:t,canShow:!0,showMode:o,parentObj:r,parentProperty:n};return this.onCanShowProperty.fire(this,i),i.canShow},t.prototype.canDeleteItem=function(e,t,o){var r={obj:e,item:t,canDelete:o};return this.onCanDeleteItem.fire(this,r),r.canDelete},t.prototype.getErrorOnPropertyChanging=function(e,t,o){if("name"!==t)return null;if(te.getObjectType(e)===X.Unknown)return null;return(te.getObjectType(e)===X.Column?!!e.colOwner&&!this.isNameUniqueInArray(e.colOwner.columns,e,o):this.generateUniqueName(e,o)!==o)?this.getLocString("pe.propertyNameIsNotUnique"):null},t.prototype.generateUniqueName=function(e,t){var o={element:e,name:t,isDone:!0},r=[];do{if(this.generateUniqueNameCore(o),!o.isDone&&r.indexOf(o.name)>-1){o.name=this.checkForUniqueName(e,o.name);break}r.push(o.name)}while(!o.isDone);return o.name},t.prototype.generateUniqueNameCore=function(e){e.name=this.checkForUniqueName(e.element,e.name);var t={element:e.element,name:e.name};this.onGenerateNewName.fire(this,t),e.name!==t.name&&(e.name=t.name,e.name=this.checkForUniqueName(e.element,e.name),e.isDone=e.name===t.name)},t.prototype.checkForUniqueName=function(e,t){for(;!this.isNameUnique(e,t,!1);)t=te.generateNewName(t);return t},t.prototype.isNameUnique=function(e,t,o){return void 0===o&&(o=!0),!!this.isNameUniqueInArray(this.survey.pages,e,t)&&(!!this.isNameUniqueInArray(this.getAllPanels(o),e,t)&&this.isNameUniqueInArray(this.getAllQuestions(o),e,t))},t.prototype.isNameUniqueInArray=function(e,t,o){if(!Array.isArray(e))return!0;o=o.toLowerCase();for(var r=0;r<e.length;r++)if(e[r]!=t&&e[r].name.toLowerCase()==o)return!1;return!0},t.prototype.doPropertyGridChanged=function(){},Object.defineProperty(t.prototype,"alwaySaveTextInPropertyEditors",{get:function(){return this.alwaySaveTextInPropertyEditorsValue},set:function(e){this.alwaySaveTextInPropertyEditorsValue=e},enumerable:!1,configurable:!0}),t.prototype.onCanShowPropertyCallback=function(e,t,o,r,n){return void 0===o&&(o=null),this.onCanShowObjectProperty(e,t,o,r,n)},t.prototype.onPropertyGridSurveyCreatedCallback=function(e,t){var o={obj:e,survey:t};this.onPropertyGridSurveyCreated.fire(this,o)},t.prototype.onPropertyEditorCreatedCallback=function(e,t,o){var r={obj:e,property:t,editor:o};this.onPropertyEditorCreated.fire(this,r)},t.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,o,r){var n={obj:e,property:t,editor:o,titleActions:r};this.onPropertyEditorUpdateTitleActions.fire(this,n)},t.prototype.onPropertyGridShowModalCallback=function(e,t,o,r,n){var i={obj:e,property:t,editor:o,popupEditor:r,popupModel:n};this.onPropertyGridShowModal.fire(this,i)},t.prototype.onCanDeleteItemCallback=function(e,t,o){if(t&&t.isPage){if("bypage"===this.pageEditMode)return t!==this.survey.currentPage;if("single"===this.pageEditMode)return!1}return this.canDeleteItem(e,t,o)},t.prototype.onCollectionItemDeletingCallback=function(e,t,o,r){var n;if((null===(n=r)||void 0===n?void 0:n.isPage)&&!this.checkOnElementDeleting(r))return!1;if(this.onCollectionItemDeleting.isEmpty)return!0;var i={obj:e,property:t,propertyName:t.name,collection:o,item:r,allowDelete:!0};return this.onCollectionItemDeleting.fire(this,i),i.allowDelete},t.prototype.onCollectionItemAllowingCallback=function(e,t,o,r,n){if(!this.onCollectionItemAllowOperations.isEmpty){var i={obj:e,property:t,propertyName:t&&t.name,collection:o,item:r,allowEdit:n.allowEdit,allowDelete:n.allowDelete,allowAdd:n.allowAdd};this.onCollectionItemAllowOperations.fire(this,i),n.allowEdit=i.allowEdit,n.allowDelete=i.allowDelete,n.allowAdd=i.allowAdd}},t.prototype.onItemValueAddedCallback=function(e,t,o,r){var n={obj:e,propertyName:t,newItem:o,itemValues:r};this.onItemValueAdded.fire(this,n)},t.prototype.onFastEntryCallback=function(e,t){var o={items:e,lines:t};return this.onFastEntryFinished.fire(this,o),o.items},t.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,o){var r={newColumn:t,matrix:e,columns:o};this.onMatrixColumnAdded.fire(this,r)},t.prototype.onSetPropertyEditorOptionsCallback=function(e,t,o){var r={propertyName:e,obj:t,editorOptions:o};this.onSetPropertyEditorOptions.fire(this,r)},t.prototype.onGetErrorTextOnValidationCallback=function(e,t,o){var r=this.getErrorOnPropertyChanging(t,e,o);if(r)return r;var n={propertyName:e,obj:t,value:o,error:""};return this.onPropertyValidationCustomError.fire(this,n),n.error},t.prototype.onValueChangingCallback=function(e){this.onPropertyValueChanging.fire(this,e)},t.prototype.onGetElementEditorTitleCallback=function(e,t){return t},t.prototype.onConditionQuestionsGetListCallback=function(e,t,o,r){if(this.onConditionQuestionsGetList.isEmpty)return a.logic.questionSortOrder;var n={propertyName:e,obj:t,editor:o,sortOrder:"asc",list:r};if(this.onConditionQuestionsGetList.fire(this,n),n.list!==r){r.splice(0,r.length);for(var i=0;i<n.list.length;i++)r.push(n.list[i])}return n.sortOrder},t.prototype.onConditionGetTitleCallback=function(e,t){var o={expression:e,title:t};return this.onConditionGetTitle.fire(this,o),o.title},t.prototype.isConditionOperatorEnabled=function(e,t,o,r){if(this.onGetConditionOperator.isEmpty)return r;var n={questionName:e,question:t,questionType:t?t.getType():"",operator:o,show:r};return this.onGetConditionOperator.fire(this,n),n.show},t.prototype.onLogicGetTitleCallback=function(e,t,o,r){if(this.onLogicItemDisplayText.isEmpty)return o;var n={expression:e,expressionText:t,text:o,logicItem:r};return this.onLogicItemDisplayText.fire(this,n),n.text},t.prototype.getProcessedTranslationItemText=function(e,t,o,r){if(this.onTranslationItemChanging.isEmpty)return o;var n={locale:e,obj:r,locString:t,newText:o};return this.onTranslationItemChanging.fire(this,n),n.newText},t.prototype.getTranslationExportedText=function(e,t,o,r,n){if(this.onTranslationExportItem.isEmpty)return n;var i={obj:e,name:t,locString:o,locale:r,text:n};return this.onTranslationExportItem.fire(this,i),i.text},t.prototype.getHasMachineTranslation=function(){return!this.onMachineTranslate.isEmpty},t.prototype.doMachineTranslation=function(e,t,o,r){this.getHasMachineTranslation()?this.onMachineTranslate.fire(this,{fromLocale:e,toLocale:t,strings:o,callback:r}):r(void 0)},t.prototype.doAutoSave=function(){var e=this,t=function(){return e.doSave()};if(this.autoSaveDelay<=0)t();else{this.autoSaveTimerId&&clearTimeout(this.autoSaveTimerId);var o=this;this.autoSaveTimerId=setTimeout((function(){clearTimeout(o.autoSaveTimerId),o.autoSaveTimerId=null,t()}),this.autoSaveDelay)}},t.prototype._doSaveCore=function(e){var t=this;this.setState("saving"),this.saveSurveyFunc&&(this.saveNo++,this.saveSurveyFunc(this.saveNo,(function(o,r){t.saveNo===o&&(r?t.setState("saved"):(t.setState("modified"),t.showErrorOnFailedSave&&t.notify(t.getLocString("ed.saveError"),"error")),e&&e())})))},t.prototype.saveSurvey=function(){this._doSaveCore()},t.prototype.doSave=function(){this._doSaveCore()},t.prototype.saveSurveyActionHandler=function(){this.syncSaveButtons?this.save():this.saveSurvey()},t.prototype._updateSaveActions=function(){var e=this._findAction("svd-save");if(e&&(e.enabled="modified"===this.state,e.active="modified"===this.state),this.syncSaveButtons){var t=this._findAction("svd-save-theme");t&&(t.enabled=this.hasPendingThemeChanges,t.active=this.hasPendingThemeChanges)}},t.prototype.save=function(){var e=this,t=function(){e.hasPendingThemeChanges&&e._doSaveThemeCore((function(){e._updateSaveActions()}))};"modified"===this.state?this._doSaveCore((function(){t()})):t()},Object.defineProperty(t.prototype,"saveSurveyFunc",{get:function(){return this.saveSurveyFuncValue},set:function(e){this.saveSurveyFuncValue=e,this.showSaveButton=null!=e&&!this.isAutoSave},enumerable:!1,configurable:!0}),t.prototype.convertCurrentQuestion=function(e){var t=this.selectedElement;if(t&&t.getType()!==e){var o=te.getObjectType(t);o!==X.Question&&o!==X.Panel||(this.addNewElementReason="ELEMENT_CONVERTED",t=this.convertQuestion(t,e),this.selectElement(t,null,"#convertTo button"))}},t.prototype.getAddNewQuestionText=function(e){if(void 0===e&&(e=null),e||(e=this.currentAddQuestionType),e){var t=this.getLocString("ed.addNewTypeQuestion"),o=this.toolbox.items.filter((function(t){return t.name==e}));if(Array.isArray(o)&&o.length>0&&t&&t.format)return t.format(o[0].title)}return this.getLocString("ed.addNewQuestion")},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return this.getAddNewQuestionText()},enumerable:!1,configurable:!0}),t.prototype.getAvailableToolboxItems=function(e,t){void 0===t&&(t=!0);var o=[].concat(this.toolbox.items);if(!e||this.maxNestedPanels<0)return o;if(!t&&e.isPanel)return o;if(this.maxNestedPanels<te.getElementDeepLength(e))for(var r=o.length-1;r>=0;r--)o[r].isPanel&&o.splice(r,1);return o},t.prototype.getQuestionTypeSelectorModel=function(e,t){var o=this,r=t&&t.isPanel?t:null,n=function(){return o.getAvailableToolboxItems(t).map((function(e){return o.createIActionBarItemByClass(e.name,e.title,e.iconName,e.needSeparator)}))},a=Object(i.createDropdownActionModel)({iconName:"icon-more",title:this.getLocString("ed.addNewQuestion")},{items:n(),onSelectionChanged:function(t){o.currentAddQuestionType=t.id,o.addNewQuestionInPage(e,r)},onShow:function(){a.popupModel.contentComponentData.model.setItems(n())},allowSelection:!1,verticalPosition:"bottom",horizontalPosition:"center",displayMode:this.isTouch?"overlay":"popup"});return a},t.prototype.getUpdatedPageAdornerFooterActions=function(e,t){var o={page:e.page,addNewQuestion:function(t){e.addNewQuestion(e,void 0,t)},actions:t};return this.onGetPageActions.fire(this,o),o.actions},t.prototype.addNewQuestionInPage=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null),o||(o=this.currentAddQuestionType),o||(o=a.designer.defaultAddQuestionType),e(o);var r={type:o},n=this.toolbox.getItemByName(o);n&&n.json&&(r=n.json);var i=this.createNewElement(r);this.clickToolboxItem(i,t,"ADDED_FROM_PAGEBUTTON")},t.prototype.createIActionBarItemByClass=function(e,t,o,r){var n=new i.Action({title:t,id:e,iconName:o});return n.needSeparator=r,n},t.prototype.onElementMenuItemsChanged=function(e,t){this.onDefineElementMenuItems.fire(this,{obj:e,items:t})},t.prototype.getElementAllowOperations=function(e){var t={obj:e,element:e,allowDelete:!0,allowCopy:!0,allowDragging:!0,allowChangeType:!0,allowChangeInputType:!0,allowChangeRequired:!0,allowShowSettings:void 0,allowEdit:void 0};return this.onElementAllowOperations.fire(this,t),t},t.prototype.getChoicesItemBaseTitle=function(){return this.getLocString("ed.choices_Item")||i.surveyLocalization.getString("choices_Item")},t.prototype.getNextItemValue=function(e){return d(this.getChoicesItemBaseTitle(),e.choices)},t.prototype.createNewItemValue=function(e,t,o){void 0===t&&(t=!0);var r=this.getNextItemValue(e),n=e.createItemValue(r);if(n.text=h(e.choices),e.choices.push(n),o&&o(n),t){var i=n.ownerPropertyName?n.ownerPropertyName:"choices";this.onItemValueAddedCallback(e,i,n,e.choices)}return n},t.prototype.onPropertyValueChanged=function(t,o,r){var n=this;e.prototype.onPropertyValueChanged.call(this,t,o,r),"viewType"===t&&this.tabs.forEach((function(e){var t=n.viewType===e.id;e.active=t,e.disableHide=t}))},t.prototype.initResponsivityManager=function(e){this.responsivityManager=new yo(e,this)},t.prototype.resetResponsivityManager=function(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)},Object.defineProperty(t.prototype,"showPageNavigator",{get:function(){return this.showPageNavigatorValue&&this.allowShowPageNavigator},set:function(e){this.showPageNavigatorValue=e},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){var t=this;this.isCreatorDisposed=!0,this.tabs=[],Object.keys(this.plugins).forEach((function(e){var o=t.plugins[e];"function"==typeof o.deactivate&&o.deactivate(),"function"==typeof o.dispose&&o.dispose()})),e.prototype.dispose.call(this)},Z([Object(i.property)({defaultValue:!0})],t.prototype,"showDesignerTab",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showJSONEditorTab",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showTestSurveyTab",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showThemeTab",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showTranslationTab",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showLogicTab",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"useTableViewInLogicTab",void 0),Z([Object(i.property)({defaultValue:200})],t.prototype,"pageHoverDelay",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"inplaceEditForValues",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"previewShowResults",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isAutoSave",void 0),Z([Object(i.property)()],t.prototype,"showOptions",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showSearch",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"generateValidJSON",void 0),Z([Object(i.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),Z([Object(i.property)({defaultValue:"landscape"})],t.prototype,"previewOrientation",void 0),Z([Object(i.property)()],t.prototype,"surveyValue",void 0),Z([Object(i.property)()],t.prototype,"viewType",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"allowShowToolbox",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showToolboxValue",void 0),Z([Object(i.property)()],t.prototype,"showSidebarValue",void 0),Z([no()],t.prototype,"addPage",null),Z([io()],t.prototype,"doOnQuestionAdded",null),Z([io()],t.prototype,"doOnPanelAdded",null),Z([io()],t.prototype,"doOnPageAdded",null),Z([no()],t.prototype,"deleteObject",null),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){var o=t.getPlugin("theme");o&&(e?(t.onModified.add(t._syncSaveActions),o.onThemePropertyChanged.add(t._syncSaveActions),o.onThemeSelected.add(t._syncSaveActions)):(t.onModified.remove(t._syncSaveActions),o.onThemePropertyChanged.remove(t._syncSaveActions),o.onThemeSelected.remove(t._syncSaveActions)))}})],t.prototype,"syncSaveButtons",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showSaveButton",void 0),Z([no()],t.prototype,"convertCurrentQuestion",null),Z([no()],t.prototype,"addNewQuestionInPage",null),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showHeaderInEmptySurvey",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"allowShowPageNavigator",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showPageNavigatorValue",void 0),Z([Object(i.property)({getDefaultValue:function(){return a.layout.showTabs}})],t.prototype,"showTabs",void 0),Z([Object(i.property)({getDefaultValue:function(){return a.layout.showToolbar}})],t.prototype,"showToolbar",void 0),Z([Object(i.property)({getDefaultValue:function(){return a.layout.allowCollapseSidebar}})],t.prototype,"allowCollapseSidebar",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.survey.setIsMobile(!!e)}})],t.prototype,"isMobileView",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isTouch",void 0),Z([Object(i.property)({defaultValue:"left",onSet:function(e,t){t.toolbox&&(t.toolbox.setLocation(e),t.updateToolboxIsCompact())}})],t.prototype,"toolboxLocation",void 0),Z([Object(i.property)({defaultValue:"right"})],t.prototype,"sidebarLocation",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){if(!e)throw new Error("Creator is disposed")}})],t.prototype,"isCreatorDisposed",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"enableLinkFileEditor",void 0),t}(i.Base),vr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t}(br),xr=function(){function e(){}return Object.defineProperty(e,"currentTheme",{get:function(){te.warnNonSupported("StylesManager")},set:function(e){te.warnNonSupported("StylesManager")},enumerable:!1,configurable:!0}),e.applyTheme=function(e){te.warnNonSupported("StylesManager")},e}();function wr(e,t){e.creator=t,e.isPopupEditorContent=!1;var o=e.getElementWrapperComponentName;e.getElementWrapperComponentName=function(t,r){return Sr(t,r,e.isPopupEditorContent)||o.call(e,t,r)};var r=e.getQuestionContentWrapperComponentName;e.getQuestionContentWrapperComponentName=function(t,o){return Tr(t)||r.call(e,t,o)};var n=e.getElementWrapperComponentData;e.getElementWrapperComponentData=function(o,r){return Pr(o,r,t)||n.call(e,o,r)},e.getRowWrapperComponentName=function(e){return"svc-row"},e.getRowWrapperComponentData=function(e){return{creator:t,row:e}},e.getItemValueWrapperComponentName=function(e,t){return Er(e,t)},e.getItemValueWrapperComponentData=function(e,o){return Ir(e,o,t)},e.getRendererForString=function(e,o){if(!t.readOnly&&Or(e,o))return Cr},e.getRendererContextForString=function(e,o){return!t.readOnly&&Or(e,o.name)?{creator:t,element:e,locStr:o}:o}}function jr(e){for(var t=e;t;){if(t.isContentElement)return!0;t=t.parentQuestion}return!1}var Cr="svc-string-editor";function Sr(e,t,o){if("logo-image"===t)return"svc-logo-image";if("cell"===t||"column-header"===t||"row-header"===t){if(jr(function(e){return e?e.row?e.row.data:e.column?e.column.colOwner:null:null}(e)))return;return"svc-matrix-cell"}if(!jr(e)){if(e instanceof i.Question){var r=e.isDescendantOf("dropdown")||e.isDescendantOf("tagbox");return o?r?"svc-cell-dropdown-question":"svc-cell-question":e.customWidget?"svc-widget-question":r?"svc-dropdown-question":e.isDescendantOf("image")?"svc-image-question":"svc-question"}if(e instanceof i.PanelModel)return"svc-panel"}}function Tr(e){if(e.isDescendantOf("rating")&&!jr(e))return"svc-rating-question-content"}function Pr(e,t,o){return"logo-image"===t?o:"cell"===t||"column-header"===t||"row-header"===t?{creator:o,element:e,question:e.question,row:e.row,column:e.column}:Sr(e,t,!1)?e instanceof i.Question||e instanceof i.PanelModel?o:null:void 0}function Er(e,t){return jr(t)?i.SurveyModel.TemplateRendererComponentName:t.isDescendantOf("imagepicker")?"svc-image-item-value":"svc-item-value"}function Ir(e,t,o){return t.isContentElement?e:{creator:o,question:t,item:e}}function Or(e,t){return!(e.parentQuestion instanceof i.QuestionMatrixDropdownModelBase&&(e.data||jr(e.parentQuestion)))&&(!jr(e)||e.isEditableTemplateElement)}function Vr(e){if(!e.tagName)return!1;var t=e.tagName.toLowerCase();return-1!==["input","textarea"].indexOf(t)||-1!==["span","div"].indexOf(t)&&e.isContentEditable}function Nr(e,t){te.warnNonSupported("registerAdorner","This functionality is no longer supported.")}function kr(e){void 0===e&&(e=void 0),te.warnNonSupported("removeAdorners","This functionality is no longer supported.")}var Ar=function(e){function t(t,o){var r=e.call(this)||this;return r.item=t,r.creator=o,r.click=function(e){r.allowAdd&&r.creator.clickToolboxItem(r.item.json)},r.onPointerUp=function(e){r._node.classList.remove("svc-toolbox__tool--pressed"),r._node=null,document.removeEventListener("pointerup",r.onPointerUp)},r.startDragToolboxItem=function(e,t){var o=r.creator.getJSONForNewElement(r.item.json);return r.dragDropHelper.startDragToolboxItem(e,o,r.item),!0},r.dragOrClickHelper=new i.DragOrClickHelper(r.startDragToolboxItem),r}return Y(t,e),Object.defineProperty(t.prototype,"allowAdd",{get:function(){return!this.creator.readOnly},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){var t;if(this.allowAdd){if(0===this.item.id.indexOf("dotsItem-id"))return!0;this.dragOrClickHelper.onPointerDown(e),this._node=e.currentTarget,this._node.classList.add("svc-toolbox__tool--pressed"),document.addEventListener("pointerup",this.onPointerUp),null===(t=this.creator)||void 0===t||t.onDragDropItemStart()}},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),t}(i.Base);o(19),o(20);var _r=function(e){function t(t,o){var r=e.call(this)||this;return r.pagesController=t,r.pageEditMode=o,r.pagesChangedFunc=function(e,t){r.buildItems()},r.currentPagesChangedFunc=function(e,t){r.currentPage=r.pagesController.currentPage},r.pcPropertyChangedHandler=function(e,t){"toolboxLocation"===t.name&&("sidebar"==r.pagesController.creator.toolboxLocation?r.popupModel.horizontalPosition="right":r.popupModel.horizontalPosition=r.pagesController.creator.toolboxLocation)},r.togglePageSelector=function(e){return r.popupModel.toggleVisibility()},r.icon="icon-select-page",r.pagesController.onPagesChanged.add(r.pagesChangedFunc),r.pagesController.onCurrentPageChanged.add(r.currentPagesChangedFunc),r.pageListModel=new i.ListModel([],(function(e){r.pagesController.selectPage(e.data),r.popupModel.toggleVisibility()}),!0),r.popupModel=new i.PopupModel("sv-list",{model:r.pageListModel}),r.pagesController&&(r.popupModel.horizontalPosition=r.pagesController.creator.toolboxLocation),r.popupModel.onShow=function(){r.pageListModel.selectedItem=r.getActionBarByPage(r.pagesController.currentPage),r.isPopupOpened=!0},r.popupModel.onHide=function(){r.isPopupOpened=!1},r.pagesController.creator.onPropertyChanged&&r.pagesController.creator.onPropertyChanged.add(r.pcPropertyChangedHandler),r.buildItems(),r}return Y(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.stopItemsContainerHeightObserver(),this.pagesController.onPagesChanged.remove(this.pagesChangedFunc),this.pagesController.onCurrentPageChanged.remove(this.currentPagesChangedFunc),this.pagesController.creator.onPropertyChanged&&(this.pagesController.creator.onPropertyChanged.remove(this.pcPropertyChangedHandler),this.pcPropertyChangedHandler=void 0),this.pageListModel&&this.pageListModel.dispose(),this.popupModel&&this.popupModel.dispose(),this._scrollableContainer=void 0,this._itemsContainer=void 0},t.prototype.getActionBarByPage=function(e){for(var t=0;t<this.items.length;t++)if(this.items[t].data===e)return this.items[t];return null},t.prototype.setItems=function(e){this.items=e,this.pageListModel.setItems(e),this.updateVisibility()},t.prototype.buildItems=function(){this.currentPage=this.pagesController.currentPage||this.pagesController.pages[0];for(var e=[],t=this.pagesController.pages,o=0;o<t.length;o++)e.push(this.createActionBarItem(t[o]));if("bypage"===this.pagesController.creator.pageEditMode){var r=this.pagesController.creator.getPlugin("designer").model.newPage;r&&e.push(this.createActionBarItem(r))}this.setItems(e)},t.prototype.patchContainerOffset=function(e){for(;e;){if(-1!==e.className.indexOf("svc-tab-designer--with-page-navigator"))return void(e.offsetParent.scrollTop=0);e=e.parentElement}},t.prototype.createActionBarItem=function(e){var t=this,o={id:e.id,title:new i.ComputedUpdater((function(){var o=e.name,r=e.title;return t.pagesController?t.pagesController.getDisplayName(e):r||o}))};return o.active=new i.ComputedUpdater((function(){return e===t.currentPage})),o.action=function(o){t.scrollToPage(e)},o.data=e,this.createActionBarCore(o)},Object.defineProperty(t.prototype,"isByPageMode",{get:function(){return"bypage"===this.pagesController.creator.pageEditMode},enumerable:!1,configurable:!0}),t.prototype.scrollToPage=function(e){var t=this;if("bypage"===this.pageEditMode)return this.pagesController.currentPage=e,this.currentPage=e,void this.pagesController.creator.selectElement(this.pagesController.currentPage);var o=document.getElementById(e.id);if(o){var r=this.pagesController.pages.indexOf(e)===this.pagesController.pages.length-1;this._scrollableContainer?(this._scrollableContainer.scrollTo(this._scrollableContainer.scrollLeft,o.offsetTop-20),this.patchContainerOffset(o),r&&setTimeout((function(){t._scrollableContainer.scrollTo(t._scrollableContainer.scrollLeft,o.offsetTop-20),t.patchContainerOffset(o)}),50)):(o.scrollIntoView({block:"start"}),this.patchContainerOffset(o),r&&setTimeout((function(){o.scrollIntoView({block:"start"}),t.patchContainerOffset(o)}),50))}},t.prototype.createActionBarCore=function(e){return new i.Action(e)},Object.defineProperty(t.prototype,"pageSelectorCaption",{get:function(){return z("ed.selectPage")},enumerable:!1,configurable:!0}),t.prototype.onContainerScroll=function(e){var t=e.scrollTop,o=e.clientHeight,r=t+o,n=[],i=void 0,a=0;return this.pagesController.pages.forEach((function(e){var o=document.getElementById(e.id);if(o){var s=o.offsetTop,l=s+o.clientHeight;if(!(s<r||l>t))return;var c=s-t,p=r-l,u=o.clientHeight;c<0&&(u+=c),p<0&&(u+=p),(u/=o.clientHeight)>0&&(n.push({page:e,visiblePart:u}),u>a&&(a=u,i=e))}})),this.currentPage=i,n},t.prototype.stopItemsContainerHeightObserver=function(){this._itemsContainer=void 0,this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),this.isDisposed||(this.visibleItemsStartIndex=0,this.visibleItemsCount=Number.MAX_VALUE)},t.prototype.setScrollableContainer=function(e){this._scrollableContainer=e},t.prototype.setItemsContainer=function(e){var t=this;this.stopItemsContainerHeightObserver(),this._itemsContainer=e,this._resizeObserver=new ResizeObserver((function(e,o){return t.updateVisibleItems(e[0].contentBoxSize[0].blockSize)})),this._resizeObserver.observe(e)},t.prototype.updateVisibleItems=function(e){if(this.updateVisibility(),!this.isByPageMode){var o=e-t.PAGE_NAVIGATION_MENU_ITEM_HEIGHT;this.visibleItemsCount=Math.floor(o/t.PAGE_NAVIGATION_ITEM_HEIGHT);var r=this.pagesController.pages.indexOf(this.currentPage),n=0;r>=this.visibleItemsCount&&(n=this.items.length-r-1<this.visibleItemsCount/2?this.items.length-this.visibleItemsCount:r-Math.floor(this.visibleItemsCount/2)),this.visibleItemsStartIndex=n}},t.prototype._updateVisibility=function(){this.hasScrolling=!this._scrollableContainer||this._scrollableContainer.scrollHeight>this._scrollableContainer.clientHeight,this.visible=this.items.length>1&&(this.hasScrolling||this.isByPageMode),this.isByPageMode&&(this.visibleItemsStartIndex=0,this.visibleItemsCount=this.items.length)},t.prototype.updateVisibility=function(){var e=this;setTimeout((function(){e._updateVisibility()}),10)},Object.defineProperty(t.prototype,"visibleItems",{get:function(){return this.items.length<=this.visibleItemsCount?this.items:this.items.slice(this.visibleItemsStartIndex,this.visibleItemsStartIndex+this.visibleItemsCount)},enumerable:!1,configurable:!0}),t.PAGE_NAVIGATION_MENU_ITEM_HEIGHT=44,t.PAGE_NAVIGATION_ITEM_HEIGHT=36,Z([Object(i.property)({defaultValue:!0})],t.prototype,"hasScrolling",void 0),Z([Object(i.propertyArray)()],t.prototype,"items",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"visible",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isPopupOpened",void 0),Z([Object(i.property)({onSet:function(e,t){var o=t.pagesController.pages.indexOf(e);if(!(o>=t.visibleItemsStartIndex&&o<t.visibleItemsStartIndex+t.visibleItemsCount)){var r=t.visibleItemsStartIndex;if(o<t.visibleItemsStartIndex&&(r=o),o>=t.visibleItemsStartIndex+t.visibleItemsCount&&(r=o-t.visibleItemsCount+1),t.visibleItemsStartIndex!==r)if(t.visible&&t._itemsContainer){var n=t._itemsContainer.querySelectorAll(".svc-page-navigator__selector + div")[0];if(n){var i="svc-page-navigator__items--"+(t.visibleItemsStartIndex<r?"up":"down");n.className=i,setTimeout((function(){n.className="",t.visibleItemsStartIndex=r}),250)}}else t.visibleItemsStartIndex=r}}})],t.prototype,"currentPage",void 0),Z([Object(i.property)({defaultValue:0})],t.prototype,"visibleItemsStartIndex",void 0),Z([Object(i.property)({defaultValue:Number.MAX_VALUE})],t.prototype,"visibleItemsCount",void 0),t}(i.Base),Lr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.needToShrink=function(e,t,o){return"start"==e.innerItem.location&&t||"start"!=e.innerItem.location&&o},t.prototype.setModeForActions=function(e,t,o){var r=this;void 0===o&&(o=[]),this.visibleActions.forEach((function(n){-1==o.indexOf(n.id)?r.needToShrink(n,e,t)?n.mode=n.innerItem.iconName?"small":"removed":n.mode="large":n.mode="removed"}))},t.prototype.calcItemSize=function(e,t,o,r){return void 0===r&&(r=[]),-1!=r.indexOf(e.id)?0:this.needToShrink(e,t,o)?e.innerItem.iconName?e.minDimension:0:e.maxDimension},t.prototype.fit=function(e,t){var o=this;if(!(e<=0)){this.dotsItem.visible=!1;var r=this.visibleActions;e>=r.reduce((function(e,t){return e+t.maxDimension}),0)?r.forEach((function(e){return e.mode="large"})):e>=r.reduce((function(e,t){return e+o.calcItemSize(t,!1,!0)}),0)?this.setModeForActions(!1,!0):e>=r.reduce((function(e,t){return e+o.calcItemSize(t,!1,!0,["convertInputType"])}),0)?this.setModeForActions(!1,!0,["convertInputType"]):e>=r.reduce((function(e,t){return e+o.calcItemSize(t,!0,!0)}),0)?this.setModeForActions(!0,!0):(this.visibleActions.forEach((function(e){"convertTo"!=e.id?"convertInputType"!=e.id?e.mode="popup":e.mode="removed":e.mode="small"})),this.dotsItem.visible=!0,this.hiddenItemsListModel.setItems(r.filter((function(e){return"popup"==e.mode})).map((function(e){return e.innerItem}))))}},t}(i.AdaptiveActionContainer),Dr=function(e){function t(t,o){var r=e.call(this)||this;return r.creator=t,r.surveyElement=o,r.selectedPropPageFunc=function(e,t){"isSelectedInDesigner"===t.name&&r.onElementSelectedChanged(t.newValue)},r.sidebarFlyoutModeChangedFunc=function(e,t){"flyoutMode"===t.name&&r.updateActionsProperties()},r.actionContainer=new Lr,r.actionContainer.dotsItem.iconSize=16,r.actionContainer.dotsItem.popupModel.horizontalPosition="center",r.setSurveyElement(o),r.creator.sidebar.onPropertyChanged.add(r.sidebarFlyoutModeChangedFunc),r.setShowAddQuestionButton(!0),r}return Y(t,e),t.prototype.detachElement=function(e){e&&e.onPropertyChanged.remove(this.selectedPropPageFunc)},t.prototype.attachElement=function(e){e&&e.onPropertyChanged.add(this.selectedPropPageFunc)},t.prototype.setSurveyElement=function(e){if(this.detachElement(this.surveyElement),this.surveyElement=e,this.attachElement(this.surveyElement),this.surveyElement){var t=[];this.buildActions(t),this.creator.onElementMenuItemsChanged(this.surveyElement,t),this.actionContainer.actions.forEach((function(e){return e.dispose&&e.dispose()})),this.actionContainer.setItems(t),this.updateActionsProperties()}},t.prototype.checkActionProperties=function(){this.creator.isElementSelected(this.surveyElement)&&this.updateActionsProperties()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.detachElement(this.surveyElement),this.actionContainer.isDisposed||this.actionContainer.dispose(),this.creator.sidebar.onPropertyChanged.remove(this.sidebarFlyoutModeChangedFunc),this.selectedPropPageFunc=void 0,this.sidebarFlyoutModeChangedFunc=void 0},t.prototype.onElementSelectedChanged=function(e){e&&this.updateActionsProperties()},t.prototype.updateActionsProperties=function(){this.isDisposed||this.updateElementAllowOptions(this.creator.getElementAllowOperations(this.surveyElement),this.isOperationsAllow())},t.prototype.updateElementAllowOptions=function(e,t){if(this.allowDragging=t&&e.allowDragging,this.allowEditOption=null==e.allowEdit||!!e.allowEdit,this.updateActionVisibility("delete",t&&e.allowDelete),this.updateActionVisibility("duplicate",t&&e.allowCopy),void 0===e.allowShowSettings){var o=void 0!==e.allowEdit?t&&e.allowEdit:this.creator.sidebar.flyoutMode;this.updateActionVisibility("settings",o)}else this.updateActionVisibility("settings",e.allowShowSettings);this.setShowAddQuestionButton(!1!==e.allowEdit)},t.prototype.isOperationsAllow=function(){return!this.creator.readOnly},t.prototype.updateActionVisibility=function(e,t){var o=this.getActionById(e);o&&o.visible!=t&&(o.visible=t)},t.prototype.getActionById=function(e){for(var t=this.actionContainer.actions,o=0;o<t.length;o++)if(t[o].id===e)return t[o];return null},t.prototype.buildActions=function(e){var t=this;e.push(new i.Action({id:"duplicate",iconName:"icon-duplicate_16x16",css:"svc-action-bar-item--right sv-action-bar-item--secondary",title:this.creator.getLocString("survey.duplicate"),visibleIndex:10,iconSize:16,action:function(){t.duplicate()}})),e.push(new i.Action({id:"settings",iconName:"icon-settings_16x16",css:"svc-action-bar-item--right sv-action-bar-item--secondary",title:this.creator.getLocString("ed.settings"),locTooltipName:"ed.settingsTooltip",visibleIndex:20,iconSize:16,action:function(){t.creator.setShowSidebar(!0,!0),t.creator.isMobileView||t.creator.propertyGrid.getAllQuestions()[0].focus()}})),e.push(new i.Action({id:"delete",iconName:"icon-delete_16x16",css:"svc-action-bar-item--right sv-action-bar-item--secondary",title:this.creator.getLocString("pe.delete"),visibleIndex:30,iconSize:16,action:function(){t.delete()}}))},Object.defineProperty(t.prototype,"allowEdit",{get:function(){return!!this.creator&&!this.creator.readOnly&&this.allowEditOption},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showAddQuestionButton",{get:function(){return this.getPropertyValue("showAddQuestionButton")},enumerable:!1,configurable:!0}),t.prototype.setShowAddQuestionButton=function(e){this.setPropertyValue("showAddQuestionButton",e&&this.allowEdit&&a.designer.showAddQuestionButton)},t.prototype.duplicate=function(){},t.prototype.delete=function(){this.creator.deleteElement(this.surveyElement)},Z([Object(i.property)({defaultValue:!0})],t.prototype,"allowDragging",void 0),t}(i.Base);o(21);var Mr=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.addGhostPage=function(e){void 0===e&&(e=!0);var t=r.page;r.isGhost&&(!!r.creator.addPage(t,e,(function(){return t.unRegisterFunctionOnPropertiesValueChanged(["title","description"],"add_ghost"),t.name=te.getNewPageName(r.creator.survey.pages),!0}))&&(r.creator.survey.currentPage=t));e&&r.creator.selectElement(t)},r.actionContainer.sizeMode="small",r.questionTypeSelectorModel=r.creator.getQuestionTypeSelectorModel((function(e){r.currentAddQuestionType=e,r.addGhostPage()})),r.attachElement(o),r}return Y(t,e),t.prototype.updateDragTypeOverMe=function(){var e;this.isDisposed||(this.dragTypeOverMe=null===(e=this.page)||void 0===e?void 0:e.dragTypeOverMe)},t.prototype.updateShowPlaceholder=function(e){this.showPlaceholder=!this.isGhost&&0===(e||this.page.elements).length},t.prototype.attachElement=function(t){var o=this;e.prototype.attachElement.call(this,t),this.dragTypeOverMe=null,t&&(t.surveyChangedCallback=function(){o.isPageLive=!!t.survey},this.calcIsGhostPage(t)&&(this.updateActionsProperties(),t.registerFunctionOnPropertiesValueChanged(["title","description"],(function(){o.addGhostPage(),o.updateShowPlaceholder()}),"add_ghost"),this.patchPageForDragDrop(t,this.addGhostPage)),t.registerFunctionOnPropertiesValueChanged(["dragTypeOverMe"],(function(){o.updateDragTypeOverMe()})),t.registerFunctionOnPropertiesValueChanged(["elements"],(function(e){o.updateShowPlaceholder(e)})),this.updateShowPlaceholder(),t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0),this.checkActionProperties(),this.dragTypeOverMe=t.dragTypeOverMe)},t.prototype.detachElement=function(t){t&&(t.unRegisterFunctionOnPropertiesValueChanged(["dragTypeOverMe"]),t.unRegisterFunctionOnPropertiesValueChanged(["title","description"],"add_ghost"),t.surveyChangedCallback=void 0),e.prototype.detachElement.call(this,t),this.isDisposed||(this.dragTypeOverMe=null)},t.prototype.onElementSelectedChanged=function(t){e.prototype.onElementSelectedChanged.call(this,t),this.isSelected=t,t&&"bypage"===this.creator.pageEditMode&&this.setSurveyElement(this.creator.selectedElement),t&&this.onPageSelectedCallback&&this.onPageSelectedCallback()},t.prototype.patchPageForDragDrop=function(e,t){e._isGhost=!0,e._addGhostPageViewModel=function(){delete e._isGhost,delete e._addGhostPageViewModel,t()}},t.prototype.dispose=function(){this.detachElement(this.page),e.prototype.dispose.call(this),this.onPropertyValueChangedCallback=void 0},t.prototype.calcIsGhostPage=function(e){return this.creator.survey.pages.indexOf(e)<0},Object.defineProperty(t.prototype,"isGhost",{get:function(){return this.calcIsGhostPage(this.page)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.creator.isMobileView?z("ed.pagePlaceHolderMobile"):z("ed.pagePlaceHolder")},enumerable:!1,configurable:!0}),t.prototype.isOperationsAllow=function(){return e.prototype.isOperationsAllow.call(this)&&!this.isGhost&&"single"!==this.creator.pageEditMode&&this.creator.allowModifyPages},t.prototype.getPage=function(){return this.surveyElement},Object.defineProperty(t.prototype,"page",{get:function(){return this.getPage()},enumerable:!1,configurable:!0}),t.prototype.addNewQuestion=function(e,t,o){var r=this;this.creator.addNewQuestionInPage((function(e){r.addGhostPage(!1),r.creator.survey.currentPage=r.page}),null,o||this.currentAddQuestionType||a.designer.defaultAddQuestionType)},t.prototype.select=function(e,t){e.isGhost||("single"!==e.creator.pageEditMode?(e.creator.selectElement(e.page,void 0,!1),this.onPageSelectedCallback&&this.onPageSelectedCallback()):e.creator.selectElement(e.creator.survey,void 0,!1)),t.stopPropagation(),t.cancelBubble=!0},Object.defineProperty(t.prototype,"css",{get:function(){var e="";return this.dragTypeOverMe&&this.showPlaceholder?e="svc-question__content--drag-over-inside":this.dragTypeOverMe&&0===this.page.elements.length&&this.creator.survey.pages.length>0&&(e="svc-page--drag-over-empty",a.designer.showAddQuestionButton||(e+=" svc-page--drag-over-empty-no-add-button")),this.isGhost?e+" svc-page__content--new":(this.creator.isElementSelected(this.page)&&(e+=" svc-page__content--selected"),e)},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){w(e,t,this.creator.pageHoverDelay)},t.prototype.hoverStopper=function(e,t){e.__svc_question_processed=!0},t.prototype.duplicate=function(){var e=this.creator.copyPage(this.page);this.creator.selectElement(e)},t.prototype.delete=function(){this.creator.deleteElement(this.page)},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return!this.currentAddQuestionType&&this.creator?this.creator.getLocString("ed.addNewQuestion"):this.creator?this.creator.getAddNewQuestionText(this.currentAddQuestionType):""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"footerActionsBar",{get:function(){var e=this;if(!this._footerActionsBar){this._footerActionsBar=new i.ActionContainer,this._footerActionsBar.containerCss="svc-page__footer",this._footerActionsBar.cssClasses={item:"svc-btn",itemTitle:"svc-text svc-text--normal svc-text--bold"};var t=[{css:"svc-add-new-question-action",visible:new i.ComputedUpdater((function(){return e.showAddQuestionButton})),component:"svc-add-new-question-btn",data:this}];t=this.creator.getUpdatedPageAdornerFooterActions(this,t),this.footerActionsBar.setItems(t)}return this._footerActionsBar},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isPageLive",void 0),Z([Object(i.property)()],t.prototype,"showPlaceholder",void 0),Z([Object(i.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),Z([Object(i.property)({defaultValue:null})],t.prototype,"dragTypeOverMe",void 0),t}(Dr);o(22);var Rr=function(e){function t(t,o,r){var n=e.call(this)||this;return n.creator=t,n.row=o,n.templateData=r,n}return Y(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){var e="svc-row";return 1===this.row.elements.length&&"sv-drag-drop-ghost-survey-element-name"===this.row.elements[0].name&&(e+=" svc-row--ghost"),this.row.dragTypeOverMe===i.DragTypeOverMeEnum.Top&&(e+=" svc-row--drag-over-top"),this.row.dragTypeOverMe===i.DragTypeOverMeEnum.Bottom&&(e+=" svc-row--drag-over-bottom"),e},enumerable:!1,configurable:!0}),t}(i.Base);o(23);var qr=function(e){function t(t,o,r){var n=e.call(this,t,o)||this;return n.templateData=r,n.startDragSurveyElement=function(e){var t=n.surveyElement,o=n.creator.selectedElement===t;return n.dragDropHelper.startDragSurveyElement(e,t,o),!0},n.questionTypeSelectorModel=n.creator.getQuestionTypeSelectorModel((function(e){n.currentAddQuestionType=e}),n.surveyElement),n.actionContainer.sizeMode="small",o.isQuestion&&o.setCanShowOptionItemCallback&&o.setCanShowOptionItemCallback((function(e){return!t.readOnly&&(e!==n.surveyElement.newItem||(t.maximumChoicesCount<1||o.choices.length<t.maximumChoicesCount))})),n.checkActionProperties(),n.dragOrClickHelper=new i.DragOrClickHelper(n.startDragSurveyElement),wo.setQuestion(n),n}return Y(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),t.prototype.select=function(e,t){if(e.surveyElement.isInteractiveDesignElement){var o=e.creator,r=e.surveyElement,n=null===document||void 0===document?void 0:document.activeElement;return o.selectedElement!==r&&n&&n.blur&&"input"===n.tagName.toLocaleLowerCase()&&n.blur(),t.stopPropagation(),t.cancelBubble=!0,o.selectElement(r,void 0,!1),!0}},t.prototype.rootCss=function(){return this.surveyElement.isQuestion&&!this.surveyElement.startWithNewLine?" svc-question__adorner--start-with-new-line":""},t.prototype.css=function(){if(!this.surveyElement.isInteractiveDesignElement)return"";var e="svc-question__content";return e+="function"==typeof this.surveyElement.getType?" svc-question__content--"+this.surveyElement.getType():"",this.creator.isElementSelected(this.surveyElement)&&(e+=" svc-question__content--selected"),this.isEmptyElement&&(e+=" svc-question__content--empty"),this.isEmptyTemplate&&(e+=" svc-question__content--empty-template"),this.isDragMe?e+=" svc-question__content--dragged":e=e.replace(" svc-question__content--dragged",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.InsideEmptyPanel?e+=" svc-question__content--drag-over-inside":e=e.replace(" svc-question__content--drag-over-inside",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.Left?e+=" svc-question__content--drag-over-left":e=e.replace(" svc-question__content--drag-over-left",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.Right?e+=" svc-question__content--drag-over-right":e=e.replace(" svc-question__content--drag-over-right",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.Top?e+=" svc-question__content--drag-over-top":e=e.replace(" svc-question__content--drag-over-top",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.Bottom?e+=" svc-question__content--drag-over-bottom":e=e.replace(" svc-question__content--drag-over-bottom",""),e},Object.defineProperty(t.prototype,"isDragMe",{get:function(){return this.surveyElement.isDragMe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTypeOverMe",{get:function(){return this.element.dragTypeOverMe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isBannerShowing",{get:function(){return this.isUsingCarryForward||this.isUsingRestfull||this.isMessagePanelVisible},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUsingCarryForward",{get:function(){var e;return null===(e=this.element)||void 0===e?void 0:e.isUsingCarryForward},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUsingRestfull",{get:function(){var e;return null===(e=this.element)||void 0===e?void 0:e.isUsingRestful},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMessagePanelVisible",{get:function(){var e;return null===(e=this.element)||void 0===e?void 0:e.getPropertyValue("isMessagePanelVisible")},enumerable:!1,configurable:!0}),t.prototype.createBannerParams=function(){return this.createCarryForwardParams()||this.createUsingRestfulParams()||this.createCustomMessagePanel()},t.prototype.createCarryForwardParams=function(){var e,t=this;if(!this.isUsingCarryForward)return null;var o=null===(e=this.element)||void 0===e?void 0:e.choicesFromQuestion;if(!o)return null;var r=this.creator.survey.getQuestionByName(o);return r?{actionText:r.name,text:this.creator.getLocString("ed.carryForwardChoicesCopied"),onClick:function(){t.creator.selectElement(r)}}:null},t.prototype.createUsingRestfulParams=function(){var e=this;return this.isUsingRestfull?{actionText:this.creator.getLocString("ed.choicesLoadedFromWebLinkText"),text:this.creator.getLocString("ed.choicesLoadedFromWebText"),onClick:function(){e.creator.selectElement(e.element,"choicesByUrl")}}:null},t.prototype.createCustomMessagePanel=function(){if(!this.isMessagePanelVisible)return null;var e={question:this.element,actionText:"",messageText:"",onClick:function(){}};return this.creator&&this.creator.onCreateCustomMessagePanel.fire(this.creator,e),e.text=e.messageText,e},t.prototype.dispose=function(){this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isRequired","isRequiredAdorner"),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("inputType","inputTypeAdorner"),this.surveyElement.setCanShowOptionItemCallback&&this.surveyElement.setCanShowOptionItemCallback(void 0),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"isDraggable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){this.surveyElement.isInteractiveDesignElement&&w(e,t)},t.prototype.updateActionsProperties=function(){if(!this.isDisposed){e.prototype.updateActionsProperties.call(this);for(var t=this.actionContainer.visibleActions,o=!1,r=t.length-1;r>=0;r--)"convertTo"===t[r].id&&(o=!0),t[r].innerItem.location||(t[r].innerItem.location=o?"start":"end")}},t.prototype.updateElementAllowOptions=function(t,o){e.prototype.updateElementAllowOptions.call(this,t,o),this.updateActionVisibility("convertTo",o&&t.allowChangeType),this.updateActionVisibilityByProp("isrequired","isRequired",o&&t.allowChangeRequired),this.updateActionVisibilityByProp("convertInputType","inputType",t.allowChangeInputType),this.updateActionVisibilityByProp("convertInputType","rateDisplayMode",t.allowChangeInputType)},t.prototype.updateActionVisibilityByProp=function(e,t,o){var r=i.Serializer.findProperty(this.surveyElement.getType(),t);if(r){var n=this.creator.onIsPropertyReadOnlyCallback(this.surveyElement,r,r.readOnly,null,null);this.updateActionVisibility(e,o&&!n)}},Object.defineProperty(t.prototype,"isEmptyElement",{get:function(){if(this.surveyElement instanceof i.QuestionHtmlModel)return!this.surveyElement.html;if(this.surveyElement instanceof i.PanelModelBase){var e=this.surveyElement;return!e.rows||e.rows.length<=0||0===e.elements.length}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEmptyTemplate",{get:function(){return this.surveyElement instanceof i.QuestionPanelDynamicModel&&0==this.surveyElement.templateElements.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.surveyElement instanceof i.QuestionHtmlModel?z("ed.htmlPlaceHolder"):this.creator.isMobileView?z("ed.panelPlaceHolderMobile"):z("ed.panelPlaceHolder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequired",{get:function(){return this.surveyElement.isRequired},set:function(e){this.surveyElement.isRequired=e},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){this.dragOrClickHelper.onPointerDown(e)},t.prototype.getConvertToTypesActions=function(){var e=this,t=this.creator.getAvailableToolboxItems(this.element,!1),o=[];t.forEach((function(e){-1==o.indexOf(e.typeName)&&o.push(e.typeName)}));var r=ee.getConvertToClasses(this.currentType,o,!0),n=[],i=null;return r.forEach((function(t){var o=e.creator.toolbox.items.filter((function(e){return e.name==t}));if(Array.isArray(o)&&o.length>0){var r=o[0],a=i&&r.category!=i.category,s=e.creator.createIActionBarItemByClass(r.name,r.title,r.iconName,a);i=r,n.push(s)}})),n},Object.defineProperty(t.prototype,"currentType",{get:function(){return this.surveyElement.getType()},enumerable:!1,configurable:!0}),t.prototype.createConvertToAction=function(){var e,t=this,o=this.getConvertToTypesActions(),r=o.length>0,n=this.getSelectedItem(o,this.currentType),i={id:"convertTo",enabled:r,visibleIndex:0,title:n?n.title:G.getString("qt."+this.currentType),iconName:null===(e=this.creator.toolbox.getItemByName(this.element.getType()))||void 0===e?void 0:e.iconName},a=this.createDropdownModel(i,o,(function(e){var o=t.getConvertToTypesActions();e.setItems(o),e.selectedItem=t.getSelectedItem(o,t.currentType)}),(function(e){t.creator.convertCurrentQuestion(e.id)}));return a.disableHide=!0,a},t.prototype.createConvertInputType=function(){var e=this,t=null;if("text"===this.surveyElement.getType()&&(t=i.Serializer.findProperty("text","inputType")),"rating"===this.surveyElement.getType()&&(t=i.Serializer.findProperty("rating","rateDisplayMode")),!t||!x(this.surveyElement,t.name))return null;var o=t.name,r=this.surveyElement.getPropertyValue(o),n=t.getChoices(this.surveyElement,(function(e){})),a=function(){var e=[];return n.forEach((function(o){e.push({id:o,title:G.getPropertyValueInEditor(t.name,o)})})),e},s={id:"convertInputType",visibleIndex:1,title:G.getPropertyValueInEditor(t.name,r)},l=this.createDropdownModel(s,a(),(function(t){var r=a();t.setItems(r),t.selectedItem=e.getSelectedItem(r,e.surveyElement.getPropertyValue(o))}),(function(t){var r=e.getUpdatedPropertyValue(o,t.id);e.surveyElement.setPropertyValue(o,r)}));return l.disableShrink=!0,this.surveyElement.registerFunctionOnPropertyValueChanged(o,(function(){var t=e.getSelectedItem(a(),e.surveyElement.getPropertyValue(o));t&&(l.popupModel.contentComponentData.model.selectedItem=t,l.title=t.title)}),"inputTypeAdorner"),l.removePriority=1,l},t.prototype.getSelectedItem=function(e,t){var o=e.filter((function(e){return e.id===t}));return o.length>0?o[0]:void 0},t.prototype.createDropdownModel=function(e,t,o,r){var n=Object(i.createDropdownActionModel)({id:e.id,css:"sv-action--convertTo sv-action-bar-item--secondary",iconName:e.iconName,iconSize:24,title:e.title,enabled:e.enabled,visibleIndex:e.visibleIndex,disableShrink:!1,location:"start",action:function(e){}},{items:t,onSelectionChanged:r,allowSelection:!0,horizontalPosition:"center",onShow:function(){var e=n.popupModel.contentComponentData.model;o(e)}});return n.popupModel.displayMode=this.creator.isTouch?"overlay":"popup",n.data.locOwner=this.creator,n},t.prototype.createRequiredAction=function(){var e=this;this.surveyElement.isRequired;var t=new i.Action({id:"isrequired",ariaChecked:new i.ComputedUpdater((function(){return e.isRequired})),ariaRole:"checkbox",css:"svc-action-bar-item--right sv-action-bar-item--secondary",title:this.creator.getLocString("pe.isRequired"),visibleIndex:20,iconName:"icon-required",iconSize:16,action:function(){e.creator.isCanModifyProperty(e.surveyElement,"isRequired")&&(e.isRequired=e.getUpdatedPropertyValue("isRequired",!e.isRequired))}});return t.innerCss=new i.ComputedUpdater((function(){return(new i.CssClassBuilder).append("svc-required-action").append("svc-required-action--active",e.isRequired).toString()})),t.innerItem.title=new i.ComputedUpdater((function(){return e.isRequired?e.creator.getLocString("pe.removeRequiredMark"):e.creator.getLocString("pe.markRequired")})),t},t.prototype.getUpdatedPropertyValue=function(e,t){var o={obj:this.element,propertyName:e,value:this.element[e],newValue:t,doValidation:!1};return this.creator.onValueChangingCallback(o),o.newValue},t.prototype.buildActions=function(t){e.prototype.buildActions.call(this,t);var o=this.surveyElement;t.push(this.createConvertToAction());var r=this.createConvertInputType();r&&t.push(r),t[t.length-1].css+=" sv-action--convertTo-last",void 0!==o.isRequired&&v(o,"isRequired")&&x(o,"isRequired")&&t.push(this.createRequiredAction())},t.prototype.duplicate=function(){var e=this;setTimeout((function(){var t=e.creator.fastCopyQuestion(e.surveyElement);e.creator.selectElement(t)}),1)},t.prototype.addNewQuestion=function(){this.creator.addNewQuestionInPage((function(e){}),this.surveyElement instanceof i.PanelModelBase?this.surveyElement:null,this.currentAddQuestionType||a.designer.defaultAddQuestionType)},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return!this.currentAddQuestionType&&this.creator?this.creator.getLocString("ed.addNewQuestion"):this.creator?this.creator.getAddNewQuestionText(this.currentAddQuestionType):""},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"isDragged",void 0),Z([Object(i.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),t}(Dr);o(3);var Hr=function(e){function t(t,o,r){var n=e.call(this,t,o,r)||this;return n.switchCollapse=function(){n.isCollapsed=!n.isCollapsed},n.surveyElement.registerFunctionOnPropertyValueChanged("isSelectedInDesigner",(function(){n.leftFocus()}),"dropdownCollapseChecker"),n.visibleCount=t.maxVisibleChoices,n.isCollapsed=n.isCollapsed&&n.needToCollapse,n}return Y(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemComponent",{get:function(){return this.surveyElement.isDescendantOf("dropdown")?"survey-radiogroup-item":"survey-checkbox-item"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needToCollapse",{get:function(){return this.visibleCount>0&&this.question.visibleChoices.length>this.visibleCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCollapseView",{get:function(){return this.isCollapsed},enumerable:!1,configurable:!0}),t.prototype.leftFocus=function(){this.creator.isElementSelected(this.surveyElement)||this.isCollapsed||(this.isCollapsed=this.needToCollapse)},t.prototype.getChoiceCss=function(){return(new i.CssClassBuilder).append("svc-question__dropdown-choice").append("svc-question__dropdown-choice--collapsed",this.isCollapsed&&this.needToCollapse).toString()},t.prototype.getRenderedItems=function(){return this.isCollapsed?this.question.visibleChoices.slice(0,this.visibleCount):this.question.visibleChoices},t.prototype.getButtonText=function(){return this.isCollapsed?G.getString("ed.showMoreChoices"):G.getString("ed.showLessChoices")},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isSelectedInDesigner","dropdownCollapseChecker")},Z([Object(i.property)({defaultValue:!0})],t.prototype,"isCollapsed",void 0),Z([Object(i.property)({defaultValue:-1})],t.prototype,"visibleCount",void 0),t}(qr);o(24);var Br=function(e){function t(t,o,r,n){var i=e.call(this,t,o,r)||this;return i.questionRoot=n,i.isEmptyImageLink=!i.question.imageLink,i.surveyElement.registerFunctionOnPropertyValueChanged("imageLink",(function(){i.imageLinkValueChangedHandler()}),"imageLinkValueChanged"),i.initFilePresentationModel(),i}return Y(t,e),t.prototype.initFilePresentationModel=function(){var e=this;this.filePresentationModel=i.Serializer.createClass("file",{name:this.question.name});var t=new i.SurveyModel;this.filePresentationModel.setSurveyImpl(t),this.filePresentationModel.forceIsInputReadOnly=!this.creator.isCanModifyProperty(this.question,"imageLink"),this.filePresentationModel.filePlaceholder=this.placeholderText,this.filePresentationModel.chooseButtonCaption=this.chooseImageText,this.filePresentationModel.acceptedTypes="image/*",this.filePresentationModel.storeDataAsText=!1,this.filePresentationModel.cssClasses.chooseFileIconId="icon-choosefile",t.onOpenFileChooser.add((function(t,o){e.creator.chooseFiles(o.input,o.callback,o.context)})),t.onUploadFiles.add((function(t,o){o.files[0]&&e.creator.uploadFiles(o.files,e.question,(function(t,r){e.question.imageLink=r,o.callback(t,[{content:r,file:o.files[0]}])}),{element:e.question,elementType:e.question.getType(),propertyName:"imageLink"})}))},t.prototype.chooseFile=function(e){var t=e.questionRoot.getElementsByClassName("svc-choose-file-input")[0],o={element:e.question,elementType:e.question.getType(),propertyName:"imageLink"};e.creator.chooseFiles(t,(function(t){e.isUploading=!0,e.creator.uploadFiles(t,e.surveyElement,(function(t,o){e.surveyElement.imageLink=o,e.isUploading=!1}),o)}),o)},Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N(this.surveyElement.contentMode)},enumerable:!1,configurable:!0}),t.prototype.imageLinkValueChangedHandler=function(){this.isEmptyImageLink=!this.question.imageLink,this.filePresentationModel.value=null,this.filePresentationModel.visible=!this.question.imageLink},Object.defineProperty(t.prototype,"isEmptyElement",{get:function(){return this.isEmptyImageLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.creator.isMobileView?z("ed.imagePlaceHolderMobile"):z("ed.imagePlaceHolder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"chooseImageText",{get:function(){return z("ed.imageChooseImage")},enumerable:!1,configurable:!0}),t.prototype.css=function(){return(new i.CssClassBuilder).append(e.prototype.css.call(this)).append("svc-question__content--loading",this.isUploading).toString()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.questionRoot=void 0},Z([Object(i.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isEmptyImageLink",void 0),t}(qr);o(25);var Qr=function(e){function t(t,o,r){var n=e.call(this)||this;return n.creator=t,n.surveyElement=o,n.templateData=r,n}return Y(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return k(this.surveyElement)},enumerable:!1,configurable:!0}),t.useRateValues=function(e){var t=e.contentQuestion?e.contentQuestion:e;return!!t.useRateValues&&t.useRateValues()},t.prototype.addItem=function(e){if(e.allowAdd&&e.enableAdd)if(t.useRateValues(e.element)){var o,r=e.element.rateValues.map((function(e){return e.value}));o=g(e.creator.getChoicesItemBaseTitle(),r);var n=new i.ItemValue(o);n.locOwner={getLocale:function(){return e.element.getLocale?e.element.getLocale():""},getMarkdownHtml:function(e){return e},getProcessedText:function(e){return e}},e.element.rateValues=e.element.rateValues.concat([n]);var a=e.element.rateValues;e.creator.onItemValueAddedCallback(e.element,"rateValues",a[a.length-1],a)}else e.element.rateMax+=e.element.rateStep},t.prototype.removeItem=function(e){if(e.allowRemove&&e.enableRemove){var o=i.Serializer.findProperty(e.element.getType(),"rateValues"),r=e.element.rateValues&&e.element.rateValues.length-1,n=e.element.rateValues&&e.element.rateValues[r]||null;if(e.creator.onCollectionItemDeletingCallback(e.element,o,e.element.rateValues,n)){var a=e.element;t.useRateValues(e.element)||r!==a.rateValues.length-1?(t.useRateValues(e.element)||(a.rateValues=a.rateValues),a.rateValues.splice(r,1)):a.rateMax-=a.rateStep}}},t.allowAddForElement=function(e,o){return(o<1||o>i.settings.ratingMaximumRateValueCount)&&!t.useRateValues(e)&&(o=i.settings.ratingMaximumRateValueCount),"smileys"==e.rateDisplayMode&&(o<1||o>10)&&(o=10),o<1||e.rateCount<o},Object.defineProperty(t.prototype,"allowAdd",{get:function(){return this.canAddOrRemove()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableAdd",{get:function(){return this.allowAdd&&t.allowAddForElement(this.element,this.creator.maximumRateValues)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addClassNames",{get:function(){return(new i.CssClassBuilder).append("svc-item-value-controls__button").append("svc-item-value-controls__button--disabled",!this.enableAdd).append("svc-item-value-controls__add").toString()},enumerable:!1,configurable:!0}),t.allowRemoveForElement=function(e){return e.rateCount>2},t.prototype.canAddOrRemove=function(){return this.creator.isCanModifyProperty(this.element,"rateValues")&&this.creator.isCanModifyProperty(this.element,"rateCount")&&(!this.element.autoGenerate||this.creator.isCanModifyProperty(this.element,"rateMax"))},Object.defineProperty(t.prototype,"allowRemove",{get:function(){return this.canAddOrRemove()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableRemove",{get:function(){return this.allowRemove&&t.allowRemoveForElement(this.element)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeClassNames",{get:function(){return(new i.CssClassBuilder).append("svc-item-value-controls__button").append("svc-item-value-controls__button--disabled",!this.enableRemove).append("svc-item-value-controls__remove").toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTopLabel",{get:function(){return("top"==this.element.rateDescriptionLocation||"topBottom"==this.element.rateDescriptionLocation)&&!!this.element.minRateDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"controlsClassNames",{get:function(){return(new i.CssClassBuilder).append("svc-rating-question-controls").append("svc-item-value-controls").append("svc-rating-question-controls--labels-top",this.hasTopLabel).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addTooltip",{get:function(){return z("pe.addItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeTooltip",{get:function(){return z("pe.removeItem")},enumerable:!1,configurable:!0}),t}(i.Base);o(26);var Fr={noneItem:"showNoneItem",otherItem:"showOtherItem",selectAllItem:"showSelectAllItem",refuseItem:"showRefuseItem",dontKnowItem:"showDontKnowItem"},Ur=function(e){function t(t,o,r){var n=e.call(this)||this;for(var a in n.creator=t,n.question=o,n.item=r,n.canTouchItems=!0,n.focusCameFromDown=!1,n.startDragItemValue=function(e,t){n.dragDropHelper.startDrag(e,n.item,n.question,t)},n.handleDragDropGhostPositionChanged=function(){n.ghostPosition=n.getGhostPosition(n.item),n.isDragDropGhost=n.item===n.dragDropHelper.draggedElement,n.item===n.dragDropHelper.prevDropTarget?(n.isDragDropMoveDown=n.item.isDragDropMoveDown,n.isDragDropMoveUp=n.item.isDragDropMoveUp):(n.isDragDropMoveDown=!1,n.isDragDropMoveUp=!1)},n.updateIsNew(o,r),Fr)n.registerOnPropertyChanged(a,Fr[a]);return n.isNew&&(o.visibleChoicesChangedCallback=function(){n.updateNewItemValue()},n.updateNewItemValue()),n.dragDropHelper.onGhostPositionChanged.add(n.handleDragDropGhostPositionChanged),n.dragOrClickHelper=new i.DragOrClickHelper(n.startDragItemValue),n.allowItemOperations={allowDelete:void 0,allowEdit:void 0,allowAdd:void 0},n.collectionProperty=i.Serializer.findProperty(o.getType(),n.collectionPropertyName),n.creator.onCollectionItemAllowingCallback(o.ownerObj||o,n.collectionProperty,o.visibleChoices,n.item,n.allowItemOperations),void 0===n.allowItemOperations.allowDelete&&(n.allowItemOperations.allowDelete=!0),void 0===n.allowItemOperations.allowAdd&&(n.allowItemOperations.allowAdd=!0),n.allowItemOperations.allowAdd||n.updateIsNewVisibility(),n.creator.isCanModifyProperty(o,"choices")||(n.canTouchItems=!1),n}return Y(t,e),Object.defineProperty(t.prototype,"canBeDragged",{get:function(){return!this.isNew&&this.question.choices.indexOf(this.item)>-1},enumerable:!1,configurable:!0}),t.prototype.isBanStartDrag=function(e){return!this.isDraggable||("true"===e.target.getAttribute("contenteditable")||!this.canBeDragged)},t.prototype.updateNewItemValue=function(){this.creator&&this.question&&this.question.newItem&&(this.question.newItem.value=this.creator.getNextItemValue(this.question),this.question.newItem.text=h(this.question.choices))},t.prototype.registerOnPropertyChanged=function(e,t){var o=this;if(this.question[e]===this.item){var r=this.question,n=this.item;r.registerFunctionOnPropertyValueChanged(t,(function(){o.updateIsNew(r,n)}))}},Object.defineProperty(t.prototype,"collectionPropertyName",{get:function(){return this.item.ownerPropertyName?this.item.ownerPropertyName:"choices"},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){return!!this.isBanStartDrag(e)||(this.dragOrClickHelper.onPointerDown(e),!1)},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropChoices},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.dragDropHelper.onGhostPositionChanged.remove(this.handleDragDropGhostPositionChanged)},t.prototype.getGhostPosition=function(e){return this.dragDropHelper.dropTarget!==e?null:this.dragDropHelper.isBottom?"bottom":"top"},Object.defineProperty(t.prototype,"isDraggable",{get:function(){return this.isDraggableItem(this.item)},enumerable:!1,configurable:!0}),t.prototype.isDraggableItem=function(e){return!(this.creator.readOnly||!this.canTouchItems)&&-1!==this.question.choices.indexOf(e)},t.prototype.getSpecificProp=function(e){for(var t in Fr)if(e.question[t]===e.item)return Fr[t]},t.prototype.add=function(e){var t=this.getSpecificProp(e);t?e.question[t]=!0:(this.addNewItem(e.item,e.question,e.creator),this.updateIsNew(e.question,e.item))},t.prototype.addNewItem=function(e,t,o){e.value="newitem";var r=o.createNewItemValue(t);this.updateNewItemValue(),Eo.get(r.locText).setAutoFocus()},t.prototype.remove=function(e){var t=this.getSpecificProp(e);if(t)e.question[t]=!1;else{var o=e.question.choices,r=o.indexOf(e.item);if(this.creator.onCollectionItemDeletingCallback(e.question,this.collectionProperty,o,e.item)){var n=this.findNextElementIndexToRemove(r);e.question.choices.splice(r,1),this.focusNextElementToRemove(n),this.updateIsNew(e.question,e.item)}}},t.prototype.onFocusOut=function(e){this.question._lastActiveItemValueIndex=this.question.choices.indexOf(this.item)},t.prototype.findNextElementIndexToRemove=function(e){var t=0;return this.question.choices.length>0&&((t=e<this.question._lastActiveItemValueIndex?e-1:e)<0&&(t=0),t>=this.question.choices.length-2&&(t=this.question.choices.length-2)),t},t.prototype.focusNextElementToRemove=function(e){var t=this;setTimeout((function(){var o;null===(o=document.getElementById(t.question.id).querySelectorAll(".svc-item-value-controls__remove")[e])||void 0===o||o.focus()}),100)},t.prototype.updateIsNew=function(e,t){this.isNew=!e.isItemInList(t)&&!this.isAutoGeneratedItem(t),this.updateIsNewVisibility()},t.prototype.updateIsNewVisibility=function(){var e;this.isNew&&this.item.setIsVisible(!(!1===(null===(e=this.allowItemOperations)||void 0===e?void 0:e.allowAdd)))},Object.defineProperty(t.prototype,"allowRemove",{get:function(){var e=this.creator.minimumChoicesCount;if(e>0&&e>=this.question.choices.length)return!1;var t=!this.question.isItemInList(this.item),o=this.isAutoGeneratedItem(this.item);return!this.creator.readOnly&&this.canTouchItems&&this.allowItemOperations.allowDelete&&!t&&!o},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{get:function(){return z(this.isNew?"pe.addItem":"pe.removeItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTooltip",{get:function(){return z("pe.dragItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowAdd",{get:function(){var e=!this.question.isItemInList(this.item),t=this.isAutoGeneratedItem(this.item);return!this.creator.readOnly&&this.canTouchItems&&this.allowItemOperations.allowAdd&&e&&!t},enumerable:!1,configurable:!0}),t.prototype.select=function(e,t){e.question.inMatrixMode||(e.creator.selectElement(e.question,"choices",!1),t&&t.stopPropagation())},t.prototype.isAutoGeneratedItem=function(e){var t=e.value;if(!i.Helpers.isNumber(t))return!1;var o=this.question.choicesMin,r=this.question.choicesMax;return!(!i.Helpers.isNumber(o)||!i.Helpers.isNumber(r)||o===r&&0===o)&&(t>=o&&t<=r)},Z([Object(i.property)({defaultValue:!1})],t.prototype,"isNew",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isDragging",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isDragDropGhost",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isDragDropMoveDown",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isDragDropMoveUp",void 0),Z([Object(i.property)({defaultValue:null})],t.prototype,"ghostPosition",void 0),t}(i.Base);o(27);var Wr=function(e){function t(t,o,r,n,i){var a=e.call(this,t,o,r)||this;return a.question=o,a.item=r,a.templateData=n,a.itemsRoot=i,a.isChoosingNewFile=!1,a.onDragOver=function(e){a.isFileDragging=!0,e.dataTransfer.dropEffect="copy",e.preventDefault()},a.onDrop=function(e){a.isFileDragging=!1,e.preventDefault();var t=e.dataTransfer;if(t&&t.files&&!(t.files.length<1)){for(var o=[],r=0;r<t.files.length;r++)o.push(t.files[r]);a.uploadFiles(o)}},a.onDragLeave=function(e){a.isFileDragging=!1},a}return Y(t,e),t.prototype.getRootCss=function(){return(new i.CssClassBuilder).append("svc-image-item-value-wrapper").append("svc-image-item-value").append("svc-image-item-value--new",this.isNew||this.isUploading).append("svc-image-item-value-wrapper--ghost",this.isDragDropGhost).append("svc-image-item-value--file-dragging",this.isFileDragging).append("svc-image-item-value--single",this.getIsNewItemSingle()).toString()},t.prototype.getIsNewItemSingle=function(){return this.isNew&&0===this.question.choices.length},Object.defineProperty(t.prototype,"canRenderControls",{get:function(){return this.getIsNewItemSingle()||!this.question.renderedImageWidth||this.question.renderedImageWidth>150},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectFileTitle",{get:function(){return this.creator.getLocString("ed.selectFile")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeFileTitle",{get:function(){return this.creator.getLocString("ed.removeFile")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addFileTitle",{get:function(){return this.creator.getLocString("ed.selectFile")},enumerable:!1,configurable:!0}),t.prototype.chooseFile=function(e){var t=e.itemsRoot.getElementsByClassName("svc-choose-file-input")[0],o={element:e.question,item:e.item,elementType:e.question.getType(),propertyName:"imageLink"};e.creator.chooseFiles(t,(function(t){e.isUploading=!0,e.creator.uploadFiles(t,e.question,(function(t,o){"success"===t&&(e.item.imageLink=o),e.isUploading=!1}),o)}),o)},t.prototype.uploadFiles=function(e){var t=this;this.isUploading=!0;var o={element:this.question,item:void 0,elementType:this.question.getType(),propertyName:"imageLink"};this.creator.uploadFiles(e,this.question,(function(e,o){"success"===e&&t.creator.createNewItemValue(t.question,t.isChoosingNewFile,(function(e){e.imageLink=o})),t.isChoosingNewFile=!1,t.isUploading=!1}),o)},t.prototype.chooseNewFile=function(e){var t=this,o=e.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];e.creator.chooseFiles(o,(function(o){t.isChoosingNewFile=!0,e.uploadFiles(o)}),{element:e.question,item:e.item,elementType:e.question.getType(),propertyName:"imageLink"})},Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N(this.question.contentMode)},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isFileDragging",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(Ur);o(28);var Gr=function(){function e(e,t,o,r){this.cellQuestion=t,this.column=o,this.creator=e;var n=t.toJSON();n.type=t.getType(),this.surveyValue=e.createSurvey({questions:[n]},"modal-question-editor",r,(function(e){e.css=i.defaultV2Css,e.setDesignMode(!0),e.isPopupEditorContent=!0,e.showQuestionNumbers="none",e.questionTitleLocation="hidden"})),this.question.setSurveyImpl(this.survey),this.question.inMatrixMode=!0,this.question.ownerObj=this.column}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"question",{get:function(){return this.survey.getAllQuestions()[0]},enumerable:!1,configurable:!0}),e.prototype.apply=function(){var e=this.cellQuestion.parentQuestion,t=e.getColumnByName(this.cellQuestion.name),o=t.toJSON(),r=o.cellType,n=this.survey.getAllQuestions()[0].toJSON();if(r&&(n.cellType=r),!i.Helpers.isTwoValueEquals(n,o)){for(var a in o)void 0!==n[a]||!0!==o[a]&&!1!==o[a]||(n[a]=!o[a]);t.fromJSON(n),e.onColumnCellTypeChanged(t),this.creator.setModified({type:"MATRIX_CELL_EDITOR",column:t})}},e}(),zr=function(e){function t(t,o,r,n,i){var a=e.call(this)||this;return a.creator=t,a.templateData=o,a.question=r,a.row=n,a.column=i,a.onSelectionChanged=function(e,t){a.context&&a.context.getPropertyValue?a.isSelected=a.creator.isElementSelected(a.context):a.isSelected=!1},t.onSelectedElementChanged.add(a.onSelectionChanged),a}return Y(t,e),t.prototype.editQuestion=function(e,t){var o=new Gr(e.creator,e.question,e.column,this);o.question.cellOwner=e;var r=i.surveyLocalization.currentLocale,n=G.currentLocale;i.surveyLocalization.currentLocale=n,i.settings.showDialog({componentName:"svc-question-editor-content",data:{survey:o.survey,creator:this.creator},onApply:function(){return o.apply(),!0},cssClass:"svc-matrix-cell__popup",title:e.question.name,displayMode:this.creator.isMobileView?"overlay":"popup"},e.creator.rootElement).locale=n,i.surveyLocalization.currentLocale=r,t.stopPropagation(),e.creator.selectElement(e.column)},Object.defineProperty(t.prototype,"context",{get:function(){return this.row||this.column||this.templateData},enumerable:!1,configurable:!0}),t.prototype.selectContext=function(e,t){if(e.row)return e.creator.selectElement(e.row.data,"rows",!1),void t.stopPropagation();"function"==typeof e.context.getType&&("itemvalue"===e.context.getType()?e.creator.selectElement(e.context.locOwner,e.context.ownerPropertyName,!1):e.creator.selectElement(e.context),t.stopPropagation())},Object.defineProperty(t.prototype,"isSupportCellEditor",{get:function(){return!(!this.question||!this.question.getType)&&te.isSupportCellEditor(this.question.getType())},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){!this.row&&this.context&&this.context.getPropertyValue&&this.context.getType&&"itemvalue"!==this.context.getType()&&w(e,t)},t.prototype.dispose=function(){this.creator.onSelectedElementChanged.remove(this.onSelectionChanged),e.prototype.dispose.call(this)},Z([Object(i.property)()],t.prototype,"isSelected",void 0),t}(i.Base);o(29);var Jr=function(e){function t(t,o,r){var n=e.call(this)||this;return n.survey=t,n._data=o,n._lvl=r,n.toggle=function(){n.collapsed=!n.collapsed},n.markerWidth=16,n.question=t.getQuestionByName(n.name),n.items=Zr(t,o.data,r+1),n.lvl=r,n}return Y(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNode",{get:function(){return this._data.isNode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._data.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._data.title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._data.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return this._data.displayValue},enumerable:!1,configurable:!0}),t.prototype.getString=function(e){return this._data.getString(e)},Object.defineProperty(t.prototype,"markerMargin",{get:function(){return(1.5+this.lvl)*this.markerWidth+"px"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textMargin",{get:function(){return(2.75+this.lvl)*this.markerWidth+"px"},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:!0})],t.prototype,"collapsed",void 0),Z([Object(i.property)({defaultValue:0})],t.prototype,"lvl",void 0),Z([Object(i.property)()],t.prototype,"items",void 0),t}(i.Base);function Zr(e,t,o){return void 0===t&&(t=[]),t.filter((function(e){return!!e})).map((function(t){return new Jr(e,t,o)}))}var Kr=function(e){function t(t){var o=e.call(this)||this;o.survey=t,o.selectTableClick=function(){o.resultViewType="table"},o.selectJsonClick=function(){o.resultViewType="text"},o.resultText=JSON.stringify(t.data,null,4);var r=t.getPlainData({includeEmpty:!1,includeValues:!0});return o.resultData=Zr(t,r,0),o}return Y(t,e),t.prototype.getLocString=function(e){return G.getString(e)},Object.defineProperty(t.prototype,"surveyResultsText",{get:function(){return this.getLocString("ed.surveyResults")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyResultsTableText",{get:function(){return this.getLocString("ed.surveyResultsTable")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyResultsJsonText",{get:function(){return this.getLocString("ed.surveyResultsJson")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsTitle",{get:function(){return this.getLocString("ed.resultsTitle")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsName",{get:function(){return this.getLocString("ed.resultsName")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsValue",{get:function(){return this.getLocString("ed.resultsValue")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsDisplayValue",{get:function(){return this.getLocString("ed.resultsDisplayValue")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTableSelected",{get:function(){return"table"===this.resultViewType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isJsonSelected",{get:function(){return"text"===this.resultViewType},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:"table"})],t.prototype,"resultViewType",void 0),Z([Object(i.property)({defaultValue:""})],t.prototype,"resultText",void 0),Z([Object(i.propertyArray)()],t.prototype,"resultData",void 0),t}(i.Base);o(30);var Yr=function(e){function t(t,o){var r=e.call(this)||this;return r.creator=t,r.root=o,r}return Y(t,e),Object.defineProperty(t.prototype,"allowEdit",{get:function(){var e=this.creator.survey,t=i.Serializer.findProperty(e.getType(),"logo");return!(this.creator.readOnly||t.overridingProperty&&e[t.overridingProperty])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"containerCss",{get:function(){return(new i.CssClassBuilder).append("svc-logo-image-container").append("svc-logo-image-container--editable",this.allowEdit).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),t.prototype.uploadFile=function(e,t,o){e.isUploading=!0,e.creator.uploadFiles(o,void 0,(function(o,r){e.creator.survey.logo=r,t.value="",e.isUploading=!1}),{element:e.creator.survey,elementType:"survey",propertyName:"logo"})},t.prototype.chooseFile=function(e){if(this.allowEdit){var t=e.root.getElementsByClassName("svc-choose-file-input")[0];0===t.files.length?e.creator.chooseFiles(t,(function(o){e.uploadFile(e,t,o)}),{element:this.survey,elementType:this.survey.getType(),propertyName:"logo"}):e.uploadFile(e,t,[t.files[0]])}},t.prototype.remove=function(e){e.creator.survey.logo=""},Object.defineProperty(t.prototype,"chooseLogoPlaceholder",{get:function(){return this.creator.getLocString("ed.chooseLogoPlaceholder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N("image")},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(i.Base),Xr=function(e){function t(t){var o=e.call(this,t)||this;return o.onEmbeddedSurveyValueChanged=function(){},o}return Y(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){return this.embeddedSurveyValue},set:function(e){this.embeddedSurveyValue=e,this.onEmbeddedSurveyValueChanged()},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"embeddedsurvey"},t}(i.QuestionNonValue);i.Serializer.addClass("embeddedsurvey",[],(function(){return new Xr("")}),"nonvalue"),i.QuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return new Xr(e)})),o(31);var $r=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this,t)||this,n=o&&!o.showValueInLink&&G.getString("pe.set")+" "+o.title||null;return r.linkValueText=n||G.getString("pe.emptyValue"),r}return Y(t,e),t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),"value"===t&&(this.updateLinkValueText(),this.allowClear&&(this.showClear=!i.Helpers.isValueEmpty(r)),this.updateIsClickable())},t.prototype.onReadOnlyChanged=function(){this.updateIsClickable(),e.prototype.onReadOnlyChanged.call(this)},t.prototype.updateIsClickable=function(){this.setPropertyValue("isClickable",!this.isReadOnly||!!this.isClickableCallback&&this.isClickableCallback())},Object.defineProperty(t.prototype,"ariaRole",{get:function(){return"button"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{get:function(){return this.showTooltip?this.linkValueText:void 0},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"linkvalue"},t.prototype.doLinkClick=function(){this.linkClickCallback&&this.linkClickCallback()},t.prototype.doClearClick=function(){this.clearClickCallback&&this.clearClickCallback()},t.prototype.updateLinkValueText=function(){var e;e=this.showValueInLink?this.isEmpty()?G.getString("pe.emptyValue"):this.getObjDisplayValue():G.getString(this.isEmpty()?"pe.set":"pe.change")+" "+this.title,this.linkValueText=e},t.prototype.stringifyValue=function(e){return"string"!=typeof e?JSON.stringify(e):e},t.prototype.getObjDisplayValue=function(){var e=this.obj;if(!e||!e.getDisplayValue)return this.stringifyValue(this.value);var t=e.getDisplayValue(!0,this.value);return"string"!=typeof t?JSON.stringify(t):t},Z([Object(i.property)({defaultValue:"svc-link-value-button svc-question-link__set-button"})],t.prototype,"linkSetButtonCssClasses",void 0),Z([Object(i.property)({defaultValue:"svc-question-link__clear-button"})],t.prototype,"linkClearButtonCssClasses",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),Z([Object(i.property)()],t.prototype,"linkValueText",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showClear",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showValueInLink",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showTooltip",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isClickable",void 0),t}(i.Question);i.Serializer.addClass("linkvalue",["showValueInLink",{name:"showTooltip: boolean",default:!1,visible:!1}],(function(e){return new $r("",e)}),"nonvalue"),i.QuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return new $r(e)}));var en=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._showUnitsInEditor=!0,t.onUpButtonMouseDown=function(){t.increase(),t.increaseTimer=setTimeout(t.onUpButtonMouseDown,200)},t.onDownButtonMouseDown=function(){t.decrease(),t.decreaseTimer=setTimeout(t.onDownButtonMouseDown,200)},t.onButtonMouseLeave=function(){t.onButtonMouseUp()},t.onButtonMouseUp=function(){clearTimeout(t.decreaseTimer),clearTimeout(t.increaseTimer)},t.onKeyDown=function(e){switch(e.key){case"ArrowUp":t.increase(),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":t.decrease(),e.stopPropagation(),e.preventDefault()}t.onTextKeyDownHandler(e)},t.onInputKeyDown=function(e){"ArrowUp"!=e.key&&"ArrowDown"!=e.key||t.updateValueOnEvent(e)},t.onFocus=function(e){"INPUT"==e.target.tagName&&queueMicrotask((function(){var o=e.target,r=o.selectionStart,n=o.selectionEnd,i=o.selectionDirection;t._showUnitsInEditor=!1,queueMicrotask((function(){Math.abs(n-r)>0?o.setSelectionRange(0,t.renderedValue.length,i):o.setSelectionRange(t.renderedValue.length,t.renderedValue.length)}))}))},t.onBlur=function(e){t._showUnitsInEditor=!0,"INPUT"==e.target.tagName&&t.updateValueOnEvent(e)},t}return Y(t,e),t.prototype.parseValue=function(e){return{value:parseFloat(e.toString()),unit:e.toString().replace(/[^A-Za-z]/g,"")}},t.prototype.changeValue=function(e){var t=this.parseValue(this.renderedValue),o=Number(this.renderedStep||1),r=t.value;e?r+=o:r-=o,this.value=r},Object.defineProperty(t.prototype,"showUnitsInEditor",{get:function(){return!!this.unit&&this._showUnitsInEditor},enumerable:!1,configurable:!0}),t.prototype.correctValue=function(e){if(null==e||null==e)return e;var t=Number(this.renderedMax),o=Number(this.renderedMin);return e="string"==typeof e?parseFloat(e):e,isNaN(e)?e=isNaN(o)?0:o:e>t?e=t:e<o&&(e=o),e=Math.round(1e3*e)/1e3},t.prototype.setNewValue=function(t){e.prototype.setNewValue.call(this,this.correctValue(t))},Object.defineProperty(t.prototype,"renderedValue",{get:function(){var e,t,o=(null!==(t=null!==(e=this.value)&&void 0!==e?e:this.renderedMin)&&void 0!==t?t:0).toString();return this.showUnitsInEditor&&(o+=this.unit),o},enumerable:!1,configurable:!0}),t.prototype.increase=function(){this.changeValue(!0)},t.prototype.decrease=function(){this.changeValue(!1)},t.prototype.onBeforeInput=function(e){var t=0==e.target.selectionStart?/[\d.-]/:/[\d.]/;e.data&&!t.test(e.data)&&e.preventDefault()},t.prototype.getType=function(){return"spinedit"},Object.defineProperty(t.prototype,"isInputTextUpdate",{get:function(){return!1},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"unit",void 0),Z([Object(i.property)()],t.prototype,"_showUnitsInEditor",void 0),t}(i.QuestionTextModel);i.Serializer.addClass("spinedit",["unit"],(function(){return new en("")}),"text"),i.QuestionFactory.Instance.registerQuestion("spinedit",(function(e){return new en(e)}));var tn=function(e){function t(t){var o=e.call(this,t)||this;return o.allowEmptyValue=!1,o.createItemValues("choices"),o.registerFunctionOnPropertyValueChanged("choices",(function(){o.updateChoices()})),o}return Y(t,e),t.prototype.getCorrectedValue=function(e){if(null==e||null==e||this.allowEmptyValue&&!e)return e;if((e=M(null!=e?e:"").color).indexOf("#")<0&&(e="#"+e),4===(e=(e.match(/#([0-9a-fA-F]){1,6}/)||["#000000"])[0]).length){for(var t=e.slice(0,1),o=1;o<4;o++)t+=e[o]+e[o];e=t}if(e.length<7){var r=e.length;for(o=0;o<7-r;o++)e+="0"}return e},t.prototype.isNewValueEqualsToValue=function(t){return!(!e.prototype.isNewValueEqualsToValue.call(this,t)&&!this.isTwoValueEquals(t,this.value,!0,!0))},t.prototype.setNewValue=function(t){this.resetRenderedValue(),e.prototype.setNewValue.call(this,this.getCorrectedValue(t)),this.updateRenderedValue()},t.prototype.onBeforeInput=function(e){e.data&&!/[\d\w(),#]/.test(e.data)&&e.preventDefault()},t.prototype.onColorInputChange=function(e){this.value=e.target.value},t.prototype.getType=function(){return"color"},t.prototype.resetRenderedValue=function(){this._renderedValue=void 0},t.prototype.updateRenderedValue=function(){if(this.value){var e=M(this.value||"");this._renderedValue=e.color}else this.allowEmptyValue?this._renderedValue="":this._renderedValue="#000000"},Object.defineProperty(t.prototype,"renderedValue",{get:function(){return this._renderedValue||""===this._renderedValue||this.updateRenderedValue(),this._renderedValue.toUpperCase()},enumerable:!1,configurable:!0}),t.prototype.getSwatchCss=function(){return(new i.CssClassBuilder).append(this.cssClasses.swatch).append(this.cssClasses.swatchDefault,!this.renderedValue).append(this.cssClasses.swatchDisabled,this.isInputReadOnly).toString()},t.prototype.getSwatchStyle=function(){return{backgroundColor:this.renderedValue||"#FFFFFF"}},Object.defineProperty(t.prototype,"renderedColorValue",{get:function(){return this.renderedValue||"#FFFFFF"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInputTextUpdate",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.updateRenderedValue()},Object.defineProperty(t.prototype,"dropdownAction",{get:function(){return this._dropdownAction||(this._dropdownAction=this.createDropdownAction()),this._dropdownAction},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choices",{get:function(){return this.getPropertyValue("choices")},set:function(e){this.setPropertyValue("choices",e)},enumerable:!1,configurable:!0}),t.prototype.onTextKeyDownHandler=function(t){var o=this.dropdownAction.popupModel;"ArrowDown"===t.key&&this.dropdownAction.action(),o.isVisible||e.prototype.onTextKeyDownHandler.call(this,t)},Object.defineProperty(t.prototype,"showDropdownAction",{get:function(){return!this.isValueEmpty(this.choices)},enumerable:!1,configurable:!0}),t.prototype.createDropdownAction=function(){var e=this,t=Object(i.createDropdownActionModelAdvanced)({enabled:new i.ComputedUpdater((function(){return!e.isInputReadOnly}))},{onSelectionChanged:function(t){e.value=t.value},items:this.choices},{showPointer:!1,verticalPosition:"bottom",horizontalPosition:"center"});t.disableTabStop=!0;var o=t.popupModel,r=o.contentComponentData.model;return o.displayMode=i.IsTouch?"overlay":"popup",o.setWidthByTarget=!0,o.positionMode="fixed",r.isItemSelected=function(t){return t.value==e.value},t},t.prototype.calcCssClasses=function(t){var o=e.prototype.calcCssClasses.call(this,t),r=this.dropdownAction;r.cssClasses={item:o.colorDropdown},r.iconName=o.colorDropdownIcon;var n=r.popupModel.contentComponentData.model;return n.cssClasses={},n.cssClasses={itemBody:n.cssClasses.itemBody+" "+o.colorItem},o},t.prototype.updateChoices=function(){this.dropdownAction.popupModel.contentComponentData.model.setItems(this.choices)},Object.defineProperty(t.prototype,"itemComponent",{get:function(){return"color-item"},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"allowEmptyValue",void 0),Z([Object(i.property)()],t.prototype,"_renderedValue",void 0),t}(i.QuestionTextModel);i.Serializer.addClass("color",[{name:"allowEmptyValue:boolean",default:!1},"choices:itemvalue[]"],(function(){return new tn("")}),"text"),i.QuestionFactory.Instance.registerQuestion("color",(function(e){return new tn(e)}));var on=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._renderedValue="",t.placeholder="",t.onKeyDown=function(e){"INPUT"===e.target.tagName&&t.onTextKeyDownHandler(e)},t.onFileInputChange=function(e){if(!t.onChooseFilesCallback)return t.doChange(e),!0},t}return Y(t,e),t.prototype.onChangeQuestionValue=function(e){},t.prototype.setNewValue=function(t){"object"==typeof t&&(this.stateChanged(this.isEmpty()?"empty":"loaded"),this.isLoadingFromJson||this.loadPreview(t),this.loadedFilesValue=t,t=this.previewValue[0].content),this.updateRenderedValue(t),e.prototype.setNewValue.call(this,t)},t.prototype.loadPreview=function(t){"string"!=typeof t&&e.prototype.loadPreview.call(this,t)},Object.defineProperty(t.prototype,"allowMultiple",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),t.prototype.clear=function(e,t){var o=this;if(void 0===t&&(t=!0),this.survey){var r=function(){t&&(o.value=void 0),o.errors=[],e&&e()};this.loadedFilesValue?(this.containsMultiplyFiles=!1,this.survey.clearFiles(this.loadedFilesValue,this.name,this.previewValue,null,(function(e,t){"success"===e&&r()}))):r()}},t.prototype.updateRenderedValue=function(e){var t=e?e.match(/^data:((?:\w+\/(?:(?!;).)+)?)((?:;[\w\W]*?[^;])*),/):null;t?(this.placeholder=t[0]+"...",this._renderedValue=""):(this.placeholder="",this._renderedValue=e)},Object.defineProperty(t.prototype,"renderedValue",{get:function(){return this._renderedValue},enumerable:!1,configurable:!0}),t.prototype.updateValueFromInputEvent=function(e){var t=e.target.value;this.placeholder&&!t||i.Helpers.isTwoValueEquals(t,this.value)||(this.clear(void 0,!1),this.loadedFilesValue=void 0,this.value=e.target.value)},t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.updateRenderedValue(t)},t.prototype.onInputChange=function(e){e.target!==document.activeElement&&this.updateValueFromInputEvent(e)},t.prototype.onInputBlur=function(e){this.updateValueFromInputEvent(e)},t.prototype.getType=function(){return"fileedit"},t.prototype.getIsClearButtonDisabled=function(){return!this.value||this.isInputReadOnly},t.prototype.getChooseButtonCss=function(){return(new i.CssClassBuilder).append(this.cssClasses.chooseButton).append(this.cssClasses.chooseButtonDisabled,this.isInputReadOnly).toString()},t.prototype.chooseFiles=function(e){var t=this;if(this.isInputReadOnly||!this.onChooseFilesCallback)return!0;e.preventDefault(),e.stopPropagation();var o=this.rootElement.querySelectorAll("input[type='file']")[0];this.onChooseFilesCallback(o,(function(e){t.loadFiles(e)}))},Z([Object(i.property)()],t.prototype,"_renderedValue",void 0),Z([Object(i.property)()],t.prototype,"placeholder",void 0),t}(i.QuestionFileModel);i.Serializer.addClass("fileedit",[],(function(){return new on("")}),"file"),i.QuestionFactory.Instance.registerQuestion("fileedit",(function(e){return new on(e)}));var rn=function(e){function t(t){var o=e.call(this)||this;return o.question=t,o}return Y(t,e),t.prototype.resetValue=function(){this.resetValueCallback&&this.resetValueCallback()},Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.question.isInputReadOnly||!this.allowResetValue},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"allowResetValue",void 0),t}(i.Base),nn=function(e){function t(t){var o=e.call(this,t)||this;return o.resetValueAdorner=o.createResetValueAdorner(),o}return Y(t,e),t.prototype.createResetValueAdorner=function(){return new rn(this)},t.prototype.getType=function(){return"textwithreset"},t.prototype.getRootClass=function(){return(new i.CssClassBuilder).append(this.cssClasses.root).append(this.cssClasses.onError,this.errors.length>0).toString()},t.prototype.getControlClass=function(){return(new i.CssClassBuilder).append(this.cssClasses.control).toString()},Object.defineProperty(t.prototype,"wrappedQuestionTemplate",{get:function(){return"text"},enumerable:!1,configurable:!0}),t}(i.QuestionTextModel);i.Serializer.addClass("textwithreset",[],(function(){return new nn("")}),"text"),i.QuestionFactory.Instance.registerQuestion("textwithreset",(function(e){return new nn(e)}));var an=function(e){function t(t){var o=e.call(this,t)||this;return o.resetValueAdorner=o.createResetValueAdorner(),o}return Y(t,e),t.prototype.createResetValueAdorner=function(){return new rn(this)},t.prototype.getType=function(){return"commentwithreset"},t.prototype.getCssType=function(){return"textwithreset"},t.prototype.getRootClass=function(){return(new i.CssClassBuilder).append(this.cssClasses.root).append(this.cssClasses.rootMultiline).append(this.cssClasses.onError,this.errors.length>0).toString()},t.prototype.getControlClass=function(){return(new i.CssClassBuilder).append(this.cssClasses.control).append(this.cssClasses.controlMultiline).toString()},Object.defineProperty(t.prototype,"wrappedQuestionTemplate",{get:function(){return"comment"},enumerable:!1,configurable:!0}),t}(i.QuestionCommentModel);i.Serializer.addClass("commentwithreset",[{name:"allowResize:boolean",default:!1}],(function(){return new an("")}),"comment"),i.QuestionFactory.Instance.registerQuestion("commentwithreset",(function(e){return new an(e)}));var sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"expression"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment",showOptionsCaption:!1}},t.prototype.clearPropertyValue=function(e,t,o,r){o.clearValue()},t}(nt),ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"condition"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment",showOptionsCaption:!1}},t.prototype.canClearPropertyValue=function(e,t,o,r){return!1!==r.allowEditExpressionsInTextEditor},t.prototype.onSetup=function(e,t,o,r){!1===r.allowEditExpressionsInTextEditor&&(t.onKeyDownPreprocess=function(e){!e.ctrlKey&&["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].indexOf(e.key)<0&&e.preventDefault()})},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new Ut(e.getSurvey(),e,r,t.name)},t}(sn);et.register(new sn),et.register(new ln);var cn=function(e){function t(t,o,r,n){void 0===o&&(o=null),void 0===r&&(r="item"),void 0===n&&(n=[]);var i=e.call(this,o)||this;return i.choices=t,i.className=r,i.names=n,i.commentValue=i.editSurvey.getQuestionByName("question"),i.setComment(),i.editSurvey.getQuestionByName("question").placeholder=G.getString("pe.fastEntryPlaceholder"),i.editSurvey.onValidateQuestion.add((function(e,t){var o=i.options.minimumChoicesCount;if(o>0){o>(r=i.getChoicesCount())&&(t.error=G.getString("pe.fastEntryChoicesMinCountError").format(o))}else{var r,n=i.options.maximumChoicesCount;if(n>0)n<(r=i.getChoicesCount())&&(t.error=G.getString("pe.fastEntryChoicesCountError").format(r,n));else if(i.isValueUnique){var a=i.getFirstUniqueValue();a&&(t.error=G.getString("pe.fastEntryNonUniqueError").format(a))}}})),i}return Y(t,e),t.prototype.calcBeforeApplyItemsArray=function(e,t,o){if(t&&0!=t.length){if(e.length>t.length&&e.splice(t.length,e.length-t.length),e.length<t.length){for(var r=[],n=e.length;n<t.length;n++)r.push(t[n]);e.splice.apply(e,[e.length,0].concat(r))}}else e.splice(0,e.length)},t.prototype.applyItemValueArray=function(e,t,o){void 0===o&&(o=[]),this.calcBeforeApplyItemsArray(e,t,o);for(var r=0;r<e.length;r++)o.forEach((function(o){e[r][o]=t[r][o]}))},t.prototype.getSurveyJSON=function(){return{elements:[{type:"comment",name:"question",titleLocation:"hidden",rows:12}]}},t.prototype.getSurveyCreationReason=function(){return"fast-entry"},t.prototype.apply=function(){return!this.comment.isEmpty()&&this.applyCore()},t.prototype.applyCore=function(){if(this.editSurvey.hasErrors(!0))return!1;var e=(this.comment.value||"").split("\n")||[],t=this.convertTextToItemValues(e);return t=this.options.onFastEntryCallback(t,e),this.applyItemValueArray(this.choices,t,this.names),!0},t.prototype.convertTextToItemValues=function(e){for(var t=[],o=0;o<e.length;o++)if(e[o]){var r=e[o].split(i.ItemValue.Separator),n=i.Serializer.createClass(this.className);this.names.forEach((function(e,t){n[e]=r[t]})),t.push(n)}return t},Object.defineProperty(t.prototype,"comment",{get:function(){return this.commentValue},enumerable:!1,configurable:!0}),t.prototype.getChoicesCount=function(){for(var e=this.comment.value.split("\n"),t=0,o=0;o<e.length;o++){e[o]&&t++}return t},Object.defineProperty(t.prototype,"isValueUnique",{get:function(){return!0===i.Serializer.findProperty("itemvalue","value").isUnique},enumerable:!1,configurable:!0}),t.prototype.getFirstUniqueValue=function(){for(var e=this.comment.value.split("\n"),t={},o=0;o<e.length;o++){var r=e[o];if(r){var n=r.split(i.ItemValue.Separator)[0];if(t[n])return n;t[n]=!0}}},t.prototype.setComment=function(){var e=this.convertItemValuesToText();this.comment.value=e},t.prototype.collectNames=function(e,t,o){var r="";return this.names.forEach((function(n){if("itemvalues"===t){if("value"==n)return;var a="text"==n?e.pureText:e[n]}else a=e[n];if(a){for(var s=0;s<o;s++)r+=i.ItemValue.Separator;r+=a,o=1}else o++})),r},t.prototype.convertItemValuesToText=function(){var e=this,t="";return this.choices.forEach((function(o){t&&(t+="\n"),t+=e.collectNames(o,"",0)})),t},t}($e),pn=function(e){function t(t,o,r,n){void 0===o&&(o=null),void 0===r&&(r="itemvalue"),void 0===n&&(n=["value","text"]);var i=e.call(this,t,o,r,n)||this;return i.choices=t,i.className=r,i.names=n,i}return Y(t,e),t.prototype.apply=function(){return this.applyCore()},t.prototype.applyItemValueArray=function(e,t,o){void 0===o&&(o=[]),this.calcBeforeApplyItemsArray(e,t,o);for(var r=0;r<e.length;r++)e[r].value!=t[r].value&&(e[r].value=t[r].value),e[r].text=t[r].hasText?t[r].text:"",o.forEach((function(o){"value"!=o&&"text"!=o&&(e[r][o]=t[r][o])}))},t.prototype.convertItemValuesToText=function(){var e=this,t="";return this.choices.forEach((function(o){t&&(t+="\n"),t+=o.value,t+=e.collectNames(o,"itemvalues",1)})),t},t}(cn);i.Serializer.addProperty("itemvalue",{name:"icon",isSerializable:!1,readOnly:!0,visibleIndex:0,visibleIf:function(e){return e&&"rateValues"===e.ownerPropertyName&&e.locOwner instanceof i.QuestionRatingModel&&"smileys"==e.locOwner.rateType}});var un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.getNewColumnName=function(e,t,o){var r=[];if(Array.isArray(e))for(var n=0;n<e.length;n++)r.push(e[n][t]);return g(o,r)},t.prototype.onCreated=function(e,t,o,r,n){var i=this;t.onGetValueForNewRowCallBack=function(e){return i.createNewItem(e,o)},this.setupMatrixQuestion(e,t,o,n)},t.prototype.onSetup=function(e,t,o,r){var n=t;n.allowRowsDragAndDrop&&n.dragDropMatrixRows&&(n.dragDropMatrixRows.onDragStart.add((function(){r.startUndoRedoTransaction()})),n.dragDropMatrixRows.onDragEnd.add((function(){r.stopUndoRedoTransaction()})))},t.prototype.initializePlaceholder=function(e,t,o){var r="function"==typeof e.getType&&e.getType();"text"===t.getType()&&r&&("text"===o&&"itemvalue"===r&&(t.placeholder=new i.ComputedUpdater((function(){return e.value?e.value.toString():e.text}))),"title"!==o||"matrixdropdowncolumn"!==r&&"multipletextitem"!==r||(t.placeholder=new i.ComputedUpdater((function(){return e.name?e.name:e.title}))))},t.prototype.onMatrixCellCreated=function(e,t){var o=t.row.editingObj;if(o){var r=t.cellQuestion;r.obj=o,this.initializePlaceholder(o,r,t.columnName),r.property=i.Serializer.findProperty(o.getType(),t.columnName)}},t.prototype.onGetMatrixRowAction=function(e,t,o){var r=this,n=t.question,i=t.row,a=t.actions;this.getEditItemAsStandAlone()&&a.push({id:"svd-grid-edit-column",iconName:"icon-edit",title:G.getString("pe.edit"),visibleIndex:0,showTitle:!1,location:"end",action:function(){var e=t.row.editingObj;o(e)}});var s=a.filter((function(e){return"show-detail"===e.id}))[0];It(n,a,i),s&&(s.component="sv-action-bar-item",s.iconName=this.getShowDetailActionIconName(i),s.showTitle=!1,s.location="end",s.ariaExpanded=i.isDetailPanelShowing,s.action=function(){i.showHideDetailPanelClick(),s.iconName=i.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},s.visibleIndex=0,s.visible=this.hasPropertiesInDetail,i.onDetailPanelShowingChanged=function(){s.iconName=r.getShowDetailActionIconName(i),s.ariaExpanded=i.isDetailPanelShowing}),Ot(a)},t.prototype.getShowDetailActionIconName=function(e){return e.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},t.prototype.addItem=function(e,t,o){o.addRow()},t.prototype.onGetQuestionTitleActions=function(e,t,o){var r=this,n=t.question;t.titleActions.push({id:"add-item",iconName:"icon-add",title:n.addRowText,showTitle:!1,action:function(){return r.addItem(o,e,n)},enabled:new i.ComputedUpdater((function(){return n.canAddRow}))})},t.prototype.createNewItem=function(e,o){e.visibleRows.forEach((function(e){return e.hideDetailPanel()}));var r=this.getBaseValue(o),n=this.getKeyValue();r||(r="item");var a=null;r&&n&&(a=t.getNewColumnName(e.value,n,r));var s=e.obj,l=i.Serializer.createClass(this.getDefaultClassName(s,o),{});a&&(l[n]=a),this.getObjTypeName()&&(l[this.getObjTypeName()]=l.getType());var c=s[o.name];return i.Serializer.isDescendantOf(l.getType(),"itemvalue")&&(l.text=h(c)),c.push(l),c!=e.value&&(e.value=c),l},t.prototype.getDefaultClassName=function(e,t){return t.className},t.prototype.getBaseValue=function(e){return e.getBaseValue()},t.prototype.getKeyValue=function(){return""},t.prototype.getColumnNames=function(e,t,o,r){var n=this.getPropertiesNames(e,t,o,r);return n&&n.length>0?n:this.getDefaultListProperties(t)},t.prototype.getColumnClassName=function(e,t){return t.className},t.prototype.getPropertiesNames=function(e,t,o,r){for(var n=[],i=this.getDefinedListProperties(e,t,o,r),a=0;a<i.length;a++)n.push(i[a].name);return 0==n.length&&(n=this.getDefaulColumnNames()),n},t.prototype.getDefinedListProperties=function(e,t,o,r){if(!t.className)return[];var n=i.Serializer.createClass(t.className);if(!n)return[];var a=new Ke(n,o,this.getColumnClassName(e,t),"list",e,t,r);return 0==a.getTabs().length?[]:a.getTabs()[0].properties},t.prototype.getDefaultListProperties=function(e){var t=[];if(e&&e.className)for(var o=i.Serializer.getProperties(e.className),r=0;r<o.length;r++)this.isPropertyShownInList(o[r])&&t.push(o[r].name);return t.length>0?t:this.getDefaulColumnNames()},t.prototype.getDefaulColumnNames=function(){return[]},t.prototype.isPropertyShownInList=function(e){return e.visible&&"form"!==e.showMode},t.prototype.getObjTypeName=function(){return""},t.prototype.hasDetailPanel=function(){return!this.getEditItemAsStandAlone()},t.prototype.setupMatrixQuestion=function(e,t,o,r){var n=this;this.hasPropertiesInDetail=this.hasDetailPanel()&&this.calcHasPropertiesInDetail(t,o,r),t.onHasDetailPanelCallback=function(e){return!1!==e.allowEditRow&&n.hasPropertiesInDetail},t.onCreateDetailPanelRenderedRowCallback=function(e){e.cells=[e.cells[1]],e.cells[0].colSpans+=2};var i=t;if(t.onCreateDetailPanelCallback=function(e,t){new ot(e.editingObj,i.creatorOptions,i.obj,i.property,r).setupObjPanel(t,!0)},t.allowRowsDragAndDrop=this.getAllowRowDragDrop(o)&&!t.isReadOnly,i.creatorOptions&&this.setupUsingOptions(e,t,i.creatorOptions,o),o.uniquePropertyName){var a=t.getColumnByName(o.uniquePropertyName);a&&(a.isUnique=!0)}},t.prototype.getAllowRowDragDrop=function(e){return!1},t.prototype.calcHasPropertiesInDetail=function(e,t,o){if(!t.className)return!0;var r=i.Serializer.createClass(t.className);if(!r)return!0;var n=new i.PanelModel("");return new ot(r,e.creatorOptions,e.obj,t,o).setupObjPanel(n,!0),n.elements.length>0},t.prototype.getJSON=function(e,t,o,r){return this.getMatrixJSON(e,t,this.getColumnNames(e,t,o,r),o,r)},t.prototype.getMatrixJSON=function(e,t,o,r,n){var i=t.className;i||(i=t.baseClassName);var a=this.getColumnsJSON(e,t,o,r,n),s={type:"matrixdynamic",detailPanelMode:"underRow",cellType:"text",rowCount:0,keyName:this.getKeyName(t),columns:a,showHeader:a.length>1,hideColumnsIfEmpty:!0,addRowText:this.getAddRowText(t),keyDuplicationError:G.getString("pe.propertyIsNoUnique"),emptyRowsText:this.getEmptyRowsText(t)};this.getShowDetailPanelOnAdding()&&(s.detailPanelShowOnAdding=!0);var l=this.getMinimumRowCount(e,t,r),c=this.getMaximumRowCount(e,t,r);return l>0&&(s.minRowCount=l),c>0&&(s.maxRowCount=c),s},t.prototype.getEmptyRowsText=function(e){var t="pe.listIsEmpty",o=t+"@"+e.name;return G.hasString(o)&&(t=o),G.getString(t)},t.prototype.getMinimumRowCount=function(e,t,o){return-1},t.prototype.getMaximumRowCount=function(e,t,o){return-1},t.prototype.filterPropertyNames=function(e,t){return e},t.prototype.getClassNameByProp=function(e){return e.className?e.className:e.baseClassName},t.prototype.getKeyName=function(e){var t=this.getClassNameByProp(e);if(!t)return"";for(var o=i.Serializer.getProperties(t),r=0;r<o.length;r++)if(o[r].isUnique)return o[r].name;return""},t.prototype.getColumnsJSON=function(e,t,o,r,n){for(var i=new ot(e,r,void 0,void 0,n).createColumnsJSON(this.getClassNameByProp(t),this.filterPropertyNames(o,r)),a=0;a<i.length;a++)"comment"==i[a].cellType&&(i[a].cellType="text");return i},t.prototype.getEditItemAsStandAlone=function(){return!1},t.prototype.getShowDetailPanelOnAdding=function(){return!1},t.prototype.getAddRowText=function(e){var t="pe.addNew@"+e.name;return G.hasString(t)?G.getString(t):G.getString("pe.addNew")},t.prototype.setupUsingOptions=function(e,t,o,r){var n={allowAddRemoveItems:!0,allowRemoveAllItems:!0,showTextView:!0,allowBatchEdit:!0};o.onSetPropertyEditorOptionsCallback(r.name,e,n),n.allowAddRemoveItems||(t.allowAddRows=!1,t.allowRemoveRows=!1),t.allowRemoveAllItems=n.allowRemoveAllItems,t.showTextView=n.showTextView,t.allowBatchEdit=n.allowBatchEdit},t}(nt),dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return e.isArray&&i.Serializer.isDescendantOf(e.className,"itemvalue")&&"rateValues"!=e.name},t.prototype.excludeTextPropertyName=function(e,t){return(null==t?void 0:t.inplaceEditForValues)?e.filter((function(e){return"text"!==e})):e},t.prototype.filterPropertyNames=function(e,t){return this.excludeTextPropertyName(e,t).filter((function(e){return"icon"!=e}))},t.prototype.isPropertyEditorSetupEnabled=function(e,t,o,r){if(!1===o.showTextView)return!1;var n=o.getColumnByName("value"),i=o.value;return!!n&&n.isVisible&&!n.readOnly&&!this.hasMultipleLanguage(i)&&!this.hasVisibleIfOrEnableIf(i)},t.prototype.getAllowRowDragDrop=function(e){return!0},t.prototype.createPropertyEditorSetup=function(e,t,o,r){var n=o.columns.filter((function(e){return!e.readOnly})).map((function(e){return e.name}));return new pn(e[t.name],r,t.className,n)},t.prototype.canClearPropertyValue=function(e,t,o,r){return!1!==o.allowRemoveAllItems},t.prototype.clearPropertyValue=function(e,t,o,r){var n=e[t.name];Array.isArray(n)&&n.splice(0,n.length)},t.prototype.getColumnClassName=function(e,t){return e.getType()+"@"+t.name},t.prototype.getDefaulColumnNames=function(){return["value","text"]},t.prototype.getKeyValue=function(){return"value"},t.prototype.getMatrixJSON=function(t,o,r,n,i){var a=e.prototype.getMatrixJSON.call(this,t,o,r,n,i);return"rateValues"===o.name&&"icon"==a.columns[0].name&&(a.showHeader=a.columns>3),a},t.prototype.getMinimumRowCount=function(t,o,r){return"choices"===o.name?r.minimumChoicesCount:e.prototype.getMaximumRowCount.call(this,t,o,r)},t.prototype.getMaximumRowCount=function(t,o,r){return"choices"===o.name?r.maximumChoicesCount:"rows"===o.name?r.maximumRowsCount:"columns"===o.name?r.maximumColumnsCount:"rateValues"===o.name?r.maximumRateValues:e.prototype.getMaximumRowCount.call(this,t,o,r)},t.prototype.hasMultipleLanguage=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].locText.hasNonDefaultText())return!0;return!1},t.prototype.hasVisibleIfOrEnableIf=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].visibleIf||e[t].enableIf)return!0;return!1},t.prototype.onMatrixCellCreated=function(t,o){function r(e,t){e.html='<div class="spg-smiley-icon"><svg><use xlink:href="#icon-'+t+'"></use></svg></div>'}e.prototype.onMatrixCellCreated.call(this,t,o),t instanceof i.QuestionRatingModel&&"icon"==o.columnName&&(r(o.cellQuestion,o.cellQuestion.value),o.cellQuestion.onPropertyChanged.add((function(e,t){"value"==t.name&&r(e,t.newValue)})))},t.prototype.onMatrixCellValueChanged=function(e,t){e instanceof i.QuestionRatingModel&&"icon"==t.columnName&&(t.cellQuestion.html=t.cellQuestion.value)},t}(un),hn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return e.isArray&&i.Serializer.isDescendantOf(e.className,"itemvalue")&&"rateValues"==e.name},t.prototype.updateAllowAddRemove=function(e,t){e.allowRemoveRows=Qr.allowRemoveForElement(t),e.allowAddRows=Qr.allowAddForElement(t,e.maxRowCount)},t.prototype.onCreated=function(t,o,r,n,i){var a=this;e.prototype.onCreated.call(this,t,o,r,n,i);var s=o,l=k(t);this.updateAllowAddRemove(s,l),t.onPropertyChanged.add((function(e,t){"rateCount"!=t.name&&"rateDisplayMode"!=t.name||a.updateAllowAddRemove(s,l)}))},t.prototype.onGetQuestionTitleActions=function(t,o,r){var n=o.titleActions.filter((function(e){return"property-grid-clear"==e.id}))[0];n&&(n.visible=!1),e.prototype.onGetQuestionTitleActions.call(this,t,o,r)},t.prototype.filterPropertyNames=function(e,t){return this.excludeTextPropertyName(e,t)},t}(dn),gn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"matrixdropdowncolumns"==e.type},t.prototype.getEditItemAsStandAlone=function(){return!0},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"column"},t.prototype.getMaximumRowCount=function(e,t,o){return o.maximumColumnsCount},t.prototype.getAllowRowDragDrop=function(e){return!0},t}(un),fn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"surveypages"==e.type},t.prototype.addItem=function(e,t,o){e.addPage()},t.prototype.getColumnClassName=function(e,t){return"page@"+e.getType()},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.hasDetailPanel=function(){return!1},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"page"},t.prototype.getAllowRowDragDrop=function(e){return!0},t}(un),mn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"calculatedvalues"==e.type},t.prototype.getColumnClassName=function(e,t){return"calculatedvalue@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"var"},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t.prototype.setupMatrixQuestion=function(t,o,r,n){e.prototype.setupMatrixQuestion.call(this,t,o,r,n),o.isUniqueCaseSensitive=!1},t}(un),yn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"htmlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["html"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(un),bn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"urlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["url"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(un),vn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"textitem[]"==e.type},t.prototype.getEditItemAsStandAlone=function(){return!0},t.prototype.getColumnClassName=function(e,t){return"multipletext@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"item"},t.prototype.getAllowRowDragDrop=function(){return!0},t.prototype.createPropertyEditorSetup=function(e,t,o,r){var n=[];return o.columns.forEach((function(e){n.push(e.name)})),new cn(e[t.name],r,t.className,n)},t.prototype.onMatrixCellCreated=function(t,o){e.prototype.onMatrixCellCreated.call(this,t,o);var r=o.cellQuestion;if(o.row.editingObj){var n=o.row.editingObj.editor;n&&r.property&&n.registerFunctionOnPropertyValueChanged(r.property.name,(function(){r.value=i.Serializer.getObjPropertyValue(n,r.property.name)}))}},t}(un),xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getColumnsJSON=function(t,o,r,n,i){var a=e.prototype.getColumnsJSON.call(this,t,o,r,n,i);return this.getObjTypeName()&&a.unshift({name:this.getObjTypeName(),cellType:"dropdown"}),a},t.prototype.onMatrixCellCreated=function(t,o){if(e.prototype.onMatrixCellCreated.call(this,t,o),o.row.editingObj){var r=o.cellQuestion;o.columnName===this.getObjTypeName()&&(r.showOptionsCaption=!1,r.choices=this.getChoices(t),r.value=o.row.editingObj.getType())}},t.prototype.onMatrixCellValueChanged=function(e,t){if(t.columnName===this.getObjTypeName()){var o=t.question.visibleRows.indexOf(t.row);if(!(o<0)){var r=t.row.isDetailPanelShowing,n=t.row.editingObj.toJSON();delete n.type;var a=i.Serializer.createClass(t.value);a.fromJSON(n),a[this.getObjTypeName()]=a.getType(),t.row.hideDetailPanel(!0),t.question.value.splice(o,1,a),t.row.value=a,r&&t.row.showDetailPanel()}}},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(un),wn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"validators"==e.type},t.prototype.getObjTypeName=function(){return"validatorType"},t.prototype.getDefaultClassName=function(e,t){var o="expression",r=e;if(r.getSupportedValidators){var n=r.getSupportedValidators();n.length>0&&n.indexOf(o)<0&&(o=n[0])}return o+"validator"},t.prototype.getChoices=function(e){for(var t=this.getSupportedValidators(e),o=[],r=0;r<t.length;r++){var n=t[r]+"validator";o.push({value:n,text:G.getValidatorName(n)})}return o},t.prototype.getSupportedValidators=function(e){return e?e.getSupportedValidators?e.getSupportedValidators():e.getOriginalObj?this.getSupportedValidators(e.getOriginalObj()):[]:[]},t}(xn),jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getAvailableTriggers=function(){return i.Serializer.getChildrenClasses("surveytrigger",!0).filter((function(e){return"visibletrigger"!==e.name}))},t.prototype.fit=function(e){return"triggers"==e.type},t.prototype.getObjTypeName=function(){return"triggerType"},t.prototype.getDefaultClassName=function(e,t){var o=this.getAvailableTriggers().map((function(e){return e.name}));return o.length?-1!==o.indexOf("runexpressiontrigger")?"runexpressiontrigger":o[0]:t.name},t.prototype.getAllowRowDragDrop=function(e){return!0},t.prototype.getChoices=function(e){return this.getAvailableTriggers().map((function(e){return{value:e.name,text:G.getTriggerName(e.name)}}))},t}(xn);et.register(new dn),et.register(new hn),et.register(new gn),et.register(new fn),et.register(new mn),et.register(new yn),et.register(new bn),et.register(new vn),et.register(new wn),et.register(new jn),et.register({fit:function(e){return"icon"===e.name&&"itemvalue"===e.classInfo.name},getJSON:function(e){return{type:"html"}}});var Cn={name:"propertygrid_bindings",showInToolbox:!1,internal:!0,createElements:function(){}};i.ComponentCollection.Instance.getCustomQuestionByName(Cn.name)||i.ComponentCollection.Instance.add(Cn);var Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"bindings"==e.type},t.prototype.getJSON=function(){return{type:"propertygrid_bindings"}},t.prototype.onCreated=function(e,t,o,r){t.contentPanel.fromJSON({elements:this.getQuestions(e,r)}),t.valueFromDataCallback=function(t){if(!t&&e.bindings.getNames().length>0){for(var o={},r=0,n=e.bindings.getNames();r<n.length;r++){var i=n[r];o[i]=e.bindings.getValueNameByPropertyName(i)}return o}return t}},t.prototype.getQuestions=function(e,t){for(var o=[],r=0,n=e.bindings.getNames();r<n.length;r++){var i=n[r];o.push(this.getBindingJSON(i,e,t))}return o},t.prototype.getBindingJSON=function(e,t,o){var r=new i.JsonObjectProperty(null,"value");r.type="questionvalue";var n=et.getJSON(t,r,o);return n.titleLocation="left",n.descriptionLocation="hidden",n.minWidth="0px",n.name=e,n.title=G.getPropertyName(e),n},t}(nt);et.register(new Sn);var Tn={name:"propertygrid_restfull",showInToolbox:!1,internal:!0,createElements:function(e){}};i.ComponentCollection.Instance.getCustomQuestionByName(Tn.name)||i.ComponentCollection.Instance.add(Tn);var Pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"restfull"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"propertygrid_restfull",titleLocation:"hidden"}},t.prototype.onCreated=function(e,t,o,r,n){var i=t.contentPanel,a=e[o.name];new ot(a,r,e,o,n).setupObjPanel(i,!0);var s=i.addNewQuestion("dropdown","test");s.title=G.getString("ed.choicesLoadedFromWebPreviewTitle"),s.choices=[],this.updateTestQuestion(s,a)},t.prototype.onValueChanged=function(e,t,o){if("choicesByUrl"===t.name){var r=o.contentPanel.getQuestionByName("test");this.updateTestQuestion(r,e[t.name])}},t.prototype.updateTestQuestion=function(e,t){t&&(e.visible=!!t.url,e.choicesByUrl.setData(t))},t}(wt);et.register(new Pn);var En=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"font"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"font",descriptionLocation:"hidden"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return e},t.valueToDataCallback=function(e){return e}},t}(nt);et.register(new En);var In=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"backgroundcornerradius"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"backgroundcornerradius",descriptionLocation:"hidden"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return e},t.valueToDataCallback=function(e){return e}},t}(nt);et.register(new In);var On=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"shadoweffects"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"shadoweffects",descriptionLocation:"hidden"}},t}(nt);et.register(new On);var Vn=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this,o)||this;return r.matrix=t,r.editMatrixValue=r.editSurvey.getQuestionByName("question"),r.buildColumns(),r.buildRows(),r.editMatrix.value=r.matrix.cells.getJson(),r}return Y(t,e),t.prototype.getSurveyJSON=function(){return{elements:[{type:"matrixdropdown",name:"question",cellType:"comment"}]}},t.prototype.getSurveyCreationReason=function(){return"cells-editor"},Object.defineProperty(t.prototype,"editMatrix",{get:function(){return this.editMatrixValue},enumerable:!1,configurable:!0}),t.prototype.apply=function(){return this.matrix.cells.setJson(this.editMatrix.value),!0},t.prototype.buildColumns=function(){for(var e=this.matrix.columns,t=0;t<e.length;t++)this.editMatrix.addColumn(""+e[t].value,e[t].text)},t.prototype.buildRows=function(){this.editMatrix.rows.push(new i.ItemValue("default",G.getString("pe.cellsDefaultRow")));for(var e=this.matrix.rows,t=0;t<e.length;t++)this.editMatrix.rows.push(new i.ItemValue(e[t].value,e[t].text))},t}($e),Nn=function(e){function t(t,o,r){void 0===r&&(r=null);var n=e.call(this,r,!1)||this;return n.editQuestion=t,n.propertyName=o,n.setupSurvey(),n.question.value=n.getQuestionValue(),n}return Y(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.editSurvey.getQuestionByName("question")},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){return{elements:[this.getQuestionJSON()]}},t.prototype.getQuestionJSON=function(){var e=this.editQuestion.toJSON();return e.name="question",e.title=e.title||this.editQuestion.name,e.type=this.editQuestion.getType(),"expression"==e.type&&(e.type="text"),e.cellType&&"matrixdropdowncolumn"==e.type&&(e.type=e.cellType,delete e.cellType),te.updateQuestionJson(e),e},t.prototype.getQuestionValue=function(){return this.editQuestion[this.propertyName]},t.prototype.getEditValue=function(){return this.question.value},t.prototype.getSurveyCreationReason=function(){return"default-value"},t.prototype.apply=function(){return this.editQuestion[this.propertyName]=this.getEditValue(),!0},t}($e),kn=function(e){function t(t,o,r){void 0===r&&(r=null);var n=e.call(this,t,o,r)||this;return n.editQuestion=t,n.propertyName=o,n}return Y(t,e),t.prototype.getQuestionValue=function(){var t=e.prototype.getQuestionValue.call(this);return t?(Array.isArray(t)||(t=[t]),t):t},t.prototype.getEditValue=function(){var t=e.prototype.getEditValue.call(this);return t&&Array.isArray(t)?0==t.length?null:t[0]:t},t}(Nn),An=function(e){function t(t,o,r){void 0===r&&(r=null);var n=e.call(this,t,o,r)||this;return n.editQuestion=t,n.propertyName=o,n}return Y(t,e),t.prototype.getQuestionJSON=function(){var t=e.prototype.getQuestionJSON.call(this);return t.type="matrixdynamic",t.rowCount=1,t.minRowCount=1,t.maxRowCount=1,t.columnsLocation="vertical",t},t}(kn),_n=function(e){function t(t,o,r){void 0===r&&(r=null);var n=e.call(this,t,o,r)||this;return n.editQuestion=t,n.propertyName=o,n}return Y(t,e),t.prototype.getQuestionJSON=function(){var t=e.prototype.getQuestionJSON.call(this);return t.panelCount=1,t.minPanelCount=1,t.maxPanelCount=1,t},t}(kn),Ln=function(e){function t(t,o,r,n){void 0===n&&(n=null);var i=e.call(this,t,r,n)||this;return i.editQuestion=t,i.editObj=o,i.propertyName=r,i.question.value=i.getQuestionValue(),i}return Y(t,e),t.prototype.getQuestionValue=function(){return this.editObj?this.editObj[this.propertyName]:null},t.prototype.apply=function(){return this.editObj[this.propertyName]=this.question.value,!0},t}(Nn),Dn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onCreated=function(e,o,r,n){var i=o;i.isClickableCallback=function(){return!i.isReadOnly||!t.isValueEmpty(i.value)},i.linkClickCallback=function(){t.showModalPropertyEditor(t,r,o,n,(function(){return i.isSelected=!1})),i.isSelected=!0},i.clearClickCallback=function(){t.clearPropertyValue(o.obj,r,o,null)}},t}return Y(t,e),t.prototype.getJSON=function(e,t,o){return{type:"linkvalue",showValueInLink:!1,titleLocation:"hidden"}},t.prototype.clearPropertyValue=function(e,t,o,r){e[t.name]=void 0},t.prototype.isValueEmpty=function(e){return i.Helpers.isValueEmpty(e)},t.prototype.isSupportGrouping=function(){return!0},t}(nt),Mn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"cells"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new Vn(e,r)},t.prototype.clearPropertyValue=function(e,t,o,r){e.cells.setJson(null)},t.prototype.isValueEmpty=function(e){return!e||i.Helpers.isValueEmpty(e.values)},t}(Dn),Rn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"value"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new Nn(e,t.name,r)},t}(Dn),qn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"rowvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new An(e,t.name,r)},t}(Dn),Hn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"panelvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new _n(e,t.name,r)},t}(Dn),Bn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"triggervalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){var n=o.obj,i=this.getSetToNameQuestion(n);return new Ln(i,n,t.name,r)},t.prototype.getSetToNameQuestion=function(e){var t=e.getSurvey();return t||(t=e.owner),e.setToName&&t?t.getQuestionByValueName(e.setToName):null},t}(Dn),Qn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e,t){return"logic"===t&&"triggervalue"==e.type},t.prototype.getJSON=function(e,t,o){var r=this.getSetToNameQuestion(e);if(!r)return{type:"linkvalue"};var n=r.toJSON();return n.type=r.getType(),te.updateQuestionJson(n),n},t}(Bn);et.register(new Mn),et.register(new Rn),et.register(new qn),et.register(new Hn),et.register(new Bn),et.register(new Qn);var Fn={name:"propertygrid_masksettings",showInToolbox:!1,internal:!0,createElements:function(e){}};i.ComponentCollection.Instance.getCustomQuestionByName(Fn.name)||i.ComponentCollection.Instance.add(Fn);var Un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"masksettings"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"propertygrid_masksettings",titleLocation:"hidden"}},t.prototype.onCreated=function(e,t,o,r){var n=e[o.name];this._propertyGrid=new ot(n,r,e,o),this._prevMaskType="";var i=t.contentPanel;this._previewQuestion=i.addNewQuestion("html","preview"),this.updatePanel(e,t,o)},t.prototype.onValueChanged=function(e,t,o){"maskSettings"===t.name&&this.updatePanel(e,o,t)},t.prototype.updatePanel=function(e,t,o){var r=t.contentPanel,n=e[o.name];this._prevMaskType!==e.maskType&&(this._propertyGrid.obj=n,this._propertyGrid.setupObjPanel(r,!0),this._prevMaskType=e.maskType),"datetimemask"==n.getType()&&this.updateDateTimeMinMaxInputType(n,r),this.updatePreviewQuestion(n,r)},t.prototype.updateDateTimeMinMaxInputType=function(e,t){var o="datetime-local";e.hasDatePart||(o="time"),e.hasTimePart||(o="date"),t.getQuestionByName("min").inputType=o,t.getQuestionByName("max").inputType=o},t.prototype.updatePreviewQuestion=function(e,t){this._previewQuestion.visible="masksettings"===e.getType(),t.getElementByName(this._previewQuestion.name)||t.addElement(this._previewQuestion)},t}(nt);et.register(new Un);var Wn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"masktype"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"dropdown",default:"none",allowClear:!1,searchEnabled:!1,choices:this.getChoices("none")}},t.prototype.getChoices=function(e){var t=(i.Serializer.getChildrenClasses("masksettings")||[]).map((function(e){var t=e.name;return-1!==e.name.indexOf("mask")&&(t=t.slice(0,t.indexOf("mask"))),{value:t,text:z("pe.maskTypes."+e.name)}})),o={value:e,text:z("pe.maskTypes.none")};return t.splice(0,0,o),t},t}(nt);et.register(new Wn);var Gn={name:"propertygrid_header",showInToolbox:!1,internal:!0,createElements:function(e){}};i.ComponentCollection.Instance.getCustomQuestionByName(Gn.name)||i.ComponentCollection.Instance.add(Gn);var zn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"header"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"propertygrid_header",titleLocation:"hidden"}},t.prototype.onCreated=function(e,t,o,r,n){var i,a=t.contentPanel,s=e[o.name];new ot(s,r,e,o,pr).setupObjPanel(a,!0);for(var l=a.elements,c=0;c<l.length;c++)"settings"==l[c].name&&(i=l[c]);i.state=void 0,i.title="",i.elements.forEach((function(e){e.title="",e.state=void 0}))},t}(nt);et.register(new zn);var Jn,Zn=o(32);i.SvgRegistry.registerIconsFromFolder(Zn),Jn="1.11.1",o(4),o(127),o(128),o(129),o(130),o(131),o(3),o(132),o(133),o(134),o(135),o(136),i.settings.supportCreatorV2=!0,Object(i.checkLibraryVersion)("1.11.1","survey-creator-core")}])}));
|
|
183
|
+
/*! exports provided: default, ThreeDimensionalLight */function(e,t,o){"use strict";o.r(t),o.d(t,"ThreeDimensionalLight",(function(){return n}));var r={themeName:"threedimensional",colorPalette:"light",isPanelless:!1,cssVariables:{"--sjs-general-backcolor":"rgba(248, 248, 248, 1)","--sjs-general-backcolor-dark":"rgba(242, 242, 242, 1)","--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(242, 242, 242, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-primary-backcolor":"rgba(217, 74, 100, 1)","--sjs-primary-backcolor-light":"rgba(217, 74, 100, 0.1)","--sjs-primary-backcolor-dark":"rgba(189, 61, 84, 1)","--sjs-primary-forecolor":"rgba(255, 255, 255, 1)","--sjs-primary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-secondary-backcolor":"rgba(255, 152, 20, 1)","--sjs-secondary-backcolor-light":"rgba(255, 152, 20, 0.1)","--sjs-secondary-backcolor-semi-light":"rgba(255, 152, 20, 0.25)","--sjs-secondary-forecolor":"rgba(255, 255, 255, 1)","--sjs-secondary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-shadow-small":"0px 2px 0px 2px rgba(228, 228, 228, 1),0px 0px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-small-reset":"0px 0px 0px 0px rgba(228, 228, 228, 1),0px 0px 0px 0px rgba(228, 228, 228, 1)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(228, 228, 228, 1),0px 8px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-large":"0px 0px 0px 0px rgba(0, 0, 0, 0.1)","--sjs-shadow-inner":"0px 0px 0px 2px rgba(228, 228, 228, 1),0px -2px 0px 2px rgba(228, 228, 228, 1)","--sjs-shadow-inner-reset":"0px 0px 0px 0px rgba(228, 228, 228, 1),0px 0px 0px 0px rgba(228, 228, 228, 1)","--sjs-border-light":"rgba(0, 0, 0, 0.08)","--sjs-border-default":"rgba(0, 0, 0, 0.08)","--sjs-border-inside":"rgba(0, 0, 0, 0.16)","--sjs-special-red":"rgba(229, 10, 62, 1)","--sjs-special-red-light":"rgba(229, 10, 62, 0.1)","--sjs-special-red-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-green":"rgba(25, 179, 148, 1)","--sjs-special-green-light":"rgba(25, 179, 148, 0.1)","--sjs-special-green-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-blue":"rgba(67, 127, 217, 1)","--sjs-special-blue-light":"rgba(67, 127, 217, 0.1)","--sjs-special-blue-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(255, 255, 255, 1)","--sjs-article-font-xx-large-textDecoration":"none","--sjs-article-font-xx-large-fontWeight":"700","--sjs-article-font-xx-large-fontStyle":"normal","--sjs-article-font-xx-large-fontStretch":"normal","--sjs-article-font-xx-large-letterSpacing":"0","--sjs-article-font-xx-large-lineHeight":"64px","--sjs-article-font-xx-large-paragraphIndent":"0px","--sjs-article-font-xx-large-textCase":"none","--sjs-article-font-x-large-textDecoration":"none","--sjs-article-font-x-large-fontWeight":"700","--sjs-article-font-x-large-fontStyle":"normal","--sjs-article-font-x-large-fontStretch":"normal","--sjs-article-font-x-large-letterSpacing":"0","--sjs-article-font-x-large-lineHeight":"56px","--sjs-article-font-x-large-paragraphIndent":"0px","--sjs-article-font-x-large-textCase":"none","--sjs-article-font-large-textDecoration":"none","--sjs-article-font-large-fontWeight":"700","--sjs-article-font-large-fontStyle":"normal","--sjs-article-font-large-fontStretch":"normal","--sjs-article-font-large-letterSpacing":"0","--sjs-article-font-large-lineHeight":"40px","--sjs-article-font-large-paragraphIndent":"0px","--sjs-article-font-large-textCase":"none","--sjs-article-font-medium-textDecoration":"none","--sjs-article-font-medium-fontWeight":"700","--sjs-article-font-medium-fontStyle":"normal","--sjs-article-font-medium-fontStretch":"normal","--sjs-article-font-medium-letterSpacing":"0","--sjs-article-font-medium-lineHeight":"32px","--sjs-article-font-medium-paragraphIndent":"0px","--sjs-article-font-medium-textCase":"none","--sjs-article-font-default-textDecoration":"none","--sjs-article-font-default-fontWeight":"400","--sjs-article-font-default-fontStyle":"normal","--sjs-article-font-default-fontStretch":"normal","--sjs-article-font-default-letterSpacing":"0","--sjs-article-font-default-lineHeight":"28px","--sjs-article-font-default-paragraphIndent":"0px","--sjs-article-font-default-textCase":"none"}};t.default=r;var n=r}})},e.exports=r()},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){var r={"./add-lg.svg":33,"./add.svg":34,"./add_16x16.svg":35,"./add_24x24.svg":36,"./apply.svg":37,"./arrow-down.svg":38,"./arrow-left.svg":39,"./arrow-left_16x16.svg":40,"./arrow-right.svg":41,"./arrow-right_16x16.svg":42,"./arrow-up.svg":43,"./boolean.svg":44,"./change-question-type_16x16.svg":45,"./checkbox.svg":46,"./checked.svg":47,"./clear.svg":48,"./clear_16x16.svg":49,"./collapse-detail-light_16x16.svg":50,"./collapse-detail_16x16.svg":51,"./collapse-panel.svg":52,"./collapse_16x16.svg":53,"./color-picker.svg":54,"./comment.svg":55,"./config.svg":56,"./copy.svg":57,"./default.svg":58,"./delete_16x16.svg":59,"./description-hide.svg":60,"./description.svg":61,"./device-desktop.svg":62,"./device-phone.svg":63,"./device-rotate.svg":64,"./device-tablet.svg":65,"./download.svg":66,"./drag-area-indicator.svg":67,"./drag-area-indicator_24x16.svg":68,"./drop-down-arrow.svg":69,"./drop-down-arrow_16x16.svg":70,"./dropdown.svg":71,"./duplicate_16x16.svg":72,"./edit.svg":73,"./edit_16x16.svg":74,"./editing-finish.svg":75,"./error.svg":76,"./expand-detail-light_16x16.svg":77,"./expand-detail_16x16.svg":78,"./expand-panel.svg":79,"./expand_16x16.svg":80,"./export.svg":81,"./expression.svg":82,"./fast-entry.svg":83,"./file.svg":84,"./fix.svg":85,"./html.svg":86,"./image.svg":87,"./imagepicker.svg":88,"./import.svg":89,"./invisible-items.svg":90,"./keyboard-dragging.svg":91,"./language.svg":92,"./load.svg":93,"./logic-collapse.svg":94,"./logic-expand.svg":95,"./logo.svg":96,"./matrix.svg":97,"./matrixdropdown.svg":98,"./matrixdynamic.svg":99,"./multipletext.svg":100,"./next_16x16.svg":101,"./panel.svg":102,"./paneldynamic.svg":103,"./preview.svg":104,"./previous_16x16.svg":105,"./radiogroup.svg":106,"./ranking.svg":107,"./rating.svg":108,"./redo.svg":109,"./remove_16x16.svg":110,"./required.svg":111,"./reset.svg":112,"./save.svg":113,"./select-page.svg":114,"./settings.svg":115,"./settings_16x16.svg":116,"./signaturepad.svg":117,"./switch-active_16x16.svg":118,"./switch-inactive_16x16.svg":119,"./tagbox.svg":120,"./text.svg":121,"./theme.svg":122,"./toolbox.svg":123,"./undo.svg":124,"./visible.svg":125,"./wizard.svg":126};function n(e){var t=i(e);return o(t)}function i(e){if(!o.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}n.keys=function(){return Object.keys(r)},n.resolve=i,e.exports=n,n.id=32},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 11H17V13H13V17H11V13H7V11H11V7H13V11ZM24 12C24 18.6 18.6 24 12 24C5.4 24 0 18.6 0 12C0 5.4 5.4 0 12 0C18.6 0 24 5.4 24 12ZM22 12C22 6.5 17.5 2 12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 7H12V9H9V12H7V9H4V7H7V4H9V7ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 7H12V9H9V12H7V9H4V7H7V4H9V7ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1C5.9 1 1 5.9 1 12C1 18.1 5.9 23 12 23C18.1 23 23 18.1 23 12C23 5.9 18.1 1 12 1ZM12 21C7 21 3 17 3 12C3 7 7 3 12 3C17 3 21 7 21 12C21 17 17 21 12 21ZM16.3 8L17.7 9.4L10 17.1L6.3 13.4L7.7 12L10 14.3L16.3 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.01 11.59L13.01 15.59V6H11.01V15.59L7.00998 11.59L5.59998 13L12.01 19.41L18.43 13L17.01 11.59Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10.4 2.60001L11.8 4.00001L4.8 11H22V13H4.8L11.8 20L10.4 21.4L1 12L10.4 2.60001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 8.99999H4.39998L8.69998 13.3L7.29998 14.7L0.599976 7.99999L7.29998 1.29999L8.69998 2.69999L4.39998 6.99999H15V8.99999V8.99999Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.6 2.60001L12.2 4.00001L19.2 11H2V13H19.2L12.2 20L13.6 21.4L23 12L13.6 2.60001Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M18.43 11.01L12.01 4.60001L5.59998 11.01L7.00998 12.43L11.01 8.43001V18.01H13.01V8.43001L17.01 12.43L18.43 11.01Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 11H17C19.8 11 22 8.8 22 6C22 3.2 19.8 1 17 1H7C4.2 1 2 3.2 2 6C2 8.8 4.2 11 7 11ZM7 3H17C18.7 3 20 4.3 20 6C20 7.7 18.7 9 17 9H7C5.3 9 4 7.7 4 6C4 4.3 5.3 3 7 3ZM5 6C5 4.9 5.9 4 7 4C8.1 4 9 4.9 9 6C9 7.1 8.1 8 7 8C5.9 8 5 7.1 5 6ZM19 18C19 19.1 18.1 20 17 20C15.9 20 15 19.1 15 18C15 16.9 15.9 16 17 16C18.1 16 19 16.9 19 18ZM17 13H7C4.2 13 2 15.2 2 18C2 20.8 4.2 23 7 23H17C19.8 23 22 20.8 22 18C22 15.2 19.8 13 17 13ZM17 21H7C5.3 21 4 19.7 4 18C4 16.3 5.3 15 7 15H17C18.7 15 20 16.3 20 18C20 19.7 18.7 21 17 21Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 2V7H10L12 5C11.1 3.8 9.6 3 8 3C5.2 3 3 5.2 3 8H1C1 4.1 4.1 1 8 1C10.2 1 12.1 2 13.4 3.6L15 2ZM8 13C6.4 13 4.9 12.2 4 11L6 9H1V14L2.6 12.4C3.9 14 5.8 15 8 15C11.9 15 15 11.9 15 8H13C13 10.8 10.8 13 8 13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19 8.90001L21 6.10001V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5.00001C3 3.90001 3.9 3.00001 5 3.00001H19C19 3.00001 19 3.00001 19.1 3.00001L20.8 0.600006L22.4 1.80001L11.1 17.5L6.6 13L8 11.6L10.9 14.5L17.7 5.00001H5V19H19V8.90001Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<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.4 14.6C0.600003 15.4 0.600003 16.6 1.4 17.4L6 22H12L22.6 11.4C23.3 10.6 23.3 9.3 22.6 8.6ZM11.1 20H6.8L2.8 16L6.2 12.6L12.4 18.8L11.1 20ZM13.8 17.4L7.6 11.2L15 3.8L21.2 10L13.8 17.4ZM16 20H23V22H14L16 20Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H3V9H13V7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 9H4V7H12V9ZM16 0V16H0V0H16ZM14 2H2V14H14V2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 5.6L19.4 12L13 18.4L11.6 17L15.6 13H2V11H15.6L11.6 7L13 5.6ZM20 2V22H22V2H20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 6L3 5L8 10L13 5L14 6L8 12L2 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M3.31 15.0002C2.69 15.0002 2.11 14.7602 1.68 14.3202C0.780005 13.4202 0.780005 11.9502 1.68 11.0502L2.45 10.2802C2.45 10.1802 2.44 10.0802 2.44 9.98023C2.44 9.02023 2.81 8.12023 3.49 7.44023L5.6 5.33023C5.37 5.04023 5.25 4.68023 5.25 4.31023C5.25 3.86023 5.42 3.44023 5.74 3.12023C6.06 2.80023 6.48 2.63023 6.92 2.63023C7.29 2.63023 7.65 2.75023 7.94 2.98023L8.88 2.04023C9.56 1.36023 10.46 0.990234 11.41 0.990234C12.36 0.990234 13.27 1.36023 13.95 2.04023C14.63 2.72023 15 3.62023 15 4.58023C15 5.54023 14.63 6.44023 13.95 7.12023L12.94 8.13023C13.04 8.34023 13.09 8.58023 13.09 8.82023C13.09 9.27023 12.92 9.69023 12.6 10.0002C12.28 10.3102 11.86 10.4902 11.42 10.4902C11.18 10.4902 10.94 10.4402 10.73 10.3402L8.56 12.5102C7.88 13.1902 6.98 13.5602 6.03 13.5602C5.93 13.5602 5.83 13.5602 5.73 13.5402L4.97 14.3002C4.53 14.7402 3.95 14.9802 3.34 14.9802L3.31 15.0002Z" fill="black" fill-opacity="0.15"></path><path d="M14.0001 4.57969C14.0001 3.88969 13.7301 3.23969 13.2401 2.74969C12.2301 1.73969 10.5901 1.73969 9.58006 2.74969L7.94006 4.38969L7.39006 3.83969C7.13006 3.57969 6.70006 3.57969 6.44006 3.83969C6.18006 4.09969 6.18006 4.52969 6.44006 4.78969L6.99006 5.33969L4.18006 8.14969C3.69006 8.63969 3.42006 9.28969 3.42006 9.97969C3.42006 10.1997 3.46006 10.4097 3.51006 10.6197L2.38006 11.7497C1.87006 12.2597 1.87006 13.0897 2.38006 13.6097C2.64006 13.8697 2.97006 13.9897 3.31006 13.9897C3.65006 13.9897 3.98006 13.8597 4.24006 13.6097L5.37006 12.4797C5.58006 12.5297 5.79006 12.5697 6.01006 12.5697C6.70006 12.5697 7.35006 12.2997 7.84006 11.8097L10.6501 8.99969L10.9401 9.28969C11.0701 9.41969 11.2401 9.48969 11.4201 9.48969C11.6001 9.48969 11.7701 9.41969 11.9001 9.28969C12.1601 9.02969 12.1601 8.59969 11.9001 8.33969L11.6101 8.04969L13.2501 6.40969C13.7401 5.91969 14.0101 5.26969 14.0101 4.57969H14.0001ZM6.89006 10.8597C6.42006 11.3297 5.61006 11.3297 5.14006 10.8597C4.91006 10.6297 4.78006 10.3197 4.78006 9.98969C4.78006 9.65969 4.91006 9.34969 5.14006 9.11969L7.95006 6.30969L9.70006 8.05969L6.89006 10.8697V10.8597Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3ZM20 19H4V5H20V19ZM18 9H6V7H18V9ZM18 13H6V11H18V13ZM12 17H6V15H12V17Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 25 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_19827_2206)"><path d="M15.13 2.02C15.74 2.02 16.33 2.11 16.9 2.25L13.63 5.52C12.25 6.9 12.25 9.14 13.63 10.52C14.32 11.21 15.23 11.56 16.13 11.56C17.03 11.56 17.94 11.21 18.63 10.52L21.9 7.25C22.05 7.82 22.13 8.41 22.13 9.02C22.13 12.89 19 16.02 15.13 16.02C13.97 16.02 12.88 15.73 11.92 15.23L6.13 21.02C5.72 21.43 5.17 21.64 4.63 21.64C4.09 21.64 3.54 21.43 3.13 21.02C2.3 20.19 2.3 18.85 3.13 18.02L8.92 12.23C8.42 11.27 8.13 10.18 8.13 9.02C8.13 5.15 11.26 2.02 15.13 2.02ZM15.13 0.02C10.17 0.02 6.13 4.06 6.13 9.02C6.13 9.95 6.28 10.88 6.56 11.76L1.71 16.61C0.93 17.39 0.5 18.42 0.5 19.52C0.5 20.62 0.93 21.66 1.71 22.43C2.49 23.21 3.52 23.64 4.62 23.64C5.72 23.64 6.76 23.21 7.53 22.43L12.38 17.58C13.27 17.86 14.19 18.01 15.12 18.01C20.08 18.01 24.12 13.97 24.12 9.01C24.12 8.26 24.02 7.5 23.82 6.74C23.64 6.05 23.1 5.5 22.41 5.31C22.24 5.26 22.06 5.24 21.89 5.24C21.37 5.24 20.86 5.45 20.48 5.83L17.21 9.1C16.92 9.39 16.53 9.55 16.12 9.55C15.71 9.55 15.32 9.39 15.03 9.1C14.74 8.81 14.58 8.42 14.58 8.01C14.58 7.6 14.74 7.21 15.03 6.92L18.3 3.65C18.81 3.14 19 2.4 18.82 1.71C18.63 1.02 18.09 0.48 17.39 0.3C16.63 0.1 15.87 0 15.12 0L15.13 0.02Z"></path></g><defs><clipPath id="clip0_19827_2206"><rect width="24" height="24" transform="translate(0.5)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 1H9C7.9 1 7 1.9 7 3V7H3C1.9 7 1 7.9 1 9V21C1 22.1 1.9 23 3 23H15C16.1 23 17 22.1 17 21V17H21C22.1 17 23 16.1 23 15V3C23 1.9 22.1 1 21 1ZM15 21H3V9H15V21ZM21 15H17V9C17 7.9 16.1 7 15 7H9V3H21V15Z" fill="black" fill-opacity="0.45"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C16.41 4 20 7.14 20 11C19.9901 11.928 19.7826 12.8433 19.3911 13.6847C18.9997 14.5262 18.4334 15.2746 17.73 15.88C17.5103 16.0801 17.338 16.3266 17.2256 16.6017C17.1132 16.8767 17.0634 17.1733 17.08 17.47C16.7752 17.2972 16.4304 17.2076 16.08 17.21C15.8237 17.212 15.5698 17.2594 15.33 17.35C14.2722 17.7789 13.1415 17.9996 12 18C7.59 18 4 14.86 4 11C4 7.14 7.59 4 12 4ZM12 2C6.48 2 2 6 2 11C2 16 6.48 20 12 20C13.4012 19.9996 14.7894 19.7314 16.09 19.21L20 22L19.07 17.36C19.9796 16.5667 20.711 15.5899 21.216 14.4937C21.721 13.3975 21.9882 12.2069 22 11C22 6 17.52 2 12 2Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.3 3.7L3.6 5C2 6.9 1 9.3 1 12C1 18.1 5.9 23 12 23C14.7 23 17.1 22 19 20.4L20.3 21.7L21.7 20.3L3.7 2.3L2.3 3.7ZM12 21C7 21 3 17 3 12C3 9.9 3.7 7.9 5 6.4L10.8 12.2C10.7 12.3 10.6 12.4 10.6 12.5C10.5 12.7 10.4 13 10.4 13.3C10.4 13.6 10.5 13.9 10.6 14.1C10.7 14.3 10.8 14.5 10.9 14.8C11 15 11.2 15.1 11.4 15.1C11.5 15.1 11.5 15.1 11.6 15.1H11.7C11.8 15.1 11.9 15.1 12.1 15C12.4 14.9 12.6 14.7 12.6 14.5V14.4V14.1L17.5 19C16.1 20.3 14.1 21 12 21ZM7.8 4.1L6.3 2.6C8 1.6 9.9 1 12 1C18.1 1 23 5.9 23 12C23 14.1 22.4 16 21.4 17.7L19.9 16.2C20.6 15 21 13.5 21 12C21 7 17 3 12 3C10.5 3 9 3.4 7.8 4.1ZM13.5 9.8C13.5 9.7 13.6 9.6 13.6 9.4C13.6 9 13.5 8.6 13.2 8.4C12.8 8 12.4 7.9 12 7.9C11.9 7.9 11.8 7.9 11.6 7.9L10.1 6.4C10.2 6.4 10.2 6.3 10.3 6.3C11.5 5.9 12.7 5.9 13.6 6.1C14.1 6.2 14.5 6.4 14.9 6.6C15.6 7.3 16 8.1 16 9.3C16 10.1 15.7 10.8 15.2 11.4L13.5 9.8ZM11.8 15.9C12.5 15.9 13 16.2 13.3 16.8C13.4 17 13.4 17.2 13.4 17.4C13.4 17.8 13.2 18.2 13 18.5C12.7 18.8 12.3 18.9 11.9 18.9C11.5 18.9 11.1 18.7 10.8 18.5C10.5 18.2 10.4 17.8 10.4 17.4C10.4 17 10.6 16.6 10.8 16.3C11 16 11.4 15.9 11.8 15.9Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1C5.9 1 1 5.9 1 12C1 18.1 5.9 23 12 23C18.1 23 23 18.1 23 12C23 5.9 18.1 1 12 1ZM12 21C7 21 3 17 3 12C3 7 7 3 12 3C17 3 21 7 21 12C21 17 17 21 12 21ZM13.3 16.8C13.4 17 13.4 17.2 13.4 17.4C13.4 17.8 13.2 18.2 13 18.5C12.7 18.8 12.3 18.9 11.9 18.9C11.5 18.9 11.1 18.7 10.8 18.5C10.5 18.2 10.4 17.8 10.4 17.4C10.4 17 10.6 16.6 10.8 16.3C11.1 16 11.5 15.8 11.9 15.8C12.5 15.9 13 16.2 13.3 16.8ZM16 9.3C16 10.4 15.5 11.2 14.6 11.9C14.4 12.1 14.1 12.2 13.9 12.4L13.3 12.8C13 13 12.9 13.1 12.9 13.1C12.8 13.2 12.8 13.3 12.8 13.4C12.8 13.6 12.7 13.8 12.7 14.1V14.4V14.5C12.6 14.7 12.4 14.9 12.2 15C12 15.1 11.9 15.1 11.8 15.1H11.7C11.6 15.1 11.6 15.1 11.5 15.1C11.3 15 11.1 14.9 11 14.8C10.9 14.6 10.7 14.4 10.7 14.1C10.6 13.8 10.5 13.6 10.5 13.3C10.5 13 10.6 12.7 10.7 12.5C10.8 12.3 11 12.1 11.2 11.9C11.4 11.7 11.6 11.6 11.8 11.5L12.4 11.2C13 10.9 13.2 10.7 13.3 10.6C13.6 10.3 13.7 9.9 13.7 9.5C13.7 9.1 13.6 8.7 13.3 8.5C12.8 8 12.4 7.9 12 7.9C10.9 7.9 10.6 8.4 10.6 8.8C10.4 9.3 10.4 9.4 10.4 9.4V9.6C10.4 9.7 10.4 9.7 10.4 9.8L10.5 10.2L10.2 10.3C9.6 10.6 9.1 10.6 8.7 10.4C8.6 10.3 8.4 10.1 8.3 10C8.1 9.7 8 9.4 8 9C8 8.6 8.1 8.3 8.2 8C8.3 7.7 8.5 7.5 8.7 7.3C8.9 7.1 9.1 6.9 9.4 6.7C9.7 6.6 10 6.4 10.3 6.3C11.5 5.9 12.7 5.9 13.6 6.1C14.1 6.2 14.5 6.4 14.9 6.6C15.6 7.3 16 8.1 16 9.3Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 17V2H2V17H10V19C10 19.7956 9.68393 20.5587 9.12132 21.1213C8.55871 21.6839 7.79565 22 7 22H17C16.2044 22 15.4413 21.6839 14.8787 21.1213C14.3161 20.5587 14 19.7956 14 19V17H22ZM4 4H20V15H4V4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16 18H8V6H16V18ZM16 2H8C7.46957 2 6.96086 2.21071 6.58579 2.58579C6.21071 2.96086 6 3.46957 6 4V20C6 20.5304 6.21071 21.0391 6.58579 21.4142C6.96086 21.7893 7.46957 22 8 22H16C16.5304 22 17.0391 21.7893 17.4142 21.4142C17.7893 21.0391 18 20.5304 18 20V4C18 3.46957 17.7893 2.96086 17.4142 2.58579C17.0391 2.21071 16.5304 2 16 2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.41 5.99591L18 11.4059L16.59 9.99591L19.59 6.99591H17C13.5522 6.99591 10.2456 8.36555 7.80761 10.8035C5.36964 13.2415 4 16.5481 4 19.9959V21.9959H2V19.9959C2 16.0177 3.58035 12.2024 6.3934 9.38931C9.20644 6.57626 13.0218 4.99591 17 4.99591H19.59L16.59 1.99591L18 0.585907L23.41 5.99591Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 18H4V6H20V18ZM21 4H3C2.46957 4 1.96086 4.21071 1.58579 4.58579C1.21071 4.96086 1 5.46957 1 6V18C1 18.5304 1.21071 19.0391 1.58579 19.4142C1.96086 19.7893 2.46957 20 3 20H21C21.5304 20 22.0391 19.7893 22.4142 19.4142C22.7893 19.0391 23 18.5304 23 18V6C23 5.46957 22.7893 4.96086 22.4142 4.58579C22.0391 4.21071 21.5304 4 21 4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18.41L4.59 11L6 9.59L11 14.59V2H13V14.59L18 9.59L19.41 11L12 18.41ZM2 20V22H22V20H2Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 15L17 10H7L12 15Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 11L13 6H3L8 11Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4C2.9 2 2 2.9 2 4V6C2 7.1 2.9 8 4 8V20C4 21.1 4.9 22 6 22H20C21.1 22 22 21.1 22 20V8V6V4C22 2.9 21.1 2 20 2ZM20 20H6V8H20V20ZM4 6V4H20V6H4ZM18 12H8V10H18V12ZM18 16H8V14H18V16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_9500_71113)"><path d="M14 0H6C5.46957 0 4.96086 0.210714 4.58579 0.585786C4.21071 0.960859 4 1.46957 4 2V4H2C1.46957 4 0.960859 4.21071 0.585786 4.58579C0.210714 4.96086 0 5.46957 0 6L0 14C0 14.5304 0.210714 15.0391 0.585786 15.4142C0.960859 15.7893 1.46957 16 2 16H10C10.5304 16 11.0391 15.7893 11.4142 15.4142C11.7893 15.0391 12 14.5304 12 14V12H14C14.5304 12 15.0391 11.7893 15.4142 11.4142C15.7893 11.0391 16 10.5304 16 10V2C16 1.46957 15.7893 0.960859 15.4142 0.585786C15.0391 0.210714 14.5304 0 14 0V0ZM10 14H2V6H10V14ZM14 10H12V6C12 5.46957 11.7893 4.96086 11.4142 4.58579C11.0391 4.21071 10.5304 4 10 4H6V2H14V10Z"></path></g><defs><clipPath id="clip0_9500_71113"><rect width="16" height="16"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.9 4.8L19.1 2C18.5 1.5 17.8 1.2 17 1.2C16.2 1.2 15.5 1.5 14.9 2.1L4.6 12.3C2.9 14 2 16.3 2 18.7V21C2 21.6 2.4 22 3 22H5.3C7.7 22 10 21.1 11.7 19.4L21.9 9.1C23.1 7.9 23.1 6 21.9 4.8ZM10.2 17.9C8.9 19.2 7.1 20 5.3 20H4V18.7C4 16.8 4.7 15.1 6.1 13.8L12.3 7.6L16.5 11.8L10.2 17.9ZM20.5 7.7L17.8 10.4L13.6 6.2L16.3 3.5C16.5 3.2 16.8 3.2 17 3.2C17.2 3.2 17.5 3.2 17.7 3.5L20.5 6.3C20.9 6.6 20.9 7.3 20.5 7.7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2693_58208)"><path d="M15.3 2.8L13.2 0.7C12.7 0.2 12.2 0 11.6 0C11 0 10.4 0.2 10 0.7L2 8.6C0.7 9.9 0 11.7 0 13.5V15.3C0 15.7 0.3 16 0.8 16H2.6C4.4 16 6.2 15.3 7.5 14L15.4 6.1C16.2 5.2 16.2 3.7 15.3 2.8ZM6 12.6C5.1 13.5 3.8 14 2.5 14H2V13.5C2 12.2 2.5 10.9 3.4 10L8 5.4L10.6 8L6 12.6ZM13.9 4.7L12 6.6L9.4 4L11.3 2.1C11.4 2 11.5 2 11.6 2C11.7 2 11.7 2 11.8 2.1L13.9 4.2C14 4.3 14 4.5 13.9 4.7Z"></path></g><defs><clipPath id="clip0_2693_58208"><rect width="16" height="16"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.3 3.7L7.8 9.2L4.6 12.4C2.9 14.1 2 16.4 2 18.8V21.1C2 21.7 2.4 22.1 3 22.1H5.3C7.7 22.1 10 21.2 11.7 19.5L14.9 16.3L20.4 21.8L21.8 20.4L3.8 2.4L2.3 3.7ZM10.2 17.9C8.9 19.2 7.1 20 5.3 20H4V18.7C4 16.8 4.7 15.1 6.1 13.8L9.3 10.6L13.5 14.8L10.2 17.9ZM21.9 9.1L17.2 13.8L15.8 12.4L20.5 7.7C20.9 7.3 20.9 6.7 20.5 6.3L17.7 3.5C17.5 3.2 17.2 3.2 17 3.2C16.8 3.2 16.5 3.2 16.3 3.5L11.6 8.2L10.2 6.8L14.9 2.1C15.5 1.5 16.2 1.2 17 1.2C17.8 1.2 18.5 1.5 19.1 2.1L21.9 4.9C23.1 6 23.1 7.9 21.9 9.1Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_19289_560924)"><path d="M8 0C3.58 0 0 3.58 0 8C0 12.42 3.58 16 8 16C12.42 16 16 12.42 16 8C16 3.58 12.42 0 8 0ZM8 14C4.69 14 2 11.31 2 8C2 4.69 4.69 2 8 2C11.31 2 14 4.69 14 8C14 11.31 11.31 14 8 14ZM11.41 6L9.41 8L11.41 10L10 11.41L8 9.41L6 11.41L4.59 10L6.59 8L4.59 6L6 4.59L8 6.59L10 4.59L11.41 6Z"></path></g><defs><clipPath id="clip0_19289_560924"><rect width="16" height="16" fill="transparent"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H9V3H7V7H3V9H7V13H9V9H13V7Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M7 9H4V7H7V4H9V7H12V9H9V12H7V9ZM16 0V16H0V0H16ZM14 2H2V14H14V2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.9959 2H14.9959V22H21.9959V2H19.9959ZM19.9959 20H16.9959V4H19.9959V20ZM4.40588 11H12.9959V13H4.40588L8.40588 17L6.99588 18.41L0.585876 12L6.99588 5.59L8.40588 7L4.40588 11Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6 14L5 13L10 8L5 3L6 2L12 8L6 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 10.4059L4.59 8.99591L12 1.58591L19.41 8.99591L18 10.4059L13 5.40591V17.9959H11V5.40591L6 10.4059ZM2 19.9959V21.9959H22V19.9959H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 0.5C19.4 0.2 18.7 0 17.8 0C15.9 0 14.3 0.8 13 2.3C11.5 4.1 10.1 7.1 9 11.5H6.2L5.8 13H8.5L8.3 14C8.2 14.4 8.1 14.9 7.9 15.7C7.7 16.4 7.6 17.1 7.5 17.6C6.8 20.6 6.1 21.9 5.6 22.4C5.6 22.1 5.5 21.8 5.2 21.6C4.7 21.3 3.8 21.2 3.3 21.8C3.1 22 3 22.4 3 22.7C3 23.1 3.1 23.4 3.4 23.6C3.7 23.9 4.2 24 4.8 24C5.4 24 6 23.9 6.5 23.6C7.9 23 9 21.7 9.8 19.6C10.2 18.5 10.8 16.7 11.4 14.1L11.7 12.9H15.1L15.5 11.4H12.1C13.1 7.2 14.2 4.2 15.3 2.7C15.6 2.3 15.9 2 16.2 1.8C16.6 1.5 16.8 1.5 17 1.5C17.2 1.5 17.4 1.5 17.7 1.6C17.5 1.9 17.5 2.2 17.5 2.5C17.5 2.9 17.7 3.3 18 3.6C18.7 4.1 19.8 4.1 20.5 3.6C20.8 3.2 21 2.8 21 2.3C21 1.5 20.7 0.9 20 0.5Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 5H2V3H13V5ZM10 7H2V9H10V7ZM2 17H10V15H2V17ZM13 11H2V13H13V11ZM23.4 14.9L17 21.3C16 22.4 14.5 23 13 23H11.6C11.3 23 11 22.7 11 22.4V21C11 19.5 11.6 18.1 12.7 17L19.1 10.6C19.4 10.2 19.9 10 20.4 10C20.9 10 21.4 10.2 21.7 10.6L23.4 12.3C24.2 13 24.2 14.2 23.4 14.9ZM21.9 13.6L20.3 12L14 18.3C13.4 19.1 13 20 13 21C14 21 14.9 20.6 15.6 19.9L21.9 13.6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 9V7C22 5.9 21.1 5 20 5H12L10 3H4C2.9 3 2 3.9 2 5V9V10V21H22L24 9H22ZM4 5H9.2L10.6 6.4L11.2 7H12H20V9H4V5ZM20.3 19H4V11H21.6L20.3 19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_506_606)"><path opacity="0.75" d="M8.71 11.29L5.71 8.29C5.32 7.9 4.69 7.9 4.3 8.29C3.91 8.68 3.91 9.31 4.3 9.7L5.59 10.99H1C0.45 10.99 0 11.44 0 11.99C0 12.54 0.45 12.99 1 12.99H5.59L4.3 14.28C3.91 14.67 3.91 15.3 4.3 15.69C4.5 15.89 4.75 15.98 5.01 15.98C5.27 15.98 5.52 15.88 5.72 15.69L8.72 12.69C8.81 12.6 8.89 12.49 8.94 12.36C9.04 12.12 9.04 11.84 8.94 11.6C8.89 11.48 8.82 11.37 8.72 11.27L8.71 11.29Z" fill="black" fill-opacity="0.45"></path><path opacity="0.75" d="M15.71 10.29C15.32 9.89999 14.69 9.89999 14.3 10.29C13.91 10.68 13.91 11.31 14.3 11.7L16.3 13.7C16.5 13.9 16.75 13.99 17.01 13.99C17.27 13.99 17.52 13.89 17.72 13.7L23.72 7.69999C24.11 7.30999 24.11 6.67999 23.72 6.28999C23.33 5.89999 22.7 5.89999 22.31 6.28999L21.05 7.54999C19.99 6.57999 18.57 5.98999 17.02 5.98999C13.71 5.98999 11.02 8.67999 11.02 11.99C11.02 15.3 13.71 17.99 17.02 17.99C20.33 17.99 23.02 15.3 23.02 11.99C23.02 11.5 22.96 11.03 22.85 10.58L20.98 12.45C20.75 14.44 19.07 15.99 17.03 15.99C14.82 15.99 13.03 14.2 13.03 11.99C13.03 9.77999 14.82 7.98999 17.03 7.98999C18.03 7.98999 18.93 8.36999 19.63 8.97999L17.03 11.58L15.74 10.29H15.71Z"></path></g><defs><clipPath id="clip0_506_606"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.85 6.64999L3.35 11.95L7.85 17.35L6.25 18.65L0.75 11.95L6.25 5.34999L7.85 6.64999ZM17.85 5.34999L16.25 6.64999L20.75 11.95L16.25 17.35L17.75 18.65L23.25 12.05L17.85 5.34999ZM8.15 20.65L10.05 21.25L16.05 3.24999L14.15 2.64999L8.15 20.65Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4C2.9 2 2 2.9 2 4V20C2 21.1 2.9 22 4 22H20C21.1 22 22 21.1 22 20V4C22 2.9 21.1 2 20 2ZM20 20H4V4H20V20ZM7 8C7 6.9 7.9 6 9 6C10.1 6 11 6.9 11 8C11 9.1 10.1 10 9 10C7.9 10 7 9.1 7 8ZM19 19H5L9 14L11 15L14 12L19 19Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 5H4C2.9 5 2 5.9 2 7V20C2 21.1 2.9 22 4 22H17C18.1 22 19 21.1 19 20V7C19 5.9 18.1 5 17 5ZM17 20H4V7H17V20ZM6 11C6 9.9 6.9 9 8 9C9.1 9 10 9.9 10 11C10 12.1 9.1 13 8 13C6.9 13 6 12.1 6 11ZM16 19H5L16 14V19ZM22 4V17C22 18.1 21.1 19 20 19V17V4H7H5C5 2.9 5.9 2 7 2H20C21.1 2 22 2.9 22 4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18.41L4.59 11L6 9.59L11 14.59V2H13V14.59L18 9.59L19.41 11L12 18.41ZM2 20V22H22V20H2Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 7.003C12.4641 7.01107 12.9249 7.08171 13.37 7.213L11.54 9.053C10.9155 9.15262 10.3384 9.44704 9.89125 9.89423C9.44406 10.3414 9.14964 10.9185 9.05002 11.543L7.21002 13.373C7.07873 12.9279 7.00809 12.467 7.00002 12.003C7.00002 10.6769 7.5268 9.40515 8.46449 8.46747C9.40217 7.52978 10.6739 7.003 12 7.003ZM5.40002 15.183C4.39516 14.2466 3.52369 13.1766 2.81002 12.003C5.10002 8.223 8.47002 6.003 12 6.003C12.765 6.0082 13.5255 6.11925 14.26 6.333L15.86 4.733C14.6291 4.25486 13.3206 4.0074 12 4.003C7.24002 4.003 3.05002 7.173 0.52002 12.003C1.41557 13.7255 2.59165 15.2868 4.00002 16.623L5.40002 15.183ZM23.48 12.003C21 16.833 16.76 20.003 12 20.003C10.1707 19.9916 8.37315 19.5242 6.77002 18.643L2.71002 22.713L1.29002 21.293L21.29 1.293L22.71 2.713L18.94 6.473C20.8367 7.96509 22.3858 9.8521 23.48 12.003ZM14.7 10.723L10.7 14.723C11.1058 14.9158 11.5508 15.0116 12 15.003C12.7957 15.003 13.5587 14.6869 14.1213 14.1243C14.6839 13.5617 15 12.7986 15 12.003C14.9993 11.559 14.8967 11.1211 14.7 10.723ZM21.19 12.003C20.243 10.4087 18.9887 9.01851 17.5 7.913L16.16 9.263C16.7052 10.073 16.9975 11.0266 17 12.003C17 13.3291 16.4732 14.6009 15.5356 15.5385C14.5979 16.4762 13.3261 17.003 12 17.003C11.0237 17.0005 10.07 16.7081 9.26002 16.163L8.26002 17.163C9.43056 17.7122 10.707 17.9989 12 18.003C15.53 18.003 18.9 15.783 21.19 12.003Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 5L12 0L7 5H11V9H13V5H17Z"></path><path d="M13 19V15H11V19H7L12 24L17 19H13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.75 8H15.25L13.35 13.08C12.2029 12.2588 11.2439 11.2027 10.537 9.98187C9.83 8.76107 9.39127 7.40364 9.25 6H14V4H9V2H7V4H2V6H6.91C6.73189 7.75797 6.09115 9.43736 5.05302 10.8672C4.01489 12.2971 2.61643 13.4263 1 14.14C1.32315 14.7296 1.69441 15.2915 2.11 15.82C4.82764 14.5445 6.96846 12.2966 8.11 9.52C9.02641 11.7596 10.5985 13.6698 12.62 15L10 22H12.42L13.79 18.13H19.16L20.56 22H23L17.75 8ZM14.46 16.16L15.73 12.53C16.0406 11.7049 16.2945 10.8596 16.49 10C16.55 10.26 16.67 10.66 16.84 11.21C17.01 11.76 17.14 12.15 17.24 12.41L18.55 16.2L14.46 16.16Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_252_57732)"><path d="M19 29.2996L20.4 30.6996L22.7 28.3996V33.9996H24.7V28.3996L27 30.6996L28.4 29.2996L23.7 24.5996L19 29.2996Z"></path><path d="M24.7 19.6V14H22.7V19.6L20.4 17.3L19 18.7L23.7 23.4L28.4 18.7L27 17.3L24.7 19.6Z"></path></g><defs><clipPath id="clip0_252_57732"><rect width="9.4" height="20" fill="white" transform="translate(19 14)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_252_57727)"><path d="M19 17.7L20.4 19.1L22.7 16.8V22.4H24.7V16.8L27 19.1L28.4 17.7L23.7 13L19 17.7Z"></path><path d="M24.7 32.0004V26.4004H22.7V32.0004L20.4 29.7004L19 31.1004L23.7 35.8004L28.4 31.1004L27 29.7004L24.7 32.0004Z"></path></g><defs><clipPath id="clip0_252_57727"><rect width="9.4" height="22.8" fill="white" transform="translate(19 13)"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M28 0H4C1.79 0 0 1.79 0 4V28C0 30.21 1.79 32 4 32H28C30.21 32 32 30.21 32 28V4C32 1.79 30.21 0 28 0ZM30 28C30 29.1 29.1 30 28 30H4C2.9 30 2 29.1 2 28V4C2 2.9 2.9 2 4 2H28C29.1 2 30 2.9 30 4V28ZM6 9C6 7.34 7.34 6 9 6C10.66 6 12 7.34 12 9C12 10.66 10.66 12 9 12C7.34 12 6 10.66 6 9ZM19 16L28 28H4L11 19L15 21L19 16Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 1C3.2 1 1 3.2 1 6C1 8.8 3.2 11 6 11C8.8 11 11 8.8 11 6C11 3.2 8.8 1 6 1ZM6 9C4.3 9 3 7.7 3 6C3 4.3 4.3 3 6 3C7.7 3 9 4.3 9 6C9 7.7 7.7 9 6 9ZM8 6C8 7.1 7.1 8 6 8C4.9 8 4 7.1 4 6C4 4.9 4.9 4 6 4C7.1 4 8 4.9 8 6ZM20 18C20 19.1 19.1 20 18 20C16.9 20 16 19.1 16 18C16 16.9 16.9 16 18 16C19.1 16 20 16.9 20 18ZM6 13C3.2 13 1 15.2 1 18C1 20.8 3.2 23 6 23C8.8 23 11 20.8 11 18C11 15.2 8.8 13 6 13ZM6 21C4.3 21 3 19.7 3 18C3 16.3 4.3 15 6 15C7.7 15 9 16.3 9 18C9 19.7 7.7 21 6 21ZM18 11C20.8 11 23 8.8 23 6C23 3.2 20.8 1 18 1C15.2 1 13 3.2 13 6C13 8.8 15.2 11 18 11ZM18 3C19.7 3 21 4.3 21 6C21 7.7 19.7 9 18 9C16.3 9 15 7.7 15 6C15 4.3 16.3 3 18 3ZM18 13C15.2 13 13 15.2 13 18C13 20.8 15.2 23 18 23C20.8 23 23 20.8 23 18C23 15.2 20.8 13 18 13ZM18 21C16.3 21 15 19.7 15 18C15 16.3 16.3 15 18 15C19.7 15 21 16.3 21 18C21 19.7 19.7 21 18 21Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 4C7 5.7 5.7 7 4 7C2.3 7 1 5.7 1 4C1 2.3 2.3 1 4 1C5.7 1 7 2.3 7 4ZM15 4C15 5.7 13.7 7 12 7C10.3 7 9 5.7 9 4C9 2.3 10.3 1 12 1C13.7 1 15 2.3 15 4ZM13 4C13 3.4 12.6 3 12 3C11.4 3 11 3.4 11 4C11 4.6 11.4 5 12 5C12.6 5 13 4.6 13 4ZM17 4C17 2.3 18.3 1 20 1C21.7 1 23 2.3 23 4C23 5.7 21.7 7 20 7C18.3 7 17 5.7 17 4ZM19 4C19 4.6 19.4 5 20 5C20.6 5 21 4.6 21 4C21 3.4 20.6 3 20 3C19.4 3 19 3.4 19 4ZM7 12C7 13.7 5.7 15 4 15C2.3 15 1 13.7 1 12C1 10.3 2.3 9 4 9C5.7 9 7 10.3 7 12ZM5 12C5 11.4 4.6 11 4 11C3.4 11 3 11.4 3 12C3 12.6 3.4 13 4 13C4.6 13 5 12.6 5 12ZM12 9C10.3 9 9 10.3 9 12C9 13.7 10.3 15 12 15C13.7 15 15 13.7 15 12C15 10.3 13.7 9 12 9ZM20 9C18.3 9 17 10.3 17 12C17 13.7 18.3 15 20 15C21.7 15 23 13.7 23 12C23 10.3 21.7 9 20 9ZM4 17C2.3 17 1 18.3 1 20C1 21.7 2.3 23 4 23C5.7 23 7 21.7 7 20C7 18.3 5.7 17 4 17ZM12 17C10.3 17 9 18.3 9 20C9 21.7 10.3 23 12 23C13.7 23 15 21.7 15 20C15 18.3 13.7 17 12 17ZM23 20C23 21.7 21.7 23 20 23C18.3 23 17 21.7 17 20C17 18.3 18.3 17 20 17C21.7 17 23 18.3 23 20ZM21 20C21 19.4 20.6 19 20 19C19.4 19 19 19.4 19 20C19 20.6 19.4 21 20 21C20.6 21 21 20.6 21 20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 4C7 5.7 5.7 7 4 7C2.3 7 1 5.7 1 4C1 2.3 2.3 1 4 1C5.7 1 7 2.3 7 4ZM15 4C15 5.7 13.7 7 12 7C10.3 7 9 5.7 9 4C9 2.3 10.3 1 12 1C13.7 1 15 2.3 15 4ZM13 4C13 3.4 12.6 3 12 3C11.4 3 11 3.4 11 4C11 4.6 11.4 5 12 5C12.6 5 13 4.6 13 4ZM17 4C17 2.3 18.3 1 20 1C21.7 1 23 2.3 23 4C23 5.7 21.7 7 20 7C18.3 7 17 5.7 17 4ZM19 4C19 4.6 19.4 5 20 5C20.6 5 21 4.6 21 4C21 3.4 20.6 3 20 3C19.4 3 19 3.4 19 4ZM7 12C7 13.7 5.7 15 4 15C2.3 15 1 13.7 1 12C1 10.3 2.3 9 4 9C5.7 9 7 10.3 7 12ZM5 12C5 11.4 4.6 11 4 11C3.4 11 3 11.4 3 12C3 12.6 3.4 13 4 13C4.6 13 5 12.6 5 12ZM12 9C10.3 9 9 10.3 9 12C9 13.7 10.3 15 12 15C13.7 15 15 13.7 15 12C15 10.3 13.7 9 12 9ZM20 9C18.3 9 17 10.3 17 12C17 13.7 18.3 15 20 15C21.7 15 23 13.7 23 12C23 10.3 21.7 9 20 9ZM5 17H3V19H1V21H3V23H5V21H7V19H5V17Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 1H4C2.9 1 2 1.9 2 3V9C2 10.1 2.9 11 4 11H20C21.1 11 22 10.1 22 9V3C22 1.9 21.1 1 20 1ZM20 9H4V3H20V9ZM14 7H6V5H14V7ZM20 13H4C2.9 13 2 13.9 2 15V21C2 22.1 2.9 23 4 23H20C21.1 23 22 22.1 22 21V15C22 13.9 21.1 13 20 13ZM20 21H4V15H20V21ZM14 19H6V17H14V19Z"></path></svg>'},function(e,t){e.exports='<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"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2V4H4V9H2V4C2 2.9 2.9 2 4 2H9ZM20 2H15V4H20V9H22V4C22 2.9 21.1 2 20 2ZM4 20V15H2V20C2 21.1 2.9 22 4 22H9V20H4ZM20 20H15V22H20C21.1 22 22 21.1 22 20V15H20V20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2V4H4V9H2V4C2 3.46957 2.21071 2.96086 2.58579 2.58579C2.96086 2.21071 3.46957 2 4 2H9ZM20 2H15V4H20V9H22V4C22 3.46957 21.7893 2.96086 21.4142 2.58579C21.0391 2.21071 20.5304 2 20 2ZM4 20V15H2V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H9V20H4ZM20 20H15V22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V15H20V20ZM17 13H15V11H13V13H11V15H13V17H15V15H17V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 25 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.5 1C6.42 1 1.5 5.92 1.5 12C1.5 18.08 6.42 23 12.5 23C18.58 23 23.5 18.08 23.5 12C23.5 5.92 18.58 1 12.5 1ZM12.5 21C7.54 21 3.5 16.96 3.5 12C3.5 7.04 7.54 3 12.5 3C17.46 3 21.5 7.04 21.5 12C21.5 16.96 17.46 21 12.5 21ZM17.41 10.25L11.47 6.95C10.85 6.6 10.1 6.61 9.49 6.97C8.87 7.33 8.5 7.98 8.5 8.69V15.29C8.5 16.01 8.87 16.65 9.49 17.01C9.81 17.2 10.15 17.29 10.5 17.29C10.85 17.29 11.17 17.21 11.47 17.04L17.41 13.74C18.04 13.39 18.44 12.72 18.44 11.99C18.44 11.26 18.05 10.59 17.41 10.24V10.25ZM10.5 15.3V8.7L16.44 12L10.5 15.3Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M10.393 12.6465L5.69297 8.04651L10.393 3.34651L9.69297 2.64651L4.29297 8.04651L9.69297 13.3465L10.393 12.6465Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C16.4 4 20 7.6 20 12C20 16.4 16.4 20 12 20C7.6 20 4 16.4 4 12C4 7.6 7.6 4 12 4ZM12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12C22 6.5 17.5 2 12 2ZM12 10C13.1 10 14 10.9 14 12C14 13.1 13.1 14 12 14C10.9 14 10 13.1 10 12C10 10.9 10.9 10 12 10ZM12 8C9.8 8 8 9.8 8 12C8 14.2 9.8 16 12 16C14.2 16 16 14.2 16 12C16 9.8 14.2 8 12 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 4H2V21H14V16H18V11H22V4ZM12 19H4V16H12V19ZM16 14H4V11H16V14ZM20 9H4V6H20V9Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0)"><path d="M12 6.8L12.9 9.7L13.3 11.1H14.8H17.8L15.4 12.9L14.2 13.8L14.6 15.2L15.5 18.1L13.1 16.3L12 15.3L10.8 16.2L8.4 18L9.3 15.1L9.7 13.7L8.5 12.8L6.1 11H9.1H10.6L11 9.6L12 6.8ZM12 0.300003L9.2 9H0L7.4 14.4L4.6 23.1L12 17.7L19.4 23.1L16.6 14.4L24 9H14.8L12 0.300003Z"></path></g><defs><clipPath id="clip0"><rect width="24" height="24"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 8.00001H19.6L15.6 4.00001L17 2.60001L23.4 9.00001L17 15.4L15.6 14L19.6 10H7C4.8 10 3 11.8 3 14C3 16.2 4.8 18 7 18H8V20H7C3.7 20 1 17.3 1 14C1 10.7 3.7 8.00001 7 8.00001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 7V9H4V7H12ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1564_16728)"><path d="M2.77 14.1393L6.09 9.03927L0 9.18927L0.06 6.51927L6.15 6.88927L2.96 1.68927L5.29 0.379272L8.02 5.81927L10.96 0.489272L13.23 1.84927L9.91 6.94927L16 6.79927L15.94 9.46927L9.85 9.09927L13.04 14.2993L10.71 15.6093L7.98 10.1693L5.04 15.4993L2.77 14.1393Z"></path></g><defs><clipPath id="clip0_1564_16728"><rect width="16" height="16" fill="white"></rect></clipPath></defs></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 2.993C11.8 2.993 11.59 3.023 11.37 3.043L12.71 1.703L11.3 0.292999L7.59 4.003L11.3 7.713L12.71 6.303L11.46 5.053C11.64 5.043 11.82 5.013 12 5.013C15.86 5.013 19 8.153 19 12.013C19 15.873 15.86 19.013 12 19.013C8.14 19.013 5 15.873 5 12.013C5 11.463 4.55 11.013 4 11.013C3.45 11.013 3 11.463 3 12.013C3 16.973 7.04 21.013 12 21.013C16.96 21.013 21 16.973 21 12.013C21 7.053 16.97 2.993 12.01 2.993Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2H4L2 4V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V4C22 3.46957 21.7893 2.96086 21.4142 2.58579C21.0391 2.21071 20.5304 2 20 2ZM15 4V6H9V4H15ZM8 20V15H16V20H8ZM20 20H18V13H6V20H4V4.83L4.83 4H7V8H17V4H20V20Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23 11H19.9C19.4 7.4 16.6 4.5 13 4.1V1H11V4.1C7.4 4.5 4.5 7.4 4.1 11H1V13H4.1C4.6 16.6 7.4 19.5 11 19.9V23H13V19.9C16.6 19.4 19.5 16.6 19.9 13H23V11ZM12 18C8.7 18 6 15.3 6 12C6 8.7 8.7 6 12 6C15.3 6 18 8.7 18 12C18 15.3 15.3 18 12 18Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.9 4C9.4 2.3 7.9 1 6 1C3.8 1 2 2.8 2 5C2 7.2 3.8 9 6 9C7.9 9 9.4 7.7 9.9 6H22V4H9.9ZM6 7C4.9 7 4 6.1 4 5C4 3.9 4.9 3 6 3C7.1 3 8 3.9 8 5C8 6.1 7.1 7 6 7ZM9 15C7.1 15 5.6 16.3 5.1 18H2V20H5.1C5.5 21.7 7.1 23 9 23C10.9 23 12.4 21.7 12.9 20H22V18H12.9C12.4 16.3 10.9 15 9 15ZM9 21C7.9 21 7 20.1 7 19C7 17.9 7.9 17 9 17C10.1 17 11 17.9 11 19C11 20.1 10.1 21 9 21ZM18 8C16.1 8 14.6 9.3 14.1 11H2V13H14.1C14.5 14.7 16.1 16 18 16C20.2 16 22 14.2 22 12C22 9.8 20.2 8 18 8ZM18 14C16.9 14 16 13.1 16 12C16 10.9 16.9 10 18 10C19.1 10 20 10.9 20 12C20 13.1 19.1 14 18 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6.8 2C6.4 0.8 5.3 0 4 0C2.3 0 1 1.3 1 3C1 4.7 2.3 6 4 6C5.3 6 6.4 5.2 6.8 4H15V2H6.8ZM4 4C3.4 4 3 3.6 3 3C3 2.4 3.4 2 4 2C4.6 2 5 2.4 5 3C5 3.6 4.6 4 4 4ZM12 5C10.7 5 9.6 5.8 9.2 7H1V9H9.2C9.6 10.2 10.7 11 12 11C13.7 11 15 9.7 15 8C15 6.3 13.7 5 12 5ZM12 9C11.4 9 11 8.6 11 8C11 7.4 11.4 7 12 7C12.6 7 13 7.4 13 8C13 8.6 12.6 9 12 9ZM6 10C4.7 10 3.6 10.8 3.2 12H1V14H3.2C3.6 15.2 4.7 16 6 16C7.3 16 8.4 15.2 8.8 14H15V12H8.8C8.4 10.8 7.3 10 6 10ZM6 14C5.4 14 5 13.6 5 13C5 12.4 5.4 12 6 12C6.6 12 7 12.4 7 13C7 13.6 6.6 14 6 14Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M24 17V19H9.1C9.5 18.4 9.9 17.7 10.2 17H24ZM11.9 9.00001C11 13.7 8.6 19.6 5 22.6C3.8 23.6 2 22.6 2 21.1C2 20.4 2.1 19.7 2.2 19H0V17H2.8C4.3 12.9 7.6 9.10001 10.2 7.60001C10.4 6.10001 10.4 4.80001 10.2 3.90001C9.9 3.30001 9.7 3.00001 9.6 3.00001C9.4 3.00001 7.8 2.90001 3.8 8.70001L2.2 7.60001C5.5 2.80001 7.9 0.700007 9.9 1.00001C12 1.20001 12.5 4.60001 12.2 6.90001C14.3 7.00001 14.8 8.20001 14.9 10.3C16.2 9.10001 18.1 7.90001 19.2 9.20001C20.8 8.90001 22.1 10.4 22.9 11.5L21.3 12.7C20.4 11.4 19.8 11.2 19.6 11.2C19.5 11.2 19.5 11.3 19.4 11.4C19 12 18.6 12.8 18 13.7C17.7 14.1 17.2 14.3 16.7 14.1C15.5 13.5 16.5 12.1 16.8 11.2C15.8 12 14.4 13.4 13.9 14.8C13.8 15.5 13.3 16.3 12.5 16.1C11.6 15.9 11.7 14.9 12 14.2C13.3 9.80001 12.5 9.00001 12.5 9.00001C12.5 8.90001 12.2 8.80001 11.9 9.00001ZM9.5 10.4C6.9 12.8 4.1 17.1 4 20.8C6.6 18.5 8.5 14.3 9.5 10.4Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11 5C12.7 5 14 6.3 14 8C14 9.7 12.7 11 11 11H5C3.3 11 2 9.7 2 8C2 6.3 3.3 5 5 5H11ZM11 3H5C2.2 3 0 5.2 0 8C0 10.8 2.2 13 5 13H11C13.8 13 16 10.8 16 8C16 5.2 13.8 3 11 3ZM11 6C9.9 6 9 6.9 9 8C9 9.1 9.9 10 11 10C12.1 10 13 9.1 13 8C13 6.9 12.1 6 11 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11 5C12.7 5 14 6.3 14 8C14 9.7 12.7 11 11 11H5C3.3 11 2 9.7 2 8C2 6.3 3.3 5 5 5H11ZM11 3H5C2.2 3 0 5.2 0 8C0 10.8 2.2 13 5 13H11C13.8 13 16 10.8 16 8C16 5.2 13.8 3 11 3ZM5 6C3.9 6 3 6.9 3 8C3 9.1 3.9 10 5 10C6.1 10 7 9.1 7 8C7 6.9 6.1 6 5 6Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 7V6C22 4.9 21.1 4 20 4H16C14.9 4 14 4.9 14 6V7C14 8.1 14.9 9 16 9H20C21.1 9 22 8.1 22 7ZM20 7H16V6H20V7ZM2 6V7C2 8.1 2.9 9 4 9H11C12.1 9 13 8.1 13 7V6C13 4.9 12.1 4 11 4H4C2.9 4 2 4.9 2 6ZM4 6H11V7H4V6ZM9 12V13C9 14.1 9.9 15 11 15H20C21.1 15 22 14.1 22 13V12C22 10.9 21.1 10 20 10H11C9.9 10 9 10.9 9 12ZM11 12H20V13H11V12ZM2 18V19C2 20.1 2.9 21 4 21H15C16.1 21 17 20.1 17 19V18C17 16.9 16.1 16 15 16H4C2.9 16 2 16.9 2 18ZM4 18H15V19H4V18ZM2 12V13C2 14.1 2.9 15 4 15H6C7.1 15 8 14.1 8 13V12C8 10.9 7.1 10 6 10H4C2.9 10 2 10.9 2 12ZM4 12H6V13H4V12Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 6H4C2.9 6 2 6.9 2 8V16C2 17.1 2.9 18 4 18H20C21.1 18 22 17.1 22 16V8C22 6.9 21.1 6 20 6ZM20 16H4V8H20V16ZM14 13H6V11H14V13Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M24 21.4201C23.9387 22.1566 23.5894 22.8394 23.0278 23.3202C22.4662 23.8011 21.7376 24.0413 21 23.9888C20.2624 24.0413 19.5338 23.8011 18.9722 23.3202C18.4106 22.8394 18.0613 22.1566 18 21.4201C18 18.8513 21 16.2826 21 14.9932C21 16.2826 24 18.8513 24 21.4201ZM22 12.9942L11 1.99951L8.71 4.2884L10.12 5.70771L11 4.82814L18.17 11.9946L5.64 15.8028L2.83 12.9942L7.71 8.11653L9.29 9.70576C9.38296 9.79944 9.49356 9.8738 9.61542 9.92455C9.73728 9.97529 9.86799 10.0014 10 10.0014C10.132 10.0014 10.2627 9.97529 10.3846 9.92455C10.5064 9.8738 10.617 9.79944 10.71 9.70576C10.8037 9.61284 10.8781 9.5023 10.9289 9.3805C10.9797 9.2587 11.0058 9.12805 11.0058 8.99611C11.0058 8.86416 10.9797 8.73352 10.9289 8.61172C10.8781 8.48992 10.8037 8.37937 10.71 8.28645L3.71 1.28986C3.5217 1.10165 3.2663 0.995911 3 0.995911C2.7337 0.995911 2.4783 1.10165 2.29 1.28986C2.1017 1.47807 1.99591 1.73334 1.99591 1.99951C1.99591 2.26569 2.1017 2.52096 2.29 2.70917L6.29 6.70722L0 12.9942L10 22.9893L18 14.9932L22 12.9942Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21 4H16V2C16 1.46957 15.7893 0.960859 15.4142 0.585786C15.0391 0.210714 14.5304 0 14 0L10 0C9.46957 0 8.96086 0.210714 8.58579 0.585786C8.21071 0.960859 8 1.46957 8 2V4H3C2.46957 4 1.96086 4.21071 1.58579 4.58579C1.21071 4.96086 1 5.46957 1 6V12H2V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H20C20.5304 22 21.0391 21.7893 21.4142 21.4142C21.7893 21.0391 22 20.5304 22 20V12H23V6C23 5.46957 22.7893 4.96086 22.4142 4.58579C22.0391 4.21071 21.5304 4 21 4ZM10 2H14V4H10V2ZM20 20H4V12H9V16H15V12H20V20ZM11 14V10H13V14H11ZM21 10H15V8H9V10H3V6H21V10Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 8.00001H4.40001L8.40001 4.00001L7.00001 2.60001L0.600006 9.00001L7.00001 15.4L8.40001 14L4.40001 10H17C19.2 10 21 11.8 21 14C21 16.2 19.2 18 17 18H16V20H17C20.3 20 23 17.3 23 14C23 10.7 20.3 8.00001 17 8.00001Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C7.2 4 3 7.2 0.5 12C3 16.8 7.2 20 12 20C16.8 20 20.9 16.8 23.5 12C20.9 7.2 16.7 4 12 4ZM12 18C8.5 18 5.1 15.8 2.8 12C5.1 8.2 8.5 6 12 6C15.5 6 18.9 8.2 21.2 12C18.9 15.8 15.5 18 12 18ZM12 7C9.2 7 7 9.2 7 12C7 14.8 9.2 17 12 17C14.8 17 17 14.8 17 12C17 9.2 14.7 7 12 7ZM12 15C10.3 15 9 13.7 9 12C9 11.7 9 11.5 9.1 11.3L12 12L10.3 9.5C10.8 9.2 11.3 9 12 9C13.7 9 15 10.3 15 12C15 13.7 13.6 15 12 15Z"></path></svg>'},function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.7 16.3C8.1 16.7 8.1 17.3 7.7 17.7L3.7 21.7C3.5 21.9 3.3 22 3 22C2.7 22 2.5 21.9 2.3 21.7C1.9 21.3 1.9 20.7 2.3 20.3L6.3 16.3C6.7 15.9 7.3 15.9 7.7 16.3ZM20.5 10L23 13.7L18.6 14.6L17.7 19L14 16.5L10.3 19L9.4 14.6L5 13.7L7.5 10L5 6.3L9.4 5.4L10.3 1L14 3.5L17.7 1L18.6 5.4L23 6.3L20.5 10ZM18.1 10L18.8 8.9L19.6 7.7L18.1 7.4L16.8 7.1L16.5 5.8L16.2 4.3L15 5.1L14 5.9L12.9 5.2L11.7 4.3L11.4 5.8L11.1 7.1L9.8 7.4L8.3 7.7L9.1 8.9L9.9 10L9.2 11.1L8.4 12.3L9.9 12.6L11.2 12.9L11.5 14.2L11.8 15.7L13 14.9L14.1 14.2L15.2 14.9L16.4 15.7L16.7 14.2L17 12.9L18.3 12.6L19.8 12.3L19 11.1L18.1 10Z"></path></svg>'},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},,function(e,t,o){"use strict";o.r(t),o.d(t,"Version",(function(){return Zn})),o.d(t,"enStrings",(function(){return n})),o.d(t,"editorLocalization",(function(){return G})),o.d(t,"defaultStrings",(function(){return J})),o.d(t,"localization",(function(){return G})),o.d(t,"QuestionConvertMode",(function(){return r})),o.d(t,"settings",(function(){return a})),o.d(t,"EmptySurveyCreatorOptions",(function(){return s})),o.d(t,"CreatorAction",(function(){return gr})),o.d(t,"TabbedMenuItem",(function(){return fr})),o.d(t,"TabbedMenuContainer",(function(){return mr})),o.d(t,"ToolbarActionContainer",(function(){return yr})),o.d(t,"CreatorEvent",(function(){return br})),o.d(t,"SurveyCreatorModel",(function(){return vr})),o.d(t,"CreatorBase",(function(){return xr})),o.d(t,"StylesManager",(function(){return wr})),o.d(t,"initializeDesignTimeSurveyModel",(function(){return jr})),o.d(t,"editableStringRendererName",(function(){return Sr})),o.d(t,"getElementWrapperComponentName",(function(){return Tr})),o.d(t,"getQuestionContentWrapperComponentName",(function(){return Pr})),o.d(t,"getElementWrapperComponentData",(function(){return Er})),o.d(t,"getItemValueWrapperComponentName",(function(){return Ir})),o.d(t,"getItemValueWrapperComponentData",(function(){return Or})),o.d(t,"isStringEditable",(function(){return Vr})),o.d(t,"isTextInput",(function(){return Nr})),o.d(t,"registerAdorner",(function(){return kr})),o.d(t,"removeAdorners",(function(){return Ar})),o.d(t,"CreatorResponsivityManager",(function(){return bo})),o.d(t,"AceJsonEditorModel",(function(){return xe})),o.d(t,"TabJsonEditorAcePlugin",(function(){return we})),o.d(t,"JsonEditorBaseModel",(function(){return be})),o.d(t,"TabJsonEditorBasePlugin",(function(){return ve})),o.d(t,"TextareaJsonEditorModel",(function(){return je})),o.d(t,"TabJsonEditorTextareaPlugin",(function(){return Ce})),o.d(t,"TestSurveyTabViewModel",(function(){return Ie})),o.d(t,"TabTestPlugin",(function(){return Oe})),o.d(t,"updatecoloralphaJSON",(function(){return or})),o.d(t,"createColor",(function(){return nr})),o.d(t,"updateShadowEffectsJSON",(function(){return Wo})),o.d(t,"createBoxShadow",(function(){return Go})),o.d(t,"createBoxShadowReset",(function(){return zo})),o.d(t,"parseBoxShadow",(function(){return Jo})),o.d(t,"DefaultFonts",(function(){return _o})),o.d(t,"updateFontSettingsJSON",(function(){return Mo})),o.d(t,"fontsettingsToCssVariable",(function(){return Ro})),o.d(t,"fontsettingsFromCssVariable",(function(){return qo})),o.d(t,"updateBackgroundCornerRadiusJSON",(function(){return Bo})),o.d(t,"backgroundCornerRadiusToCssVariable",(function(){return Qo})),o.d(t,"backgroundCornerRadiusFromCssVariable",(function(){return Fo})),o.d(t,"Themes",(function(){return No})),o.d(t,"PredefinedThemes",(function(){return ko})),o.d(t,"PredefinedColors",(function(){return Ao})),o.d(t,"ThemeTabViewModel",(function(){return Vo})),o.d(t,"ThemeTabPlugin",(function(){return hr})),o.d(t,"themeModelPropertyGridDefinition",(function(){return ur})),o.d(t,"ThemeModelEditorDefinition",(function(){return dr})),o.d(t,"initLogicOperator",(function(){return He})),o.d(t,"LogicEvent",(function(){return Be})),o.d(t,"SurveyLogic",(function(){return Qe})),o.d(t,"TranslationItemBase",(function(){return Nt})),o.d(t,"TranslationItemString",(function(){return kt})),o.d(t,"TranslationItem",(function(){return At})),o.d(t,"TranslationGroup",(function(){return _t})),o.d(t,"Translation",(function(){return Lt})),o.d(t,"TranslationForEditor",(function(){return Dt})),o.d(t,"TranslationEditor",(function(){return Mt})),o.d(t,"createImportCSVAction",(function(){return Rt})),o.d(t,"createExportCSVAction",(function(){return qt})),o.d(t,"translationCss",(function(){return Et})),o.d(t,"TabTranslationPlugin",(function(){return Ht})),o.d(t,"initialSettingsAllowShowEmptyTitleInDesignMode",(function(){return fo})),o.d(t,"TabDesignerViewModel",(function(){return mo})),o.d(t,"TabDesignerPlugin",(function(){return yo})),o.d(t,"SurveyLogicUI",(function(){return Yt})),o.d(t,"TabLogicPlugin",(function(){return Xt})),o.d(t,"logicCss",(function(){return Bt})),o.d(t,"ToolboxToolViewModel",(function(){return _r})),o.d(t,"PageNavigatorViewModel",(function(){return Lr})),o.d(t,"PageAdorner",(function(){return Rr})),o.d(t,"RowViewModel",(function(){return qr})),o.d(t,"QuestionAdornerViewModel",(function(){return Hr})),o.d(t,"QuestionDropdownAdornerViewModel",(function(){return Br})),o.d(t,"QuestionImageAdornerViewModel",(function(){return Qr})),o.d(t,"QuestionRatingAdornerViewModel",(function(){return Fr})),o.d(t,"ItemValueWrapperViewModel",(function(){return Wr})),o.d(t,"ImageItemValueWrapperViewModel",(function(){return Gr})),o.d(t,"MatrixCellWrapperEditSurvey",(function(){return zr})),o.d(t,"MatrixCellWrapperViewModel",(function(){return Jr})),o.d(t,"SurveySimulatorModel",(function(){return Se})),o.d(t,"DEFAULT_MONITOR_DPI",(function(){return Te})),o.d(t,"simulatorDevices",(function(){return Pe})),o.d(t,"SurveyResultsItemModel",(function(){return Zr})),o.d(t,"SurveyResultsModel",(function(){return Yr})),o.d(t,"LogoImageViewModel",(function(){return Xr})),o.d(t,"StringItemsNavigatorBase",(function(){return jo})),o.d(t,"StringEditorConnector",(function(){return Io})),o.d(t,"StringEditorViewModelBase",(function(){return Oo})),o.d(t,"QuestionEmbeddedSurveyModel",(function(){return $r})),o.d(t,"QuestionLinkValueModel",(function(){return en})),o.d(t,"EditorLocalization",(function(){return W})),o.d(t,"getLocString",(function(){return z})),o.d(t,"SurveyJSON5",(function(){return $})),o.d(t,"QuestionSpinEditorModel",(function(){return tn})),o.d(t,"QuestionColorModel",(function(){return on})),o.d(t,"QuestionFileEditorModel",(function(){return rn})),o.d(t,"ResetValueAdorner",(function(){return nn})),o.d(t,"QuestionTextWithResetModel",(function(){return an})),o.d(t,"QuestionCommentWithResetModel",(function(){return sn})),o.d(t,"setSurveyJSONForPropertyGrid",(function(){return $e})),o.d(t,"PropertyEditorSetupValue",(function(){return et})),o.d(t,"PropertyGridEditorCollection",(function(){return tt})),o.d(t,"PropertyGridTitleActionsCreator",(function(){return ot})),o.d(t,"PropertyJSONGenerator",(function(){return rt})),o.d(t,"PropertyGridModel",(function(){return nt})),o.d(t,"PropertyGridEditor",(function(){return it})),o.d(t,"PropertyGridEditorBoolean",(function(){return at})),o.d(t,"PropertyGridEditorStringBase",(function(){return st})),o.d(t,"PropertyGridEditorString",(function(){return lt})),o.d(t,"PropertyGridEditorDateTime",(function(){return ct})),o.d(t,"PropertyGridLinkEditor",(function(){return pt})),o.d(t,"PropertyGridEditorColor",(function(){return ut})),o.d(t,"PropertyGridEditorColorWithAlpha",(function(){return dt})),o.d(t,"PropertyGridEditorNumber",(function(){return ht})),o.d(t,"PropertyGridEditorSpinEdit",(function(){return gt})),o.d(t,"PropertyGridEditorImageSize",(function(){return ft})),o.d(t,"PropertyGridEditorText",(function(){return mt})),o.d(t,"PropertyGridEditorHtml",(function(){return yt})),o.d(t,"PropertyGridEditorStringArray",(function(){return bt})),o.d(t,"PropertyGridEditorDropdown",(function(){return vt})),o.d(t,"PropertyGridEditorSet",(function(){return xt})),o.d(t,"PropertyGridEditorPage",(function(){return wt})),o.d(t,"PropertyGridEditorQuestion",(function(){return jt})),o.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return Ct})),o.d(t,"PropertyGridEditorQuestionCarryForward",(function(){return St})),o.d(t,"PropertyGridEditorQuestionValue",(function(){return Tt})),o.d(t,"PropertyGridEditorExpression",(function(){return ln})),o.d(t,"PropertyGridEditorCondition",(function(){return cn})),o.d(t,"PropertyGridEditorMatrix",(function(){return dn})),o.d(t,"PropertyGridEditorMatrixItemValues",(function(){return hn})),o.d(t,"PropertyGridEditorMatrixRateValues",(function(){return gn})),o.d(t,"PropertyGridEditorMatrixColumns",(function(){return fn})),o.d(t,"PropertyGridEditorMatrixPages",(function(){return mn})),o.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return yn})),o.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return bn})),o.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return vn})),o.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return xn})),o.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return wn})),o.d(t,"PropertyGridEditorMatrixValidators",(function(){return jn})),o.d(t,"PropertyGridEditorMatrixTriggers",(function(){return Cn})),o.d(t,"PropertyGridEditorBindings",(function(){return Tn})),o.d(t,"PropertyGridViewModel",(function(){return uo})),o.d(t,"ObjectSelectorItem",(function(){return so})),o.d(t,"ObjectSelector",(function(){return lo})),o.d(t,"ObjectSelectorModel",(function(){return co})),o.d(t,"PropertyGridEditorQuestionRestfull",(function(){return En})),o.d(t,"PropertyGridEditorFontSettings",(function(){return In})),o.d(t,"PropertyGridEditorBackgroundCornerRadius",(function(){return On})),o.d(t,"PropertyGridEditorShadowEffects",(function(){return Vn})),o.d(t,"PropertyGridValueEditorBase",(function(){return Mn})),o.d(t,"PropertyGridCellsEditor",(function(){return Rn})),o.d(t,"PropertyGridValueEditor",(function(){return qn})),o.d(t,"PropertyGridRowValueEditor",(function(){return Hn})),o.d(t,"PropertyGridPanelValueEditor",(function(){return Bn})),o.d(t,"PropertyGridTriggerValueEditor",(function(){return Qn})),o.d(t,"PropertyGridTriggerValueInLogicEditor",(function(){return Fn})),o.d(t,"SearchManager",(function(){return po})),o.d(t,"PropertyGridEditorQuestionMaskSettings",(function(){return Wn})),o.d(t,"PropertyGridEditorMaskType",(function(){return Gn})),o.d(t,"PropertyGridEditorQuestionHeader",(function(){return Jn})),o.d(t,"propertyGridCss",(function(){return We})),o.d(t,"QuestionConverter",(function(){return ee})),o.d(t,"svgBundle",(function(){})),o.d(t,"SurveyTextWorkerError",(function(){return ne})),o.d(t,"SurveyTextWorkerParserError",(function(){return ie})),o.d(t,"SurveyTextWorkerJsonError",(function(){return ue})),o.d(t,"SurveyTextWorker",(function(){return de})),o.d(t,"JsonDuplicateNameError",(function(){return he})),o.d(t,"QuestionToolboxCategory",(function(){return ge})),o.d(t,"QuestionToolboxItem",(function(){return fe})),o.d(t,"QuestionToolbox",(function(){return me})),o.d(t,"SidebarModel",(function(){return wo})),o.d(t,"SidebarTabModel",(function(){return vo})),o.d(t,"Switcher",(function(){return cr})),o.d(t,"roundTo2Decimals",(function(){return c})),o.d(t,"getNextItemValue",(function(){return d})),o.d(t,"getNextItemText",(function(){return h})),o.d(t,"getNextValue",(function(){return g})),o.d(t,"findParentNode",(function(){return f})),o.d(t,"focusFirstControl",(function(){return m})),o.d(t,"getFirstNonTextElement",(function(){return y})),o.d(t,"getNodesFromKoComponentInfo",(function(){return b})),o.d(t,"propertyExists",(function(){return v})),o.d(t,"isPropertyVisible",(function(){return x})),o.d(t,"toggleHovered",(function(){return w})),o.d(t,"clearNewLines",(function(){return j})),o.d(t,"select",(function(){return C})),o.d(t,"copyObject",(function(){return S})),o.d(t,"copyCssClasses",(function(){return T})),o.d(t,"assignDefaultV2Classes",(function(){return P})),o.d(t,"wrapTextByCurlyBraces",(function(){return E})),o.d(t,"capitalize",(function(){return I})),o.d(t,"notShortCircuitAnd",(function(){return O})),o.d(t,"imageMimeTypes",(function(){return V})),o.d(t,"getAcceptedTypesByContentMode",(function(){return N})),o.d(t,"getQuestionFromObj",(function(){return k})),o.d(t,"scrollElementIntoView",(function(){return A})),o.d(t,"ingectAlpha",(function(){return _})),o.d(t,"convertRgbaToString",(function(){return L})),o.d(t,"parseRgbaFromString",(function(){return D})),o.d(t,"parseColor",(function(){return M})),o.d(t,"HSBToRGB",(function(){return R})),o.d(t,"RGBToHSB",(function(){return q})),o.d(t,"trimEmptyFields",(function(){return H})),o.d(t,"assign",(function(){return B})),o.d(t,"ColorCalculator",(function(){return Q})),o.d(t,"saveToFileHandler",(function(){return F})),o.d(t,"defaultPropertyGridDefinition",(function(){return ze})),o.d(t,"SurveyQuestionEditorDefinition",(function(){return Je})),o.d(t,"ObjType",(function(){return X})),o.d(t,"SurveyHelper",(function(){return te})),o.d(t,"ResizeManager",(function(){return xo})),o.d(t,"UndoRedoPlugin",(function(){return no})),o.d(t,"undoRedoTransaction",(function(){return io})),o.d(t,"ignoreUndoRedo",(function(){return ao})),o.d(t,"UndoRedoManager",(function(){return $t})),o.d(t,"Transaction",(function(){return eo})),o.d(t,"UndoRedoAction",(function(){return to})),o.d(t,"UndoRedoArrayAction",(function(){return oo})),o.d(t,"PagesController",(function(){return ho}));var r,n={survey:{edit:"Edit",externalHelpLink:"Watch and learn how to create surveys",externalHelpLinkUrl:"https://www.youtube.com/channel/UCH2ru9okIcooNZfpIbyq4qQ?view_as=subscriber",dropQuestion:"Please drop a question here from the Toolbox.",addLogicItem:"Create a rule to customize the flow of the survey.",copy:"Copy",duplicate:"Duplicate",addToToolbox:"Add to toolbox",deletePanel:"Delete Panel",deleteQuestion:"Delete Question",convertTo:"Convert to",drag:"Drag element",license:"To use our library, a <a href='https://surveyjs.io/licensing'>developer license</a> is required. If you have an active license, <a href='https://surveyjs.io/remove-alert-banner'>set up your license key</a> and ensure you're using the latest version."},tabs:{preview:"Preview",theme:"Themes",translation:"Translations",designer:"Designer",editor:"JSON Editor",logic:"Logic"},qt:{default:"Default",checkbox:"Checkboxes",comment:"Long Text",imagepicker:"Image Picker",ranking:"Ranking",image:"Image",dropdown:"Dropdown",tagbox:"Multi-Select Dropdown",file:"File Upload",html:"HTML",matrix:"Single-Select Matrix",matrixdropdown:"Multi-Select Matrix",matrixdynamic:"Dynamic Matrix",multipletext:"Multiple Textboxes",panel:"Panel",paneldynamic:"Dynamic Panel",radiogroup:"Radio Button Group",rating:"Rating Scale",text:"Single-Line Input",boolean:"Yes/No (Boolean)",expression:"Expression (read-only)",signaturepad:"Signature",buttongroup:"Button Group"},toolboxCategories:{general:"General",choice:"Choice Questions",text:"Text Input Questions",containers:"Containers",matrix:"Matrix Questions",misc:"Misc"},ed:{defaultLocale:"Default ({0})",survey:"Survey",settings:"Settings",settingsTooltip:"Open settings",surveySettings:"Survey Settings",surveySettingsTooltip:"Survey settings",themeSettings:"Theme Settings",themeSettingsTooltip:"Theme settings",showPanel:"Show Panel",hidePanel:"Hide Panel",prevSelected:"Select previous",nextSelected:"Select next",prevFocus:"Focus previous",nextFocus:"Focus next",surveyTypeName:"Survey",pageTypeName:"Page",panelTypeName:"Panel",questionTypeName:"Question",columnTypeName:"Column",addNewPage:"Add New Page",moveRight:"Scroll to the Right",moveLeft:"Scroll to the Left",deletePage:"Delete Page",editPage:"Edit Page",edit:"Edit",newPageName:"page",newQuestionName:"question",newPanelName:"panel",newTextItemName:"text",defaultV2Theme:"Default",modernTheme:"Modern",defaultTheme:"Default (legacy)",testSurveyAgain:"Preview Survey Again",testSurveyWidth:"Survey width: ",navigateToMsg:"You had to navigate to",saveSurvey:"Save Survey",saveSurveyTooltip:"Save Survey",saveTheme:"Save Theme",saveThemeTooltip:"Save Theme",jsonHideErrors:"Hide errors",jsonShowErrors:"Show errors",undo:"Undo",redo:"Redo",undoTooltip:"Undo last change",redoTooltip:"Redo the change",showMoreChoices:"Show more",showLessChoices:"Show less",copy:"Copy",cut:"Cut",paste:"Paste",copyTooltip:"Copy selection to clipboard",cutTooltip:"Cut selection to clipboard",pasteTooltip:"Paste from clipboard",options:"Options",generateValidJSON:"Generate Valid JSON",generateReadableJSON:"Generate Readable JSON",toolbox:"Toolbox","property-grid":"Properties",propertyGridFilteredTextPlaceholder:"Type to search...",propertyGridNoResultsFound:"No results found",correctJSON:"Please correct JSON.",surveyResults:"Survey Results ",surveyResultsTable:"As Table",surveyResultsJson:"As JSON",resultsTitle:"Question Title",resultsName:"Question Name",resultsValue:"Answer Value",resultsDisplayValue:"Display Value",modified:"Modified",saving:"Saving",saved:"Saved",propertyEditorError:"Error",saveError:"Error! Editor content is not saved.",translationPropertyGridTitle:"Language Settings",themePropertyGridTitle:"Theme Settings",translationLanguages:"Languages",translationDeleteLanguage:"Are you certain you wish to delete all strings for this language?",translationAddLanguage:"Select language to translate",translationShowAllStrings:"All Strings",translationShowUsedStringsOnly:"Used Strings Only",translationShowAllPages:"All Pages",translationNoStrings:"No strings to translate. Please change the filter.",translationExportToSCVButton:"Export to CSV",translationImportFromSCVButton:"Import from CSV",translateUsigAI:"Auto-translate All",translateUsigAIFrom:"Translate from: ",translationDialogTitle:"Untranslated strings",translationMergeLocaleWithDefault:"Merge {0} with default locale",translationPlaceHolder:"Translation...",translationSource:"Source: ",translationTarget:"Target: ",themeExportButton:"Export",themeImportButton:"Import",surveyJsonExportButton:"Export",surveyJsonImportButton:"Import",surveyJsonCopyButton:"Copy to clipboard",themeResetButton:"Reset theme settings to default",themeResetConfirmation:"Do you really want to reset the theme? All your customizations will be lost.",themeResetConfirmationOk:"Yes, reset the theme",bold:"Bold",italic:"Italic",underline:"Underline",addNewQuestion:"Add Question",selectPage:"Select page...",carryForwardChoicesCopied:"Choices are copied from",choicesLoadedFromWebText:"Choices are loaded from a web service.",choicesLoadedFromWebLinkText:"Go to settings",choicesLoadedFromWebPreviewTitle:"Preview of loaded choice options",htmlPlaceHolder:"HTML content will be here.",panelPlaceHolder:"Drop a question from the toolbox here.",surveyPlaceHolder:"The survey is empty. Drag an element from the toolbox or click the button below.",pagePlaceHolder:"The page is empty. Drag an element from the toolbox or click the button below.",imagePlaceHolder:"Drag and drop an image here or click the button below and choose an image to upload",surveyPlaceHolderMobile:'Click the "Add Question" button below to start creating your form.',pagePlaceHolderMobile:'Click the "Add Question" button below to add a new element to the page.',panelPlaceHolderMobile:'Click the "Add Question" button below to add a new element to the panel.',imagePlaceHolderMobile:"Click the button below and choose an image to upload",imageChooseImage:"Choose Image",addNewTypeQuestion:"Add {0}",chooseLogoPlaceholder:"[LOGO]",choices_Item:"Item ",selectFile:"Select a file",removeFile:"Remove the file",lg:{addNewItem:"Add New Rule",empty_tab:"Create a rule to customize the flow of the survey.",page_visibilityName:"Show/hide page",page_enableName:"Enable/disable page",page_requireName:"Make page required",panel_visibilityName:"Show/hide panel",panel_enableName:"Enable/disable panel",panel_requireName:"Make panel required",question_visibilityName:"Show/hide question",question_enableName:"Enable/disable question",question_requireName:"Make question required",question_resetValueName:"Reset question value",question_setValueName:"Set question value",column_visibilityName:"Show/hide column",column_enableName:"Enable/disable column",column_requireName:"Make column required",column_resetValueName:"Reset column value",column_setValueName:"Set column value",trigger_completeName:"Complete survey",trigger_setvalueName:"Set answer",trigger_copyvalueName:"Copy answer",trigger_skipName:"Skip to question",trigger_runExpressionName:"Run expression",completedHtmlOnConditionName:'Set "Thank You" page markup',page_visibilityDescription:"Make the page visible when the logical expression evaluates to true. Otherwise, keep the page invisible.",panel_visibilityDescription:"Make the page visible when the logical expression evaluates to true. Otherwise, keep the panel invisible.",panel_enableDescription:"Make the panel and all elements inside it enabled when the logical expression evaluates to true. Otherwise, keep them disabled.",question_visibilityDescription:"Make the question visible when the logical expression evaluates to true. Otherwise, keep the question invisible.",question_enableDescription:"Make the question enabled when the logical expression evaluates to true. Otherwise, keep the question disabled.",question_requireDescription:"Question becomes required when the logical expression evaluates to true.",trigger_completeDescription:'When the logical expression evaluates to true, the survey ends, and the respondent sees the "Thank you" page.',trigger_setvalueDescription:"When question values used in the logical expression are changed, and the expression evaluates to true, the specified value is assigned to the selected question.",trigger_copyvalueDescription:"When question values used in the logical expression are changed, and the expression evaluates to true, the value of the selected question is copied to another question.",trigger_skipDescription:"When the logical expression evaluates to true, the survey focuses/jumps to the selected question.",trigger_runExpressionDescription:"When the logical expression evaluates to true, the survey evaluates another expression. Optionally, the result of the latter expression can be assigned as a value to the selected question",completedHtmlOnConditionDescription:'If the logical expression evaluates to true, the "Thank You" page displays the specified content.',itemExpressionText:"When expression: '{0}' returns true",itemEmptyExpressionText:"New rule",page_visibilityText:"make page {0} visible",panel_visibilityText:"make panel {0} visible",panel_enableText:"make panel {0} enable",question_visibilityText:"make question {0} visible",question_enableText:"make question {0} enable",question_requireText:"make question {0} required",question_resetValueText:"reset value for question: {0}",question_setValueText:"assign value: {1} to question: {0}",column_visibilityText:"make column {0} of question {1} visible",column_enableText:"make column {0} of question {1} enable",column_requireText:"make column {0} of question {1} required",column_resetValueText:"reset cell value for column: {0}",column_setValueText:"assign cell value: {1} to column: {0}",setValueExpressionPlaceholder:"An expression whose result will be assigned to the target question.",trigger_completeText:"survey becomes completed",trigger_setvalueText:"set into question: {0} value {1}",trigger_setvalueEmptyText:"clear question value: {0}",trigger_copyvalueText:"copy into question: {0} value from question {1}",trigger_skipText:"survey skip to the question {0}",trigger_runExpressionText1:"run expression: '{0}'",trigger_runExpressionText2:" and set its result into question: {0}",completedHtmlOnConditionText:'show custom text for the "Thank You" page.',showAllQuestions:"All Questions",showAllActionTypes:"All Action Types",conditions:"Condition(s)",actions:"Action(s)",expressionEditorTitle:"Define condition(s)",actionsEditorTitle:"Define action(s)",deleteAction:"Delete Action",addNewAction:"Add Action",selectedActionCaption:"Select action...",expressionInvalid:"The logic expression is empty or invalid. Please correct it.",noActionError:"Please add at least one action.",actionInvalid:"Please fix issues in your action(s).",uncompletedRule_title:"Logical rules are incomplete",uncompletedRule_text:"You have not completed some of the logical rules. If you leave the tab now, the changes will be lost. Do you still want to leave the tab without completing the changes?",uncompletedRule_apply:"Yes",uncompletedRule_cancel:"No, I want to complete the rules"}},pe:{panel:{name:"Panel name",title:"Panel title",description:"Panel description",visibleIf:"Make the panel visible if",requiredIf:"Make the panel required if",questionsOrder:"Question order within the panel",page:"Move the panel to page",startWithNewLine:"Display the panel on a new line",state:"Panel collapse state",width:"Inline panel width",minWidth:"Minimum panel width",maxWidth:"Maximum panel width",showNumber:"Number panels"},paneldynamic:{name:"Panel name",title:"Panel title",description:"Panel description",visibleIf:"Make the panel visible if",requiredIf:"Make the panel required if",page:"Move the panel to page",startWithNewLine:"Display the panel on a new line",state:"Panel collapse state",width:"Inline panel width",minWidth:"Minimum panel width",maxWidth:"Maximum panel width",confirmDelete:"Confirm panel deletion",templateDescription:"Panel description pattern",templateTitle:"Panel title pattern",noEntriesText:"Empty panel text",templateTabTitle:"Tab title pattern",templateVisibleIf:"Make an individual panel visible if",hideNumber:"Hide the panel number",titleLocation:"Panel title alignment",descriptionLocation:"Panel description alignment",templateTitleLocation:"Question title alignment",templateErrorLocation:"Error message alignment",newPanelPosition:"New panel location",keyName:"Prevent duplicate responses in the following question"},question:{name:"Question name",title:"Question title",description:"Question description",visibleIf:"Make the question visible if",requiredIf:"Make the question required if",page:"Move the question to page",state:"Question box collapse state",hideNumber:"Hide the question number",titleLocation:"Question title alignment",descriptionLocation:"Question description alignment",errorLocation:"Error message alignment",indent:"Increase the inner indent",width:"Inline question width",minWidth:"Minimum question width",maxWidth:"Maximum question width",textUpdateMode:"Update input field value"},signaturepad:{signatureWidth:"Signature area width",signatureHeight:"Signature area height",signatureAutoScaleEnabled:"Auto-scale the signature area",showPlaceholder:"Show a placeholder within signature area",placeholder:"Placeholder text",placeholderReadOnly:"Placeholder text in read-only or preview mode",allowClear:"Show the Clear button within signature area",penMinWidth:"Minimum stroke width",penMaxWidth:"Maximum stroke width",penColor:"Stroke color"},comment:{rows:"Input field height (in lines)"},showQuestionNumbers:"Question numbering",questionStartIndex:"Question indexing type",expression:{name:"Expression name",title:"Expression title",description:"Expression description",expression:"Expression"},trigger:{expression:"Expression"},calculatedvalue:{expression:"Expression"},survey:{title:"Survey title",description:"Survey description"},page:{name:"Page name",title:"Page title",description:"Page description",visibleIf:"Make the page visible if",requiredIf:"Make the page required if",maxTimeToFinish:"Time limit to complete the page",questionsOrder:"Question order on the page"},matrixdropdowncolumn:{name:"Column name",title:"Column title",isUnique:"Prevent duplicate responses",width:"Column width",minWidth:"Minimum column width",rows:"Input field height (in lines)",visibleIf:"Make the column visible if",requiredIf:"Make the column required if",showInMultipleColumns:"Each option in a separate column"},multipletextitem:{name:"Name",title:"Title"},masksettings:{saveMaskedValue:"Save masked value in survey results"},patternmask:{pattern:"Value pattern"},datetimemask:{min:"Minimum value",max:"Maximum value"},numericmask:{allowNegativeValues:"Allow negative values",thousandsSeparator:"Thousands separator",decimalSeparator:"Decimal separator",precision:"Value precision",min:"Minimum value",max:"Maximum value"},currencymask:{prefix:"Currency prefix",suffix:"Currency suffix"},imageHeight:"Display area height",imageWidth:"Display area width",valueName:"Join identifier",rateDescriptionLocation:"Label alignment",size:"Input field width (in characters)",cellErrorLocation:"Cell error message alignment",apply:"Apply",ok:"OK",save:"Save",clear:"Clear",saveTooltip:"Save",cancel:"Cancel",set:"Set",reset:"Reset",change:"Change",refresh:"Refresh",close:"Close",delete:"Delete",add:"Add",addNew:"Add New",addItem:"Click to add an item...",removeItem:"Click to remove the item...",dragItem:"Drag the item",addOther:"Other",addSelectAll:"Select All",addNone:"None",removeAll:"Remove All",edit:"Edit",back:"Return without saving",backTooltip:"Return without saving",saveAndBack:"Save and return",saveAndBackTooltip:"Save and return",doneEditing:"Done",editChoices:"Edit Choices",showChoices:"Show Choices",move:"Move",empty:"<empty>",emptyValue:"Value is empty",fastEntry:"Manual Entry",fastEntryNonUniqueError:"Value '{0}' is not unique",fastEntryChoicesCountError:"Please limit the number of items from {0} to {1}",fastEntryChoicesMinCountError:"Please enter at least {0} items",fastEntryPlaceholder:"Enter the list of choice options and their IDs in the following format:\n\nid|option\n\nA choice option ID is not visible to respondents and can be used in conditional rules.",formEntry:"Form Entry",testService:"Test the service",itemSelectorEmpty:"Please select the element",conditionActionEmpty:"Please select the action",conditionSelectQuestion:"Select a question...",conditionSelectPage:"Select a page...",conditionSelectPanel:"Select a panel...",conditionValueQuestionTitle:"Please enter/select the value",aceEditorHelp:"Press ctrl+space to get expression completion hint",aceEditorRowTitle:"Current row",aceEditorPanelTitle:"Current panel",showMore:"For more details please check the documentation",assistantTitle:"Available questions",cellsEmptyRowsColumns:"There is should be at least one column or row",showPreviewBeforeComplete:"Review before submit",overridingPropertyPrefix:"Enabled by a condition",resetToDefaultCaption:"Reset",propertyIsEmpty:"Please enter a value",propertyIsNoUnique:"Please enter a unique value",propertyNameIsNotUnique:"Please enter a unique name",propertyNameIsIncorrect:'Do not use reserved words: "item", "choice", "panel", "row".',listIsEmpty:"You don't have any items yet","listIsEmpty@choices":"You don't have any choices yet","listIsEmpty@columns":"You don't have any columns yet","listIsEmpty@rows":"You don't have any rows yet","listIsEmpty@validators":"You don't have any validation rules yet","listIsEmpty@calculatedValues":"You don't have any custom variables yet","listIsEmpty@triggers":"You don't have any triggers yet","listIsEmpty@navigateToUrlOnCondition":"You don't have any links yet","addNew@choices":"Add new choice","addNew@columns":"Add new column","addNew@rows":"Add new row","addNew@validators":"Add new rule","addNew@calculatedValues":"Add new variable","addNew@triggers":"Add new trigger","addNew@navigateToUrlOnCondition":"Add new URL",expressionIsEmpty:"Expression is empty",value:"Value",text:"Text",rowid:"Row ID",imageLink:"Image or video file URL",columnEdit:"Edit column: {0}",itemEdit:"Edit item: {0}",url:"URL",path:"Path to data",choicesbyurl:{url:"Web service URL",valueName:"Get value to store from the following property"},titleName:"Get value to display from the following property",imageLinkName:"Get file URLs from the following property",allowEmptyResponse:"Accept empty response",titlePlaceholder:"Title",surveyTitlePlaceholder:"Survey Title",pageTitlePlaceholder:"Page {num}",descriptionPlaceholder:"Description",surveyDescriptionPlaceholder:"Description",pageDescriptionPlaceholder:"Description",textWrapEnabled:"Wrap choices",showOtherItem:'Enable the "Other" option',otherText:'Rename the "Other" option',showNoneItem:'Enable the "None" option',showRefuseItem:'Enable the "Refuse to Answer" option',showDontKnowItem:'Enable the "Don\'t Know" option',noneText:'Rename the "None" option',showSelectAllItem:'Enable the "Select All" option',selectAllText:'Rename the "Select All" option',choicesMin:"Minimum value for auto-generated items",choicesMax:"Maximum value for auto-generated items",choicesStep:"Step value for auto-generated items",name:"Name",title:"Title",cellType:"Cell input type",colCount:"Column count",choicesOrder:"Choice order",visible:"Visible",isRequired:"Required",markRequired:"Mark as required",removeRequiredMark:"Remove the required mark",isAllRowRequired:"Require an answer in each row",eachRowUnique:"Prevent duplicate responses in rows",requiredErrorText:"Error message for required questions",startWithNewLine:"Display the question on a new line",rows:"Rows",cols:"Columns",placeholder:"Placeholder text within input field",showPreview:"Show preview area",storeDataAsText:"Store file content in JSON result as text",maxSize:"Maximum file size (in bytes)",rowCount:"Row count",columnLayout:"Columns layout",addRowLocation:'"Add Row" button alignment',transposeData:"Transpose rows to columns",addRowText:'"Add Row" button text',removeRowText:'"Remove Row" button text',rateMin:"Minimum rating value",rateMax:"Maximum rating value",rateStep:"Step value",minRateDescription:"Minimum value label",maxRateDescription:"Maximum value label",inputType:"Input type",optionsCaption:"Option placeholder",defaultValue:"Default Answer",cellsDefaultRow:"Default texts",surveyEditorTitle:"Edit survey settings",qEditorTitle:"Edit: {0}",maxLength:"Maximum character limit",buildExpression:"Build",editExpression:"Edit",and:"and",or:"or",remove:"Remove",addCondition:"Add Condition",emptyLogicPopupMessage:"Select a question to start configuring conditions.",if:"If",then:"then",setToName:"Target question",fromName:"Question to copy answer from",gotoName:"Question to skip to",ruleIsNotSet:"Rule is incorrect",includeIntoResult:"Add to the survey results",showTitle:"Make the title and description visible",expandCollapseTitle:"Expand/collapse title",locale:"Select a survey language",simulator:"Select device type",landscapeOrientation:"Switch to landscape orientation",portraitOrientation:"Switch to portrait orientation",mode:"Survey display mode",clearInvisibleValues:"Clear hidden question values",cookieName:"Limit to one response",sendResultOnPageNext:"Auto-save survey progress on page change",storeOthersAsComment:'Save the "Other" option value as a separate property',showPageTitles:"Show page titles",showPageNumbers:"Show page numbers",pagePrevText:'"Previous Page" button text',pageNextText:'"Next Page" button text',completeText:'"Complete Survey" button text',previewText:'"Review Answers" button text',editText:'"Edit Answer" button text',startSurveyText:'"Start Survey" button text',showNavigationButtons:"Show/hide navigation buttons",showPrevButton:'Show the "Previous Page" button',firstPageIsStarted:"First page is a start page",showCompletedPage:'Show the "Thank You" page',goNextPageAutomatic:"Auto-advance to the next page",allowCompleteSurveyAutomatic:"Complete the survey automatically",showProgressBar:"Progress bar alignment",questionTitleLocation:"Question title alignment",requiredText:"Required symbol(s)",questionTitleTemplate:"Question title template, default is: '{no}. {require} {title}'",questionErrorLocation:"Error message alignment",focusFirstQuestionAutomatic:"Focus first question on a new page",questionsOrder:"Question order",maxTimeToFinish:"Time limit to complete the survey",maxTimeToFinishPage:"Time limit to complete one page",showTimerPanel:"Timer alignment",showTimerPanelMode:"Timer mode",renderMode:"Panel display mode",allowAddPanel:"Enable panel addition",allowRemovePanel:"Enable panel removal",panelAddText:'"Add Panel" button text',panelRemoveText:'"Remove Panel" button text',isSinglePage:"Show all elements on one page",html:"HTML markup",setValue:"Answer",dataFormat:"Storage format",allowAddRows:"Enable row addition",allowRemoveRows:"Enable row removal",allowRowsDragAndDrop:"Enable row reordering",responsiveImageSizeHelp:"Does not apply if you specify the exact display area width or height.",minImageWidth:"Minimum display area width",maxImageWidth:"Maximum display area width",minImageHeight:"Minimum display area height",maxImageHeight:"Maximum display area height",minValue:"Minimum value",maxValue:"Maximum value",minLength:"Minimum length (in characters)",allowDigits:"Allow digits",minCount:"Minimum count",maxCount:"Maximum count",regex:"Regular expression",surveyvalidator:{text:"Error message",expression:"Validation expression"},totalText:"Total row header",totalType:"Aggregation method",totalExpression:"Total value expression",totalDisplayStyle:"Total value display format",totalCurrency:"Currency",totalFormat:"Formatted string",logo:"Survey logo",questionsOnPageMode:"Survey layout",maxTextLength:"Restrict answer length",maxOthersLength:"Restrict comment length",autoGrowComment:"Auto-expand text areas",allowResizeComment:"Allow users to resize text areas",textUpdateMode:"Update input field values",maskType:"Input mask type",maskTypes:{none:"None",patternmask:"Pattern",numericmask:"Numeric",datetimemask:"Date and Time",currencymask:"Currency"},focusOnFirstError:"Set focus on the first invalid answer",checkErrorsMode:"Run validation",navigateToUrl:"Redirect to an external link after submission",navigateToUrlOnCondition:"Dynamic external link",completedBeforeHtml:"Markup to show if the user already filled out this survey",completedHtml:'"Thank You" page markup',completedHtmlOnCondition:'Dynamic "Thank You" page markup',loadingHtml:"Markup to show while survey model is loading",commentText:"Comment area text",autocomplete:"Autocomplete type",labelTrue:'Label for "True"',labelFalse:'Label for "False"',allowClear:"Show the Clear button",searchMode:"Search Mode",displayStyle:"Display format",format:"Formatted string",maximumFractionDigits:"Maximum fractional digits",minimumFractionDigits:"Minimum fractional digits",useGrouping:"Display grouping separators",allowMultiple:"Enable multiple file upload",allowImagesPreview:"Preview uploaded images",acceptedTypes:"Accepted file types",waitForUpload:"Wait for upload to complete",needConfirmRemoveFile:"Confirm file deletion",detailPanelMode:"Row expansion alignment",minRowCount:"Minimum row count",maxRowCount:"Maximum row count",confirmDelete:"Confirm row deletion",confirmDeleteText:"Confirmation message",panelCount:"Initial panel count",minPanelCount:"Minimum panel count",maxPanelCount:"Maximum panel count",panelsState:"Inner panel collapse state",panelPrevText:'"Previous Panel" button text',panelNextText:'"Next Panel" button text',showRangeInProgress:"Show the progress bar",panelRemoveButtonLocation:'"Remove Panel" button alignment',hideIfRowsEmpty:"Hide the question if it has no rows",hideColumnsIfEmpty:"Hide columns if there are no rows",rateValues:"Custom rating values",rateCount:"Rating count",autoGenerate:"Rating configuration",hideIfChoicesEmpty:"Hide the question if it has no choices",minWidth:"Minimum width",maxWidth:"Maximum width",width:"Width",showHeader:"Show column headers",horizontalScroll:"Show horizontal scrollbar",columnMinWidth:"Minimum column width",rowTitleWidth:"Row header width",valueTrue:'Value to store when "True" is selected',valueFalse:'Value to store when "False" is selected',minErrorText:'"Value is below minimum" error message',maxErrorText:'"Value exceeds maximum" error message',otherErrorText:'"Empty comment" error message',keyDuplicationError:"Error message for duplicate responses",minSelectedChoices:"Minimum choices to select",maxSelectedChoices:"Maximum choices to select",showClearButton:"Show the Clear button",logoWidth:"Logo width",logoHeight:"Logo height",readOnly:"Read-only",enableIf:"Disable the read-only mode if",emptyRowsText:'"No rows" message',separateSpecialChoices:"Separate special choices",choicesFromQuestion:"Copy choices from the following question",choicesFromQuestionMode:"Which choice options to copy",progressBarShowPageTitles:"Display page titles in progress bar",progressBarShowPageNumbers:"Display page numbers in progress bar",showCommentArea:"Add a comment box",commentPlaceholder:"Placeholder text for the comment box",displayRateDescriptionsAsExtremeItems:"Show the labels as extreme values",rowsOrder:"Row order",columnsLayout:"Column layout",columnColCount:"Nested column count",correctAnswer:"Correct Answer",defaultPanelValue:"Default Values",cells:"Cell Texts",keyName:"Prevent duplicate responses in the following column",itemvalue:{visibleIf:"Make the option visible if",enableIf:"Make the option selectable if"},"itemvalue@rows":{visibleIf:"Make the row visible if",enableIf:"Make the row editable if"},imageitemvalue:{text:"Alt text"},logoPosition:"Logo position",addLogo:"Add logo...",changeLogo:"Change logo...",logoPositions:{none:"Remove logo",left:"Left",right:"Right",top:"On the top",bottom:"In the bottom"},tabs:{panel:{layout:"Panel Layout"},general:"General",fileOptions:"Options",html:"HTML Editor",columns:"Columns",rows:"Rows",choices:"Choice Options",items:"Items",visibleIf:"Visible If",enableIf:"Editable If",requiredIf:"Required If",rateValues:"Rating Values",choicesByUrl:"Choices from a Web Service",matrixChoices:"Default Choices",multipleTextItems:"Text Inputs",numbering:"Numbering",validators:"Validators",navigation:"Navigation",question:"Question Settings",pages:"Pages",timer:"Quiz Mode",calculatedValues:"Calculated Values",triggers:"Triggers",templateTitle:"Title template",totals:"Totals",logic:"Conditions",mask:"Input Mask Settings",layout:{panel:"Panel Layout",question:"Layout",base:"Layout"},data:"Data",validation:"Validation",cells:"Individual Cell Texts",showOnCompleted:'"Thank You" Page',logo:"Logo in the Survey Header",slider:"Slider",expression:"Expression",questionSettings:"Question Settings",header:"Header",background:"Background",appearance:"Appearance",others:"Others"},editProperty:"Edit property '{0}'",items:"Items",choicesVisibleIf:"Make choices visible if",choicesEnableIf:"Make choices selectable if",columnsEnableIf:"Make columns visible if",rowsEnableIf:"Make rows visible if",innerIndent:"Increase the inner indent",defaultValueFromLastRow:"Use answers from the last row as default",defaultValueFromLastPanel:"Use answers from the last panel as default",enterNewValue:"Please enter a value.",noquestions:"There are no questions in the survey.",createtrigger:"Please create a trigger",titleKeyboardAdornerTip:"Press enter button to edit",keyboardAdornerTip:"Press enter button to edit item, press delete button to delete item, press alt plus arrow up or arrow down to move item",triggerOn:"On ",triggerMakePagesVisible:"Make pages visible",triggerMakeQuestionsVisible:"Make elements visible",triggerCompleteText:"Complete the survey if successful.",triggerNotSet:"The trigger is not set",triggerRunIf:"Run if",triggerSetToName:"Change value of: ",triggerFromName:"Copy value from: ",triggerRunExpression:"Run this Expression",triggerSetValue:"to: ",triggerGotoName:"Go to the question",triggerIsVariable:"Do not put the variable into the survey result.",triggerRunExpressionEmpty:"Please enter a valid expression",emptyExpressionPlaceHolder:"Type expression here...",noFile:"No file chosen",clearIfInvisible:"Clear hidden question values",valuePropertyName:"Store values in the following property",searchEnabled:"Enable search-as-you-type",hideSelectedItems:"Hide selected items",closeOnSelect:"Collapse the dropdown upon selection",verticalAlign:"Vertical alignment within cells",alternateRows:"Alternate row colors",columnsVisibleIf:"Make columns visible if",rowsVisibleIf:"Make rows visible if",otherPlaceholder:"Placeholder text for the comment box",filePlaceholder:"Placeholder text for Local file",photoPlaceholder:"Placeholder text for Camera",fileOrPhotoPlaceholder:"Placeholder text for Local file or Camera",rateType:"Rating icon",url_placeholder:"Ex.: https://api.example.com/books",path_placeholder:"Ex.: categories.fiction",questionStartIndex_placeholder:"Ex.: a)",width_placeholder:"Ex.: 6in",minWidth_placeholder:"Ex.: 600px",maxWidth_placeholder:"Ex.: 50%",imageHeight_placeholder:"auto",imageWidth_placeholder:"auto",theme:{themeName:"Theme",isPanelless:"Question appearance",editorPanel:"Background and corner radius",questionPanel:"Background and corner radius",primaryColor:"Accent color",panelBackgroundTransparency:"Panel background opacity",questionBackgroundTransparency:"Question background opacity",fontSize:"Font size",scale:"Scale",cornerRadius:"Corner radius",pageTitle:"Title font",pageDescription:"Description font",questionTitle:"Title font",questionDescription:"Description font",editorFont:"Font",backgroundOpacity:"Opacity","--sjs-font-family":"Font family","--sjs-general-backcolor-dim":"Background color","--sjs-primary-backcolor":"Accent background","--sjs-primary-forecolor":"Accent foreground","--sjs-shadow-small":"Shadow effects","--sjs-shadow-inner":"Shadow effects","--sjs-border-default":"Colors"},"header@header":{headerView:"View",logoPosition:"Logo position",surveyTitle:"Survey title font",surveyDescription:"Survey description font",headerTitle:"Survey title font",headerDescription:"Survey description font",inheritWidthFrom:"Content area width",textAreaWidth:"Text width",backgroundColorSwitch:"Background color",backgroundImage:"Background image",backgroundImageOpacity:"Opacity",overlapEnabled:"Overlap",logoPositionX:"Logo position",titlePositionX:"Title position",descriptionPositionX:"Description position"}},pv:{true:"true",false:"false",file:"Local file",camera:"Camera","file-camera":"Local file or Camera",inherit:"Inherit",show:"Visible",hide:"Hidden",default:"Inherit",initial:"Initial",random:"Random",collapsed:"Collapsed",expanded:"Expanded",none:"None",asc:"Ascending",desc:"Descending",indeterminate:"Indeterminate",selected:"Selected",unselected:"Unselected",decimal:"decimal",currency:"currency",percent:"percent",firstExpanded:"First panel is expanded",off:"Hide question numbers",list:"List",progressTop:"Panel navigator + Progress bar at the top",progressBottom:"Panel navigator + Progress bar at the bottom",progressTopBottom:"Panel navigator + Progress bar at the top and bottom",tab:"Tabs",horizontal:"Horizontal",vertical:"Vertical",top:"Top",bottom:"Bottom",topBottom:"Top and bottom",both:"Both",left:"Left",right:"Right",center:"Center",leftRight:"Left and right",middle:"Middle",color:"color",date:"date",datetime:"datetime","datetime-local":"datetime-local",email:"email",month:"month",number:"number",password:"password",range:"range",tel:"tel",text:"text",time:"time",url:"url",week:"week",hidden:"Hidden",edit:"Editable",display:"Read-only",contain:"Contain",cover:"Cover",fill:"Fill",next:"Next",last:"Last",onComplete:"Upon survey completion",onHidden:"When question gets hidden",onHiddenContainer:"When question or its panel/page gets hidden",clearInvisibleValues:{none:"Never"},clearIfInvisible:{none:"Never"},inputType:{color:"Color",date:"Date","datetime-local":"Date and Time",email:"Email",month:"Month",number:"Number",password:"Password",range:"Range",tel:"Phone Number",text:"Text",time:"Time",url:"URL",week:"Week"},all:"All",page:"Page",survey:"Survey",onNextPage:"When switching to the next page",onValueChanged:"After an answer is changed",onValueChanging:"Before an answer is changed",questionsOnPageMode:{standard:"Original structure",singlePage:"Show all questions on one page",questionPerPage:"Show single question per page"},noPreview:"No preview",showAllQuestions:"Show all questions",showAnsweredQuestions:"Show answered questions only",pages:"Completed pages",questions:"Answered questions",requiredQuestions:"Answered required questions",correctQuestions:"Valid answers",buttons:"Completed pages (button UI)",underInput:"Under the input field",underTitle:"Under the question title",onBlur:"On lost focus",onTyping:"While typing",underRow:"Under the row",underRowSingle:"Under the row, display one row expansion only",auto:"Auto",showNavigationButtons:{none:"Hidden"},showTimerPanel:{none:"Hidden"},showTimerPanelMode:{all:"Both"},addRowLocation:{default:"Based on matrix layout"},panelsState:{default:"Locked",collapsed:"Collapse all",expanded:"Expand all",firstExpanded:"First expanded"},widthMode:{static:"Static",responsive:"Responsive"},contentMode:{image:"Image",video:"Video",youtube:"YouTube"},displayMode:{buttons:"Buttons",dropdown:"Dropdown"},rateColorMode:{default:"Default",scale:"Scale"},scaleColorMode:{monochrome:"Monochrome",colored:"Colored"},autoGenerate:{true:"Auto-generate",false:"Manual"},rateType:{labels:"Labels",stars:"Stars",smileys:"Smileys"},state:{default:"Locked"},showQuestionNumbers:{default:"Auto-numbering",on:"Auto-numbering",onPage:"Reset on each page",onpanel:"Reset on each panel",onPanel:"Reset on each panel",onSurvey:"Continue across the survey",off:"No numbering"},descriptionLocation:{underTitle:"Under the question title",underInput:"Under the input field"},selectToRankAreasLayout:{horizontal:"Next to choices",vertical:"Above choices"},displayStyle:{decimal:"Decimal",currency:"Currency",percent:"Percentage",date:"Date"},totalDisplayStyle:{decimal:"Decimal",currency:"Currency",percent:"Percentage",date:"Date"},rowsOrder:{initial:"Original"},questionsOrder:{initial:"Original"},showProgressBar:{off:"Hidden",topbottom:"Top and bottom",aboveheader:"Above the header",belowheader:"Below the header"},sum:"Sum",count:"Count",min:"Min",max:"Max",avg:"Avg",searchMode:{contains:"Contains",startsWith:"Starts with"},backgroundImageFit:{auto:"Auto",cover:"Cover",contain:"Contain",fill:"Stretch",tile:"Tile"},backgroundImageAttachment:{fixed:"Fixed",scroll:"Scroll"},headerView:{basic:"Basic",advanced:"Advanced"},inheritWidthFrom:{survey:"Same as survey",container:"Fit to container"},backgroundColorSwitch:{none:"None",accentColor:"Accent color",custom:"Custom"},colorPalette:{light:"Light",dark:"Dark"},isPanelless:{false:"Default",true:"Without Panels"}},op:{empty:"Empty",notempty:"Not empty",equal:"Equals",notequal:"Does not equal",contains:"Contains",notcontains:"Does not contain",anyof:"Any of",allof:"All of",greater:"Greater than",less:"Less than",greaterorequal:"Greater than or equal to",lessorequal:"Less than or equal to",and:"and",or:"or"},ew:{angular:"Use Angular version",jquery:"Use jQuery version",knockout:"Use Knockout version",react:"Use React version",vue:"Use Vue version",bootstrap:"For bootstrap framework",modern:"Modern theme",default:"Default theme",orange:"Orange theme",darkblue:"Darkblue theme",darkrose:"Darkrose theme",stone:"Stone theme",winter:"Winter theme",winterstone:"Winter-Stone theme",showOnPage:"Show survey on a page",showInWindow:"Show survey in a window",loadFromServer:"Load Survey JSON from server",titleScript:"Scripts and styles",titleHtml:"HTML",titleJavaScript:"JavaScript"},ts:{selectPage:"Select the page to test it",showInvisibleElements:"Show invisible elements",hideInvisibleElements:"Hide invisible elements"},validators:{answercountvalidator:"Answer count",emailvalidator:"Email",expressionvalidator:"Expression",numericvalidator:"Number",regexvalidator:"Regex",textvalidator:"Text"},triggers:{completetrigger:"Complete survey",setvaluetrigger:"Set answer",copyvaluetrigger:"Copy answer",skiptrigger:"Skip to question",runexpressiontrigger:"Run expression",visibletrigger:"change visibility (deprecated)"},peplaceholder:{patternmask:{pattern:"Ex.: +1(999)-999-99-99"},datetimemask:{pattern:"Ex.: mm/dd/yyyy HH:MM:ss"},currencymask:{prefix:"Ex.: $",suffix:"Ex.: USD"}},pehelp:{panel:{name:"A panel ID that is not visible to respondents.",description:"Type a panel subtitle.",visibleIf:"Use the magic wand icon to set a conditional rule that determines panel visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the panel.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey submission unless at least one nested question has an answer.",questionTitleLocation:'Applies to all questions within this panel. If you want to override this setting, define title alignment rules for individual questions. The "Inherit" option applies the page-level (if set) or survey-level setting ("Top" by default).',questionErrorLocation:'Sets the location of an error message in relation to all questions within the panel. The "Inherit" option applies the page-level (if set) or survey-level setting.',questionsOrder:'Keeps the original order of questions or randomizes them. The "Inherit" option applies the page-level (if set) or survey-level setting.',page:"Repositions the panel to the end of a selected page.",innerIndent:"Adds space or margin between the panel content and the left border of the panel box.",startWithNewLine:"Unselect to display the panel in one line with the previous question or panel. The setting doesn't apply if the panel is the first element in your form.",state:'Choose from: "Expanded" - the panel is displayed in full and can be collapsed; "Collapsed" - the panel displays only the title and description and can be expanded; "Locked" - the panel is displayed in full and cannot be collapsed.',width:"Sets the width of the panel in proportion to other survey elements in the same line. Accepts CSS values (px, %, in, pt, etc.)."},paneldynamic:{name:"A panel ID that is not visible to respondents.",description:"Type a panel subtitle.",visibleIf:"Use the magic wand icon to set a conditional rule that determines panel visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the panel.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey submission unless at least one nested question has an answer.",templateTitleLocation:'Applies to all questions within this panel. If you want to override this setting, define title alignment rules for individual questions. The "Inherit" option applies the page-level (if set) or survey-level setting ("Top" by default).',templateErrorLocation:'Sets the location of an error message in relation to a question with invalid input. Choose between: "Top" - an error text is placed at the top of the question box; "Bottom" - an error text is placed at the bottom of the question box. The "Inherit" option applies the page-level (if set) or survey-level setting ("Top" by default).',errorLocation:'Sets the location of an error message in relation to all questions within the panel. The "Inherit" option applies the page-level (if set) or survey-level setting.',page:"Repositions the panel to the end of a selected page.",innerIndent:"Adds space or margin between the panel content and the left border of the panel box.",startWithNewLine:"Unselect to display the panel in one line with the previous question or panel. The setting doesn't apply if the panel is the first element in your form.",state:'Choose from: "Expanded" - the panel is displayed in full and can be collapsed; "Collapsed" - the panel displays only the title and description and can be expanded; "Locked" - the panel is displayed in full and cannot be collapsed.',width:"Sets the width of the panel in proportion to other survey elements in the same line. Accepts CSS values (px, %, in, pt, etc.).",templateTitle:"Type in a template for dynamic panel titles. Use {panelIndex} for the panel's general position and {visiblePanelIndex} for its order among visible panels. Insert these placeholders into the pattern to add automatic numbering.",templateTabTitle:"Type in a template for tab titles. Use {panelIndex} for a panel's general position and {visiblePanelIndex} for its order among visible panels. Insert these placeholders into the pattern to add automatic numbering.",templateVisibleIf:"This setting allows you to control the visibility of individual panels within the dynamic panel. Use the `{panel}` placeholder to reference the current panel in your expression.",titleLocation:'This setting is automatically inherited by all questions within this panel. If you want to override this setting, define title alignment rules for individual questions. The "Inherit" option applies the page-level (if set) or survey-level setting ("Top" by default).',descriptionLocation:'The "Inherit" option applies the page-level (if set) or survey-level setting ("Under the panel title" by default).',newPanelPosition:'Defines the position of a newly added panel. By default, new panels are added to the end. Select "Next" to insert a new panel after the current one.',defaultValueFromLastPanel:"Duplicates answers from the last panel and assigns them to the next added dynamic panel.",keyName:"Reference a question name to require a user to provide a unique response for this question in each panel."},defaultValueExpression:"This setting allows you to assign a default answer value based on an expression. The expression can include basic calculations - `{q1_id} + {q2_id}`, Boolean expressions, such as `{age} > 60`, and functions: `iif()`, `today()`, `age()`, `min()`, `max()`, `avg()`, etc. The value determined by this expression serves as the initial default value that can be overridden by a respondent's manual input.",resetValueIf:'Use the magic wand icon to set a conditional rule that determines when a respondent\'s input is reset to the value based on the "Default value expression" or "Set value expression" or to the "Default answer" value (if either is set).',setValueIf:'Use the magic wand icon to set a conditional rule that determines when to run the "Set value expression" and dynamically assign the resulting value as a response.',setValueExpression:'Specify an expression that defines the value to be set when the conditions in the "Set value if" rule are met. The expression can include basic calculations - `{q1_id} + {q2_id}`, Boolean expressions, such as `{age} > 60`, and functions: `iif()`, `today()`, `age()`, `min()`, `max()`, `avg()`, etc. The value determined by this expression can be overridden by a respondent\'s manual input.',question:{name:"A question ID that is not visible to respondents.",description:"Type a question subtitle.",visibleIf:"Use the magic wand icon to set a conditional rule that determines question visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the question.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey advancing or submission unless the question received an answer.",startWithNewLine:"Unselect to display the question in one line with the previous question or panel. The setting doesn't apply if the question is the first element in your form.",page:"Repositions the question to the end of a selected page.",state:'Choose from: "Expanded" - the question box is displayed in full and can be collapsed; "Collapsed" - the question box displays only the title and description and can be expanded; "Locked" - the question box is displayed in full and cannot be collapsed.',titleLocation:'Overrides title alignment rules defined on a panel, page or survey level. The "Inherit" option applies any higher-level settings (if set) or survey-level setting ("Top" by default).',descriptionLocation:'The "Inherit" option applies the survey-level setting ("Under the question title" by default).',errorLocation:'Sets the location of an error message in relation to the question with invalid input. Choose between: "Top" - an error text is placed at the top of the question box; "Bottom" - an error text is placed at the bottom of the question box. The "Inherit" option applies the survey-level setting ("Top" by default).',indent:"Adds space or margin between the question content and the left border of the question box.",width:"Sets the width of the question in proportion to other survey elements in the same line. Accepts CSS values (px, %, in, pt, etc.).",surveyvalidator:{expression:"Use the magic wand icon to set a validation rule for the question."},textUpdateMode:'Choose from: "On lost focus" - the value is updated when the input field loses focus; "While typing" - the value is updated in real-time, as users are typing. The "Inherit" option applies the survey-level setting ("On lost focus" by default).',url:"You can use any web service as a data source for multiple-choice questions. To populate choice values, enter the URL of the service providing the data.",searchMode:"A comparison operation used to filter the drop-down list.",textWrapEnabled:"Long texts in choice options will automatically generate line breaks to fit within the drop-down menu. Unselect if you want the texts to clip."},signaturepad:{signatureWidth:"Sets the width of the displayed signature area and the resulting image.",signatureHeight:"Sets the height of the displayed signature area and the resulting image.",signatureAutoScaleEnabled:"Select if you want the signature area to fill all available space within the question box while maintaining the default 3:2 aspect ratio. When custom width and height values are set, the setting will keep the aspect ratio of these dimensions."},file:{imageHeight:"Adjusts the height of the image in the survey results.",imageWidth:"Adjusts the width of the image in the survey results."},image:{contentMode:'The "Auto" option automatically determines the suitable mode for display - Image, Video, or YouTube - based on the source URL provided.'},imagepicker:{imageHeight:"Overrides the minimum and maximum height values.",imageWidth:"Overrides the minimum and maximum width values.",choices:'"Value" serves as an item ID used in conditional rules; "Text" is displayed to respondents.',contentMode:'Choose between "Image" and "Video" to set the content mode of the media selector. If "Image" is selected, ensure that all options provided are image files in the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO. Similarly, if "Video" is selected, ensure that all options are direct links to video files in the following formats: MP4, MOV, WMV, FLV, AVI, MKV. Please note that YouTube links are not supported for video options.'},text:{size:"This setting only resizes the input field and doesn't affect the width of the question box. To limit the accepted input length, go to <b>Validation → Maximum character limit</b>."},comment:{rows:"Sets the number of displayed lines in the input field. If the input takes up more lines, the scroll bar will appear."},survey:{mode:'Choose between: "Editable" - enables respondents to fill out your survey; "Read-only" - disables form editing.'},matrixdropdowncolumn:{name:"A column ID that is not visible to respondents.",isUnique:"When enabled for a column, a respondent is required to provide a unique response for each question within this column.",rows:"Sets the number of displayed lines in the input field. If the input takes up more lines, the scroll bar will appear.",visibleIf:"Use the magic wand icon to set a conditional rule that determines column visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the column.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey submission unless at least one nested question has an answer.",showInMultipleColumns:"When selected, creates an individual column for each choice option."},widthMode:'Choose from: "Static" - sets a fixed width; "Responsive" - makes the survey occupy the full width of the screen; "Auto" - applies either of the two depending on the question types used.',cookieName:"Assign a unique cookie value for your survey. The cookie will be set in a respondent's browser upon survey completion to prevent repetitive survey submissions.",logo:"Paste an image link (no size limits) or click the folder icon to browse a file from your computer (up to 64KB).",logoWidth:"Sets a logo width in CSS units (px, %, in, pt, etc.).",logoHeight:"Sets a logo height in CSS units (px, %, in, pt, etc.).",logoFit:'Choose from: "None" - image maintains its original size; "Contain" - image is resized to fit while maintaining its aspect ratio; "Cover" - image fills the entire box while maintaining its aspect ratio; "Fill" - image is stretched to fill the box without maintaining its aspect ratio.',goNextPageAutomatic:"Select if you want the survey to advance to the next page automatically after a respondent answers all questions on the current page.",allowCompleteSurveyAutomatic:"Select if you want the survey to complete automatically after a respondent answers all questions.",showNavigationButtons:"Sets the visibility and location of navigation buttons on a page.",showProgressBar:'Sets the visibility and location of a progress bar. The "Auto" value displays the progress bar above or below the survey header.',showPreviewBeforeComplete:"Enable the preview page with all or answered questions only.",questionTitleLocation:"Applies to all questions within the survey. This setting can be overridden by title alignment rules at lower levels: panel, page, or question. A lower-level setting will override those on a higher level.",requiredText:"A symbol or a sequence of symbols indicating that an answer is required.",questionStartIndex:"Enter a number or letter with which you want to start numbering.",questionErrorLocation:'Sets the location of an error message in relation to the question with invalid input. Choose between: "Top" - an error text is placed at the top of the question box; "Bottom" - an error text is placed at the bottom of the question box.',focusFirstQuestionAutomatic:"Select if you want the first input field on each page ready for text entry.",questionsOrder:"Keeps the original order of questions or randomizes them. The effect of this setting is only visible in the Preview tab.",maxTextLength:"For text entry questions only.",maxOthersLength:"For question comments only.",autoGrowComment:"Select if you want question comments and Long Text questions to auto-grow in height based on the entered text length.",allowResizeComment:"For question comments and Long Text questions only.",calculatedValues:"Custom variables serve as intermediate or auxiliary variables used in form calculations. They take respondent inputs as source values. Each custom variable has a unique name and an expression it's based on.",includeIntoResult:"Select if you wish the calculated value of the expression to be saved along with survey results.",triggers:'A trigger is an event or condition that is based on an expression. Once the expression is evaluated to "true", a trigger sets off an action. Such an action can optionally have a target question it affects.',clearInvisibleValues:"Choose whether or not to clear values for questions hidden by conditional logic and when to do it.",textUpdateMode:'Choose from: "On lost focus" - the value is updated when the input field loses focus; "While typing" - the value is updated in real-time, as users are typing.',columns:"The left value serves as a column ID used in conditional rules, the right value is displayed to respondents.",rows:"The left value serves as a row ID used in conditional rules, the right value is displayed to respondents.",columnMinWidth:"Accepts CSS values (px, %, in, pt, etc.).",rowTitleWidth:"Accepts CSS values (px, %, in, pt, etc.).",totalText:'Visible only if at least one column displays total values set with "Aggregation method" or "Total value expression".',cellErrorLocation:'Sets the location of an error message in relation to a cell with invalid input. The "Inherit" option applies the setting from the "Error message alignment" property.',keyDuplicationError:'When the "Prevent duplicate responses" property is enabled, a respondent attempting to submit a duplicate entry will receive the following error message.',totalExpression:"Allows you to calculate total values based on an expression. The expression can include basic calculations (`{q1_id} + {q2_id}`), Boolean expressions (`{age} > 60`) and functions ('iif()`, `today()`, `age()`, `min()`, `max()`, `avg()`, etc.).",confirmDelete:"Triggers a prompt asking to confirm the row deletion.",defaultValueFromLastRow:"Duplicates answers from the last row and assigns them to the next added dynamic row.",keyName:"Reference a column ID to require a user to provide a unique response for each question within the specified column.",description:"Type a subtitle.",locale:"Choose a language to begin creating your survey. To add a translation, switch to a new language and translate the original text here or in the Translations tab.",detailPanelMode:'Sets the location of a details section in relation to a row. Choose from: "None" - no expansion is added; "Under the row" - a row expansion is placed under each row of the matrix; "Under the row, display one row expansion only" - an expansion is displayed under a single row only, the remaining row expansions are collapsed.',imageFit:'Choose from: "None" - image maintains its original size; "Contain" - image is resized to fit while maintaining its aspect ratio; "Cover" - image fills the entire box while maintaining its aspect ratio; "Fill" - image is stretched to fill the box without maintaining its aspect ratio.',autoGrow:'Gradually increases the height of the input field as data is being entered. Overrides the "Input field height (in lines)" setting.',allowResize:"The resize handle (or grip) appears in the corner and can be dragged to alter the size of the input field.",maxTimeToFinish:'A time interval in seconds after which the survey auto-advances to the "Thank You" page.',maxTimeToFinishPage:"A time interval in seconds after which the survey auto-advances to the next page.",page:{maxTimeToFinish:"A time interval in seconds after which the survey auto-advances to the next page.",visibleIf:"Use the magic wand icon to set a conditional rule that determines page visibility.",enableIf:"Use the magic wand icon to set a conditional rule that disables the read-only mode for the page.",requiredIf:"Use the magic wand icon to set a conditional rule that prevents survey submission unless at least one nested question has an answer.",questionTitleLocation:'Applies to all questions within this page. If you want to override this setting, define title alignment rules for individual questions or panels. The "Inherit" option applies the survey-level setting ("Top" by default).',questionErrorLocation:'Sets the location of an error message in relation to the question with invalid input. Choose between: "Top" - an error text is placed at the top of the question box; "Bottom" - an error text is placed at the bottom of the question box. The "Inherit" option applies the survey-level setting ("Top" by default).',questionsOrder:'Keeps the original order of questions or randomizes them. The "Inherit" option applies the survey-level setting ("Original" by default). The effect of this setting is only visible in the Preview tab.',navigationButtonsVisibility:'Sets the visibility of navigation buttons on the page. The "Inherit" option applies the survey-level setting, which defaults to "Visible".'},showTimerPanel:"Sets the visibility and location of a timer on a page.",panelsState:'Choose from: "Locked" - users cannot expand or collapse panels; "Collapse all" - all panels start in a collapsed state; "Expand all" - all panels start in an expanded state; "First expanded" - only the first panel is initially expanded.',imageLinkName:"Enter a shared property name within the array of objects that contains the image or video file URLs you want to display in the choice list.",choices:"The left value serves as an item ID used in conditional rules, the right value is displayed to respondents.",title:"Type a user-friendly title to display.",waitForUpload:"Ensures that users won't complete the survey until files are uploaded.",minWidth:"Accepts CSS values (px, %, in, pt, etc.).",maxWidth:"Accepts CSS values (px, %, in, pt, etc.).",width:"Accepts CSS values (px, %, in, pt, etc.).",valueName:"A join identifier is a custom key that you can assign to several questions to link them together and sync their values. These values will be merged into a single array or object and stored in survey results using the key as the property name.",useDisplayValuesInDynamicTexts:"In single- and multiple-selection question types, each choice option has an ID and display value. When selected, this setting shows a display value instead of an ID value in HTML questions and dynamic titles and descriptions of survey elements.",clearIfInvisible:'Choose whether or not to clear question values hidden by conditional logic and when to do it. The "Inherit" option applies the survey-level setting ("Upon survey completion" by default).',choicesFromQuestionMode:'Choose from: "All" - copies all choice options from the selected question; "Selected" - dynamically copies only selected choice options; "Unselected" - dynamically copies only unselected choice options. The "None" and "Other" options are copied by default if enabled in the source question.',showOtherItem:"When selected, users can include additional input in a separate comment box.",separateSpecialChoices:'Displays each special choice option ("None", "Other", "Select All") on a new line, even when using a multiple-column layout.',path:"Specify the location within the service dataset where the target array of objects is located. Leave empty if the URL already points to the array.",choicesbyurl:{valueName:"Enter a uniform property name within the array of objects whose value will be stored as a response in survey results."},titleName:"Enter a uniform property name within the array of objects that contains the values you want to display in the choice list.",allowEmptyResponse:"Select to allow the service to return an empty response or array.",choicesVisibleIf:"Use the magic wand icon to set a conditional rule that determines the visibility of all choice options.",rateValues:"The left value serves as an item ID used in conditional rules, the right value is displayed to respondents.",rating:{displayMode:'"Auto" selects between the "Buttons" and "Dropdown" modes based on the available width. When the width is insufficient to display buttons, the question displays a dropdown.'},valuePropertyName:"Allows you to connect questions that produce results in different formats. When such questions are linked together using a join identifier, this shared property stores selected question values.",searchEnabled:"Select if you want to update the drop-down menu contents to match the search query that a user is typing in the input field.",valueTrue:"A value to save in survey results when respondents give a positive answer.",valueFalse:"A value to save in survey results when respondents give a negative answer.",showPreview:"It's not recommended that you disable this option as it overrides the Preview image and makes it hard for a user to understand whether the files have been uploaded.",needConfirmRemoveFile:"Triggers a prompt asking to confirm the file deletion.",selectToRankEnabled:"Enable to rank only selected choices. Users will drag selected items from the choice list to order them within the ranking area.",dataList:"Enter a list of choices that will be suggested to the respondent during input.",itemSize:"The setting only resizes the input fields and doesn't affect the width of the question box.",itemTitleWidth:"Sets consistent width for all item labels in pixels",altText:"Serves as a substitute when the image cannot be displayed on a user's device and for accessibility purposes.",rateColorMode:'Defines the color of the selected emoji when the Rating icon type is set to "Smileys". Choose between: "Default" - the selected emoji appears in default survey color; "Scale" - the selected emoji inherits color from the rating scale.',expression:{name:"An expression ID that is not visible to respondents.",description:"Type an expression subtitle.",expression:"An expression can include basic calculations (`{q1_id} + {q2_id}`), conditions (`{age} > 60`), and functions ('iif()`, `today()`, `age()`, `min()`, `max()`, `avg()`, etc.)."},storeOthersAsComment:'Select to store the "Other" option value as a separate property in survey results.',format:"Use {0} as a placeholder for the actual value.",acceptedTypes:"Refer to the [accept](https://www.w3schools.com/tags/att_input_accept.asp) attribute description for more information.",columnColCount:'Applies only if "Cell input type" is set to Radio Button Group or Checkboxes.',autocomplete:"Select the data type that the user's browser can retrieve. This data is sourced either from past values entered by the user or from pre-configured values if any have been saved by the user for autocompletion.",filePlaceholder:'Applies when "File source type" is "Local file" or when camera is unavailable',photoPlaceholder:'Applies when "File source type" is "Camera".',fileOrPhotoPlaceholder:'Applies when "File source type" is "Local file or camera".',masksettings:{saveMaskedValue:"Select if you want to store the question value with an applied mask in survey results."},patternmask:{pattern:"The pattern can contain string literals and the following placeholders: `9` - for a digit; `a` - for an upper- or lower-case letter; `#` - for a digit or an upper- or lower-case letter. Use backslash `\\` to escape a character."},datetimemask:{pattern:"The pattern can contain separator characters and the following placeholders:<br>`m` - Month number.<br>`mm` - Month number, with leading zero for single-digit values.<br>`d` - Day of the month.<br>`dd` - Day of the month, with leading zero for single-digit values.<br>`yy` - The last two digits of the year.<br>`yyyy` - Four-digit year.<br>`H` - Hours in 24-hour format.<br>`HH` - Hours in 24-hour format, with leading zero for single-digit values.<br>`h` - Hours in 12-hour format.<br>`hh` - Hours in 12-hour format, with leading zero for single-digit values.<br>`MM` - Minutes.<br>`ss` - Seconds.<br>`TT` - 12-hour clock period in upper case (AM/PM).<br>`tt` - 12-hour clock period in lower case (am/pm)."},numericmask:{decimalSeparator:"A symbol used to separate the fractional part from the integer part of a displayed number.",thousandsSeparator:"A symbol used to separate the digits of a large number into groups of three.",precision:"Limits how many digits to retain after the decimal point for a displayed number."},currencymask:{prefix:"One or several symbols to be displayed before the value.",suffix:"One or several symbols to be displayed after the value."}},p:{title:{name:"title",title:"Leave it empty, if it is the same as 'Name'"},multiSelect:"Allow multiple selection",showLabel:"Show image and video captions",swapOrder:"Swap the order of Yes and No",value:"Value",tabAlign:"Tab alignment",sourceType:"File source type",fitToContainer:"Fit to container",setValueExpression:"Set value expression",description:"Description",logoFit:"Logo fit",pages:"Pages",questions:"Questions",triggers:"Triggers",calculatedValues:"Custom variables",surveyId:"Survey id",surveyPostId:"Survey post id",surveyShowDataSaving:"Survey show data saving",questionDescriptionLocation:"Question description alignment",progressBarType:"Progress bar type",showTOC:"Show table of contents (TOC)",tocLocation:"TOC alignment",questionTitlePattern:"Question title pattern",widthMode:"Survey width mode",showBrandInfo:"Show brand info",useDisplayValuesInDynamicTexts:"Use display values in dynamic texts",visibleIf:"Visible if",defaultValueExpression:"Default value expression",requiredIf:"Required if",resetValueIf:"Reset value if",setValueIf:"Set value if",validators:"Validation rules",bindings:"Bindings",renderAs:"Render as",attachOriginalItems:"Attach original items",choices:"Choices",choicesByUrl:"Choices by url",currency:"Currency",cellHint:"Cell hint",totalMaximumFractionDigits:"Total maximum fraction digits",totalMinimumFractionDigits:"Total minimum fraction digits",columns:"Columns",detailElements:"Detail elements",allowAdaptiveActions:"Allow adaptive actions",defaultRowValue:"Default row value",detailPanelShowOnAdding:"Detail panel show on adding",choicesLazyLoadEnabled:"Choices lazy load enabled",choicesLazyLoadPageSize:"Choices lazy load page size",inputFieldComponent:"Input field component",itemComponent:"Item component",min:"Min",max:"Max",minValueExpression:"Min value expression",maxValueExpression:"Max value expression",step:"Step",dataList:"Items for auto-suggest",itemSize:"Input field width (in characters)",itemTitleWidth:"Item label width (in px)",elements:"Elements",content:"Content",navigationButtonsVisibility:"Show/hide navigation buttons",navigationTitle:"Navigation title",navigationDescription:"Navigation description",longTap:"Long tap",autoGrow:"Expand input field dynamically",allowResize:"Enable resize handle",acceptCarriageReturn:"Accept carriage return",displayMode:"Display mode",rateType:"Rate type",label:"Label",contentMode:"Content mode",imageFit:"Image and thumbnail fit",altText:"Alt text",height:"Height",penColor:"Pen color",backgroundColor:"Background color",templateElements:"Template elements",operator:"Operator",isVariable:"Is variable",runExpression:"Run expression",showCaption:"Show caption",iconName:"Icon name",iconSize:"Icon size",precision:"Precision",matrixDragHandleArea:"Matrix drag handle area",backgroundImage:"Background image",backgroundImageFit:"Background image fit",backgroundImageAttachment:"Background image attachment",backgroundOpacity:"Background opacity",selectToRankEnabled:"Allow selective ranking",selectToRankAreasLayout:"Ranking area alignment",selectToRankEmptyRankedAreaText:"Text to show if all options are selected",selectToRankEmptyUnrankedAreaText:"Placeholder text for the ranking area",allowCameraAccess:"Allow camera access",scaleColorMode:"Rating icon color mode",rateColorMode:"Smileys color scheme",copyDisplayValue:"Copy display value"},theme:{advancedMode:"Advanced mode",pageTitle:"Page",questionTitle:"Question box",editorPanel:"Input element",lines:"Lines",primaryDefaultColor:"Default",primaryDarkColor:"Hover",primaryLightColor:"Selected",backgroundDimColor:"Background color",cornerRadius:"Corner radius",backcolor:"Default background",hovercolor:"Hover background",borderDecoration:"Border decoration",primaryForecolor:"Default color",primaryForecolorLight:"Disabled color",font:"Font",borderDefault:"Darker",borderLight:"Lighter",fontFamily:"Font family",fontWeightRegular:"Regular",fontWeightHeavy:"Heavy",fontWeightSemiBold:"Semi-bold",fontWeightBold:"Bold",color:"Color",placeholderColor:"Placeholder color",size:"Size",opacity:"Opacity",boxShadowX:"X",boxShadowY:"Y",boxShadowAddRule:"Add Shadow Effect",boxShadowBlur:"Blur",boxShadowSpread:"Spread",boxShadowDrop:"Drop",boxShadowInner:"Inner",names:{default:"Default",sharp:"Sharp",borderless:"Borderless",flat:"Flat",plain:"Plain",doubleborder:"Double Border",layered:"Layered",solid:"Solid",threedimensional:"3D",contrast:"Contrast"},colors:{teal:"Teal",blue:"Blue",purple:"Purple",orchid:"Orchid",tulip:"Tulip",brown:"Brown",green:"Green"}}},i=o(0);!function(e){e[e.AllTypes=0]="AllTypes",e[e.CompatibleTypes=1]="CompatibleTypes"}(r||(r={}));var a={translation:{sortByName:!1,exportPrefix:"",maximumSelectedLocales:7,exportFileName:"survey_translation.csv"},themeEditor:{exportFileName:"survey_theme.json",defaultFontFamily:"Open Sans"},operators:{empty:[],notempty:[],equal:["!file"],notequal:["!file"],contains:["checkbox","text","comment"],notcontains:["checkbox","text","comment"],anyof:["selectbase"],allof:["checkbox"],greater:["!checkbox","!imagepicker","!boolean","!file"],less:["!checkbox","!imagepicker","!boolean","!file"],greaterorequal:["!checkbox","!imagepicker","!boolean","!file"],lessorequal:["!checkbox","!imagepicker","!boolean","!file"]},defaultNewSurveyJSON:{},designer:{defaultAddQuestionType:"text",showAddQuestionButton:!0},logic:{questionSortOrder:"asc",get defaultOperator(){return a.logic.defaultOperators.default},set defaultOperator(e){a.logic.defaultOperators.default=e},defaultOperators:{default:"equal",checkbox:"allof",tagbox:"allof"},visibleActions:[],logicItemTitleMaxChars:50,openBracket:"{",closeBracket:"}",updateExpressionsOnChanging:{questionName:!0,columnName:!0,choiceValue:!0},updateExpressionsOnDeleting:{question:!0}},questionConvertMode:r.AllTypes,propertyGrid:{useButtonGroup:!0,maxCharsInButtonGroup:25,showNavigationButtons:!1,enableSearch:!0,maximumColumnsCount:0,minimumChoicesCount:0,maximumChoicesCount:0,maximumRowsCount:0,maximumRateValues:0,generalTabName:"general",defaultExpandedTabName:"general",allowExpandMultipleCategories:!1},toolbox:{defaultJSON:{dropdown:{choices:["Item 1","Item 2","Item 3"]},tagbox:{choices:["Item 1","Item 2","Item 3"]},checkbox:{choices:["Item 1","Item 2","Item 3"]},radiogroup:{choices:["Item 1","Item 2","Item 3"]},ranking:{choices:["Item 1","Item 2","Item 3"]},imagepicker:{imageFit:"cover",choices:[{value:"Image 1",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"},{value:"Image 2",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/giraffe.jpg"},{value:"Image 3",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/panda.jpg"},{value:"Image 4",imageLink:"https://surveyjs.io/Content/Images/examples/image-picker/camel.jpg"}]},image:{imageFit:"cover",imageHeight:"auto",imageWidth:"100%"}}},notifications:{lifetime:2e3},autoSave:{delay:500},dragDrop:{restrictDragQuestionBetweenPages:!1,allowDragToTheSameLine:!0},layout:{showTabs:!0,showToolbar:!0,allowCollapseSidebar:!0},jsonEditor:{indentation:1,exportFileName:"survey.json"}},s=function(){function e(){this.isMobileView=!1,this.allowEditExpressionsInTextEditor=!0,this.maximumColumnsCount=a.propertyGrid.maximumColumnsCount,this.minimumChoicesCount=a.propertyGrid.minimumChoicesCount,this.maximumChoicesCount=a.propertyGrid.maximumChoicesCount,this.maximumRowsCount=a.propertyGrid.maximumRowsCount,this.maximumRateValues=a.propertyGrid.maximumRateValues,this.machineTranslationValue=!1,this.inplaceEditForValues=!1,this.maxNestedPanels=-1,this.translationLocalesOrder=[]}return e.prototype.getProcessedTranslationItemText=function(e,t,o,r){return o},e.prototype.getObjectDisplayName=function(e,t,o,r){return r},e.prototype.onCanShowPropertyCallback=function(e,t,o,r,n){return!0},e.prototype.onPropertyGridSurveyCreatedCallback=function(e,t){},e.prototype.onPropertyEditorCreatedCallback=function(e,t,o){},e.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,o,r){},e.prototype.onPropertyGridShowModalCallback=function(e,t,o,r,n){},e.prototype.onIsPropertyReadOnlyCallback=function(e,t,o,r,n){return o},e.prototype.onCanDeleteItemCallback=function(e,t,o){return o},e.prototype.onCollectionItemDeletingCallback=function(e,t,o,r){return!0},e.prototype.onCollectionItemAllowingCallback=function(e,t,o,r,n){},e.prototype.onItemValueAddedCallback=function(e,t,o,r){},e.prototype.onFastEntryCallback=function(e,t){return e},e.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,o){},e.prototype.onSetPropertyEditorOptionsCallback=function(e,t,o){},e.prototype.onGetErrorTextOnValidationCallback=function(e,t,o){return null},e.prototype.onValueChangingCallback=function(e){},e.prototype.onGetElementEditorTitleCallback=function(e,t){return t},e.prototype.startUndoRedoTransaction=function(){},e.prototype.stopUndoRedoTransaction=function(){},e.prototype.createSurvey=function(e,t,o,r,n){var a=new i.SurveyModel(e);return r&&r(a),a},e.prototype.onConditionQuestionsGetListCallback=function(e,t,o,r){return"asc"},e.prototype.onConditionGetTitleCallback=function(e,t){return t},e.prototype.isConditionOperatorEnabled=function(e,t,o,r){return r},e.prototype.onLogicGetTitleCallback=function(e,t,o,r){return o},e.prototype.getTranslationExportedText=function(e,t,o,r,n){return n},e.prototype.uploadFiles=function(e,t,o){},e.prototype.getHasMachineTranslation=function(){return this.machineTranslationValue},e.prototype.doMachineTranslation=function(e,t,o,r){},e.prototype.chooseFiles=function(e,t,o){},e}();function l(e){if(!e)return"";for(var t="",o=e.length-1;o>=0;o--){if(e[o]>="0"&&e[o]<="9")t=e[o]+t;else if(t)return t;if(10==t.length)break}return t}function c(e){return Math.round(100*e)/100}i.StylesManager.applyTheme("defaultV2");var p={true:"false",True:"False",TRUE:"FALSE",false:"true",False:"True",FALSE:"TRUE",yes:"no",Yes:"No",YES:"NO",no:"yes",No:"Yes",NO:"YES"};function u(e,t){t=t.toString();for(var o=0;o<e.length;o++)if(e[o]&&e[o].toString()===t)return!0;return!1}function d(e,t){return g(e,t.map((function(e){return e.value})))}function h(e){var t=e.length;if(0===t)return"";if(!e[t-1].text||e[t-1].text===e[t-1].value)return"";var o=[];e.forEach((function(e){e.hasText&&o.push(e.text)})),e.map((function(e){return e.text}));var r=g("",o);return r?r.toString():""}function g(e,t){if(t.length>0)var o=function(e){return p[e]?p[e]:null}(t[t.length-1]);if(o&&t.indexOf(o)<0)return o;for(var r,n="",i=-1,a=t.length-1;a>=0;a--)if(t[a]){var s=t[a].toString();if(n=l(s)){i=s.lastIndexOf(n),r=t[a];break}}if(i>-1){var c,d=parseInt(n),h=r===d;do{if(h)c=++d;else{for(var g=(d++).toString();n.length>g.length;)g="0"+g;c=s.substring(0,i)+g+s.substring(i+n.length)}}while(u(t,c));return c}return e||(e=t[t.length-1]),e+1}function f(e,t){for(var o=t;o&&!o.classList.contains(e);)o=o.parentElement;return o}function m(e){for(var t=0;t<e.length;t++)if("function"==typeof e[t].getElementsByClassName){var o=e[t].getElementsByClassName("svd-focusable");if(0===o.length&&-1!==e[t].className.indexOf("svd-focusable")&&(o=[e[t]]),o.length>0){var r=o[0];if("a"!==r.tagName.toLowerCase()){r.focus({preventScroll:!0});break}}}}function y(e){if(e&&e.length){for(var t=0;t<e.length;t++)if("#text"!=e[t].nodeName&&"#comment"!=e[t].nodeName)return e[t];return null}}function b(e){var t=e.element,o=[];if(8!==t.nodeType)return t.childNodes;for(;t=t.nextSibling;)3!==t.nodeType&&o.push(t);return o}function v(e,t){var o=!0;e&&"function"==typeof e.getType&&(o=!!i.Serializer.findProperty(e.getType(),t));return o}function x(e,t){var o=!0;if(e&&"function"==typeof e.getType){var r=i.Serializer.findProperty(e.getType(),t);o=!r||r.visible}return o}function w(e,t,o){void 0===o&&(o=0);function r(e,o){void 0===o&&(o=null);var r=(t.className||"").split(" ");o&&-1==r.indexOf(o)||-1==r.indexOf(e)&&(t.className+=" "+e)}e.__svc_question_processed||"mouseover"!==e.type?(t.className=(t.className||"").replace(" svc-hovered-ready",""),t.className=(t.className||"").replace(" svc-hovered","")):(o?(r("svc-hovered-ready"),setTimeout((function(){r("svc-hovered","svc-hovered-ready")}),o)):r("svc-hovered"),e.__svc_question_processed=!0)}function j(e){return e.replace(new RegExp("(\\r\\n|\\n|\\r)","gm"),"")}function C(e){var t,o;window&&(window.getSelection&&document.createRange?(o=window.getSelection(),(t=document.createRange()).selectNodeContents(e),o.removeAllRanges(),o.addRange(t)):document.selection&&document.body.createTextRange&&((t=document.body.createTextRange()).moveToElementText(e),t.select()))}function S(e,t){for(var o in t){var r=t[o];"object"==typeof r&&S(r={},t[o]),e[o]=r}}function T(e,t){t&&("string"==typeof t||t instanceof String?e.root=t:S(e,t))}function P(e,t){T(e,i.defaultV2Css.question),T(e,i.defaultV2Css[t]),e.hasErrorTop="",e.hasErrorBottom=""}function E(e){return a.logic.openBracket+e+a.logic.closeBracket}function I(e){return e?e=(e=e.replace(/[\s]+/g," ")).replace(/([\s]|^)(\S)/g,(function(e,t,o){return t+o.toUpperCase()})):e}function O(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every((function(e){return!0===e}))}var V="image/png, image/gif, image/jpeg, image/apng, image/avif, image/svg+xml, image/webp";function N(e){return["auto","image"].indexOf(e)>-1?V:"video"==e?"video/*":""}function k(e){return e instanceof i.MatrixDropdownColumn?e.templateQuestion:e}function A(e){if(e&&void 0!==i.settings.environment.root){var t=i.settings.environment.root.getElementById(e);t&&t.scrollIntoView({behavior:"smooth",block:"center",inline:"start"})}}function _(e,t){if(e&&void 0!==t)return"rgba("+parseInt(e.slice(1,3),16)+", "+parseInt(e.slice(3,5),16)+", "+parseInt(e.slice(5,7),16)+", "+t+")"}function L(e,t){return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function D(e){void 0===e&&(e="");var t=e.match(/\((.*)\)/);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function M(e){void 0===e&&(e="");var t=D(e);if(0!==t.length){var o=1;return 4==t.length&&(o=t.pop()),{color:t.reduce((function(e,t){var o=t.toString(16);return e+(1==o.length?"0"+o:o)}),"#"),opacity:c(100*o)}}return{color:e,opacity:100}}function R(e,t,o){t/=100,o/=100;var r=function(t){return(t+e/60)%6},n=function(e){return o*(1-t*Math.max(0,Math.min(r(e),4-r(e),1)))};return[Math.round(255*n(5)),Math.round(255*n(3)),Math.round(255*n(1))]}function q(e,t,o){e/=255,t/=255,o/=255;var r=Math.max(e,t,o),n=r-Math.min(e,t,o),i=0===n?0:n&&r===e?(t-o)/n:r===t?2+(o-e)/n:4+(e-t)/n;return[60*(i<0?i+6:i),r&&n/r*100,100*r]}function H(e){Object.keys(e).forEach((function(t){void 0!==e[t]&&null!==e[t]||delete e[t]}))}function B(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=(e||[]).filter((function(e){return!!e}));if(!(o.length<=1)){if(2==o.length)return Object.keys(o[1]).forEach((function(e){return o[0][e]=o[1][e]})),void H(e[0]);for(var r=1;r<o.length;r++)B(o[0],o[r])}}var Q=function(){function e(){this.colorSettings={baseColorAlpha:1,darkColorAlpha:1,lightColorAlpha:1,deltaDarkColor:0,deltaLightColor:0,newColorLight:"",newColorDark:""}}return e.prototype.initialize=function(e,t,o){var r=D(e),n=D(o),i=D(t);this.colorSettings.baseColorAlpha=r[3],this.colorSettings.darkColorAlpha=n[3],this.colorSettings.lightColorAlpha=i[3];var a=q(r[0],r[1],r[2]),s=q(n[0],n[1],n[2]),l=q(i[0],i[1],i[2]);this.colorSettings.deltaDarkColor=a[2]-s[2],this.colorSettings.deltaLightColor=a[2]-l[2]},e.prototype.calculateColors=function(e){var t=D(e);0===t.length&&(t=D(_(e,1)));var o=q(t[0],t[1],t[2]),r=R(o[0],o[1],o[2]-this.colorSettings.deltaDarkColor),n=R(o[0],o[1],o[2]-this.colorSettings.deltaLightColor);this.colorSettings.newColorLight=L(n,this.colorSettings.lightColorAlpha),this.colorSettings.newColorDark=L(r,this.colorSettings.darkColorAlpha)},e}();function F(e,t){if(window)if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(t,e);else{var o=window.document.createElement("a");o.href=window.URL.createObjectURL(t),o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o)}}var U={"tabs.preview":"ed.testSurvey","tabs.theme":"ed.themeSurvey","tabs.translation":"ed.translation","tabs.designer":"ed.designer","tabs.editor":"ed.jsonEditor","tabs.logic":"ed.logic"},W=function(){function e(){this.defaultLocaleValue="en",this.currentLocaleValue="",this.camelCaseBreaking=!0,this.locales={},this.peByClass={},this.peHelpByClass={},this.pePlaceholderByClass={}}return e.prototype.reset=function(){this.peByClass={},this.peHelpByClass={},this.pePlaceholderByClass={}},Object.defineProperty(e.prototype,"defaultLocale",{get:function(){return this.defaultLocaleValue},set:function(e){e||(e="en"),e!==this.defaultLocale&&(this.defaultLocaleValue=e,this.reset())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentLocale",{get:function(){return this.currentLocaleValue},set:function(e){e||(e=""),e!==this.currentLocale&&(this.currentLocaleValue=e,this.reset())},enumerable:!1,configurable:!0}),e.prototype.getString=function(e,t){void 0===t&&(t=null);var o=this.getOldKeysString(e,t);if(o)return o;var r=e.split(".");return this.getStringByPath(r,t)},e.prototype.getStringByPath=function(e,t){void 0===t&&(t=null),t||(t=this.currentLocale);var o=this.getLocale(t),r=this.getDefaultStrings(),n=[];if(o&&n.push(o),t&&t.indexOf("-")>-1){var i=this.getLocale(t.substring(0,t.indexOf("-")));i&&n.push(i)}0!==n.length&&n[n.length-1]===r||n.push(r);for(var a=0;a<n.length;a++){var s=this.getStringByLocale(e,n[a]);if(s||""===s)return s}return e[e.length-1]},e.prototype.hasString=function(e,t){return void 0===t&&(t=null),void 0!==this.getStringByLocale(e.split("."),this.getLocale(t))},e.prototype.getStringByLocale=function(e,t){for(var o=t,r=0;r<e.length;r++){if("string"==typeof o)return;if(!(o=o[e[r]])&&""!==o)return}return o},e.prototype.getLocaleName=function(e,t){void 0===t&&(t=null);var o=i.surveyLocalization.localeNames;t||(t=i.surveyLocalization.defaultLocale);var r=e?I(o[e]):G.getString("ed.defaultLocale").format(I(o[t]));return r||e},e.prototype.getPropertyName=function(e,t){void 0===t&&(t=null);var o=this.getProperty(e,t),r=o.name;return r?this.stringsDiff(r,e)?r:this.getAutoPropertyName(r,t):o},e.prototype.getPropertyTitle=function(e){var t=this.getProperty(e);return t.title?t.title:""},e.prototype.getPropertyNameInEditor=function(e,t,o){void 0===o&&(o=null);var r=this.getPropertyInfoInEditorByType(e,t,this.peByClass,"pe");return r||(r=this.getStringByPath(["pe",t])),this.stringsDiff(r,t)?r:this.getPropertyName(t,o)},e.prototype.getPropertyHelpInEditor=function(e,t,o){void 0===o&&(o=void 0);var r=this.getPropertyHelpInEditorCore(e,t,this.peHelpByClass,"pehelp");if(r)return r;var n=this.getLocale();return o&&n&&n.pe?n.pe[o+"Help"]:void 0},e.prototype.getPropertyPlaceholder=function(e,t){var o=this.getPropertyHelpInEditorCore(e,t,this.pePlaceholderByClass,"peplaceholder");if(o)return" "===o?null:o;var r=this.getLocale();return r&&r.peplaceholder&&(o=r.peplaceholder[t]),o||(r&&r.pe?r.pe[t+"_placeholder"]:void 0)},e.prototype.getPropertyHelpInEditorCore=function(e,t,o,r){var n=this.getPropertyInfoInEditorByType(e,t,o,r);if(n)return" "===n?null:n;var i=this.getLocale();return i&&i[r]?i[r][t]:void 0},e.prototype.getPropertyInfoInEditorByType=function(e,t,o,r){if(e){var n=o[e];for(void 0===n&&(n=this.getObjInEditorByType(e,o,r));n;){var i=n.props[t];if(i&&"function"!=typeof i)return n.props[t];n=n.parent}}},e.prototype.getObjInEditorByType=function(e,t,o){if(e){t[e];var r=this.getLocale(),n=r?r[o]:void 0;if(n){var a=e.indexOf("@");if(a>-1){var s=this.getObjInEditorByType(e.substring(0,a),t,o);if(!n[e])return t[e]=s,s;var l={props:n[e],parent:s};return t[e]=l,l}for(var c=[],p=i.Serializer.findClass(e),u=void 0;p;){var d=p.name;if(u=t[e])break;if(c.push(d),n[d]){u={props:n[d],parent:this.getObjInEditorByType(p.parentName,t,o)};break}if(!p.parentName)break;p=i.Serializer.findClass(p.parentName)}for(var h=0;h<c.length;h++)t[c[h]]=u;return u}}},e.prototype.getProperty=function(e,t){void 0===t&&(t=null);var o=this.getStringByPath(["p",e]);if(this.stringsDiff(o,e))return o;var r=(e+"").indexOf("_");return r<-1?this.getAutoPropertyName(o,t):(e=(e+"").substring(r+1),o=this.getStringByPath(["p",e]),this.stringsDiff(o,e)?o:this.getAutoPropertyName(o,t))},e.prototype.convertToCamelCase=function(e,t){if(void 0===t&&(t=!1),!e)return e;if((e=e.trim()).indexOf(" ")>-1)return e;for(var o=!1,r=0;r<e.length;r++)if(e[r]!==e[r].toUpperCase()){o=!0;break}if(!o)return e;var n=e[0].toUpperCase(),i=!1,a=function(t){return!(t>=e.length)&&e[t].toUpperCase()===e[t]};for(r=1;r<e.length;r++){!i&&a(r)&&(n+=" "),n+=!i&&!a(r+1)?e[r].toLowerCase():e[r],i=a(r)}return t&&(n=n.toLowerCase()),n},e.prototype.getAutoPropertyName=function(e,t){return void 0===t&&(t=null),t||(e&&this.camelCaseBreaking?this.convertToCamelCase(e):e)},e.prototype.getPropertyValueInEditor=function(e,t){var o=this.getLocale();if(o&&o.pv&&o.pv[e]){var r=o.pv[e][t];if(r)return r}return this.getPropertyValue(t)},e.prototype.getPropertyValue=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"pv",t)},e.prototype.getValidatorName=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"validators",t)},e.prototype.getTriggerName=function(e,t){return void 0===t&&(t=null),this.getValueInternal(e,"triggers",t)},e.prototype.getLocale=function(e){e||(e=this.currentLocale);var t=e?this.locales[e]:this.getDefaultStrings();return t||(t=this.getDefaultStrings()),t},e.prototype.getValueInternal=function(e,t,o){if(void 0===o&&(o=null),""===e||null==e)return"";e=e.toString();var r=this.getString(t+"."+e,o);return r||(this.camelCaseBreaking?this.convertToCamelCase(e,!1):e)},e.prototype.getLocales=function(){var e=[];for(var t in e.push(""),this.locales)e.push(t);return e},e.prototype.getDefaultStrings=function(){var e=this.defaultLocale;if(e&&"en"!==e){var t=this.getLocale(e);if(t)return t}return J},e.prototype.stringsDiff=function(e,t){return"function"!=typeof e&&"function"!=typeof t&&e!==t},e.prototype.getOldKeysString=function(e,t){void 0===t&&(t=null);var o=U[e];if(o){var r=o.split("."),n=this.getStringByPath(r,t);return n!==r[r.length-1]?n:void 0}},e}(),G=new W;function z(e,t){return void 0===t&&(t=null),G.getString(e,t)}i.surveyLocalization.onGetExternalString=function(e,t){var o=G.getString(e,t);return o!==e?o:""};var J=n,Z=function(e,t,o,r){var n,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,o,a):n(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},K=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e};function Y(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var X,$=function(){function e(e){void 0===e&&(e=0),this.parseType=e}return e.prototype.parse=function(e,t,o,r){var n;return void 0===t&&(t=null),void 0===o&&(o=0),void 0===r&&(r=-1),this.text=String(e),this.at=o,this.endAt=r,this.ch=" ",n=this.value(),this.white(),this.ch&&this.error("Syntax error"),"function"==typeof t?function e(o,r){var n,i,a=o[r];if(a&&"object"==typeof a)for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(void 0!==(i=e(a,n))?a[n]=i:delete a[n]);return t.call(o,r,a)}({"":n},""):n},e.prototype.error=function(e){var t=new SyntaxError;throw t.message=e,t.at=this.at,t},e.prototype.next=function(e){return void 0===e&&(e=null),e&&e!==this.ch&&this.error("Expected '"+e+"' instead of '"+this.ch+"'"),this.ch=this.chartAt(),this.at+=1,this.ch},e.prototype.peek=function(){return this.chartAt()},e.prototype.chartAt=function(){return this.endAt>-1&&this.at>=this.endAt?"":this.text.charAt(this.at)},e.prototype.identifier=function(){var e=this.ch;for("_"!==this.ch&&"$"!==this.ch&&(this.ch<"a"||this.ch>"z")&&(this.ch<"A"||this.ch>"Z")&&this.error("Bad identifier");this.next()&&("_"===this.ch||"$"===this.ch||this.ch>="a"&&this.ch<="z"||this.ch>="A"&&this.ch<="Z"||this.ch>="0"&&this.ch<="9");)e+=this.ch;return e},e.prototype.number=function(){var e,t="",o="",r=10;if("-"!==this.ch&&"+"!==this.ch||(t=this.ch,this.next(this.ch)),"I"===this.ch)return("number"!=typeof(e=this.word())||isNaN(e))&&this.error("Unexpected word for number"),"-"===t?-e:e;if("N"===this.ch)return e=this.word(),isNaN(e)||this.error("expected word to be NaN"),e;switch("0"===this.ch&&(o+=this.ch,this.next(),"x"===this.ch||"X"===this.ch?(o+=this.ch,this.next(),r=16):this.ch>="0"&&this.ch<="9"&&this.error("Octal literal")),r){case 10:for(;this.ch>="0"&&this.ch<="9";)o+=this.ch,this.next();if("."===this.ch)for(o+=".";this.next()&&this.ch>="0"&&this.ch<="9";)o+=this.ch;if("e"===this.ch||"E"===this.ch)for(o+=this.ch,this.next(),"-"!==this.ch&&"+"!==this.ch||(o+=this.ch,this.next());this.ch>="0"&&this.ch<="9";)o+=this.ch,this.next();break;case 16:for(;this.ch>="0"&&this.ch<="9"||this.ch>="A"&&this.ch<="F"||this.ch>="a"&&this.ch<="f";)o+=this.ch,this.next()}if(e="-"===t?-o:+o,isFinite(e))return e;this.error("Bad number")},e.prototype.string=function(){var t,o,r,n,i="";if('"'===this.ch||"'"===this.ch)for(r=this.ch;this.next();){if(this.ch===r)return this.next(),i;if("\\"===this.ch)if(this.next(),"u"===this.ch){for(n=0,o=0;o<4&&(t=parseInt(this.next(),16),isFinite(t));o+=1)n=16*n+t;i+=String.fromCharCode(n)}else if("\r"===this.ch)"\n"===this.peek()&&this.next();else{if("string"!=typeof e.escapee[this.ch])break;i+=e.escapee[this.ch]}else{if("\n"===this.ch)break;i+=this.ch}}this.error("Bad string")},e.prototype.inlineComment=function(){"/"!==this.ch&&this.error("Not an inline comment");do{if(this.next(),"\n"===this.ch||"\r"===this.ch)return void this.next()}while(this.ch)},e.prototype.blockComment=function(){"*"!==this.ch&&this.error("Not a block comment");do{for(this.next();"*"===this.ch;)if(this.next("*"),"/"===this.ch)return void this.next("/")}while(this.ch);this.error("Unterminated block comment")},e.prototype.comment=function(){"/"!==this.ch&&this.error("Not a comment"),this.next("/"),"/"===this.ch?this.inlineComment():"*"===this.ch?this.blockComment():this.error("Unrecognized comment")},e.prototype.white=function(){for(;this.ch;)if("/"===this.ch)this.comment();else{if(!(e.ws.indexOf(this.ch)>=0))return;this.next()}},e.prototype.word=function(){switch(this.ch){case"t":return this.next("t"),this.next("r"),this.next("u"),this.next("e"),!0;case"f":return this.next("f"),this.next("a"),this.next("l"),this.next("s"),this.next("e"),!1;case"n":return this.next("n"),this.next("u"),this.next("l"),this.next("l"),null;case"I":return this.next("I"),this.next("n"),this.next("f"),this.next("i"),this.next("n"),this.next("i"),this.next("t"),this.next("y"),1/0;case"N":return this.next("N"),this.next("a"),this.next("N"),NaN}this.error("Unexpected '"+this.ch+"'")},e.prototype.array=function(){var e=[];if("["===this.ch)for(this.next("["),this.white();this.ch;){if("]"===this.ch)return this.next("]"),e;if(","===this.ch?this.error("Missing array element"):e.push(this.value()),this.white(),","!==this.ch)return this.next("]"),e;this.next(","),this.white()}this.error("Bad array")},e.prototype.object=function(){var t,o,r=!0,n={};if(this.parseType>0&&(n[e.positionName]={start:this.at-1}),"{"===this.ch)for(this.next("{"),this.white(),o=this.at-1;this.ch;){if("}"===this.ch)return this.parseType>0&&(n[e.positionName].end=o),this.next("}"),n;if(t='"'===this.ch||"'"===this.ch?this.string():this.identifier(),this.white(),this.parseType>1&&(n[e.positionName][t]={start:o,valueStart:this.at}),this.next(":"),n[t]=this.value(),this.parseType>1&&(o=this.at-1,n[e.positionName][t].valueEnd=o,n[e.positionName][t].end=o),this.white(),","!==this.ch)return this.parseType>1&&(n[e.positionName][t].valueEnd--,n[e.positionName][t].end--),this.parseType>0&&(n[e.positionName].end=this.at-1),this.next("}"),n;this.parseType>1&&(n[e.positionName][t].valueEnd--,r||n[e.positionName][t].end--),this.next(","),this.white(),r=!1}this.error("Bad object")},e.prototype.value=function(){switch(this.white(),this.ch){case"{":return this.object();case"[":return this.array();case'"':case"'":return this.string();case"-":case"+":case".":return this.number();default:return this.ch>="0"&&this.ch<="9"?this.number():this.word()}},e.prototype.stringify=function(e,t,o){if(void 0===t&&(t=null),void 0===o&&(o=null),t&&"function"!=typeof t&&!this.isArray(t))throw new Error("Replacer must be a function or an array");this.replacer=t,this.indentStr=this.getIndent(o),this.objStack=[];var r={"":e};return void 0===e?this.getReplacedValueOrUndefined(r,"",!0):this.internalStringify(r,"",!0)},e.prototype.getIndent=function(e){if(e){if("string"==typeof e)return e;if("number"==typeof e&&e>=0)return this.makeIndent(" ",e,!0)}return""},e.prototype.getReplacedValueOrUndefined=function(e,t,o){var r=e[t];return r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),"function"==typeof this.replacer?this.replacer.call(e,t,r):this.replacer?o||this.isArray(e)||this.replacer.indexOf(t)>=0?r:void 0:r},e.prototype.isWordChar=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e},e.prototype.isWordStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e},e.prototype.isWord=function(e){if("string"!=typeof e)return!1;if(!this.isWordStart(e[0]))return!1;for(var t=1,o=e.length;t<o;){if(!this.isWordChar(e[t]))return!1;t++}return!0},e.prototype.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},e.prototype.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.prototype.isNaN=function(e){return"number"==typeof e&&e!=e},e.prototype.checkForCircular=function(e){for(var t=0;t<this.objStack.length;t++)if(this.objStack[t]===e)throw new TypeError("Converting circular structure to JSON")},e.prototype.makeIndent=function(e,t,o){if(void 0===o&&(o=!1),!e)return"";e.length>10&&(e=e.substring(0,10));for(var r=o?"":"\n",n=0;n<t;n++)r+=e;return r},e.prototype.escapeString=function(t){return e.escapable.lastIndex=0,e.escapable.test(t)?'"'+t.replace(e.escapable,(function(t){var o=e.meta[t];return"string"==typeof o?o:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},e.prototype.internalStringify=function(e,t,o){var r,n,i=this.getReplacedValueOrUndefined(e,t,o);switch(i&&!this.isDate(i)&&(i=i.valueOf()),typeof i){case"boolean":return i.toString();case"number":return isNaN(i)||!isFinite(i)?"null":i.toString();case"string":return this.escapeString(i.toString());case"object":if(null===i)return"null";if(this.isArray(i)){this.checkForCircular(i),r="[",this.objStack.push(i);for(var a=0;a<i.length;a++)n=this.internalStringify(i,a,!1),r+=this.makeIndent(this.indentStr,this.objStack.length),r+=null==n?"null":n,a<i.length-1?r+=",":this.indentStr&&(r+="\n");this.objStack.pop(),r+=this.makeIndent(this.indentStr,this.objStack.length,!0)+"]"}else{this.checkForCircular(i),r="{";var s=!1;for(var l in this.objStack.push(i),i)if(i.hasOwnProperty(l)){var c=this.internalStringify(i,l,!1);if(o=!1,null!=c)r+=this.makeIndent(this.indentStr,this.objStack.length),s=!0,r+=(this.isWord(l)?l:this.escapeString(l))+":"+(this.indentStr?" ":"")+c+","}this.objStack.pop(),r=s?r.substring(0,r.length-1)+this.makeIndent(this.indentStr,this.objStack.length)+"}":"{}"}return r;default:return}},e.positionName="pos",e.escapee={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},e.ws=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],e.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},e}(),ee=function(){function e(){}return Object.defineProperty(e,"convertInfo",{get:function(){return e.convertInfoValue||(e.convertInfoValue={},e.createDefaultQuestionConverterItems()),e.convertInfoValue},enumerable:!1,configurable:!0}),e.createDefaultQuestionConverterItems=function(){for(var t=i.Serializer.getChildrenClasses("selectbase",!0),o=0;o<t.length;o++)for(var r=0;r<t.length;r++)o!=r&&e.addConvertInfo(t[o].name,t[r].name);e.addConvertInfo("text","comment"),e.addConvertInfo("comment","text")},e.addConvertInfo=function(t,o){e.convertInfo[t]||(e.convertInfo[t]=[]),e.convertInfo[t].push(o)},e.getConvertableClasses=function(t){var o=e.convertInfo[t];return Array.isArray(o)&&o.indexOf(t)<0&&o.unshift(t),o},e.getConvertToClasses=function(t,o,n){void 0===o&&(o=null),void 0===n&&(n=!1);var s=a.questionConvertMode==r.AllTypes?function(e,t){void 0===t&&(t=!1);for(var o=i.Serializer.getChildrenClasses("question",!0),r=[],n=0;n<o.length;n++)(t||o[n].name!==e)&&r.push(o[n].name);(t||"panel"!==e)&&r.push("panel");var a=i.CustomWidgetCollection.Instance.widgets;for(n=0;n<a.length;n++)(t||a[n].name!==e)&&r.push(a[n].name);return r}(t,n):e.getConvertableClasses(t);if(!s)return[];if(Array.isArray(o)&&o.length>0){var l=[];s.forEach((function(e){return l.push(e)})),s=o.filter((function(e){return l.indexOf(e)>=0}))}return s||[]},e.convertObject=function(t,o,r,n){if(void 0===r&&(r=null),void 0===n&&(n=null),!t||!t.parent||o==t.getType())return null;var a=n?void 0:i.QuestionFactory.Instance.createQuestion(o,t.name);a||(a=i.Serializer.createClass(o,{})),a.name=t.name;var s=n?i.Helpers.createCopy(n):a.toJSON(),l=t.toJSON();if(r)for(var c in r)l[c]&&i.Helpers.isTwoValueEquals(l[c],r[c])&&delete l[c];for(var c in l)s[c]=l[c];e.updateJSON(s,o,t.getType()),a.fromJSON(s),e.removeValidators(a);var p=t.parent,u=p.elements.indexOf(t);p.isConverting=!0;var d=u+1<p.elements.length&&!1===p.elements[u+1].startWithNewLine;return p.removeElement(t),p.addElement(a,u),d&&(p.elements[u+1].startWithNewLine=!1),delete p.isConverting,a.onSurveyLoad(),a},e.updateJSON=function(t,o,r){e.updateJSONForRating(t,o),e.updateJSONForMatrices(t,o,r),e.updateJSONForPanels(t,o,r),e.updateJSONForBarrating(t,o)},e.updateJSONForMatrices=function(t,o,r){if(i.Serializer.isDescendantOf(o,"matrix")&&i.Serializer.isDescendantOf(r,"matrixdropdownbase")&&t.columns){var n=0;t.columns=t.columns.map((function(e){var t=e.name?e.name:"string"==typeof e?e:"col"+n++;return e.title?{value:t,text:e.title}:t}))}i.Serializer.isDescendantOf(o,"matrixdropdownbase")&&i.Serializer.isDescendantOf(r,"matrix")&&t.columns&&(t.columns=t.columns.map((function(t){return{name:e.getColumnName(t.name||t.value||t),title:t.text}})))},e.getColumnName=function(e){return i.Helpers.isNumber(e)?"col"+e:e},e.updateJSONForRating=function(e,t){"rating"===t&&e.choices&&(e.rateValues=e.choices),e.rateValues&&!i.Serializer.isDescendantOf(t,"matrixdropdownbase")&&(e.choices=e.rateValues)},e.updateJSONForBarrating=function(e,t){"barrating"===t&&(e.choices=[1,2,3,4,5])},e.updateJSONForPanels=function(e,t,o){i.Serializer.isDescendantOf(t,"paneldynamic")&&i.Serializer.isDescendantOf(o,"panel")&&e.elements&&(e.templateElements=e.elements,delete e.elements),i.Serializer.isDescendantOf(t,"panel")&&i.Serializer.isDescendantOf(o,"paneldynamic")&&e.templateElements&&(e.elements=e.templateElements,delete e.templateElements)},e.removeValidators=function(e){var t=e.validators;if(Array.isArray(t)&&0!==t.length)for(var o=e.getSupportedValidators(),r=t.length-1;r>=0;r--){var n=t[r].getType().replace("validator","");o.indexOf(n)<0&&t.splice(r,1)}},e}();!function(e){e.Unknown="unknown",e.Survey="survey",e.Page="page",e.Panel="panel",e.Question="question",e.Column="column"}(X||(X={}));var te=function(){function e(){}return e.getNewElementName=function(e){var t=e.getSurvey();return t?e.isPage?this.getNewPageName(t.pages):e.isPanel?this.getNewPanelName(t.getAllPanels()):this.getNewQuestionName(t.getAllQuestions(!1,!1,!0)):e.name},e.getNewPageName=function(t){return e.getNewName(t,G.getString("ed.newPageName"))},e.isPageNameAutoGenerated=function(t){return e.isNameAutoGenerated(t,G.getString("ed.newPageName"))},e.isPagePropertiesAreModified=function(t){if(!e.isPageNameAutoGenerated(t.name))return!0;var o=t.toJSON();for(var r in delete o.name,delete o.elements,o)return!0;return!1},e.getNewQuestionName=function(t){return e.getNewName(t,G.getString("ed.newQuestionName"))},e.getNewPanelName=function(t){return e.getNewName(t,G.getString("ed.newPanelName"))},e.generateNewName=function(e){for(var t=e.length;t>0&&e[t-1]>="0"&&e[t-1]<="9";)t--;var o=e.substring(0,t),r=0;return t<e.length&&(r=parseInt(e.substring(t))),o+ ++r},e.getNewName=function(e,t){for(var o={},r=0;r<e.length;r++)o[e[r].name]=!0;for(var n=1;o[t+n.toString()];)n++;return t+n.toString()},e.isNameAutoGenerated=function(e,t){if(!e||e.length<t.length)return!1;var o=e.substring(t.length);return i.Helpers.isNumber(o)},e.getObjectType=function(e){return e&&e.getType?e.isPage?X.Page:e.isPanel?X.Panel:"survey"==e.getType()?X.Survey:"matrixdropdowncolumn"==e.getType()?X.Column:e.isQuestion?X.Question:X.Unknown:X.Unknown},e.getObjectTypeStr=function(t){var o=e.getObjectType(t);return o===X.Survey?"survey":o===X.Page?"page":o===X.Panel?"panel":o===X.Question?"question":o===X.Column?"column":"unknown"},e.getObjectName=function(t,o){return void 0===o&&(o=!1),e.getObjectType(t)===X.Survey?G.getString("ed.surveyTypeName"):o&&t.title?t.title:o&&t.text?t.text:t.name?t.name:""},e.getElements=function(e,t){return void 0===t&&(t=!1),e?e.getElementsInDesign?e.getElementsInDesign(t):e.elements?e.elements:[]:[]},e.addElements=function(t,o,r){for(var n=0;n<t.length;n++)t[n].isPanel===o&&r.push(t[n]),e.addElements(e.getElements(t[n]),o,r)},e.getAllElements=function(t,o){for(var r=[],n=0;n<t.pages.length;n++)e.addElements(t.pages[n].elements,o,r);return r},e.isPropertyVisible=function(e,t,o,r,n,i){if(void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n=null),void 0===i&&(i=null),!t||!t.visible)return!1;if(r&&t.showMode&&r!==t.showMode)return!1;if(t.isVisible&&e.getLayoutType&&!t.isVisible(e.getLayoutType(),null))return!1;var a=o?function(e,t){return o.onCanShowPropertyCallback(e,t,r,n,i)}:null;return!(a&&!a(e,t))},e.scrollIntoViewIfNeeded=function(t){if(t&&t.scrollIntoView){var o=t.getBoundingClientRect(),r=e.getScrollableDiv(t);if(r){var n=r.clientHeight;if(o.top<r.offsetTop)t.scrollIntoView(!0);else{var i=n+r.offsetTop;o.bottom>i&&o.height<n&&t.scrollIntoView(!1)}}}},e.getScrollableDiv=function(e){for(;e;){if(e.id&&e.id.indexOf("scrollableDiv")>-1)return e;if(!e.offsetParent)return null;e=e.offsetParent}return null},e.moveItemInArray=function(t,o,r){if(!t||t.length<2)return!1;if(r<0||r>=t.length)return!1;var n=t.indexOf(o);if(n<0||n==r)return!1;for(var i=0;i<t.length;i++)e.disableSelectingObj(t[i]);t.splice(n,1),t.splice(r,0,o);for(i=0;i<t.length;i++)e.enableSelectingObj(t[i]);return!0},e.applyItemValueArray=function(e,t){if(t&&0!=t.length){if(e.length>t.length&&e.splice(t.length,e.length-t.length),e.length<t.length){for(var o=[],r=e.length;r<t.length;r++)o.push(t[r]);e.splice.apply(e,[e.length,0].concat(o))}for(r=0;r<e.length;r++)e[r].value!=t[r].value&&(e[r].value=t[r].value),e[r].text=t[r].hasText?t[r].text:""}else e.splice(0,e.length)},e.disableSelectingObj=function(e){e.disableSelecting=!0},e.enableSelectingObj=function(e){delete e.disableSelecting},e.canSelectObj=function(e){return!e||!0!==e.disableSelecting},e.warnNonSupported=function(t,o){var r=E(t)+" is not supported in V2.";o&&(r+=" Use the '"+o+"' property instead"),e.warnText(r)},e.warnText=function(e){console.warn(e)},e.deleteConditionProperties=function(e){delete e.visible,delete e.visibleIf,delete e.readOnly,delete e.enableIf,delete e.valueName,delete e.choicesVisibleIf,delete e.choicesEnableIf,delete e.width,delete e.minWidth,delete e.maxWidth},e.updateQuestionJson=function(t){t.storeOthersAsComment=!1,delete t.valuePropertyName,e.deleteConditionProperties(t),e.deleteConditionPropertiesFromArray(t.choices),e.deleteConditionPropertiesFromArray(t.rows),e.deleteConditionPropertiesFromArray(t.columns),e.deleteConditionPropertiesFromArray(t.rates)},e.deleteConditionPropertiesFromArray=function(t){Array.isArray(t)&&t.forEach((function(t){e.deleteConditionProperties(t)}))},e.convertMatrixRowsToText=function(e){return e.filter((function(e){return!e.cells[0].hasError})).map((function(e){return e.cells.map((function(e){return e.value||""})).join(i.ItemValue.Separator).replace(/\|$/,"")})).join("\n")},e.convertItemValuesToText=function(e){var t="";return e.forEach((function(e){t&&(t+="\n"),t+=e.value,e.pureText&&(t+=i.ItemValue.Separator+e.pureText)})),t},e.convertTextToItemValues=function(e,t,o){var r=[];if(!e)return r;for(var n=e.split("\n"),a=0;a<n.length;a++)if(n[a]){var s=n[a].split(i.ItemValue.Separator),l=i.Serializer.createClass(o);t.forEach((function(e,t){l[e.name]=s[t]})),r.push(l)}return r},e.sortItems=function(e,t){void 0===t&&(t="text");var o=function(e,t){for(var o="";t<e.length&&e[t]>="0"&&e[t]<="9";)o+=e[t],t++;return parseFloat(o)};e.sort((function(e,r){for(var n=e[t]?e[t]:"",i=r[t]?r[t]:"",a=0;a<n.length&&a<i.length&&n[a]===i[a];)a++;if(a<n.length&&a<i.length){for(;a>0&&n[a-1]>="0"&&n[a-1]<="9";)a--;var s=o(n,a),l=o(i,a);if(s<l)return-1;if(s>l)return 1}return n.localeCompare(i)}))},e.getQuestionContextIndexInfo=function(e,t){void 0===t&&(t="");for(var o=["row","panel"],r=0;r<o.length;r++){var n=t+o[r]+".",i=e.indexOf(n);if(i>-1)return{index:i,name:n}}},e.isSupportCellEditor=function(e){for(var t=["selectbase","boolean","rating"],o=0;o<t.length;o++)if(i.Serializer.isDescendantOf(e,t[o]))return!0;return!1},e.getElementDeepLength=function(e){for(var t=0;e;)e.isPanel&&t++,e=e.parent;return t},e}(),oe=function(e){function t(t){var o=e.call(this)||this;return o.setDesignMode(!0),o.fromJSON(t),o}return Y(t,e),t}(i.SurveyModel),re=function(){function e(){}return e.prototype.getCorrectAt=function(e,t,o){return t},Object.defineProperty(e.prototype,"isFixable",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.fixError=function(e,t,o){return e},e}(),ne=function(){function e(e,t){this.at=e,this.text=t,this.rowAt=-1,this.columnAt=-1}return Object.defineProperty(e.prototype,"isFixable",{get:function(){return this.fixer.isFixable},enumerable:!1,configurable:!0}),e.prototype.fixError=function(e){return e},Object.defineProperty(e.prototype,"fixer",{get:function(){return this.fixerValue||(this.fixerValue=this.createFixer()),this.fixerValue},enumerable:!1,configurable:!0}),e.prototype.createFixer=function(){return new re},e}(),ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getErrorType=function(){return"parseerror"},t}(ne),ae=function(e){function t(t,o){var r=e.call(this)||this;return r.element=t,r.jsonObj=o,r}return Y(t,e),t.prototype.getNewIndex=function(e,t,o,r){var n=e.indexOf(t,o);return n>-1&&(r<0||n<r)?n:-1},t.prototype.fixError=function(e,t,o){var r=e.substring(t,o+1),n=JSON.parse(r);return this.updatedJsonObjOnFix(n),this.replaceJson(e,t,o,n)},t.prototype.updatedJsonObjOnFix=function(e){},t.prototype.replaceJson=function(e,t,o,r){var n=JSON.stringify(r,null,a.jsonEditor.indentation);return n=this.addLeftIndentIntoContent(e,n,t-1),e.substring(0,t)+n+e.substring(o+1)},t.prototype.addLeftIndentIntoContent=function(e,t,o){if(o<=0)return t;for(var r="";o>0&&(" "===e[o]||"\t"===e[o]);)r+=e[o],o--;if(!r)return t;for(var n=t.split("\n"),i=1;i<n.length;i++)n[i]=r+n[i];return n.join("\n")},t}(re),se=function(e){function t(t,o,r){var n=e.call(this,t,o)||this;return n.element=t,n.jsonObj=o,n.propertyName=r,n}return Y(t,e),t.prototype.getCorrectAt=function(e,t,o){return this.propertyName?this.getNewIndex(e,this.propertyName,t,o):t},t}(ae),le=function(e){function t(t,o,r){var n=e.call(this,t,o,r)||this;return n.element=t,n.jsonObj=o,n.propertyName=r,n}return Y(t,e),Object.defineProperty(t.prototype,"isFixable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.updatedJsonObjOnFix=function(e){var t=e[this.propertyName];t&&!Array.isArray(t)&&(e[this.propertyName]=[t])},t}(se),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),Object.defineProperty(t.prototype,"isFixable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getCorrectAt=function(e,t,o){var r=this.getNewIndex(e,"name:",t,o);return r>t?r:this.getNewIndex(e,'"name":',t,o)},t.prototype.updatedJsonObjOnFix=function(e){e.name=te.getNewElementName(this.element)},t}(ae),pe=function(e){function t(t,o,r){var n=e.call(this,t,o)||this;return n.element=t,n.jsonObj=o,n.propertyName=r,n}return Y(t,e),Object.defineProperty(t.prototype,"isFixable",{get:function(){return"name"===this.propertyName},enumerable:!1,configurable:!0}),t.prototype.updatedJsonObjOnFix=function(e){var t=this.element.name;t||(t=te.getNewElementName(this.element)),e.name=t},t}(ae),ue=function(e){function t(t){var o=e.call(this,t.at,t.getFullDescription())||this;return o.elementStart=t.at,o.elementEnd=t.end,o.element=t.element,o.errorType=t.type,o.propertyName=t.propertyName,o.jsonObj=t.jsonObj,o}return Y(t,e),t.prototype.createFixer=function(){return"unknownproperty"===this.errorType?new se(this.element,this.jsonObj,this.propertyName):"arrayproperty"===this.errorType?new le(this.element,this.jsonObj,this.propertyName):"duplicatename"===this.errorType?new ce(this.element,this.jsonObj):"requiredproperty"===this.errorType?new pe(this.element,this.jsonObj,this.propertyName):e.prototype.createFixer.call(this)},t.prototype.getErrorType=function(){return this.errorType},Object.defineProperty(t.prototype,"isFixable",{get:function(){return this.fixer.isFixable&&this.elementStart>-1&&this.elementEnd>this.elementStart},enumerable:!1,configurable:!0}),t.prototype.correctAt=function(e){var t=this.fixer.getCorrectAt(e,this.at,this.elementEnd);t>-1&&(this.at=t)},t.prototype.fixError=function(e){return this.fixer.fixError(e,this.elementStart,this.elementEnd)},t}(ne),de=function(){function e(e){this.text=e,this.text&&""!=this.text.trim()||(this.text="{}"),this.errors=[],this.process()}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isJsonCorrect",{get:function(){return!!this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isJsonHasErrors",{get:function(){return this.errors.length>0||!this.isJsonCorrect},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e=this;try{this.jsonValue=new $(1).parse(this.text)}catch(r){this.errors.push(new ie(r.at,r.message))}if(null!=this.jsonValue){this.updateJsonPositions(this.jsonValue),this.surveyValue=new oe(this.jsonValue);var t=this.surveyValue.jsonErrors;if(Array.isArray(t))for(var o=0;o<t.length;o++){var r=new ue(t[o]);r.correctAt(this.text),this.errors.push(r)}this.getDuplicatedNamesErrors().forEach((function(t){return e.errors.push(t)}))}this.setErrorsPositionByChartAt()},e.prototype.updateJsonPositions=function(e){for(var t in e.pos.self=e,e){var o=e[t];o&&o.pos&&(e.pos[t]=o.pos,this.updateJsonPositions(o))}},e.prototype.setErrorsPositionByChartAt=function(){if(0!==this.errors.length){this.errors.sort((function(e,t){return e.at>t.at?1:e.at<t.at?-1:0}));for(var e={row:0,column:0},t=0,o=0;o<this.errors.length;o++){var r=this.errors[o].at;e=this.getPostionByChartAt(e,t,r);var n=this.errors[o];r==n.at&&(n.columnAt=e.column,n.rowAt=e.row),t=r}}},e.prototype.getPostionByChartAt=function(t,o,r){for(var n={row:t.row,column:t.column},i=o;i<r;)this.text.charAt(i)==e.newLineChar?(n.row++,n.column=0):n.column++,i++;return n},e.prototype.getDuplicatedNamesErrors=function(){var e=this,t=[];return this.getDuplicatedElements().forEach((function(o){var r=new ue(e.createDuplicatedError(o));r.correctAt(e.text),r&&t.push(r)})),t},e.prototype.getDuplicatedElements=function(){var e=this,t=[],o={};return this.survey.pages.forEach((function(r){return e.checkDuplicatedElement(r,o,t)})),te.getAllElements(this.survey,!0).forEach((function(r){return e.checkDuplicatedElement(r,o,t)})),te.getAllElements(this.survey,!1).forEach((function(r){return e.checkDuplicatedElement(r,o,t)})),t},e.prototype.checkDuplicatedElement=function(e,t,o){var r=e.name;t[r]?o.push(e):t[r]=!0},e.prototype.createDuplicatedError=function(e){var t=e.pos;if(t){var o=new i.JsonError("duplicatename","The name: '"+e.name+"' is duplicated.");return o.at=t.start,o.end=t.end,o.element=e,o}},e.newLineChar="\n",e}(),he=function(e){function t(t){var o=e.call(this,"duplicatename","The name: '"+t.name+"' is duplicated.")||this;return o.element=t,o}return Y(t,e),t}(i.JsonError),ge=function(e){function t(t){var o=e.call(this)||this;return o.toolbox=t,o}return Y(t,e),t.prototype.toggleState=function(){this.toolbox&&this.toolbox.toggleCategoryState(this.name)},Z([Object(i.property)()],t.prototype,"name",void 0),Z([Object(i.property)()],t.prototype,"title",void 0),Z([Object(i.propertyArray)()],t.prototype,"items",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"collapsed",void 0),t}(i.Base),fe=function(e){function t(t){var o=e.call(this,t)||this;return o.item=t,o.id||(o.id=o.name),o}return Y(t,e),t.prototype.toJSON=function(){return this.item},Object.defineProperty(t.prototype,"typeName",{get:function(){return this.json&&this.json.type?this.json.type:this.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPanel",{get:function(){var e=this.typeName;return!!e&&i.Serializer.isDescendantOf(e,"panelbase")},enumerable:!1,configurable:!0}),t}(i.Action),me=function(e){function t(t,o,r){void 0===t&&(t=null),void 0===o&&(o=null),void 0===r&&(r=!1);var n=e.call(this)||this;return n.supportedQuestions=t,n.creator=o,n._orderedQuestions=["radiogroup","rating","checkbox","dropdown","tagbox","boolean","file","imagepicker","ranking","text","comment","multipletext","panel","paneldynamic","matrix","matrixdropdown","matrixdynamic","html","expression","image","signaturepad"],n.copiedItemMaxCount=3,n.allowExpandMultipleCategoriesValue=!1,n.keepAllCategoriesExpandedValue=!1,n.categoriesTitles={},n.updateResponsiveness(n.isCompact,n.overflowBehavior),n.createDefaultItems(t,r),n.initDotsItem(),n}return Y(t,e),t.getQuestionDefaultSettings=function(e){if(a.toolbox&&a.toolbox.defaultJSON)return a.toolbox.defaultJSON[e]},Object.defineProperty(t.prototype,"orderedQuestions",{get:function(){return this._orderedQuestions},set:function(e){this._orderedQuestions=e,this.reorderItems()},enumerable:!1,configurable:!0}),t.prototype.updateResponsiveness=function(e,t){"scroll"!=t||!this.creator||this.creator.isTouch?this.hasCategories&&this.showCategoryTitles?e?(this.isResponsivenessDisabled=!1,this.raiseUpdate(!0)):(this.isResponsivenessDisabled=!0,this.setActionsMode("large")):(this.isResponsivenessDisabled=!1,this.raiseUpdate(!0)):this.isResponsivenessDisabled=!0},t.prototype.initDotsItem=function(){var e=this;this.dotsItem.popupModel.horizontalPosition="right",this.dotsItem.popupModel.verticalPosition="top",this.dragOrClickHelper=new i.DragOrClickHelper((function(t,o,r){var n,i=e.creator.getJSONForNewElement(r.json);e.dotsItem.popupModel.toggleVisibility(),null===(n=e.creator)||void 0===n||n.onDragDropItemStart(),e.dragDropHelper.startDragToolboxItem(t,i,r)})),this.hiddenItemsListModel.onPointerDown=function(t,o){e.creator.readOnly||e.dragOrClickHelper.onPointerDown(t,o)},this.dotsItem.popupModel.cssClass="svc-toolbox-popup"},t.prototype.getDefaultQuestionCategories=function(){var e=this,o={};return Object.keys(t.defaultCategories).forEach((function(r){t.defaultCategories[r].forEach((function(t){e.supportedQuestions&&-1==e.supportedQuestions.indexOf(t)||(o[t]=r)}))})),o},t.prototype.getCategoryTitle=function(e){return this.categoriesTitles[e]?this.categoriesTitles[e]:z("toolboxCategories."+e)},t.prototype.onActiveCategoryChanged=function(e){for(var t=this.categories,o=0;o<t.length;o++){var r=t[o];r.collapsed=r.name!==e}},t.prototype.setLocation=function(e){"sidebar"===e?this.visibleActions.forEach((function(e){return e.mode="small"})):this.dotsItem.popupModel.horizontalPosition="right"==this.creator.toolboxLocation?"left":"right"},Object.defineProperty(t.prototype,"jsonText",{get:function(){return JSON.stringify(this.actions)},set:function(e){this.actions=(e?JSON.parse(e):[]).map((function(e){return new fe(e)})),this.onItemsChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"copiedJsonText",{get:function(){return JSON.stringify(this.copiedItems)},set:function(e){var t=e?JSON.parse(e):[];this.clearCopiedItems();for(var o=0;o<t.length;o++)t[o].isCopied=!0,this.addItem(t[o])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemNames",{get:function(){for(var e=[],t=0;t<this.items.length;t++)e.push(this.items[t].typeName);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"copiedItems",{get:function(){for(var e=[],t=0;t<this.actions.length;t++)this.actions[t].isCopied&&e.push(this.actions[t]);return e},enumerable:!1,configurable:!0}),t.prototype.addItems=function(e,t){void 0===t&&(t=!1),t&&this.clearItems();for(var o=0;o<e.length;o++)this.actions.push(this.getActionByItem(e[o]));this.onItemsChanged()},t.prototype.addCopiedItem=function(e,o){void 0===o&&(o=null),o||(o={});var r=o.name?o.name:e.name,n=o.title?o.title:r,i=o.tooltip?o.tooltip:n,a=o.iconName?o.iconName:t.defaultIconName,s={id:r,name:r,title:n,tooltip:i,className:"svc-toolbox__item svc-toolbox__item--"+a,isCopied:!1!==o.isCopied,iconName:a,json:o.json?o.json:this.getQuestionJSON(e),category:o.category?o.category:""};if(!this.replaceItem(s)){var l=this.copiedItems;this.copiedItemMaxCount>0&&l.length==this.copiedItemMaxCount&&this.removeItem(l[this.copiedItemMaxCount-1].name),this.addItem(s)}},t.prototype.getActionByItem=function(e){return e instanceof fe?e:(e.iconName=e.iconName?e.iconName:t.defaultIconName,new fe(e))},t.prototype.addItem=function(e,t){this.correctItem(e);var o=this.getActionByItem(e);void 0===t?this.actions.push(o):this.actions.splice(t,0,o),this.onItemsChanged()},t.prototype.correctItem=function(e){e.title||(e.title=e.name),e.tooltip||(e.tooltip=e.title)},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),t.prototype.replaceItem=function(e){this.correctItem(e);var t=this.indexOf(e.name);if(!(t<0))return this.actions[t]=this.getActionByItem(e),this.onItemsChanged(),!0},t.prototype.removeItem=function(e){var t=this.indexOf(e);return!(t<0)&&(this.actions.splice(t,1),this.onItemsChanged(),!0)},t.prototype.clearItems=function(){this.actions=[],this.onItemsChanged()},t.prototype.clearCopiedItems=function(){for(var e=this.copiedItems,t=0;t<e.length;t++)this.removeItem(e[t].name)},t.prototype.getItemByName=function(e){if(!e)return null;var t=this.indexOf(e);return t>-1?this.actions[t]:null},Object.defineProperty(t.prototype,"allowExpandMultipleCategories",{get:function(){return this.allowExpandMultipleCategoriesValue},set:function(e){this.allowExpandMultipleCategoriesValue=e,this.updateCategoriesState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepAllCategoriesExpanded",{get:function(){return this.keepAllCategoriesExpandedValue||!this.showCategoryTitlesValue},set:function(e){this.keepAllCategoriesExpandedValue=e,this.canCollapseCategories=!this.keepAllCategoriesExpanded,this.updateCategoriesState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCategoryTitles",{get:function(){return this.showCategoryTitlesValue},set:function(e){this.showCategoryTitlesValue=e,this.updateCategoriesState()},enumerable:!1,configurable:!0}),t.prototype.updateTitles=function(){var e=this;this.actions.forEach((function(t){e.updateActionTitle(t),e.updateActionTitle(t.innerItem)})),Array.isArray(this.categories)&&this.categories.forEach((function(t){t.title=e.getCategoryTitle(t.name)}))},t.prototype.updateActionTitle=function(e){var t=G.getString("qt."+e.id);t&&(e.title=t,e.tooltip=t)},t.prototype.updateCategoriesState=function(){this.allowExpandMultipleCategories||this.keepAllCategoriesExpanded?(this.activeCategory="",this.keepAllCategoriesExpandedValue&&this.expandAllCategories()):this.categories.length>0&&(this.activeCategory=this.categories[0].name)},t.prototype.changeCategory=function(e,t){this.changeCategories([{name:e,category:t}])},t.prototype.changeCategories=function(e){for(var t=0;t<e.length;t++){var o=e[t],r=this.getItemByName(o.name);r&&(r.category=o.category)}this.onItemsChanged()},t.prototype.defineCategories=function(e,t){var o=this;if(void 0===t&&(t=!1),Array.isArray(e)){this.actions.forEach((function(e){e.visible=!1})),this.categoriesTitles={};var r=new Array;e.forEach((function(e){e.category&&e.title&&(o.categoriesTitles[e.category]=e.title),Array.isArray(e.items)&&e.items.forEach((function(t){var n=void 0,i=void 0;"string"==typeof t?n=t:(n=t.name,i=t.title);var a=o.getItemByName(n);a&&(a.category=e.category,a.visible=!0,i&&(a.title=i),r.push(a))}))})),this.actions.forEach((function(e){e.visible||(t&&(e.visible=!0,e.category="misc"),r.push(e))})),this.setItems(r),this.onItemsChanged(!1)}},t.prototype.removeCategories=function(){var e=i.ElementFactory.Instance.getAllTypes();this.changeCategories(e.map((function(e){return{name:e,category:null}}))),this.onItemsChanged()},t.prototype.toggleCategoryState=function(e){if(!this.keepAllCategoriesExpanded)if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!t.collapsed)}else this.activeCategory=e},t.prototype.expandCategory=function(e){if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!1)}else this.canCollapseCategories&&(this.activeCategory=e)},t.prototype.collapseCategory=function(e){if(this.allowExpandMultipleCategories){var t=this.getCategoryByName(e);t&&(t.collapsed=!0)}},t.prototype.expandAllCategories=function(){this.expandCollapseAllCategories(!1)},t.prototype.collapseAllCategories=function(){this.expandCollapseAllCategories(!0)},t.prototype.expandCollapseAllCategories=function(e){for(var t=this.categories,o=0;o<t.length;o++)t[o].collapsed=e},t.prototype.getCategoryByName=function(e){for(var t=this.categories,o=0;o<t.length;o++){var r=t[o];if(r.name===e)return r}return null},t.prototype.onItemsChanged=function(e){var t=this;void 0===e&&(e=!0);for(var o=new Array,r={},n=this.activeCategory,i=function(e){var i=a.actions[e];if(i.innerItem.action=function(){t.creator.clickToolboxItem(i.json)},!1===i.visible)return"continue";var s=i.category?i.category:"general";if(!r[s]){var l=a.createCategory();l.name=s,l.title=a.getCategoryTitle(s),l.collapsed=s!==n&&!a.keepAllCategoriesExpanded,r[s]=l,o.push(l)}r[s].items.push(i)},a=this,s=0;s<this.actions.length;s++)i(s);if(this.categories=o,this.keepAllCategoriesExpanded||(this.allowExpandMultipleCategories?o.length>0&&(o[0].collapsed=!1):n&&r[n]?this.activeCategory=n:this.activeCategory=o.length>0?o[0].name:""),e){var l=[];this.categories.forEach((function(e){l=l.concat(e.items)})),this.actions=l}this.hasCategories=o.length>1,this.updateItemSeparators(),this.raiseUpdate(!1)},t.prototype.createCategory=function(){return new ge(this)},t.prototype.indexOf=function(e){for(var t=0;t<this.actions.length;t++)if(this.actions[t].name==e)return t;return-1},t.prototype.updateItemSeparators=function(){(this.hasCategories?this.categories:[{items:this.actions}]).forEach((function(e,t){(e.items||[]).forEach((function(e,o){e.needSeparator=0!==t&&0==o,e.innerItem&&(e.innerItem.needSeparator=e.needSeparator)}))}))},t.prototype.reorderItems=function(){var e=this;this.actions.sort((function(t,o){var r=e._orderedQuestions.indexOf(t.name);-1===r&&(r=Number.MAX_VALUE);var n=e._orderedQuestions.indexOf(o.name);return-1===n&&(n=Number.MAX_VALUE),r-n})),this.onItemsChanged()},t.prototype.createDefaultItems=function(e,t){this.clearItems();for(var o=this.getQuestionTypes(e),r=t?this.getDefaultQuestionCategories():{},n=0;n<o.length;n++){var a=o[n],s=i.ElementFactory.Instance.createElement(a,"q1");s||(s=i.Serializer.createClass(a));var l=this.getQuestionJSON(s),c=G.getString("qt."+a),p="icon-"+a,u={id:a,name:a,iconName:p,title:c,tooltip:c,className:"svc-toolbox__item svc-toolbox__item--"+p,json:l,isCopied:!1,category:r[a]||""};this.actions.push(this.getActionByItem(u))}this.registerCustomWidgets(),this.registerComponentQuestions(),this.onItemsChanged()},t.prototype.registerCustomWidgets=function(){var e=i.CustomWidgetCollection.Instance;if(e.getActivatedBy)for(var t=e.widgets,o=0;o<t.length;o++)t[o].canShowInToolbox&&this.addItemFromJSON(t[o].widgetJson)},t.prototype.registerComponentQuestions=function(){for(var e=this.getComponentItems(),t=0;t<e.length;t++)this.addItemFromJSON(e[t].json)},t.prototype.getComponentItems=function(){var e=void 0;if(e||(e=i.ComponentCollection),!e)return[];var t=e.Instance.items;return t||[]},t.prototype.addItemFromJSON=function(e){if(!1!==e.showInToolbox){var o=e.iconName?e.iconName:t.defaultIconName,r=G.getString("qt."+e.name);r&&r!=e.name||(r=e.title),r||(r=e.name);var n=e.defaultJSON?e.defaultJSON:{};n.type||(n.type=e.name);var a=e.category?e.category:"",s=new i.Action({id:e.name,name:e.name,iconName:o,title:r,tooltip:r,className:"svc-toolbox__item svc-toolbox__item--"+o,json:n,isCopied:!1,category:a}),l=this.getActionByItem(s),c=this.getActionById(s.id);if(c)this.actions.splice(this.actions.indexOf(c),1,l);else{var p=Array.isArray(this.supportedQuestions)?this.supportedQuestions.indexOf(s.id):-1;p>-1?this.actions.splice(p,0,l):this.actions.push(l)}}},t.prototype.getQuestionJSON=function(e){var o=(new i.JsonObject).toJsonObject(e);o.type=e.getType();var r=t.getQuestionDefaultSettings(o.type);if(r)for(var n in r)o[n]=r[n];return o},t.prototype.isHiddenCustomWidget=function(e){var t=i.CustomWidgetCollection.Instance.getCustomWidgetByName(e);return!!t&&!t.showInToolbox},t.prototype.getQuestionTypes=function(e){var o=i.ElementFactory.Instance.getAllTypes();e&&0!=e.length||(e=o);for(var r=[],n=0;n<this.orderedQuestions.length;n++){var a=this.orderedQuestions[n];e.indexOf(a)>-1&&o.indexOf(a)>-1&&r.push(a)}for(n=0;n<e.length;n++){var s=e[n];r.indexOf(s)<0&&t.hiddenTypes.indexOf(s)<0&&o.indexOf(s)>-1&&!this.isHiddenCustomWidget(s)&&r.push(s)}return r},t.hiddenTypes=["buttongroup","linkvalue","embeddedsurvey","spinedit","color","fileedit","textwithreset","commentwithreset"],t.defaultIconName="icon-default",t.defaultCategories={choice:["radiogroup","rating","checkbox","dropdown","tagbox","boolean","file","imagepicker","ranking"],text:["text","comment","multipletext"],containers:["panel","paneldynamic"],matrix:["matrix","matrixdropdown","matrixdynamic"],misc:["html","expression","image","signaturepad"]},Z([Object(i.property)({defaultValue:!1})],t.prototype,"showCategoryTitlesValue",void 0),Z([Object(i.propertyArray)()],t.prototype,"categories",void 0),Z([Object(i.property)({defaultValue:"",onSet:function(e,t){t.onActiveCategoryChanged(e)}})],t.prototype,"activeCategory",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"hasCategories",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"canCollapseCategories",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.updateResponsiveness(e,t.overflowBehavior)}})],t.prototype,"isCompact",void 0),Z([Object(i.property)({defaultValue:"scroll",onSet:function(e,t){t.updateResponsiveness(t.isCompact,e)}})],t.prototype,"overflowBehavior",void 0),Z([Object(i.property)()],t.prototype,"forceCompact",void 0),t}(i.AdaptiveActionContainer),ye=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.items=[],o}return Y(t,e),Object.defineProperty(t.prototype,"hasPrev",{get:function(){return this.currentIndex>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasNext",{get:function(){var e=this.currentIndex;return e>-1&&e<this.items.length-1},enumerable:!1,configurable:!0}),t.prototype.hasInHistory=function(e){return this.getIndex(e)>-1},t.prototype.prev=function(){this.selectElement(this.currentIndex-1)},t.prototype.next=function(){this.selectElement(this.currentIndex+1)},t.prototype.reset=function(){this.items=[],this.creator.selectedElement&&this.onObjSelected(this.creator.selectedElement)},t.prototype.selectFromAction=function(e,t){var o=this.currentIndex;o>-1&&o<this.items.length&&(this.items[o].propertyName=t),this.creator.selectElement(e)},t.prototype.onObjSelected=function(e){if(!this.isChangingInternally){var t=this.currentIndex;t>-1&&this.items.splice(t,1),this.items.push({obj:e})}},Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this.getIndex(this.creator.selectedElement)},enumerable:!1,configurable:!0}),t.prototype.getIndex=function(e){if(!e)return-1;this.updateItems();for(var t=0;t<this.items.length;t++)if(this.items[t].obj==e)return t;return-1},t.prototype.selectElement=function(e){if(!(e<0||e>=this.items.length)){this.isChangingInternally=!0;var t=this.items[e];this.creator.selectElement(t.obj,t.propertyName),this.isChangingInternally=!1}},t.prototype.updateItems=function(){for(var e=this.items.length-1;e>=0;e--){var t=this.items[e].obj;!t||!t.isDisposed&&t.inSurvey||this.items.splice(e,1)}},t}(i.Base),be=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.isJSONChanged=!1,o.isProcessingImmediately=!1,o.jsonEditorChangedTimeoutId=-1,o}return Y(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.setText(e)},enumerable:!1,configurable:!0}),t.prototype.onEditorActivated=function(){},t.prototype.onPluginActivate=function(){this.text=this.creator.text,this.onEditorActivated(),this.isJSONChanged=!1},t.prototype.onTextChanged=function(){if(-1!==this.jsonEditorChangedTimeoutId&&clearTimeout(this.jsonEditorChangedTimeoutId),this.isProcessingImmediately)this.jsonEditorChangedTimeoutId=-1;else{var e=this;window&&(this.jsonEditorChangedTimeoutId=window.setTimeout((function(){e.jsonEditorChangedTimeoutId=-1,e.processErrors(e.text)}),t.updateTextTimeout))}},Object.defineProperty(t.prototype,"errorList",{get:function(){var e=this;return this.errorListValue||(this.errorListValue=new i.ListModel([],(function(t){var o=t.data.error;o&&e.gotoError(o.at,o.rowAt,o.columnAt)}),!1),this.errorListValue.searchEnabled=!1,this.errorListValue.cssClasses={item:"svc-json-errors__item",itemBody:"svc-json-error",itemsContainer:"svc-json-errors"},this.errorListValue.hasVerticalScroller=!0),this.errorListValue},enumerable:!1,configurable:!0}),t.prototype.setErrors=function(e){var t=e.length>0;if(t){var o=[];this.createErrorActions(e).forEach((function(e){return o.push(e)})),this.errorList.setItems(o)}this.hasErrors=t},t.prototype.gotoError=function(e,t,o){},t.prototype.createErrorActions=function(e){var t=this,o=[],r=1;return e.forEach((function(e){var n=e.rowAt>-1?"Line: "+(e.rowAt+1)+". ":"",a=e.text;a.length>153&&(a=a.substring(0,150)+"..."),a=n+a;e.at;o.push(new i.Action({id:"error_"+r++,component:"json-error-item",title:a,tooltip:e.text,iconName:"icon-error",iconSize:16,data:{error:e,showFixButton:e.isFixable,fixError:function(){t.text=e.fixError(t.text)},fixButtonIcon:"icon-fix",fixButtonTitle:"Fix error"}}))})),o},t.prototype.processErrors=function(e){var t=new de(e);this.setErrors(t.errors)},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.creator.readOnly},enumerable:!1,configurable:!0}),t.updateTextTimeout=1e3,Z([Object(i.property)()],t.prototype,"hasErrors",void 0),t}(i.Base),ve=function(){function e(e){this.creator=e,this.saveToFileHandler=F,this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.exportToFile=function(e){if(this.model){var t=new Blob([this.model.text],{type:"application/json"});this.saveToFileHandler(e,t)}},e.prototype.importFromFile=function(e,t){var o=this,r=new FileReader;r.onload=function(e){var n=r.result;o.model&&(o.model.text=n,o.model.isJSONChanged=!0),t&&t(n)},r.readAsText(e)},e.prototype.copyToClipboard=function(){this.model&&navigator.clipboard.writeText(this.model.text)},e.prototype.createActions=function(){var e=this,t=[];return this.importAction=new i.Action({id:"svc-json-import",iconName:"icon-load",locTitleName:"ed.surveyJsonImportButton",locTooltipName:"ed.surveyJsonImportButton",visible:new i.ComputedUpdater((function(){return"editor"===e.creator.activeTab})),mode:"small",component:"sv-action-bar-item",needSeparator:!0,action:function(){document&&(e.inputFileElement||(e.inputFileElement=document.createElement("input"),e.inputFileElement.type="file",e.inputFileElement.style.display="none",e.inputFileElement.onchange=function(){e.inputFileElement.files.length<1||(e.importFromFile(e.inputFileElement.files[0]),e.inputFileElement.value="")}),e.inputFileElement.click())}}),t.push(this.importAction),this.exportAction=new i.Action({id:"svc-json-export",iconName:"icon-download",locTitleName:"ed.surveyJsonExportButton",locTooltipName:"ed.surveyJsonExportButton",visible:new i.ComputedUpdater((function(){return"editor"===e.creator.activeTab})),mode:"small",component:"sv-action-bar-item",action:function(){e.exportToFile(a.jsonEditor.exportFileName)}}),t.push(this.exportAction),this.copyAction=new i.Action({id:"svc-json-copy",iconName:"icon-copy",locTitleName:"ed.surveyJsonCopyButton",locTooltipName:"ed.surveyJsonCopyButton",visible:new i.ComputedUpdater((function(){return"editor"===e.creator.activeTab})),mode:"small",component:"sv-action-bar-item",action:function(){e.copyToClipboard()}}),t.push(this.copyAction),t},e.prototype.activate=function(){this.model=this.createModel(this.creator)},e.prototype.deactivate=function(){if(this.model){if(!new de(this.model.text).isJsonCorrect)return!1;!this.model.readOnly&&this.model.isJSONChanged&&(this.creator.selectedElement=void 0,this.creator.text=this.model.text,this.creator.selectedElement=this.creator.survey,this.creator.setModified({type:"JSON_EDITOR"})),this.model.dispose(),this.model=void 0}return!0},e.prototype.defaultAllowingDeactivate=function(){if(!this.model)return!0;var e=new de(this.model.text);return e.isJsonCorrect?!e.isJsonHasErrors:void 0},e}();o(5);var xe=function(e){function t(t){var o=e.call(this,t)||this;return o.aceCanUndo=!1,o.aceCanRedo=!1,o}return Y(t,e),t.prototype.getText=function(){return this.aceEditor?this.aceEditor.getValue():""},t.prototype.setText=function(e){this.isProcessingImmediately=!0,this.aceEditor.setValue(e),this.aceEditor.renderer.updateFull(!0),this.aceEditor.getSession().getUndoManager().reset(),this.processErrors(e),this.isProcessingImmediately=!1},t.prototype.init=function(e){var o,r;this.aceEditor=e;var n=null===(r=null===(o=window.ace)||void 0===o?void 0:o.define)||void 0===r?void 0:r.modules;if(n&&n["ace/ext/searchbox"]||this.aceEditor.commands.removeCommand("find"),this.aceEditor.setReadOnly(this.readOnly),t.aceBasePath)try{window.ace.config.set("basePath",t.aceBasePath),this.aceEditor.session.setMode("ace/mode/json")}catch(e){}var i=this;this.aceEditor.setShowPrintMargin(!1),this.aceEditor.getSession().on("change",(function(){i.onTextChanged()})),this.aceEditor.getSession().setUseWorker(!0),de.newLineChar=this.aceEditor.session.doc.getNewLineCharacter(),this.onPluginActivate()},t.prototype.updateUndoRedoState=function(){var e=this.aceEditor.getSession().getUndoManager();this.aceCanUndo=e.hasUndo(),this.aceCanRedo=e.hasRedo(),!0===this.aceEditor.isFocused()&&(this.isJSONChanged=!e.isClean())},t.prototype.onTextChanged=function(){this.updateUndoRedoState(),e.prototype.onTextChanged.call(this)},t.prototype.createAnnotations=function(e){for(var t=[],o=0;o<e.length;o++){var r=e[o],n={row:r.rowAt,column:r.columnAt,text:r.text,type:"error"};t.push(n)}return t},t.prototype.setErrors=function(t){var o=this;e.prototype.setErrors.call(this,t),this.aceEditor.getSession().setAnnotations(this.createAnnotations(t)),setTimeout((function(){return o.aceEditor.resize()}))},t.prototype.gotoError=function(e,t,o){this.aceEditor.focus(),this.aceEditor.renderer.scrollCursorIntoView({row:t+1,column:o+1},.5),this.aceEditor.gotoLine(t+1,o+1)},t.prototype.onEditorActivated=function(){this.aceEditor.getSession().getUndoManager().markClean(),this.updateUndoRedoState(),this.aceEditor.focus()},t.aceBasePath="",Z([Object(i.property)()],t.prototype,"aceCanUndo",void 0),Z([Object(i.property)()],t.prototype,"aceCanRedo",void 0),t}(be),we=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,void 0,"svc-tab-json-editor-ace"),o}return Y(t,e),t.prototype.createModel=function(e){return new xe(e)},t.hasAceEditor=function(){return void 0!==window.ace},t}(ve);o(6);var je=function(e){function t(t){var o=e.call(this,t)||this;return o.ariaLabel=z("tabs.editor"),o.onPluginActivate(),o}return Y(t,e),t.prototype.checkKey=function(e,t){if("Tab"===t.key){t.preventDefault();var o=t.target,r=o.selectionStart,n=o.selectionEnd;o.value=o.value.substring(0,r)+"\t"+o.value.substring(n),o.selectionStart=o.selectionEnd=r+1,t.stopPropagation()}return!0},t.prototype.getText=function(){return this._text},t.prototype.setText=function(e){this.isProcessingImmediately=!0,this._text=e,this.processErrors(e),this.isProcessingImmediately=!1},t.prototype.gotoError=function(e,t,o){if(this.textElement){var r=this.textElement;r.selectionStart=e,r.selectionEnd=e,r.focus()}},Object.defineProperty(t.prototype,"errorButtonText",{get:function(){return this.canShowErrors?z("ed.jsonHideErrors"):z("ed.jsonShowErrors")},enumerable:!1,configurable:!0}),t.prototype.toggleErrors=function(){this.canShowErrors=!this.canShowErrors},Object.defineProperty(t.prototype,"userFriendlyErrors",{get:function(){if(0===this._errors.length)return[];for(var e=[],t=0;t<this._errors.length-1;t++)e[t]=this._errors[t].text,e[t]+="\n\n";return e[this._errors.length-1]=this._errors[this._errors.length-1].text,e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},enumerable:!1,configurable:!0}),t.prototype.onTextChanged=function(){this.isJSONChanged=!0,e.prototype.onTextChanged.call(this)},t.prototype.setErrors=function(t){this._errors=t,e.prototype.setErrors.call(this,t)},Z([Object(i.property)({defaultValue:"",onSet:function(e,t){return t.onTextChanged()}})],t.prototype,"_text",void 0),Z([Object(i.propertyArray)()],t.prototype,"_errors",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"canShowErrors",void 0),t}(be),Ce=function(e){function t(t){var o=e.call(this,t)||this;return t.addPluginTab("editor",o,void 0,"svc-tab-json-editor-textarea"),o}return Y(t,e),t.prototype.createModel=function(e){return new je(e)},t}(ve);o(7);var Se=function(e){function t(){var t=e.call(this)||this;return t.activateZoom=function(){document.addEventListener("keydown",t.listenTryToZoom),document.addEventListener("wheel",t.listenTryToZoomWithWheel,{passive:!1})},t.deactivateZoom=function(){document.removeEventListener("keydown",t.listenTryToZoom),document.removeEventListener("wheel",t.listenTryToZoomWithWheel)},t.listenTryToZoomWithWheel=function(e){return t.tryToZoomWithWheel(e,e)},t.listenTryToZoom=function(e){return t.tryToZoom(e,e)},t}return Y(t,e),Object.defineProperty(t.prototype,"zoomScale",{get:function(){return this.currZoomScale},enumerable:!1,configurable:!0}),t.prototype.tryToZoomWithWheel=function(e,t){var o=t.deltaY;return(t.ctrlKey||t.metaKey)&&(o<0?this.zoomSimulator("up",t):this.zoomSimulator("down",t)),!0},t.prototype.tryToZoom=function(e,t){return(t.ctrlKey||t.metaKey)&&(107!=t.keyCode&&187!=t.keyCode||this.zoomSimulator("up",t),109!=t.keyCode&&189!=t.keyCode||this.zoomSimulator("down",t),48!=t.keyCode&&96!=t.keyCode||this.zoomSimulator("zero",t)),!0},t.prototype.changeZoomScale=function(e){var t="up"===e?1.01:"down"===e?1/1.01:1;this.currZoomScale="zero"===e?1:this.currZoomScale*t},t.prototype.zoomSimulator=function(e,t){t.preventDefault(),this.changeZoomScale(e);var o=document.getElementById("svd-simulator-wrapper");o&&(o.style.transform="scale("+this.currZoomScale+")"),t.stopPropagation()},t.prototype.resetZoomParameters=function(){this.currZoomScale=1;var e=document.getElementById("svd-simulator-wrapper");e&&(e.style.transform="")},Object.defineProperty(t.prototype,"activeDevice",{get:function(){return this.device},set:function(e){this.device=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"landscapeOrientation",{get:function(){return this.landscape},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasFrame",{get:function(){var e=Pe[this.activeDevice];return this.simulatorEnabled&&"desktop"!==e.deviceType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"simulatorFrame",{get:function(){if(this.hasFrame){var e=Pe[this.activeDevice],t=(this.landscapeOrientation?e.height:e.width)/e.cssPixelRatio,o=(this.landscapeOrientation?e.width:e.height)/e.cssPixelRatio,r=(this.landscapeOrientation?e.height:e.width)/e.cssPixelRatio,n=(this.landscapeOrientation?e.width:e.height)/e.cssPixelRatio,i=1*r+2*(this.landscapeOrientation?64:16),a=1*n+2*(this.landscapeOrientation?16:64);return{scale:(this.simulatorScaleEnabled,1),frameWidth:i,frameHeight:a,landscapedFrameWidth:this.landscapeOrientation?a:i,landscapedFrameHeight:this.landscapeOrientation?i:a,deviceWidth:t,deviceHeight:o,cssClass:e.cssClass+(this.landscapeOrientation?" svd-simulator-frame-landscape":"")}}},enumerable:!1,configurable:!0}),t.prototype.getRootCss=function(){return(new i.CssClassBuilder).append("svd-simulator-main").append("svd-simulator-main--frame",this.hasFrame).append("svd-simulator-main--desktop","desktop"===this.device).append("svd-simulator-main--running",this.isRunning).toString()},Z([Object(i.property)({defaultValue:!0})],t.prototype,"landscape",void 0),Z([Object(i.property)()],t.prototype,"survey",void 0),Z([Object(i.property)({defaultValue:"desktop"})],t.prototype,"device",void 0),Z([Object(i.property)({defaultValue:"l"})],t.prototype,"orientation",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"considerDPI",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isRunning",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"simulatorEnabled",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"simulatorScaleEnabled",void 0),t}(i.Base),Te=96*("undefined"!=typeof window?window.devicePixelRatio:1),Pe={desktop:{deviceType:"desktop",title:"Desktop"},iPhoneSE:{cssPixelRatio:2,ppi:326,width:750,height:1334,deviceType:"phone",title:"iPhone SE",cssClass:"svd-simulator-iphonexmax"},iPhone15:{cssPixelRatio:3,ppi:460,width:1179,height:2556,deviceType:"phone",title:"iPhone 15",cssClass:"svd-simulator-iphonexmax"},iPhone15Plus:{cssPixelRatio:3,ppi:460,width:1290,height:2796,deviceType:"phone",title:"iPhone 15 Plus",cssClass:"svd-simulator-iphonexmax"},iPadMini:{cssPixelRatio:2.5,ppi:326,width:1536,height:2048,deviceType:"tablet",title:"iPad Mini",cssClass:"svd-simulator-ipadmini"},iPad:{cssPixelRatio:2,ppi:264,width:1640,height:2360,deviceType:"tablet",title:"iPad Air",cssClass:"svd-simulator-ipad"},androidPhone:{cssPixelRatio:3,ppi:411,width:1080,height:2048,deviceType:"phone",title:"Android Phone",cssClass:"svd-simulator-androidphone"},androidTablet:{cssPixelRatio:1.5,ppi:149,width:800,height:1280,deviceType:"tablet",title:"Android Tablet",cssClass:"svd-simulator-androidtablet"},msSurface:{cssPixelRatio:1,ppi:148,width:768,height:1366,deviceType:"tablet",title:"MS Surface",cssClass:"svd-simulator-mssurface"},genericPhone:{cssPixelRatio:1,deviceType:"phone",title:"",cssClass:"svd-simulator-genphone"}},Ee=function(e){function t(t,o){void 0===o&&(o=i.defaultV2Css);var r=e.call(this)||this;return r.surveyProvider=t,r.startThemeClasses=o,r.enableInvisiblePages=!0,r.pages=new i.ActionContainer,r.simulator=new Se,r}return Y(t,e),Object.defineProperty(t.prototype,"activeLanguage",{get:function(){return this.getPropertyValue("activeLanguage",this.survey.locale||i.surveyLocalization.defaultLocale)},set:function(e){e!==this.activeLanguage&&(this.setPropertyValue("activeLanguage",e),this.survey.locale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.simulator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageActions",{get:function(){return this.pages.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPageToolbarVisible",{get:function(){return this.pages.visibleActions.length>0&&!this.surveyProvider.isMobileView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileView",{get:function(){return this.surveyProvider.isMobileView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showResults",{get:function(){return this.getShowResults()},enumerable:!1,configurable:!0}),t.prototype.updateSimulatorSurvey=function(e,t){var o=this,r=this.surveyProvider.createSurvey(e||{},this.getTabName(),this,(function(e){e.applyTheme(o.surveyProvider.theme),e.setCss(t,!1),e.fitToContainer=!0,e.addLayoutElement({id:"complete-customization",container:"completePage",component:"svc-complete-page",data:o})})),n=!!this.simulator.survey;this.simulator.survey=r,this.onSurveyCreatedCallback&&this.onSurveyCreatedCallback(this.survey),this.survey.onComplete.add((function(e){o.isRunning=!1})),this.survey.onNavigateToUrl&&this.survey.onNavigateToUrl.add((function(e,t){var o=t.url;if(t.url="",o){var r=z("ed.navigateToMsg")+" '"+o+"'.";this.surveyProvider?this.surveyProvider.notify(r):alert(r)}})),this.survey.onStarted.add((function(e){o.setActivePageItem(o.simulator.survey.activePage,!0)})),this.survey.onCurrentPageChanged.add((function(e,t){o.activePage=t.newCurrentPage,o.setActivePageItem(t.oldCurrentPage,!1),o.setActivePageItem(t.newCurrentPage,!0)})),this.survey.onPageVisibleChanged.add((function(e,t){o.updatePageItem(t.page),o.updatePrevNextPageActionState()})),n&&this.show()},t.prototype.setJSON=function(e,t){this.json=e,null!=e&&e.cookieName&&delete e.cookieName,this.updateSimulatorSurvey(e,t)},t.prototype.initialize=function(e,t){this.setJSON(e,this.startThemeClasses),this.updatePageList(),void 0!==t.showPagesInTestSurveyTab&&(this.showPagesInTestSurveyTab=t.showPagesInTestSurveyTab),this.buildActions()},t.prototype.updatePageItem=function(e){var t=this.getPageItemByPage(e);t&&(t.enabled=this.enableInvisiblePages||e.isVisible)},t.prototype.getCurrentPageItem=function(){return this.pageListItems[this.survey.pages.indexOf(this.survey.activePage)]},t.prototype.getSelectPageTitle=function(){return this.activePage&&this.getPageTitle(this.activePage,"preview-tab:selected-page","survey-tester-selected")||z("ts.selectPage")},t.prototype.getPageTitle=function(e,o,r){void 0===o&&(o="preview-tab:page-list"),void 0===r&&(r="survey-tester");var n=e.title.replace(t.tagRegex,""),i=this.surveyProvider.getObjectDisplayName(e,o,r,n);if(i===e.name&&0===i.indexOf("page")){var a=this.survey.pages.indexOf(e);return G.getString("ed.pageTypeName")+" "+(a+1)}return i},t.prototype.updatePageList=function(){for(var e=[],t=0;t<this.survey.pages.length;t++){var o=this.survey.pages[t];e.push({id:o.name,data:o,title:this.getPageTitle(o),enabled:this.enableInvisiblePages||o.isVisible,visible:!0})}this.pageListItems=e},t.prototype.getTabName=function(){return""},t.prototype.getShowResults=function(){return!1},t.prototype.show=function(){this.showInvisibleElements=!1,this.activePage=this.survey.activePage,this.survey.locale=this.activeLanguage,this.isRunning=!0},t.prototype.testAgain=function(){this.setJSON(this.json,this.simulator.survey.css),this.updatePageList(),this.show()},t.prototype.buildActions=function(){var e=this,t=[],o=function(t){var o=e.survey.currentPageNo,r=o+(t?1:-1);"starting"===e.survey.state&&t&&(r=0);var n=e.survey.visiblePages[r];!t&&0===o&&e.survey.firstPageIsStarted&&e.survey.pages.length>0&&(n=e.survey.pages[0]);var i=e.survey.pages.indexOf(n);e.activePage=e.survey.pages[i],e.selectPageAction.data.selectedItem=e.pageListItems[i]};this.prevPageAction&&(this.prevPageAction.visible=new i.ComputedUpdater((function(){var t="running"===e.survey.state,o=e.getTabName()===e.surveyProvider.activeTab;return O(e.isRunning,o,e.pageListItems.length>1)&&t})),this.prevPageAction.iconName=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-left":"icon-arrow-left_16x16"})),this.prevPageAction.iconSize=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.prevPageAction.action=function(){return o(!1)},t.push(this.prevPageAction)),this.selectPageAction=Object(i.createDropdownActionModel)({id:"pageSelector",css:"svc-page-selector",title:this.getSelectPageTitle(),visible:this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab},{items:this.pageListItems,allowSelection:!0,selectedItem:this.getCurrentPageItem(),onSelectionChanged:function(t){e.activePage=t.data;for(var o=0;o<e.survey.pages.length&&e.survey.pages[o]!==e.activePage;o++)e.survey.pages[o].passed=!0},verticalPosition:"top",horizontalPosition:"center"}),t.push(this.selectPageAction),this.selectPageAction.visible=new i.ComputedUpdater((function(){return"running"===e.survey.state})),this.nextPageAction&&(this.nextPageAction.visible=new i.ComputedUpdater((function(){var t="running"===e.survey.state,o=e.getTabName()===e.surveyProvider.activeTab;return O(e.isRunning,o,e.pageListItems.length>1)&&t})),this.nextPageAction.iconName=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?"icon-arrow-right":"icon-arrow-right_16x16"})),this.nextPageAction.iconSize=new i.ComputedUpdater((function(){return e.surveyProvider.isMobileView?24:16})),this.nextPageAction.action=function(){return o(!0)},t.push(this.nextPageAction)),this.pages.actions=t,this.pages.containerCss="sv-action-bar--pages",this.updatePrevNextPageActionState()},t.prototype.setActivePageItem=function(e,t){var o=this.getPageItemByPage(e);o&&(o.active=t)},t.prototype.getPageItemByPage=function(e){var t=this.selectPageAction.popupModel.contentComponentData.model;if(t&&Array.isArray(t.actions)){for(var o=t.actions,r=0;r<o.length;r++)if(o[r].data===e)return o[r];return null}},t.prototype.updateResultsTemplate=function(e){this.simulator.survey.setCss(e,!1),this.simulator.survey.render()},t.prototype.setTheme=function(e,t){var o=t.filter((function(t){return t.name===e})),r=i.defaultV2Css;o.length>0&&(r=o[0].theme),this.isRunning?this.updateSimulatorSurvey(this.json,r):this.updateResultsTemplate(r)},t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),this.pages.hasActions&&("activePage"===t&&(this.updatePrevNextPageActionState(),this.selectPageAction.title=this.getSelectPageTitle()),"isRunning"!==t&&"pageListItems"!==t&&"showPagesInTestSurveyTab"!==t||(this.selectPageAction.popupModel.contentComponentData.model.items=this.pageListItems,this.selectPageAction.popupModel.contentComponentData.model.selectedItem=this.getCurrentPageItem(),this.selectPageAction.visible=this.isRunning&&this.pageListItems.length>1&&this.showPagesInTestSurveyTab))},t.prototype.updatePrevNextPageActionState=function(){if(this.prevPageAction&&this.survey){var e=this.survey.firstPageIsStarted&&"starting"!==this.survey.state||!this.survey.firstPageIsStarted&&!this.survey.isFirstPage;this.prevPageAction.enabled=e;var t=this.survey&&this.survey.visiblePages.indexOf(this.activePage)!==this.survey.visiblePages.length-1;this.nextPageAction.enabled=t}},t.prototype.onScroll=function(){return this.survey.onScroll(),!0},t.prototype.dispose=function(){this.selectPageAction&&this.selectPageAction.dispose(),this.simulator.dispose(),e.prototype.dispose.call(this)},t.tagRegex=/(<([^>]+)>)/gi,Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.simulator.survey.showInvisibleElements=e}})],t.prototype,"showInvisibleElements",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showPagesInTestSurveyTab",void 0),Z([Object(i.property)({defaultValue:!0,onSet:function(e,t){t.simulator&&(t.simulator.isRunning=e)}})],t.prototype,"isRunning",void 0),Z([Object(i.propertyArray)()],t.prototype,"pageListItems",void 0),Z([Object(i.property)({onSet:function(e,t){if(e){var o=t.simulator.survey;o.firstPageIsStarted&&(e===o.pages[0]?o.clear(!1,!0):"starting"==o.state&&o.setPropertyValue("isStartedState",!1)),"starting"!==o.state&&(o.currentPage=e)}t.updatePrevNextPageActionState()}})],t.prototype,"activePage",void 0),t}(i.Base);o(8);var Ie=function(e){function t(t,o){return e.call(this,t,o)||this}return Y(t,e),t.prototype.getTabName=function(){return"test"},t.prototype.getShowResults=function(){return this.surveyProvider.previewShowResults&&!this.isRunning&&!this.isMobileView},t}(Ee),Oe=function(){function e(e){this.creator=e,this.simulatorTheme=i.surveyCss[i.defaultV2ThemeName],e.addPluginTab("test",this),this.setPreviewTheme(this.creator.themeForPreview),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.setDevice=function(e){this.model.simulator.device=e,this.model.simulator.resetZoomParameters();var t=Pe[this.model.simulator.device].deviceType;this.orientationSelectorAction.enabled="desktop"!=t,this.deviceSelectorAction.iconName="icon-device-"+t,this.deviceSelectorAction.title=z("pe.simulator")},e.prototype.setDefaultLanguageOption=function(e){var t=this,o=!0===e||"all"===e||"auto"===e&&this.model.survey.getUsedLocales().length>1;this.languageSelectorAction.visible=o;var r=[];o&&(r=this.getLanguages("all"!==e?this.model.survey.getUsedLocales():null)),this.languageSelectorAction.popupModel.contentComponentData.model.setItems(r),this.languageSelectorAction.data.selectedItem=r.filter((function(e){return e.id===t.model.activeLanguage}))[0]},e.prototype.getLanguages=function(e){void 0===e&&(e=null);for(var t=[],o=e&&e.length>1?e:i.surveyLocalization.getLocales(),r=0;r<o.length;r++){var n=o[r];t.push({id:n,title:G.getLocaleName(n)})}return t},e.prototype.updateActions=function(){this.languageSelectorAction.title=G.getLocaleName(this.model.activeLanguage),this.languageSelectorAction.visible=!0,this.creator.showSimulatorInTestSurveyTab&&(this.setDevice(this.model.simulator.device),this.deviceSelectorAction.data.selectedItem={id:this.model.simulator.device},this.orientationSelectorAction.title=z("pe.portraitOrientation")),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction.css=this.model.showInvisibleElements?"sv-action-bar-item--active":"",this.invisibleToggleAction.visible=this.model.isRunning),null!=this.creator.showDefaultLanguageInTestSurveyTab&&this.setDefaultLanguageOption(this.creator.showDefaultLanguageInTestSurveyTab)},e.prototype.setPreviewTheme=function(e){this.simulatorTheme=i.surveyCss[e]||i.surveyCss[i.defaultV2ThemeName]},e.prototype.createVisibleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){return"test"===e.creator.activeTab}))},e.prototype.activate=function(){this.model=new Ie(this.creator,this.simulatorTheme),this.model.simulator.landscape="portrait"!=this.creator.previewOrientation,this.update()},e.prototype.update=function(){var e=this;if(this.model){var t={showPagesInTestSurveyTab:this.creator.showPagesInTestSurveyTab};this.model.testAgainAction=this.testAgainAction,this.model.prevPageAction=this.prevPageAction,this.model.nextPageAction=this.nextPageAction,this.model.initialize(this.creator.JSON,t),this.updateActions(),this.model.show(),this.model.onPropertyChanged.add((function(t,o){"isRunning"===o.name&&(e.invisibleToggleAction&&(e.invisibleToggleAction.visible=e.model.isRunning),e.testAgainAction.visible=!e.model.isRunning)}))}},e.prototype.deactivate=function(){return this.model&&(this.simulatorTheme=this.model.simulator.survey.css,this.model.onSurveyCreatedCallback=void 0,this.model.dispose(),this.model=void 0),this.languageSelectorAction.visible=!1,this.testAgainAction.visible=!1,this.invisibleToggleAction&&(this.invisibleToggleAction.visible=!1),!0},e.prototype.getAvailableThemes=function(e){for(var t=[],o=0;o<e.length;o++){var r=e[o],n=new i.Action({id:r.name+"_themeSwitcher",locTitleName:this.getThemeLocName(r.name)});n.value=r.name,t.push(n)}return t},e.prototype.getThemeLocName=function(e){return"ed."+e+"Theme"},e.prototype.createActions=function(){var e=this,t=[];if(this.testAgainAction=new i.Action({id:"testSurveyAgain",visible:!1,locTitleName:"ed.testSurveyAgain",action:function(){e.model.testAgain()}}),this.creator.showSimulatorInTestSurveyTab){var o=Object.keys(Pe).filter((function(e){return!!Pe[e].title})).map((function(e){var t;return{id:e,title:Pe[e].title,visibleIndex:null!==(t=Pe[e].visibleIndex)&&void 0!==t?t:Number.MAX_VALUE}}));this.deviceSelectorAction=Object(i.createDropdownActionModel)({id:"deviceSelector",iconName:"icon-device-desktop",mode:"small",visible:new i.ComputedUpdater((function(){return O("test"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)}))},{items:o,allowSelection:!0,onSelectionChanged:function(t){e.setDevice(t.id)},horizontalPosition:"center",onHide:function(){e.deviceSelectorAction.enabled=!0},onShow:function(){e.deviceSelectorAction.enabled=!1}}),t.push(this.deviceSelectorAction),this.orientationSelectorAction=new i.Action({id:"orientationSelector",iconName:"icon-device-rotate",mode:"small",visible:new i.ComputedUpdater((function(){return O("test"===e.creator.activeTab,e.creator.showSimulatorInTestSurveyTab)})),action:function(){e.model.simulator.landscape=!e.model.simulator.landscape,e.orientationSelectorAction.title=z(e.model.simulator.landscape?"pe.portraitOrientation":"pe.landscapeOrientation")}}),t.push(this.orientationSelectorAction)}this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction=new i.Action({id:"showInvisible",iconName:"icon-invisible-items",mode:"small",needSeparator:new i.ComputedUpdater((function(){return!e.creator.isMobileView})),locTitleName:"ts.showInvisibleElements",visible:!1,action:function(){e.model.showInvisibleElements=!e.model.showInvisibleElements,e.invisibleToggleAction.css=e.model.showInvisibleElements?"sv-action-bar-item--active":"",e.invisibleToggleAction.title=z(e.model.showInvisibleElements?"ts.hideInvisibleElements":"ts.showInvisibleElements")}}),t.push(this.invisibleToggleAction));var r=i.StylesManager.getIncludedThemeCss(),n=["defaultV2","modern","default"];r=r.sort((function(e,t){return n.indexOf(e.name)>n.indexOf(t.name)?1:-1}));var a,s=this.getAvailableThemes(r);if(this.creator.allowChangeThemeInPreview&&s.length>1&&!this.creator.showThemeTab){this.changeThemeModel=new i.ListModel(s,(function(t){e.model&&e.model.setTheme(t.value,r),e.changeThemeAction.locTitleName=e.getThemeLocName(t.value),e.changeThemeAction.locStrsChanged(),e.changeThemePopupModel.toggleVisibility()}),!0),this.changeThemeModel.locOwner=this.creator,this.changeThemePopupModel=new i.PopupModel("sv-list",{model:this.changeThemeModel},"bottom","center");this.changeThemeAction=new i.Action({id:"themeSwitcher",iconName:"icon-theme",component:"sv-action-bar-item-dropdown",mode:"large",locTitleName:this.getThemeLocName((a=r.filter((function(t){return t.theme.root===e.simulatorTheme.root})),a.length>0?a[0].name:"defaultV2")),needSeparator:!0,visible:new i.ComputedUpdater((function(){return O(e.creator.showSimulatorInTestSurveyTab,"test"===e.creator.activeTab)})),action:function(){e.changeThemePopupModel.toggleVisibility()},popupModel:this.changeThemePopupModel}),t.push(this.changeThemeAction)}return this.languageSelectorAction=Object(i.createDropdownActionModel)({id:"languageSelector",iconName:"icon-language",visible:!1,mode:new i.ComputedUpdater((function(){return e.creator.isMobileView?"small":"large"}))},{items:[],allowSelection:!0,onSelectionChanged:function(t){e.model.activeLanguage=t.id,e.languageSelectorAction.title=G.getLocaleName(t.id)},horizontalPosition:"center",onHide:function(){e.languageSelectorAction.enabled=!0},onShow:function(){e.languageSelectorAction.enabled=!1}}),t.push(this.languageSelectorAction),this.designerAction=new i.Action({id:"svd-designer",iconName:"icon-config",action:function(){e.creator.makeNewViewActive("designer")},visible:this.createVisibleUpdater(),locTitleName:"ed.designer",showTitle:!1}),this.previewAction=new i.Action({id:"svd-preview",iconName:"icon-preview",active:!0,visible:this.createVisibleUpdater(),locTitleName:"tabs.preview",showTitle:!1,action:function(){}}),this.prevPageAction=new i.Action({id:"prevPage",iconName:"icon-arrow-left_16x16",needSeparator:new i.ComputedUpdater((function(){return e.creator.isMobileView})),visible:!1}),this.nextPageAction=new i.Action({id:"nextPage",iconName:"icon-arrow-right_16x16",visible:!1}),t},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.designerAction),this.creator.footerToolbar.actions.push(this.previewAction),this.creator.footerToolbar.actions.push(this.prevPageAction),this.creator.footerToolbar.actions.push(this.nextPageAction),this.invisibleToggleAction&&this.creator.footerToolbar.actions.push(this.invisibleToggleAction)},e}(),Ve=function(){function e(e,t){void 0===t&&(t=null),this.survey=e,this.options=t}return e.prototype.toDisplayText=function(e){if(!this.survey)return e;this.showTitles=!!this.options&&1==this.options.showTitlesInExpressions;var t=(new i.ConditionsParser).parseExpression(e);if(!t)return e;if(t.getType)return this.toDisplayTextCore(t);if(!this.showTitles)return e;var o=[];return t.setVariables(o),this.replaceVariables(e,o)},e.prototype.toExpression=function(e){return this.toDisplayTextCore(e)},e.prototype.toDisplayTextCore=function(e){this.currentQuestion=null;var t=this,o=!0,r=function(e){var n=o;return o=!1,t.showTitles&&"variable"==e.getType()?t.getQuestionText(e):t.showTitles&&"const"==e.getType()?t.getDisplayText(e):"binary"==e.getType()?(t.proceedBinary(e),t.getDisplayBinary(e,n,r)):"unary"==e.getType()?t.getDisplayUnary(e,r):void 0};return e.toString(r)},e.prototype.getQuestionText=function(e){var t=this.getQuestionByName(e.variable);return t&&t.title?E(t.title):e.variable},e.prototype.getDisplayText=function(e){if(this.currentQuestion){var t=this.currentQuestion.getDisplayValue(!0,e.correctValue);return t?new i.Const(t).toString():void 0}},e.prototype.getDisplayOperand=function(e,t){return e?e.toString(t):""},e.prototype.getDisplayOperator=function(t){var o=e.operatorText[t];return o||G.getString("op."+t)},e.prototype.getDisplayBinary=function(e,t,o){return(t?"":"(")+this.getDisplayOperand(e.leftOperand,o)+" "+this.getDisplayOperator(e.operator)+" "+this.getDisplayOperand(e.rightOperand,o)+(t?"":")")},e.prototype.getDisplayUnary=function(e,t){var o=e.expression.toString(t),r=this.getDisplayOperator(e.operator);return"empty"==e.operator||"notempty"==e.operator?o+" "+r:r+" "+o},e.prototype.proceedBinary=function(e){e.isArithmetic||e.isConjunction?this.currentQuestion=null:(this.currentQuestion=this.getQuestionFromOperands(e.leftOperand,e.rightOperand),this.currentQuestion||(this.currentQuestion=this.getQuestionFromOperands(e.rightOperand,e.leftOperand)))},e.prototype.getQuestionFromOperands=function(e,t){if(!e||!t)return null;if("variable"!=e.getType())return null;var o=t.getType();return"const"!=o&&"function"!=o&&"array"!=o?null:this.getQuestionByName(e.variable)},e.prototype.replaceVariables=function(e,t){for(var o=0;o<t.length;o++)e=this.replaceVariable(e,t[o]);return e},e.prototype.replaceVariable=function(e,t){var o=this.getQuestionByName(t);return o&&o.title?e.replace(E(t),E(o.title)):e},e.prototype.getQuestionByName=function(e){return this.survey?this.survey.getQuestionByValueName(e):null},e.operatorText={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",power:"^",mod:"%",negate:"!"},e}(),Ne=function(){function e(){}return e.prototype.remove=function(e,t){var o=(new i.ConditionsParser).parseExpression(e);if(!o)return e;if(this.wasRemoved=!1,o.getType){var r=this.processOperand(o,t);return this.wasRemoved?r?r.toString():"":e}return e},e.prototype.processOperand=function(e,t){return e?"variable"==e.getType()?this.processVariable(e,t):"unary"==e.getType()?this.processUnary(e,t):"binary"==e.getType()?this.proceedBinary(e,t):e:null},e.prototype.processVariable=function(e,t){return e.variable!==t?e:(this.wasRemoved=!0,null)},e.prototype.processUnary=function(e,t){return this.processOperand(e.expression,t)?e:(this.wasRemoved=!0,null)},e.prototype.proceedBinary=function(e,t){var o=this.processOperand(e.leftOperand,t),r=this.processOperand(e.rightOperand,t);if(o&&r)return o!==e.leftOperand||r!==e.rightOperand?new i.BinaryOperand(e.operator,o,r,e.isArithmetic):e;if(!o&&!r)return null;var n=o||r;return"binary"==n.getType()?n:null},e}(),ke=function(){function e(e){this.constChanges=[],this.operand=(new i.ConditionsParser).parseExpression(e)}return e.prototype.update=function(e,t,o){this.updateOperand(this.operand,e.toLocaleLowerCase(),t,o)},Object.defineProperty(e.prototype,"isModified",{get:function(){return this.constChanges.length>0},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=this,t=!0,o=function(r){var n=t;return t=!1,"const"===r.getType()?e.constToString(r):"binary"===r.getType()?e.binaryToString(r,n,o):void 0};return this.operand.toString(o)},e.prototype.constToString=function(e){for(var t=0;t<this.constChanges.length;t++)if(this.constChanges[t].op===e)return this.constChanges[t].val;return e.toString()},e.prototype.binaryToString=function(e,t,o){return(t?"":"(")+this.operandToString(e.leftOperand,o)+" "+this.operatorToString(e.operator)+" "+this.operandToString(e.rightOperand,o)+(t?"":")")},e.prototype.operandToString=function(e,t){return e?e.toString(t):""},e.prototype.operatorToString=function(t){var o=e.operatorText[t];return o||t},e.prototype.updateOperand=function(e,t,o,r){if("binary"==e.getType()){var n=e;n.isConjunction?(this.updateOperand(n.leftOperand,t,o,r),this.updateOperand(n.rightOperand,t,o,r)):this.hasVarName(n.leftOperand,t)?this.updateOperandConst(n.rightOperand,o,r):this.hasVarName(n.rightOperand,t)&&this.updateOperandConst(n.leftOperand,o,r)}},e.prototype.hasVarName=function(e,t){if(e&&"variable"===e.getType())return e.variable.toLowerCase()===t},e.prototype.updateOperandConst=function(e,t,o){var r=this;if("array"===e.getType()){var n=e;Array.isArray(n.values)&&n.values.forEach((function(e){return r.updateOperandConst(e,t,o)}))}if("const"===e.getType()){var a=e;i.Helpers.isTwoValueEquals(a.correctValue,t)&&(o=this.getCorrectNewValue(a,o),this.constChanges.push({op:e,val:o}))}},e.prototype.getCorrectNewValue=function(e,t){var o=e.toString();return!o||i.Helpers.isTwoValueEquals(e.correctValue,o)||'"'!==o[0]&&"'"!==o[0]?t:o[0]+t+o[0]},e.operatorText={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"=",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",power:"^",mod:"%",negate:"!"},e}();function Ae(e,t,o,r){var n=new ke(e);return n.update(t,o,r),n.isModified?n.toString():e}function _e(e){return G.getString("ed.lg."+e)}var Le=function(){function e(e,t,o){void 0===o&&(o=null),this.logicType=e,this.survey=t,this.options=o,this.mergeWithBaseClass()}return e.expressionToDisplayText=function(e,t,o){return new Ve(e,t).toDisplayText(o)},e.prototype.mergeWithBaseClass=function(){if(this.logicType.baseClass){var e=De.baseTypes[this.logicType.baseClass];if(e)for(var t in e)this.logicType[t]||(this.logicType[t]=e[t])}},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseClass",{get:function(){return this.logicType.baseClass},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propertyName",{get:function(){return this.logicType.propertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasVisibleElements",{get:function(){return!0!==this.logicType.isInvisible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dynamicPropertyName",{get:function(){return this.logicType.dynamicPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dependedOnPropertyName",{get:function(){return this.logicType.dependedOnPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return!!this.showInUI&&(!this.logicType.showIf||this.logicType.showIf(this.survey))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showTitlesInExpression",{get:function(){return!!this.options&&this.options.showTitlesInExpressions},enumerable:!1,configurable:!0}),e.prototype.createNewObj=function(e){var t=i.Serializer.createClass(this.baseClass);return e&&t.fromJSON(e.toJSON()),t.survey=this.survey,t.setOwner&&t.setOwner(this.survey),(t instanceof i.ItemValue||t instanceof i.SurveyTrigger)&&(t.isGhost=!0),t},e.prototype.cloneElement=function(e){return this.isTrigger?this.createNewObj(e):e},e.prototype.areElementsEqual=function(e,t){return e===t||!(!this.isTrigger||e.getType()!==t.getType())&&i.Helpers.isTwoValueEquals(e.toJSON(),t.toJSON())},e.prototype.saveNewElement=function(e){var t=this.logicType.getCollection?this.logicType.getCollection(this.survey):null;!t&&this.isTrigger&&(t=this.survey.triggers),t&&t.indexOf(e)<0&&t.push(e)},Object.defineProperty(e.prototype,"showInUI",{get:function(){return!1!==this.logicType.showInUI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUniqueItem",{get:function(){return!0===this.logicType.isUniqueItem},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType.questionNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayName",{get:function(){return _e(this.name+"Name")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return _e(this.name+"Description")},enumerable:!1,configurable:!0}),e.prototype.getParentElement=function(e){return this.logicType.getParentElement?this.logicType.getParentElement(e):null},Object.defineProperty(e.prototype,"hasSelectorChoices",{get:function(){return!!this.logicType.getSelectorChoices},enumerable:!1,configurable:!0}),e.prototype.getSelectorChoices=function(e,t){return this.hasSelectorChoices?this.logicType.getSelectorChoices(e,t):null},e.prototype.getDisplayText=function(e){var t=_e(this.name+"Text");if(this.logicType.getDisplayText)return this.logicType.getDisplayText(e,t,this);this.logicType.getElementName&&(e=this.getElementByName(this.logicType.getElementName(e)));var o=this.getElementDisplayName(e);if(o){var r=this.getParentElement(e),n=this.getElementDisplayName(r);return t.format(o,n)}return t},e.prototype.getElementDisplayName=function(e){if(!e)return"";var t="";return this.showTitlesInExpression&&(t=e.title),t||(t=e.name||""),E(t)},e.prototype.getElementByName=function(e){if(!this.survey)return null;var t=this.survey.getQuestionByName(e);return t||this.survey.getPageByName(e)},e.prototype.formatElName=function(e){var t=this.getElementByName(e);return this.getElementDisplayName(t)},e.prototype.formatExpression=function(t){return e.expressionToDisplayText(this.survey,this.options,t)},e.prototype.supportContext=function(e){return!!this.logicType.supportContext&&this.logicType.supportContext(e)},Object.defineProperty(e.prototype,"isTrigger",{get:function(){return!!this.baseClass&&this.baseClass.indexOf("trigger")>-1},enumerable:!1,configurable:!0}),e}();var De=function(){function e(){}return e.baseTypes={panel:{showIf:function(e){return e.getAllPanels().length>0},getSelectorChoices:function(e,t){return e.getAllPanels()}},question:{showIf:function(e){return e.getAllQuestions().length>0},supportContext:function(e){return Array.isArray(e.templateElements)||Array.isArray(e.detailElements)&&e.detailElements.length>0},getParentElement:function(e){return e?e.parentQuestion:null},getSelectorChoices:function(e,t){for(var o=new Array,r=e.getAllQuestions(),n=function(e){o.push(e),e.isPanel&&e.elements.forEach((function(e){return n(e)}))},a=0;a<r.length;a++){var s=r[a];t||o.push(s),s instanceof i.QuestionPanelDynamicModel&&(!t||t===s)&&s.templateElements.forEach((function(e){return n(e)})),s instanceof i.QuestionMatrixDropdownModelBase&&(!t||t===s)&&s.detailElements.forEach((function(e){return n(e)}))}return o}},matrixdropdowncolumn:{showIf:function(e){return function(e){for(var t=e.getAllQuestions(),o=0;o<t.length;o++){var r=t[o];if(r instanceof i.QuestionMatrixDropdownModelBase&&r.columns.length>0)return!0}return!1}(e)},supportContext:function(e){return Array.isArray(e.columns)},getParentElement:function(e){return e?e.colOwner:null},getSelectorChoices:function(e,t){for(var o=[],r=e.getAllQuestions(),n=0;n<r.length;n++){var a=r[n];if(a instanceof i.QuestionMatrixDropdownModelBase&&(!t||t===a))for(var s=a.columns,l=0;l<s.length;l++)o.push(s[l])}return o}}},e.types=[{name:"page_visibility",baseClass:"page",propertyName:"visibleIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"page_enable",baseClass:"page",propertyName:"enableIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"page_require",baseClass:"page",propertyName:"requiredIf",showIf:function(e){return e.pages.length>1},getSelectorChoices:function(e,t){return e.pages}},{name:"panel_visibility",baseClass:"panel",propertyName:"visibleIf"},{name:"panel_enable",baseClass:"panel",propertyName:"enableIf"},{name:"panel_require",baseClass:"panel",propertyName:"requiredIf"},{name:"question_visibility",baseClass:"question",propertyName:"visibleIf"},{name:"question_enable",baseClass:"question",propertyName:"enableIf"},{name:"question_require",baseClass:"question",propertyName:"requiredIf"},{name:"question_resetValue",baseClass:"question",propertyName:"resetValueIf"},{name:"question_setValue",baseClass:"question",propertyName:"setValueIf",getDisplayText:function(e,t,o){return Me(e,t,o)}},{name:"question_setValueExpression",baseClass:"question",propertyName:"setValueExpression",showInUI:!1},{name:"column_visibility",baseClass:"matrixdropdowncolumn",propertyName:"visibleIf"},{name:"column_enable",baseClass:"matrixdropdowncolumn",propertyName:"enableIf"},{name:"column_require",baseClass:"matrixdropdowncolumn",propertyName:"requiredIf"},{name:"column_resetValue",baseClass:"matrixdropdowncolumn",propertyName:"resetValueIf"},{name:"column_setValue",baseClass:"matrixdropdowncolumn",propertyName:"setValueIf",getDisplayText:function(e,t,o){return Me(e,t,o)}},{name:"column_setValueExpression",baseClass:"matrixdropdowncolumn",propertyName:"setValueExpression",showInUI:!1},{name:"expression_expression",baseClass:"expression",propertyName:"expression",showInUI:!1},{name:"matrixdropdowncolumn_totalExpression",baseClass:"matrixdropdowncolumn",propertyName:"totalExpression",showInUI:!1},{name:"trigger_complete",baseClass:"completetrigger",propertyName:"expression",isUniqueItem:!0,isInvisible:!0},{name:"trigger_setvalue",baseClass:"setvaluetrigger",propertyName:"expression",dynamicPropertyName:"setValue",dependedOnPropertyName:"setToName",questionNames:["setToName"],getDisplayText:function(e,t,o){return i.Helpers.isValueEmpty(e.setValue)&&(t=_e("trigger_setvalueEmptyText")),t.format(o.formatElName(e.setToName),e.setValue)}},{name:"trigger_copyvalue",baseClass:"copyvaluetrigger",propertyName:"expression",questionNames:["setToName","fromName"],getDisplayText:function(e,t,o){return t.format(o.formatElName(e.setToName),o.formatElName(e.fromName))}},{name:"trigger_skip",baseClass:"skiptrigger",propertyName:"expression",questionNames:["gotoName"],isUniqueItem:!0,getElementName:function(e){return e.gotoName}},{name:"trigger_runExpression",baseClass:"runexpressiontrigger",propertyName:"expression",questionNames:["setToName"],getDisplayText:function(e,t,o){var r=_e("trigger_runExpressionText1");(r=r.format(o.formatExpression(e.runExpression)),e.setToName)&&(r+=_e("trigger_runExpressionText2").format(o.formatElName(e.setToName)));return r}},{name:"completedHtmlOnCondition",baseClass:"htmlconditionitem",propertyName:"expression",isUniqueItem:!0,getCollection:function(e){return e.completedHtmlOnCondition}},{name:"trigger_runExpression_Expression",baseClass:"runexpressiontrigger",propertyName:"runExpression",showInUI:!1},{name:"question_expressionValidator",baseClass:"expressionvalidator",propertyName:"expression",showInUI:!1},{name:"matrix_rowsVisibleIf",baseClass:"matrix",propertyName:"rowsVisibleIf",showInUI:!1},{name:"matrix_columnsVisibleIf",baseClass:"matrix",propertyName:"columnsVisibleIf",showInUI:!1},{name:"matrixdropdown_rowsVisibleIf",baseClass:"matrixdropdown",propertyName:"rowsVisibleIf",showInUI:!1},{name:"select_choicesVisibleIf",baseClass:"selectbase",propertyName:"choicesVisibleIf",showInUI:!1},{name:"select_choicesEnableIf",baseClass:"selectbase",propertyName:"choicesEnableIf",showInUI:!1},{name:"itemvalue_visibleIf",baseClass:"itemvalue",propertyName:"visibleIf",showInUI:!1},{name:"itemvalue_enableIf",baseClass:"itemvalue",propertyName:"enableIf",showInUI:!1},{name:"calculatedValue",baseClass:"calculatedvalue",propertyName:"expression",showInUI:!1}],e}();function Me(e,t,o){var r=o.formatElName(e.name),n=e.setValueExpression;return n?t.format(r,n):_e("trigger_setvalueEmptyText").format(r)}var Re=function(){function e(e,t,o){this.surveyValue=o,this.logicTypeValue=e,this.elementValue=t}return Object.defineProperty(e.prototype,"logicType",{get:function(){return this.logicTypeValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.elementValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.element&&this.logicType?this.logicType.getParentElement(this.element):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.apply=function(e,t){if(void 0===t&&(t=!1),this.element&&this.logicType&&(this.element[this.logicType.propertyName]=e,!e&&i.Serializer.isDescendantOf(this.element.getType(),"surveytrigger"))){var o=this.survey.triggers.indexOf(this.element);o>-1&&this.survey.triggers.splice(o,1)}},e.prototype.renameQuestion=function(e,t){if(this.element)for(var o=this.questionNames,r=0;r<o.length;r++){var n=this.element[o[r]];n&&n.toLowerCase()==e.toLowerCase()&&(this.element[o[r]]=t)}},e.prototype.clone=function(){var t=this.logicType.cloneElement(this.element);return new e(this.logicType,t,this.survey)},e.prototype.equals=function(e){return this.logicType===e.logicType&&this.logicType.areElementsEqual(this.element,e.element)},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType?this.logicType.displayName:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeName",{get:function(){return this.logicType?this.logicType.name:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeDescription",{get:function(){return this.logicType?this.logicType.description:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this.logicType?this.logicType.getDisplayText(this.element):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteActionText",{get:function(){return _e("deleteAction")},enumerable:!1,configurable:!0}),e.prototype.getLocString=function(e){return G.getString(e)},e.prototype.isSuitableByQuestionName=function(e){var t=this.elementName===e||0===this.elementName.indexOf(e+".");return t||(t=this.questionNamesValues.filter((function(t){return t===e||0===t.indexOf(e+".")})).length>0),t},e.prototype.isSuitableByLogicType=function(e){return!this.logicTypeName||e===this.logicTypeName},e.prototype.addQuestionNames=function(e){var t=this.elementOwnerName;this.elementName&&-1===e.indexOf(t)&&e.push(t),this.questionNamesValues.forEach((function(t){t&&-1===e.indexOf(t)&&e.push(t)}))},Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType&&this.logicType.questionNames?this.logicType.questionNames:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementName",{get:function(){if(!this.element)return"";var e="",t=this.getOwnerElement();return t&&t!==this.element&&(e=t.name+"."),e+this.element.name||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementOwnerName",{get:function(){var e=this.getOwnerElement();return e&&e.name||""},enumerable:!1,configurable:!0}),e.prototype.getOwnerElement=function(){if(!this.element)return null;var e=this.parentElement;return e||this.element},Object.defineProperty(e.prototype,"questionNamesValues",{get:function(){var e=this;return this.questionNames.map((function(t){return e.element[t]}))},enumerable:!1,configurable:!0}),e}(),qe=function(){function e(t,o){void 0===o&&(o=""),this.owner=t,this.expression=o,this.idValue=++e.counter,this.isNew=!1,this.isModified=!1,this.actionsValue=[],this.removedActions=[]}return Object.defineProperty(e.prototype,"actions",{get:function(){return this.actionsValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"logicItem"+this.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.owner.survey},enumerable:!1,configurable:!0}),e.prototype.getVisibleLogicTypes=function(){return this.owner.getVisibleLogicTypes()},Object.defineProperty(e.prototype,"expressionText",{get:function(){var e=this.getExpressionAsDisplayText();return e||G.getString("ed.lg.itemEmptyExpressionText")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actionsText",{get:function(){return this.actions.map((function(e){return e.text})).join(", ")},enumerable:!1,configurable:!0}),e.prototype.getDisplayText=function(){var e=this.getExpressionAsDisplayText(),t="";return this.actions.forEach((function(e){t+=", "+e.text})),e&&t?(this.ifText+" "+e+t).replace(new RegExp("({|})","gm"),"'"):G.getString("ed.lg.itemEmptyExpressionText")},e.prototype.edit=function(){this.owner&&this.owner.editItem(this)},e.prototype.remove=function(){this.owner&&this.owner.removeItem(this)},Object.defineProperty(e.prototype,"isReadOnly",{get:function(){return!!this.owner&&this.owner.readOnly},enumerable:!1,configurable:!0}),e.prototype.addNewAction=function(e){this.actions.push(e)},e.prototype.removeAction=function(e){this.replaceActionCore(null,e)},e.prototype.replaceAction=function(e,t){t?this.replaceActionCore(e,t):this.addNewAction(e)},e.prototype.clone=function(){for(var t=new e(this.owner,this.expression),o=0;o<this.actions.length;o++)t.addNewAction(this.actions[o].clone());return t},e.prototype.equals=function(e){if(this.expression!==e.expression)return!1;if(this.actions.length!==e.actions.length)return!1;for(var t=0;t<this.actions.length;t++)if(!this.actions[t].equals(e.actions[t]))return!1;return!0},e.prototype.replaceActionCore=function(e,t){this.removedActions.push(t);var o=this.actions.indexOf(t);o>-1&&(e?this.actions.splice(o,1,e):this.actions.splice(o,1))},e.prototype.apply=function(e){e?this.removeSameActions():this.removeActions();for(var t=0;t<this.removedActions.length;t++)this.removedActions[t].apply("");this.removedActions=[],this.applyExpression(e,!1)},e.prototype.renameQuestion=function(e,t){var o=this;if(e&&t&&e!==t){["","panel.","row."].forEach((function(r){return o.renameQuestionInExpression(r+e,r+t,[a.logic.closeBracket,".","["])}));for(var r=this.actions,n=0;n<r.length;n++)r[n].renameQuestion(e,t)}},e.prototype.renameColumn=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)){this.actions[0].parentElement===e&&this.renameQuestionInExpression("row."+o,"row."+t.name,[a.logic.closeBracket]);var r=e.rows;if(Array.isArray(r)&&this.isQuestionInExpression(e))for(var n=this.getItemValueQuestionName(e)+".",s=0;s<r.length;s++)if(!i.Helpers.isValueEmpty(r[s].value)){var l=r[s].value.toString()+".";this.renameQuestionInExpression(n+l+o,n+l+t.name,[a.logic.closeBracket])}}},e.prototype.renameItemValue=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)&&(!e.parentQuestion||(Array.isArray(e.parentQuestion.rows)&&this.renameDropdownColumnItemValue(e,t,o),this.actions[0].parentElement===e.parentQuestion))&&this.isQuestionInExpression(e)){var r=this.getItemValueQuestionName(e).toLocaleLowerCase(),n=e.rows,a=this.expression;if(Array.isArray(n))for(var s=0;s<n.length;s++){if(!i.Helpers.isValueEmpty(n[s].value))a=Ae(a,r+("."+n[s].value.toString()),o,t.value)}else a=Ae(a,r,o,t.value);a!=this.expression&&this.applyExpression(a,!0)}},e.prototype.renameDropdownColumnItemValue=function(e,t,o){var r=e.parentQuestion;if(this.isQuestionInExpression(r)){var n="."+e.getValueName();if(this.isStrContainsInExpression(n+a.logic.closeBracket)){for(var s=r.getValueName()+".",l=r.rows,c=this.expression,p=0;p<l.length;p++){if(!i.Helpers.isValueEmpty(l[p].value))c=Ae(c,s+l[p].value.toString()+n,o,t.value)}c!=this.expression&&this.applyExpression(c,!0)}}},e.prototype.renameRowValue=function(e,t,o){if(this.canUpdateExpressionByQuestion(e)&&this.isQuestionInExpression(e)){var r=this.getItemValueQuestionName(e);this.renameQuestionInExpression(r+"."+o.toString(),r+"."+t.value.toString(),[a.logic.closeBracket,"."])}},e.prototype.canUpdateExpressionByQuestion=function(e){return!!this.expression&&!!e.name&&this.actions.length>0},e.prototype.isQuestionInExpression=function(e){return this.isStrContainsInExpression(this.getItemValueQuestionName(e).toLocaleLowerCase())},e.prototype.isStrContainsInExpression=function(e){return!!e&&this.expression.toLocaleLowerCase().indexOf(e.toLocaleLowerCase())>-1},e.prototype.getItemValueQuestionName=function(e){var t=e.getValueName();if(e.parentQuestion){if(e.parentQuestion.isDescendantOf("paneldynamic"))return"panel."+t;if(e.parentQuestion.isDescendantOf("matrixdropdownbase"))return"row."+t}return t},e.prototype.removeQuestion=function(e){this.removeQuestionInExpression(e)},e.prototype.getQuestionNames=function(){var e=[];return this.getQuestionNamesFromExpression(e),this.getQuestionNamesFromActions(e),e},e.prototype.getActionTypes=function(){return this.actions.map((function(e){return e.logicTypeName}))},e.prototype.getContext=function(){var e=this.expression;if(!e)return null;if(!te.getQuestionContextIndexInfo(e,"{"))return null;for(var t=0;t<this.actions.length;t++){var o=this.actions[t].parentElement;if(o)return o}return null},e.prototype.getQuestionNamesFromExpression=function(e){new i.ConditionRunner(this.expression).getVariables().forEach((function(t){-1===e.indexOf(t)&&e.push(t)}))},e.prototype.getQuestionNamesFromActions=function(e){this.actions.forEach((function(t){return t.addQuestionNames(e)}))},e.prototype.getExpressionAsDisplayText=function(){return this.owner?this.owner.getExpressionAsDisplayText(this.expression):this.expression},Object.defineProperty(e.prototype,"editText",{get:function(){return G.getString("pe.edit")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteText",{get:function(){return G.getString("pe.delete")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ifText",{get:function(){return G.getString("pe.if")},enumerable:!1,configurable:!0}),e.prototype.isSuitable=function(e,t){return void 0===t&&(t=""),!e&&!t||(e?t?(this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e))&&this.isSuitableByLogicTypeInActions(t):this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e):this.isSuitableByLogicTypeInActions(t))},e.prototype.isSuitableInExpression=function(e){return-1!==this.expression.indexOf(E(e))||-1!==this.expression.indexOf("'"+e+".")},e.prototype.isSuitableByNameInActions=function(e){return this.actions.some((function(t){return t.isSuitableByQuestionName(e)}))},e.prototype.isSuitableByLogicTypeInActions=function(e){return this.actions.some((function(t){return t.isSuitableByLogicType(e)}))},e.prototype.renameQuestionInExpression=function(e,t,o){var r=this;if(this.expression&&(e=e.toLowerCase(),this.isStrContainsInExpression(e))){var n=a.logic.openBracket;e=n+e,t=n+t;var i=this.expression;o.forEach((function(o){i=r.renameQuestionInExpressionCore(i,i.toLocaleLowerCase(),e+o,t+o)})),i!=this.expression&&this.applyExpression(i,!0)}},e.prototype.renameQuestionInExpressionCore=function(e,t,o,r){for(var n=t.lastIndexOf(o,t.length);n>-1;)e=e.substring(0,n)+r+e.substring(n+o.length),n=(t=t.substring(0,n)).lastIndexOf(o,n);return e},e.prototype.removeQuestionInExpression=function(e){if(this.expression){var t=(new Ne).remove(this.expression,e);t!=this.expression&&this.applyExpression(t,!0)}},e.prototype.applyExpression=function(e,t){this.expression=e;for(var o=this.actions,r=0;r<o.length;r++)o[r].apply(e,t)},e.prototype.removeActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)this.removeAction(e[t])},e.prototype.removeSameActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)for(var o=t-1;o>=0;o--)if(e[t].equals(e[o])){this.removeAction(e[t]);break}},e.counter=0,e}();function He(e){e.popupModel.isFocusedContent=!0,e.popupModel.setWidthByTarget=!1,e.popupModel.positionMode="flex",e.popupModel.showPointer=!0,e.dropdownListModel.listModel.searchEnabled=e.searchEnabled}o(9);var Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t}(i.EventBase),Qe=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this)||this;return r.survey=t,r.options=o,r.invisibleItems=[],r.onLogicItemSaved=new Be,r.onLogicItemValidation=new Be,r.onLogicItemRemoving=new Be,r.onLogicItemRemoved=new Be,r.options||(r.options=new s),r.readOnly=r.optionsReadOnly,r.update(),r}return Y(t,e),Object.defineProperty(t,"visibleActions",{get:function(){return a.logic.visibleActions},set:function(e){a.logic.visibleActions=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"types",{get:function(){return De.types},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onEndEditing(),this.survey=void 0},Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this.modeValue},set:function(e){if(this.modeValue!==e){var t=this.mode;this.modeValue=e,this.errorText="","view"!=e||"edit"!=t&&"new"!=t||this.onEndEditing()}},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return G.getString(e)},t.prototype.getTypeByName=function(e){for(var t=0;t<this.logicTypes.length;t++)if(this.logicTypes[t].name==e)return this.logicTypes[t];return null},t.prototype.update=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),e&&(this.survey=e),t&&(this.options=t),this.logicTypes=this.createLogicTypes(),this.updateVisibleItems(),this.invisibleItems=this.buildItems(!1),this.readOnly=this.optionsReadOnly,this.mode="view"},t.prototype.updateVisibleItems=function(){this.items=this.buildItems(!0),this.editableItemValue=null},Object.defineProperty(t.prototype,"optionsReadOnly",{get:function(){return!!this.options&&this.options.readOnly},enumerable:!1,configurable:!0}),t.prototype.saveEditableItem=function(){if(!this.editableItem||this.hasError())return!1;this.options&&this.options.startUndoRedoTransaction(),this.onEditableItemApply();var e=this.items.indexOf(this.editableItem)<0;e&&this.items.push(this.editableItem);var t=!e||this.editableItem.isNew;return this.editableItem.isNew=!1,this.onItemChanged(this.editableItem,t?"new":"modify"),this.options&&this.options.stopUndoRedoTransaction(),this.onLogicItemSaved.fire(this,{item:this.editableItem}),!0},t.prototype.saveEditableItemAndBack=function(){var e=this.saveEditableItem();return e&&(this.mode="view"),e},t.prototype.onEditableItemApply=function(){},t.prototype.onItemChanged=function(e,t){this.onChangedCallback&&this.onChangedCallback(e,t)},t.prototype.renameQuestion=function(e,t){this.items.forEach((function(o){return o.renameQuestion(e,t)})),this.invisibleItems.forEach((function(o){return o.renameQuestion(e,t)}))},t.prototype.renameItemValue=function(e,t){var o=this.getItemValueQuestion(e,t);o&&(this.items.forEach((function(r){return r.renameItemValue(o,e,t)})),this.invisibleItems.forEach((function(r){return r.renameItemValue(o,e,t)})))},t.prototype.renameRowValue=function(e,t){var o=this.getItemValueQuestion(e,t);o&&(this.items.forEach((function(r){return r.renameRowValue(o,e,t)})),this.invisibleItems.forEach((function(r){return r.renameRowValue(o,e,t)})))},t.prototype.renameColumn=function(e,t){var o=e.colOwner;o&&o.isQuestion&&(this.items.forEach((function(r){return r.renameColumn(o,e,t)})),this.invisibleItems.forEach((function(r){return r.renameColumn(o,e,t)})))},t.prototype.getItemValueQuestion=function(e,t){if(!e.locOwner||i.Helpers.isValueEmpty(t)||i.Helpers.isValueEmpty(e.value))return null;var o=e.locOwner;return o.isQuestion?o:null},t.prototype.removeQuestion=function(e){this.removeQuestionCore(e,this.items),this.removeQuestionCore(e,this.invisibleItems)},t.prototype.hasError=function(){if(!this.editableItem)return!1;if(this.hasErrorInUI())return!0;var e=new i.ExpressionRunner(this.getExpressionText()),t={item:this.editableItem,error:"",usedNamesInExpression:e.getVariables(),actions:this.getEditingActions()};this.onLogicItemValidation.fire(this,t),this.errorText=t.error;var o=this.survey.creator;return this.errorText&&o&&o.notify(this.errorText,"error"),!!this.errorText},t.prototype.getUsedQuestions=function(){var e=this,t={};this.items.forEach((function(o){o.getQuestionNames().forEach((function(o){var r=e.survey.getQuestionByName(o);r&&!t[o]&&(t[o]=r)}))}));var o=[];return Object.keys(t).forEach((function(e){t[e]&&o.push(t[e])})),o},t.prototype.getUsedActionTypes=function(){var e=this,t={};this.items.forEach((function(o){o.getActionTypes().forEach((function(o){t[o]||(t[o]=e.logicTypes.filter((function(e){return e.name==o}))[0])}))}));var o=[];return Object.keys(t).forEach((function(e){t[e]&&o.push(t[e])})),o},t.prototype.hasErrorInUI=function(){return!1},t.prototype.getExpressionText=function(){return""},t.prototype.getEditingActions=function(){return[]},t.prototype.onReadOnlyChanged=function(){},t.prototype.removeQuestionCore=function(e,t){for(var o=0;o<t.length;o++)t[o].removeQuestion(e)},t.prototype.addNew=function(){this.options&&this.options.startUndoRedoTransaction();var e=new qe(this);e.isNew=!0,this.items.push(e),this.editItemCore(e),this.options&&this.options.stopUndoRedoTransaction()},t.prototype.editItem=function(e){this.options&&this.options.startUndoRedoTransaction(),this.editItemCore(e),this.options&&this.options.stopUndoRedoTransaction()},t.prototype.editItemCore=function(e){this.editableItemValue=e,this.onStartEditing(),this.mode=e.isNew?"new":"edit"},t.prototype.onStartEditing=function(){},t.prototype.onEndEditing=function(){this.editableItemValue=null},t.prototype.canRemoveItem=function(e){var t={item:e,allowRemove:!0};return this.onLogicItemRemoving.fire(this,t),t.allowRemove},t.prototype.removeItem=function(e,t){if(void 0===t&&(t=!0),!t||this.canRemoveItem(e)){this.options&&this.options.startUndoRedoTransaction(),e.apply("");var o=this.items.indexOf(e);o>-1&&this.items.splice(o,1),this.onItemChanged(e,"delete"),this.options&&this.options.stopUndoRedoTransaction(),this.onLogicItemRemoved.fire(this,{item:e})}},t.prototype.addAction=function(e,t){void 0===t&&(t=null);var o=this.createNewAction(e,t);return this.editableItem.addNewAction(o),o},t.prototype.addNewAction=function(){return this.addAction(null,null)},t.prototype.createNewAction=function(e,t){return new Re(e,t,this.survey)},t.prototype.getVisibleLogicTypes=function(){for(var e=[],t=this.logicTypes,o=0;o<t.length;o++)t[o].visible&&e.push(t[o]);return e},t.prototype.removeAction=function(e){this.editableItem&&(this.editableItem.removeAction(e),0==this.editableItem.actions.length&&this.addNewAction())},t.prototype.getExpressionAsDisplayText=function(e){return Le.expressionToDisplayText(this.survey,this.options,e)},t.prototype.buildItems=function(e){for(var t=[],o={},r=this.getAllElements(),n=0;n<r.length;n++)this.buildItemsByElement(r[n],t,o,e);return t},t.prototype.getAllElements=function(){var e=[];return this.AddElements(this.survey.pages,e),this.AddElements(De.baseTypes.question.getSelectorChoices(this.survey,null),e),this.AddElements(this.survey.getAllPanels(),e),this.AddElements(this.survey.triggers,e),this.AddElements(this.survey.completedHtmlOnCondition,e),this.AddElements(this.survey.calculatedValues,e),this.AddElements(De.baseTypes.matrixdropdowncolumn.getSelectorChoices(this.survey,null),e),this.AddElements(this.getValidators(),e),this.AddElements(this.getItemValues(),e),e},t.prototype.getValidators=function(){for(var e=[],t=this.survey.getAllQuestions(),o=0;o<t.length;o++)this.AddElements(t[o].validators,e);return e},t.prototype.getItemValues=function(){for(var e=[],t=this.survey.getAllQuestions(),o=0;o<t.length;o++){var r=t[o],n=r.choices;if(n){var a=i.Serializer.findProperty(r.getType(),"choices");a&&"itemvalue[]"===a.type&&this.AddElements(n,e)}}return e},t.prototype.AddElements=function(e,t){for(var o=0;o<e.length;o++)t.push(e[o])},t.prototype.buildItemsByElement=function(e,t,o,r){for(var n=this.getElementAllTypes(e),a=0;a<this.logicTypes.length;a++){var s=this.logicTypes[a];if(s.showInUI===r){var l=e[s.propertyName];if(n.indexOf(s.baseClass)>-1&&!i.Helpers.isValueEmpty(l)){var c=this.getLogicItemHashKey(l,e),p=o[c];p||(p=new qe(this,l),o[c]=p,t.push(p));var u=this.createNewAction(s,e);p.addNewAction(u)}}}},t.prototype.getLogicItemHashKey=function(e,t){var o=this.getParentQuestion(t);return(o?"@"+o.name:"")+e.replace(" ","").toLowerCase()},t.prototype.getParentQuestion=function(e){var t=e.parentQuestion;return t||(e.isDescendantOf("matrixdropdowncolumn")?e.colOwner:null)},t.prototype.getElementAllTypes=function(e){var t=[],o=e.getType();for(t.push(o);o&&"base"!=o;){var r=i.Serializer.findClass(o);if(!r)break;(o=r.parentName)&&t.push(o)}return t},t.prototype.createLogicTypes=function(){for(var e=[],o=t.visibleActions,r=0;r<t.types.length;r++)o.length>0&&o.indexOf(t.types[r].name)<0||e.push(new Le(t.types[r],this.survey,this.options));return e},Z([Object(i.propertyArray)()],t.prototype,"items",void 0),Z([Object(i.propertyArray)()],t.prototype,"logicTypes",void 0),Z([Object(i.property)()],t.prototype,"errorText",void 0),Z([Object(i.property)({onSet:function(e,t){t.onReadOnlyChanged()}})],t.prototype,"readOnly",void 0),Z([Object(i.property)()],t.prototype,"placeholderHtml",void 0),t}(i.Base),Fe=o(1),Ue=function(){function e(e){this.objValue=e,this.editableObjValue=this.createEditableObj()}return e.isCopyObject=function(e){return!!e&&e.isCopy},e.getSurvey=function(t){if(t instanceof i.SurveyModel||t&&t.getType&&"survey"==t.getType())return e.getOriginalSurvey(t);if(t instanceof i.MatrixDropdownColumn&&t.colOwner)return t.colOwner.survey;if(t){if(t.survey)return e.getOriginalSurvey(t.survey);if(t.owner)return e.getSurvey(t.owner);if(t.errorOwner)return e.getSurvey(t.errorOwner);if(t.locOwner)return e.getSurvey(t.locOwner)}var o=e.getOriginalObject(t);return o&&o!==t?e.getSurvey(o):null},e.getOriginalObject=function(e){return e&&e.originalObj?e.originalObj:e},e.getOriginalSurvey=function(t){return e.getOriginalObject(t)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editableObj",{get:function(){return this.editableObjValue},enumerable:!1,configurable:!0}),e.prototype.isPropertyChanged=function(e){return"pages"!=e&&!i.Helpers.isTwoValueEquals(this.obj[e],this.editableObj[e])},e.prototype.apply=function(e){this.isPropertyChanged(e)&&(this.obj[e]=this.editableObj[e])},e.prototype.reset=function(){this.assignProperties(this.editableObj)},e.prototype.applyAll=function(e){void 0===e&&(e=[]);for(var t=this.getProperties(e),o=0;o<t.length;o++)this.apply(t[o])},e.prototype.getProperties=function(e){var t=[],o=this.getObjJson(this.editableObj),r=this.getObjJson(this.obj);for(var n in o)e.indexOf(n)>-1||t.push(n);for(var n in r)e.indexOf(n)>-1||t.indexOf(n)>-1||t.push(n);return t},e.prototype.createEditableObj=function(){var e=this.obj.getType(),t=i.Serializer.createClass(e);return null==t&&"survey"==e&&(t=new i.SurveyModel),this.assignProperties(t),"matrixdropdowncolumn"==e&&(t.colOwner=this.obj.colOwner),"survey"!=e&&(t.setSurveyImpl?t.setSurveyImpl(this.obj.survey):this.obj.survey&&!t.survey&&(t.survey=this.obj.survey)),this.obj.parent&&(t.parent=this.obj.parent),t.isCopy=!0,t.originalObj=this.obj,t},e.prototype.assignProperties=function(e){(new i.JsonObject).toObject(this.getObjJson(),e)},e.prototype.getObjJson=function(e){void 0===e&&(e=null),e||(e=this.obj);var t=new i.JsonObject;return t.lightSerializing=!0,t.toJsonObject(e)},e}(),We={root:"spg-root-modern",container:"spg-container-modern",header:"spg-title spg-container-modern__title",body:"spg-body",bodyEmpty:"spg-body spg-body--empty",footer:"spg-footer spg-body__footer spg-clearfix",title:"",description:"",logo:"spg-logo",logoImage:"spg-logo__image",headerText:"spg-header__text",navigationButton:"",completedPage:"spg-completedpage",navigation:{complete:"spg-btn spg-footer__complete-btn",prev:"spg-btn spg-footer__prev-btn",next:"spg-btn spg-footer__next-btn",start:"spg-btn spg-footer__start-btn",preview:"spg-btn spg-footer__preview-btn",edit:"spg-btn spg-footer__edit-btn"},panel:{title:"spg-title spg-panel__title",titleExpandable:"spg-panel__title--expandable",titleExpanded:"spg-panel__title--expanded",titleCollapsed:"spg-panel__title--collapsed",titleOnError:"spg-panel__title--error",description:"spg-description spg-panel__description",container:"spg-panel spg-row__panel",content:"spg-panel__content",icon:"spg-panel__icon",iconExpanded:"spg-panel__icon--expanded",footer:"spg-panel__footer",requiredText:"spg-panel__required-text"},paneldynamic:{mainRoot:"spg-question spg-row__question",root:"spg-paneldynamic",navigation:"spg-paneldynamic__navigation",title:"spg-title spg-question__title",button:"spg-action-button spg-action-button--text",buttonRemove:"spg-action-button--danger",buttonAdd:"spg-paneldynamic__add-btn",panelsContainer:"",panelWrapper:"spg-paneldynamic__panel-wrapper",panelWrapperList:"",progressTop:"spg-paneldynamic__progress spg-paneldynamic__progress--top",progressBottom:"spg-paneldynamic__progress spg-paneldynamic__progress--bottom",buttonPrev:"spg-paneldynamic__prev-btn",buttonNext:"spg-paneldynamic__next-btn",progressContainer:"spg-paneldynamic__progress-container",progress:"spg-progress",progressBar:"spg-progress__bar",progressText:"spg-paneldynamic__progress-text",panelFooter:"spg-panel__footer",separator:"spg-paneldynamic__separator"},progress:"spg-progress spg-body__progress",progressBar:"spg-progress__bar",progressText:"spg-progress__text",progressTextInBar:"spg-hidden",page:{root:"spg-page spg-body__page",title:"spg-title spg-page__title",description:"spg-description spg-page__description"},pageTitle:"spg-title spg-page__title",pageDescription:"spg-description spg-page__description",row:"spg-row spg-clearfix",rowMultiple:"spg-row--multiple",question:{mainRoot:"spg-question spg-row__question",flowRoot:"spg-question spg-row__question spg-row__question--flow",asCell:"spg-table__cell",header:"spg-question__header",headerLeft:"spg-question__header--location--left",headerTop:"spg-question__header--location--top",headerBottom:"spg-question__header--location--bottom",content:"spg-question__content",contentLeft:"spg-question__content--left",titleLeftRoot:"spg-question--location--left",titleOnAnswer:"spg-question__title--answer",titleOnError:"spg-question__title--error",title:"spg-title spg-question__title",requiredText:"spg-question__required-text",number:"spg-question__num",description:"spg-description spg-question__description",descriptionUnderInput:"spg-description spg-question__description",comment:"spg-comment",required:"spg-question--required",titleRequired:"spg-question__title--required",indent:0,footer:"spg-question__footer",formGroup:"spg-question__form-group",hasError:"",disabled:"spg-question--disabled"},image:{root:"spg-image",image:"sv_image_image"},error:{root:"spg-question__erbox",icon:"spg-question__erbox-icon",item:"",locationTop:"spg-question__erbox--location--top",locationBottom:"spg-question__erbox--location--bottom"},checkbox:{root:"spg-selectbase",item:"spg-item spg-checkbox spg-selectbase__item",itemSelectAll:"spg-checkbox--selectall",itemNone:"spg-checkbox--none",itemDisabled:"spg-item--disabled spg-checkbox--disabled",itemChecked:"spg-checkbox--checked",itemHover:"spg-checkbox--allowhover",itemInline:"spg-selectbase__item--inline",label:"spg-selectbase__label",itemSvgIconId:"#icon-v2check",labelChecked:"",itemControl:"spg-checkbox__control",itemDecorator:"spg-checkbox__svg",controlLabel:"spg-checkbox__caption",materialDecorator:"spg-checkbox__rectangle",other:"spg-comment spg-question__other",column:"spg-selectbase__column"},radiogroup:{root:"spg-selectbase",item:"spg-item spg-radio spg-selectbase__item",itemInline:"spg-selectbase__item--inline",label:"spg-selectbase__label",labelChecked:"",itemDisabled:"spg-item--disabled spg-radio--disabled",itemChecked:"spg-radio--checked",itemHover:"spg-radio--allowhover",itemControl:"spg-visuallyhidden spg-item__control",itemDecorator:"spg-item__svg spg-radio__svg",controlLabel:"spg-item__control-label",materialDecorator:"spg-item__decorator spg-radio__decorator",other:"spg-comment spg-question__other",clearButton:"spg-btn spg-selectbase__clear-btn",column:"spg-selectbase__column"},boolean:{mainRoot:"spg-question spg-row__question spg-question--boolean",rootCheckbox:"spg-selectbase",checkboxItem:"spg-checkbox",checkboxItemChecked:"spg-checkbox--checked",checkboxitemIndeterminate:"spg-checkbox--indeterminate",checkboxItemDisabled:"spg-checkbox--disabled",svgIconId:"#icon-v2check",checkboxLabel:"spg-selectbase__label",controlCheckbox:"spg-checkbox__control",checkboxControlLabel:"spg-checkbox__caption",checkboxItemDecorator:"spg-checkbox__svg",checkboxMaterialDecorator:"spg-checkbox__rectangle"},text:{root:"spg-input spg-text",small:"spg-row__question--small",content:"spg-question__content spg-text__content",remainingCharacterCounter:"spg-remaining-character-counter",onError:"spg-input--error"},multipletext:{root:"spg-multipletext",item:"spg-multipletext__item",itemTitle:"spg-multipletext__item-title",content:"spg-multipletext__content spg-text__content",row:"spg-multipletext__row",cell:"spg-multipletext__cell"},dropdown:{root:"",popup:"spg-dropdown-popup",small:"spg-row__question--small sd-row__question--small",control:"spg-input spg-dropdown sd-input sd-dropdown",filterStringInput:"sd-dropdown__filter-string-input spg-dropdown__filter-string-input",other:"spg-comment spg-question__other",onError:"spg-input--error",selectWrapper:"sv-dropdown_select-wrapper spg-dropdown_select-wrapper",chevronButton:"sd-dropdown_chevron-button spg-dropdown_chevron-button",chevronButtonSvg:"sd-dropdown_chevron-button-svg",chevronButtonIconId:"icon-chevron"},imagepicker:{root:"spg-imagepicker",item:"spg-imagepicker__item",itemInline:"spg-imagepicker__item--inline",itemChecked:"spg-imagepicker__item--checked",itemDisabled:"spg-imagepicker__item--disabled",itemHover:"spg-imagepicker__item--allowhover",label:"spg-imagepicker__label",itemControl:"spg-imagepicker__control",image:"spg-imagepicker__image",itemText:"spg-imagepicker__text",clearButton:"spg-btn",other:"spg-comment spg-question__other"},matrix:{tableWrapper:"spg-matrix spg-table-wrapper",root:"spg-table",rowError:"spg-matrix__row--error",cell:"spg-table__cell spg-matrix__cell",headerCell:"spg-table__cell spg-table__cell--header",label:"spg-item spg-radio spg-matrix__label",itemValue:"spg-visuallyhidden spg-item__control spg-radio__control",itemChecked:"spg-radio--checked",itemDisabled:"spg-item--disabled spg-radio--disabled",itemHover:"spg-radio--allowhover",materialDecorator:"spg-item__decorator spg-radio__decorator",itemDecorator:"spg-item__svg spg-radio__svg",cellText:"spg-matrix__text",cellTextSelected:"spg-matrix__text--checked",cellTextDisabled:"spg-matrix__text--disabled"},matrixdropdown:{tableWrapper:"spg-table-wrapper",root:"spg-table",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header"},matrixdynamic:{tableWrapper:"spg-table-wrapper",root:"spg-table spg-matrixdynamic",content:"spg-matrixdynamic__content spg-text__content",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header",button:"spg-btn",detailRow:"spg-table__row spg-table__row--detail",detailButton:"spg-table__cell--detail-button",detailButtonExpanded:"spg-table__cell--detail-button--expanded",detailIcon:"spg-detail-panel__icon",detailIconExpanded:"spg-detail-panel__icon--expanded",detailPanelCell:"spg-table__cell--detail-panel",actionsCell:"spg-table__cell spg-table__cell--actions",buttonAdd:"spg-matrixdynamic__add-btn spg-action-button spg-action-button--large",buttonRemove:"spg-matrixdynamic__remove-btn",iconAdd:"",iconRemove:"",dragElementDecorator:"spg-drag-element__svg",iconDragElement:"#icon-drag-area-indicator",iconDrag:"spg-matrixdynamic__drag-element",footer:"",dragDropGhostPositionTop:"spg-matrixdynamic__drag-drop-ghost-position-top",dragDropGhostPositionBottom:"spg-matrixdynamic__drag-drop-ghost-position-bottom",emptyRowsSection:"spg-matrixdynamic__placeholder",emptyRowsText:"spg-matrixdynamic__placeholder-text",cellQuestionWrapper:"spg-table__question-wrapper"},rating:{root:"spg-rating",item:"spg-rating__item",selected:"spg-rating__item--selected",minText:"spg-rating__min-text",itemText:"spg-rating__item-text",maxText:"spg-rating__max-text",disabled:"spg-rating--disabled"},comment:{root:"spg-input spg-comment",content:"spg-question__content spg-comment__content",remainingCharacterCounter:"spg-remaining-character-counter",small:"spg-row__question--small",onError:"spg-input--error"},expression:"",file:{root:"spg-file",other:"spg-comment spg-question__other",placeholderInput:"spg-visuallyhidden",preview:"spg-file__preview",fileSign:"spg-hidden",fileSignBottom:"spg-file__sign",fileDecorator:"spg-file__decorator",fileInput:"spg-visuallyhidden",noFileChosen:"spg-description spg-file__no-file-chosen",chooseFile:"spg-btn spg-file__choose-btn",disabled:"spg-file__choose-btn--disabled",removeButton:"spg-hidden",removeButtonBottom:"spg-btn spg-file__clean-btn",removeFile:"spg-hidden",removeFileSvg:"spg-file__remove-svg",wrapper:"spg-file__wrapper"},signaturepad:{root:"spg-signaturepad sjs_sp_container",small:"spg-row__question--small",controls:"sjs_sp_controls",clearButton:"sjs_sp_clear"},propertygrid_bindings:{content:"spg-question__content spg-question__nopadding spg-question-group"},propertygrid_restfull:{content:"spg-question__content spg-question__nopadding spg-restfull"},propertygrid_masksettings:{content:"spg-question__content spg-question__nopadding spg-masksettings"},propertygrid_header:{mainRoot:"spg-header",content:"spg-question__content spg-question__nopadding"},coloralpha:{content:"spg-question__content spg-question__nopadding spg-question__content-coloralpha"},font:{content:"spg-question__content spg-question__nopadding spg-question-composite__content"},backgroundcornerradius:{content:"spg-question__content spg-question__nopadding spg-question-composite__content"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},actionBar:{root:"spg-action-bar",item:"spg-action-button",itemPressed:"spg-action-button--pressed",itemAsIcon:"spg-action-button--icon",itemIcon:"spg-action-button__icon",itemTitle:"spg-action-button__title"},spinedit:{root:"spg-input spg-spin-editor spg-input-container",control:"spg-spin-editor__input spg-input-container__input",buttonsContainer:"spg-input-container__buttons-container",arrowButton:"spg-input__edit-button",increaseButtonIcon:"icon-arrow-up",decreaseButtonIcon:"icon-arrow-down"},color:{root:"spg-input spg-color-editor spg-input-container",swatch:"spg-color-editor__color-swatch",swatchDefault:"spg-color-editor__color-swatch--default",swatchDisabled:"spg-color-editor__color-swatch--disabled",colorInput:"spg-color-editor__color-input",control:"spg-color-editor__input spg-input-container__input",colorDropdown:"spg-input__edit-button",colorDropdownIcon:"icon-drop-down-arrow",colorItem:"spg-color-editor__color-item",swatchIcon:"icon-color-picker"},textwithreset:{root:"spg-input spg-input-container",rootMultiline:"spg-input-container--multiline",control:"spg-input-container__input",controlMultiline:"spg-input-container__input spg-comment",resetButton:"spg-input__edit-button",resetButtonIcon:"icon-reset",content:"spg-question__content spg-text__content",remainingCharacterCounter:"spg-remaining-character-counter",onError:"spg-input--error"},fileedit:{root:"spg-input spg-input-container spg-file-edit",control:"spg-input-container__input",buttonsContainer:"spg-input-container__buttons-container",chooseButtonIcon:"icon-file",clearButtonIcon:"icon-clear",fileInput:"sd-visuallyhidden",clearButton:"spg-input__edit-button",chooseButton:"spg-input__edit-button spg-file-edit__choose-button",chooseButtonDisabled:"spg-input__edit-button--disabled"},linkvalue:{content:"spg-link"}},Ge={question:{properties:["name","title","description","visible","readOnly","isRequired","showCommentArea","commentText","commentPlaceholder",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"bindings",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"resetValueIf",tab:"logic"},{name:"setValueIf",tab:"logic"},{name:"setValueExpression",tab:"logic"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"hideNumber",tab:"layout"},{name:"state",tab:"layout"},{name:"titleLocation",tab:"layout"},{name:"descriptionLocation",tab:"layout"},{name:"errorLocation",tab:"layout"},{name:"indent",tab:"layout"},{name:"width",tab:"layout"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"},{name:"valueName",tab:"data"},{name:"defaultValue",tab:"data"},{name:"correctAnswer",tab:"data"},{name:"useDisplayValuesInDynamicTexts",tab:"data"},{name:"clearIfInvisible",tab:"data"},{name:"validators",tab:"validation"},{name:"requiredErrorText",tab:"validation"}],tabs:[{name:"layout",index:100},{name:"logic",index:200},{name:"data",index:300},{name:"validation",index:400}]},comment:{properties:[{name:"rows",tab:"layout"},{name:"cols",tab:"layout"},"placeholder",{name:"maxLength",tab:"validation"},{name:"textUpdateMode",tab:"data"},{name:"autoGrow",tab:"layout"},{name:"allowResize",tab:"layout"}]},file:{properties:["sourceType","visible","readOnly","isRequired","showCommentArea","allowMultiple",{name:"showPreview"},"allowImagesPreview","waitForUpload","needConfirmRemoveFile",{name:"storeDataAsText"},"allowCameraAccess","acceptedTypes","maxSize","imageHeight","imageWidth","filePlaceholder","photoPlaceholder","fileOrPhotoPlaceholder"]},signaturepad:{properties:["dataFormat","signatureWidth","signatureHeight","signatureAutoScaleEnabled","showPlaceholder","placeholder","placeholderReadOnly","allowClear","backgroundImage","backgroundColor","penMinWidth","penMaxWidth","penColor","waitForUpload",{name:"storeDataAsText"}]},html:{properties:["html"]},matrixdropdownbase:{properties:["cellType","optionsCaption","detailPanelMode","detailPanelShowOnAdding",{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"verticalAlign",tab:"layout"},{name:"alternateRows",tab:"layout"},{name:"columnsVisibleIf",tab:"logic"},{name:"columnLayout",tab:"layout"},{name:"transposeData",tab:"layout"},{name:"horizontalScroll",tab:"layout"},{name:"columnColCount",tab:"layout"},{name:"columnMinWidth",tab:"layout"},{name:"cellErrorLocation",tab:"layout"},{name:"detailErrorLocation",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"choices",index:12}]},matrixdynamic:{properties:["allowAddRows","allowRemoveRows","allowRowsDragAndDrop","rowCount","minRowCount","maxRowCount","addRowLocation","addRowText","removeRowText","confirmDelete","confirmDeleteText","placeholder",{name:"hideColumnsIfEmpty",tab:"columns"},{name:"emptyRowsText",tab:"columns"},{name:"defaultRowValue",tab:"data"},{name:"defaultValueFromLastRow",tab:"data"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},matrixdropdown:{properties:["totalText","placeholder",{name:"hideIfRowsEmpty",tab:"rows"},{name:"rowsVisibleIf",tab:"logic"},{name:"rowTitleWidth",tab:"layout"},{name:"keyDuplicationError",tab:"validation"}]},matrix:{properties:[{name:"isAllRowRequired",tab:"validation"},{name:"eachRowUnique",tab:"validation"},{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"verticalAlign",tab:"layout"},{name:"alternateRows",tab:"layout"},{name:"rowsOrder",tab:"rows"},{name:"hideIfRowsEmpty",tab:"rows"},{name:"columnsVisibleIf",tab:"logic"},{name:"rowsVisibleIf",tab:"logic"},{name:"columnMinWidth",tab:"layout"},{name:"rowTitleWidth",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"cells",index:500}]},multipletext:{properties:[{name:"colCount",tab:"layout"},{name:"itemSize",tab:"layout"},{name:"itemErrorLocation",tab:"layout"}],tabs:[{name:"items",index:10}]},rating:{properties:[{name:"displayMode",tab:"rateValues"},{name:"rateCount",tab:"rateValues"},{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"rateDescriptionLocation",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:10}]},selectbase:{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"layout"},{name:"textWrapEnabled",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"otherPlaceholder",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"hideIfChoicesEmpty",tab:"logic"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"},{name:"otherErrorText",tab:"validation"},{name:"separateSpecialChoices",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},checkbox:{properties:[{name:"showSelectAllItem",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"minSelectedChoices",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"separateSpecialChoices",tab:"choices"}]},ranking:{properties:[{name:"selectToRankEnabled"},{name:"selectToRankAreasLayout"},{name:"minSelectedChoices",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"}]},radiogroup:{properties:[{name:"showClearButton",tab:"choices"},{name:"separateSpecialChoices",tab:"choices"}]},dropdown:{properties:["placeholder","autocomplete",{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"allowClear",tab:"choices"},{name:"searchMode",tab:"choices"}]},tagbox:{properties:["closeOnSelect","placeholder",{name:"searchEnabled",tab:"choices"},{name:"searchMode",tab:"choices"},{name:"hideSelectedItems",tab:"choices"},{name:"allowClear",tab:"choices"}]},imagepicker:{properties:["contentMode","imageFit","isResponsive","minImageWidth","maxImageWidth","minImageHeight","maxImageHeight","imageHeight","imageWidth","multiSelect","showLabel"]},image:{properties:["imageLink","contentMode","imageFit","imageHeight","imageWidth","text"]},"itemvalue[]@choices":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@rows":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@columns":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},text:{properties:["inputType","min","max","step","placeholder","autocomplete","dataList",{name:"minValueExpression",tab:"logic"},{name:"maxValueExpression",tab:"logic"},{name:"size",tab:"layout"},{name:"maxLength",tab:"validation"},{name:"minErrorText",tab:"validation"},{name:"maxErrorText",tab:"validation"},{name:"textUpdateMode",tab:"data"},{name:"maskType",tab:"mask"},{name:"maskSettings",tab:"mask"}],tabs:[{name:"mask",index:250}]},boolean:{properties:["label","labelTrue","labelFalse","showTitle",{name:"valueTrue",tab:"data"},{name:"valueFalse",tab:"data"}]},expression:{properties:["expression","displayStyle","currency","format","maximumFractionDigits","minimumFractionDigits","useGrouping"]},matrixdropdowncolumn:{properties:["name","title"]},"matrixdropdowncolumn@default":{properties:["name","title","cellType","visible","readOnly","isRequired","isUnique","showInMultipleColumns","width","minWidth",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"resetValueIf",tab:"logic"},{name:"setValueIf",tab:"logic"},{name:"setValueExpression",tab:"logic"},{name:"totalType",tab:"totals"},{name:"totalDisplayStyle",tab:"totals"},{name:"totalCurrency",tab:"totals"},{name:"totalFormat",tab:"totals"},{name:"totalExpression",tab:"totals"}],tabs:[{name:"general",index:5},{name:"logic",index:20},{name:"totals",index:40}]},"matrixdropdowncolumn@checkbox":{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"showSelectAllItem",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"minSelectedChoices",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@radiogroup":{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@dropdown":{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"optionsCaption",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@tagbox":{properties:[{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choiceValuesFromQuestion",tab:"choices"},{name:"choiceTextsFromQuestion",tab:"choices"},{name:"showOtherItem",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"optionsCaption",tab:"choices"},{name:"showNoneItem",tab:"choices"},{name:"noneText",tab:"choices"},{name:"showRefuseItem",tab:"choices"},{name:"refuseText",tab:"choices"},{name:"showDontKnowItem",tab:"choices"},{name:"dontKnowText",tab:"choices"},{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@text":{properties:["inputType","min","max","step","placeholder","dataList","maxLength",{name:"maskType",tab:"mask"},{name:"maskSettings",tab:"mask"}],tabs:[{name:"mask",index:20},{name:"validators",index:25}]},"matrixdropdowncolumn@comment":{properties:["rows","placeholder","maxLength"],tabs:[{name:"validators",index:25}]},"matrixdropdowncolumn@boolean":{properties:[{name:"labelTrue",tab:"data"},{name:"labelFalse",tab:"data"},{name:"valueTrue",tab:"data"},{name:"valueFalse",tab:"data"},{name:"defaultValue",tab:"data"}],tabs:[{name:"data",index:25}]},"matrixdropdowncolumn@expression":{properties:["expression","displayStyle","currency"]},"matrixdropdowncolumn@rating":{properties:["rateValues",{name:"displayMode",tab:"rateValues"},{name:"rateType",tab:"rateValues"},{name:"rateCount",tab:"rateValues"},{name:"rateColorMode",tab:"rateValues"},{name:"scaleColorMode",tab:"rateValues"},{name:"autoGenerate",tab:"rateValues"},{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"rateDescriptionLocation",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:5}]},multipletextitem:{properties:["name","title","inputType","isRequired","size","placeholder",{name:"maxLength",tab:"validation"},{name:"requiredErrorText",tab:"validation"},{name:"validators",tab:"validation"},{name:"defaultValueExpression",tab:"logic"},{name:"minValueExpression",tab:"logic"},{name:"maxValueExpression",tab:"logic"},{name:"maskType",tab:"mask"},{name:"maskSettings",tab:"mask"}],tabs:[{name:"logic",index:200},{name:"mask",index:250},{name:"validation",index:300}]},"multipletext@items":{properties:["name","title"]},calculatedvalue:{properties:["name","expression","includeIntoResult"]},"calculatedvalue@items":{properties:["name","expression"]},paneldynamic:{properties:["renderMode","templateTabTitle","tabAlign","panelCount","minPanelCount","maxPanelCount","panelsState",{name:"allowAddPanel"},{name:"allowRemovePanel"},"panelAddText","panelRemoveText","templateTitle","templateDescription","noEntriesText","confirmDelete","confirmDeleteText","panelPrevText","panelNextText","showQuestionNumbers","showRangeInProgress",{name:"defaultPanelValue",tab:"data"},{name:"defaultValueFromLastPanel",tab:"data"},{name:"templateTitleLocation",tab:"questionSettings"},{name:"templateErrorLocation",tab:"questionSettings"},{name:"panelRemoveButtonLocation",tab:"layout"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},panelbase:{properties:["name","title","description","visible","readOnly",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"questionTitleLocation",tab:"questionSettings"},{name:"questionErrorLocation",tab:"questionSettings"}],tabs:[{name:"questionSettings",index:100},{name:"layout",index:150},{name:"logic",index:200},{name:"data",index:300},{name:"validation",index:400}]},panel:{properties:["isRequired",{name:"questionsOrder",tab:"questionSettings"},{name:"innerIndent",tab:"questionSettings"},{name:"requiredErrorText",tab:"validation"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"state",tab:"layout"},{name:"width",tab:"layout"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"},{name:"showNumber",tab:"numbering"},{name:"showQuestionNumbers",tab:"numbering"},{name:"questionStartIndex",tab:"numbering"}],tabs:[{name:"numbering",index:350}]},page:{properties:["navigationTitle","navigationDescription","maxTimeToFinish",{name:"questionsOrder",tab:"questionSettings"},{name:"navigationButtonsVisibility",tab:"navigation"}],tabs:[{name:"navigation",index:350}]},survey:{properties:["title","description","showTitle","locale","mode","cookieName","widthMode","width","fitToContainer",{name:"questionsOnPageMode",tab:"navigation"},{name:"firstPageIsStarted",tab:"navigation"},{name:"goNextPageAutomatic",tab:"navigation"},{name:"allowCompleteSurveyAutomatic",tab:"navigation"},{name:"showNavigationButtons",tab:"navigation"},{name:"showPrevButton",tab:"navigation"},{name:"showProgressBar",tab:"navigation"},{name:"progressBarType",tab:"navigation"},{name:"progressBarShowPageTitles",tab:"navigation"},{name:"progressBarShowPageNumbers",tab:"navigation"},{name:"showTOC",tab:"navigation"},{name:"tocLocation",tab:"navigation"},{name:"showPreviewBeforeComplete",tab:"navigation"},{name:"previewText",tab:"navigation"},{name:"editText",tab:"navigation"},{name:"startSurveyText",tab:"navigation"},{name:"pagePrevText",tab:"navigation"},{name:"pageNextText",tab:"navigation"},{name:"completeText",tab:"navigation"},{name:"questionsOrder",tab:"question"},{name:"questionTitleLocation",tab:"question"},{name:"questionDescriptionLocation",tab:"question"},{name:"showQuestionNumbers",tab:"question"},{name:"questionTitlePattern",tab:"question"},{name:"requiredText",tab:"question"},{name:"questionStartIndex",tab:"question"},{name:"questionErrorLocation",tab:"question"},{name:"focusFirstQuestionAutomatic",tab:"question"},{name:"maxTextLength",tab:"question"},{name:"maxOthersLength",tab:"question"},{name:"autoGrowComment",tab:"question"},{name:"allowResizeComment",tab:"question"},{name:"showPageTitles",tab:"pages"},{name:"showPageNumbers",tab:"pages"},{name:"calculatedValues",tab:"logic"},{name:"triggers",tab:"logic"},{name:"clearInvisibleValues",tab:"data"},{name:"textUpdateMode",tab:"data"},{name:"sendResultOnPageNext",tab:"data"},{name:"storeOthersAsComment",tab:"data"},{name:"focusOnFirstError",tab:"validation"},{name:"checkErrorsMode",tab:"validation"},{name:"navigateToUrl",tab:"showOnCompleted"},{name:"navigateToUrlOnCondition",tab:"showOnCompleted"},{name:"showCompletedPage",tab:"showOnCompleted"},{name:"completedHtml",tab:"showOnCompleted"},{name:"completedHtmlOnCondition",tab:"showOnCompleted"},{name:"loadingHtml",tab:"showOnCompleted"},{name:"completedBeforeHtml",tab:"showOnCompleted"},{name:"maxTimeToFinish",tab:"timer"},{name:"maxTimeToFinishPage",tab:"timer"},{name:"showTimerPanel",tab:"timer"},{name:"showTimerPanelMode",tab:"timer"},{name:"logo",tab:"logo"},{name:"logoPosition",tab:"logo"},{name:"logoWidth",tab:"logo"},{name:"logoHeight",tab:"logo"},{name:"logoFit",tab:"logo"}],tabs:[{name:"logo",index:50},{name:"navigation",index:100},{name:"question",index:200},{name:"pages",index:250},{name:"logic",index:300},{name:"data",index:400},{name:"validation",index:500},{name:"showOnCompleted",index:600},{name:"timer",index:700}]},"page@survey":{properties:["name","title"]},choicesByUrl:{properties:["url","path","valueName","titleName","allowEmptyResponse"]},"patternmask@maskSettings":{properties:["pattern","saveMaskedValue"]},"datetimemask@maskSettings":{properties:["pattern","min","max","saveMaskedValue"]},"numericmask@maskSettings":{properties:["min","max","precision","decimalSeparator","thousandsSeparator","allowNegativeValues","saveMaskedValue"]},"currencymask@maskSettings":{properties:["prefix","suffix","min","max","precision","decimalSeparator","thousandsSeparator","allowNegativeValues","saveMaskedValue"]},patternmask:{properties:["pattern"]},datetimemask:{properties:["pattern"]},currencymask:{properties:["prefix","suffix"]}},ze={autoGenerateProperties:!0,classes:Ge},Je=function(){function e(){}return e.definition=Ge,e}(),Ze=function(){function e(){}return Object.defineProperty(e.prototype,"name",{get:function(){return this.property?this.property.name:""},enumerable:!1,configurable:!0}),e}(),Ke=function(){this.visible=!0,this.index=0,this.properties=[]},Ye=function(){function e(e,t,o,r,n,a,s){void 0===t&&(t=null),void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n=null),void 0===a&&(a=null),void 0===s&&(s=null),this.obj=e,this.options=t,this.parentObj=n,this.parentProperty=a,this.propertyGridDefinition=s,this.tabs=[],this.propertyGridDefinition||(this.propertyGridDefinition=ze),this.showModeValue=r,this.properties=i.Serializer.getPropertiesByObj(this.obj),this.fillPropertiesHash(),this.buildTabs(o)}return e.prototype.getProperty=function(e){var t=this.propertiesHash[e];return t&&t.visible?t.property:null},e.prototype.getPropertyAsCategory=function(e){var t=this.getProperty(e);return!t||t.category&&t.category!==e?null:t},Object.defineProperty(e.prototype,"showMode",{get:function(){return this.showModeValue?this.showModeValue:"form"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){for(var e=0;e<this.tabs.length;e++)if(this.tabs[e].visible&&this.tabs[e].properties.length>0)return!1;return!0},enumerable:!1,configurable:!0}),e.prototype.getClassDefintion=function(e){if(this.propertyGridDefinition&&this.propertyGridDefinition.classes)return this.propertyGridDefinition.classes[e]},e.prototype.fillPropertiesHash=function(){this.propertiesHash={};for(var e=0;e<this.properties.length;e++){var t=this.properties[e];this.propertiesHash[t.name]={property:t,visible:te.isPropertyVisible(this.obj,t,this.options,this.showMode,this.parentObj,this.parentProperty)}}},e.prototype.isJSONPropertyVisible=function(e){var t=this.propertiesHash[e.name];return!!t&&t.visible},e.prototype.getTabByName=function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].name==e)return this.tabs[t];return null},e.prototype.getTabs=function(){return this.tabs},e.prototype.getProperties=function(e){for(var t=[],o=0;o<e.properties.length;o++)t.push(e.properties[o].property);return t},e.prototype.buildTabs=function(e){e||(e=this.obj.getType());for(var t=this.getAllDefinitionsByClass(e),o=[],r=t.length-1;r>=0;r--){for(var n=t[r],i=n.tabs?n.tabs.length-1:-1;i>=0;i--){var a=n.tabs[i];o.indexOf(a.name)>-1?this.setTabProperties(a):this.addPropertyIntoTab(a,!0)&&o.push(a.name)}for(i=n.properties?n.properties.length-1:-1;i>=0;i--){var s=n.properties[i].name||n.properties[i];-1===o.indexOf(s)&&(o.push(s),this.addPropertyIntoTab(n.properties[i]))}}for(r=this.tabs.length-1;r>=0;r--)this.movePropertiesToNextProperties(this.tabs[r].properties),this.tabs[r].visible?this.sortProperties(this.tabs[r].properties):this.tabs.splice(r,1);this.tabs.sort((function(e,t){return e.index<t.index?-1:e.index>t.index?1:0})),this.setParentTabs(),this.tabs.forEach((function(e){var t;null===(t=e.tabs)||void 0===t||t.sort((function(e,t){return e.index-t.index}))}))},e.prototype.setParentTabs=function(){for(var e=this.tabs.length-1;e>=0;e--){var t=this.tabs[e];if(t.parentName){var o=this.getTabByName(t.parentName);o&&(t.parent=o,Array.isArray(o.tabs)||(o.tabs=[]),o.tabs.push(t),this.tabs.splice(e,1))}}},e.prototype.addPropertyIntoTab=function(e,t){void 0===t&&(t=!1),t&&this.setTabProperties(e);var o="string"==typeof e,r=o?e:e.name,n=this.propertiesHash[r];if(!n||t&&!this.getPropertyAsCategory(r))return!1;if(!o&&!1===e.visible)return!1;if(!n.visible&&(o||!o&&!0!==e.visible))return!1;var i=t?e.name:a.propertyGrid.generalTabName;t||o||!e.tab||(i=e.tab);var s=new Ze;return s.property=n.property,s.category=!o&&e.category?e.category:"",s.title=!o&&e.title?e.title:"",s.onSameLine=this.isPropertyOnSameLine(n.property.nextToProperty),s.createdFromTabName=t,this.getTabOrCreate(i).properties.unshift(s),!0},e.prototype.setTabProperties=function(e){var t=this.getTabOrCreate(e.name);e.index>0&&(t.index=e.index),t.parentName=e.parent,!1===e.visible&&(t.visible=!1),e.title&&(t.title=e.title)},e.prototype.movePropertiesToNextProperties=function(e){for(var t=[].concat(e),o=0;o<t.length;o++){var r=this.getNextToNameProperty(t[o].property),n=this.getTabByPropertyName(r);if(n){var i=this.getPropertyByNameInTab(n,r),a=n.properties.indexOf(i);n.properties.splice(a+1,0,t[o]),e.splice(e.indexOf(t[o]),1)}}},e.prototype.getTabByPropertyName=function(e){if(!e)return null;this.isPropertyOnSameLine(e)&&(e=e.substring(1));for(var t=0;t<this.tabs.length;t++)if(this.getPropertyByNameInTab(this.tabs[t],e))return this.tabs[t];return null},e.prototype.getNextToNameProperty=function(e){return e.nextToProperty?this.isPropertyOnSameLine(e.nextToProperty)?e.nextToProperty.substring(1):e.nextToProperty:""},e.prototype.isPropertyOnSameLine=function(e){return!!e&&"*"===e[0]},e.prototype.getPropertyByNameInTab=function(e,t){for(var o=e.properties,r=0;r<o.length;r++)if(o[r].name==t)return o[r];return null},e.prototype.getTabOrCreate=function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].name==e)return this.tabs[t];var o=new Ke;return o.name=e,e==a.propertyGrid.generalTabName&&(o.index=-1),this.tabs.unshift(o),o},e.prototype.setUsedProperties=function(e,t){for(var o=0;o<e.length;o++){var r=e[o].properties;if(Array.isArray(r))for(var n=0;n<r.length;n++){t[r[n].name?r[n].name:r[n]]=!0}}},e.prototype.getAllDefinitionsByClass=function(e){var t=[],o={};if(e.indexOf("@")>-1&&this.getClassDefintion(e)){var r=e.substring(0,e.indexOf("@")+1)+"default";return r!=e&&this.getClassDefintion(r)&&t.push(this.getClassDefintion(r)),t.push(this.getClassDefintion(e)),this.setUsedProperties(t,o),this.addNonTabProperties(t,o,!0),t}var n=!1,i=this.obj.isQuestion&&this.obj.getDynamicType?this.obj.getDynamicType():"";return i&&(n=this.getAllDefinitionsByClassCore(i,o,t,e)),this.getAllDefinitionsByClassCore(e,o,t,void 0)&&n||this.addNonTabProperties(t,o),t},e.prototype.getAllDefinitionsByClassCore=function(e,t,o,r){for(var n=!1,a=e;a&&(!r||!i.Serializer.isDescendantOf(r,a));){var s=i.Serializer.findClass(a);if(!s)break;n=this.getAllDefinitionsByClassSingleCore(s.name,t,o),a=s.parentName}return n},e.prototype.getAllDefinitionsByClassSingleCore=function(e,t,o){var r=this.getClassDefintion(e),n=!1;if(!r)return n;if(r.properties)for(var i=0;i<r.properties.length;){var s=r.properties[i],l="string"==typeof s?s:s.name,c=a.propertyGrid.generalTabName;"string"!=typeof s&&s.tab&&(c=s.tab);var p=this.propertiesHash[l]?this.propertiesHash[l].property:null,u=this.getJsonPropertyCategory(p);u&&u!==c?r.properties.splice(i,1):(t[l]=!0,i++)}if(r.tabs)for(i=0;i<r.tabs.length;i++){var d=r.tabs[i].name;n=n||"others"===d,this.getPropertyAsCategory(d)&&(t[d]=!0)}return o.unshift(r),n},e.prototype.getJsonPropertyCategory=function(e){return e&&e.category?e.category:null},e.prototype.addNonTabProperties=function(e,t,o){if(void 0===o&&(o=!1),this.propertyGridDefinition.autoGenerateProperties){for(var r={properties:[],tabs:[]},n=[],i=0;i<this.properties.length;i++){var s=this.properties[i];if(!(!this.isJSONPropertyVisible(s)||t[s.name]||o&&"form"!==s.showMode)){var l=this.getJsonPropertyCategory(s),c=l||(0==e.length||this.parentObj&&"form"===this.showMode?a.propertyGrid.generalTabName:"others");if(n.indexOf(c)<0&&c!=a.propertyGrid.generalTabName&&(n.push(c),r.tabs.push({name:c,index:"others"===c?1e3:10*n.length})),s.categoryIndex>-1&&n.indexOf(c)>-1)for(var p=0;p<r.tabs.length;p++)r.tabs[p].name==c&&(r.tabs[p].index=s.categoryIndex);r.properties.push({name:this.properties[i].name,tab:c})}}r.properties.length>0&&e.push(r)}},e.prototype.sortProperties=function(e){if(Array.isArray(e))for(var t=[].concat(e),o=0;o<t.length;o++){var r=t[o].property.visibleIndex;if(t[o].createdFromTabName&&r<0&&(r=0),!(r<0)){var n=e.indexOf(t[o]);n>-1&&e.splice(n,1),r<e.length?e.splice(r,0,t[o]):e.push(t[o])}}},e}(),Xe=function(){function e(){}return e.prototype.parse=function(t){e.boldRegEx||(e.boldRegEx=/\*{2}(.*?)\*{2}/gm,e.italicRegEx=/\_(.*?)\_/gm,e.codeRegEx=/\`(.*?)\`/gm,e.linkRegEx=/\[(.+)\]\(([^ ]+?)( "(.+)")?\)/);var o=function(e,t,o,n){if(!t)return e;var i=e.indexOf(t);if(r(e,i))return e;var a=t.substring(n.length,t.length),s="<span class='"+o+"'>"+(a=a.substring(0,a.length-n.length))+"</span>";return e.replace(t,s)},r=function(e,t){for(var o=!1,r=t-1;r>0;r--){if(" "===e[r]||"\n"===e[r])return!1;if("]"===e[r]&&o)return!0;o="("===e[r]}return!1};return t=this.replace(e.boldRegEx,t,"spg-bold","**",o),t=this.replace(e.italicRegEx,t,"spg-italic","_",o),t=this.replace(e.codeRegEx,t,"spg-code","`",o),t=this.replace(e.linkRegEx,t,"spg-link","",(function(e,t,o,r){if(!t)return e;var n=t.indexOf("](");if(n<0)return e;var i=t.substring(1,n),a="<a class='"+o+"' target='_blank' href='"+t.substring(n+2,t.length-1)+"'>"+i+"</a>";return e.replace(t,a)})),t=this.addLineBreaks(t)},e.prototype.replace=function(e,t,o,r,n){var i=t.match(e);if(!Array.isArray(i)||0==i.length)return t;for(var a=0;a<i.length;a++)t=n(t,i[a],o,r);return t},e.prototype.addLineBreaks=function(e){return e.indexOf("\n")<0?e:e.split("\n").join("<br/>")},e}();function $e(e,t,o){void 0===t&&(t=!0),void 0===o&&(o=!0),e.showNavigationButtons="none",e.showPageTitles=!1,e.focusFirstQuestionAutomatic=!1,e.showQuestionNumbers="off",o&&(e.questionTitleLocation="left"),e.showProgressBar="off",t&&(e.textUpdateMode="onTyping"),e.requiredText=""}i.FunctionFactory.Instance.register("propertyVisibleIf",(function(e){if(!this.question)return!1;var t=this.question.obj,o=this.question.property;return!(!t||!o)&&(!!i.Serializer.hasOriginalProperty(t,o.name)&&o.isVisible("",t))})),i.FunctionFactory.Instance.register("propertyEnableIf",(function(e){var t=this.question.property,o=this.question.obj;return!!(this.question&&o&&t)&&(!this.question.obj[t.overridingProperty]&&t.isEnable(o))}));var et=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!0),this.options=e,this.options||(this.options=new s),t&&this.setupSurvey()}return e.prototype.setupSurvey=function(){this.editSurveyValue=this.createSurvey()},Object.defineProperty(e.prototype,"editSurvey",{get:function(){return this.editSurveyValue},enumerable:!1,configurable:!0}),e.prototype.hasErrors=function(){return this.editSurvey.hasErrors(!0,!0)},e.prototype.createSurvey=function(){var e=this.getSurveyJSON();return $e(e,!1,!1),this.options.createSurvey(e,this.getSurveyCreationReason(),this)},e.prototype.dispose=function(){this.editSurvey&&this.editSurvey.dispose()},e}(),tt={editors:new Array,fitHash:{},clearHash:function(){this.fitHash={}},register:function(e){this.editors.push(e)},getEditor:function(e,t){if(!e)return null;if(t)for(var o=this.editors.length-1;o>=0;o--){var r=this.editors[o];if(r.fit(e,t))return r}var n=this.fitHash[e.id];if(n)return n;var i=this.isEditorFit(e);return i||this.isEditorFit(e,!0)},isEditorFit:function(e,t){void 0===t&&(t=!1);for(var o=this.editors.length-1;o>=0;o--){var r=this.editors[o];if(!t&&r.fit(e)||t&&r.isDefault&&r.isDefault())return this.fitHash[e.id]=r,r}return null},getJSON:function(e,t,o,r,n){var i=this.getEditor(t,r);return i?i.getJSON(e,t,o,n):null},onCreated:function(e,t,o,r,n){var i=this.getEditor(o);i&&i.onCreated&&i.onCreated(e,t,o,r,n)},onSetup:function(e,t,o,r){var n=this.getEditor(o);n&&n.onSetup&&n.onSetup(e,t,o,r)},validateValue:function(e,t,o,r){var n=this.getEditor(o);return n&&n.validateValue?n.validateValue(e,t,o,r):""},onAfterRenderQuestion:function(e,t,o){var r=this.getEditor(t);r&&r.onAfterRenderQuestion&&r.onAfterRenderQuestion(e,t,o)},onMatrixCellCreated:function(e,t,o){var r=this.getEditor(t);r&&r.onMatrixCellCreated&&r.onMatrixCellCreated(o.question.obj,o)},onMatrixCellValueChanged:function(e,t,o){var r=this.getEditor(t);r&&r.onMatrixCellValueChanged&&r.onMatrixCellValueChanged(e,o);var n=o.row;if(n){var i=n.getQuestionByName(o.columnName);i&&n.runCondition({},{question:i})}},onMatrixAllowRemoveRow:function(e,t,o){var r=this.getEditor(t);return!r||!r.onMatrixAllowRemoveRow||r.onMatrixAllowRemoveRow(e,o)},onGetMatrixRowAction:function(e,t,o,r){var n=this.getEditor(t);n&&n.onGetMatrixRowAction&&n.onGetMatrixRowAction(e,o,r)},onUpdateQuestionCssClasses:function(e,t,o){var r=this.getEditor(t);r&&r.onUpdateQuestionCssClasses&&r.onUpdateQuestionCssClasses(e,o)},onGetQuestionTitleActions:function(e,t,o,r){var n=this.getEditor(t);n&&n.onGetQuestionTitleActions&&n.onGetQuestionTitleActions(e,o,r)},onValueChanged:function(e,t,o){var r=this.getEditor(t);r&&r.onValueChanged&&r.onValueChanged(e,t,o)},onValueChanging:function(e,t,o,r){var n=this.getEditor(t);n&&n.onValueChanging&&n.onValueChanging(e,t,o,r)},onMasterValueChanged:function(e,t,o){var r=this.getEditor(t);r&&r.onMasterValueChanged&&r.onMasterValueChanged(e,t,o)}},ot=function(){function e(e,t){this.obj=e,this.options=t}return e.prototype.onGetQuestionTitleActions=function(e){var t=e.question,o=t.property,r=tt.getEditor(o);if(r){var n=[],i=!t.isReadOnly;!!r.clearPropertyValue&&(!r.canClearPropertyValue||r.canClearPropertyValue(this.obj,o,t,this.options))&&n.push(this.createClearValueAction(r,o,t,i)),!1!==t.allowBatchEdit&&r.createPropertyEditorSetup&&(r.isPropertyEditorSetupEnabled&&(i=r.isPropertyEditorSetupEnabled(this.obj,o,e.question,this.options)),n.push(this.createEditorSetupAction(r,o,t,i)));var a=this.createPropertyHelpAction(t);a&&(n.unshift(a),t.getTitleToolbar().containerCss+=" spg-title-toolobar--single-help-action",a.iconSize=16),n.length>0&&(e.titleActions=n)}},e.prototype.createClearValueAction=function(e,t,o,r){var n=this;return{id:"property-grid-clear",title:z("pe.clear"),showTitle:!1,iconName:"icon-clear",innerCss:"spg-action-button--danger",enabled:r,visible:new i.ComputedUpdater((function(){var e=o.obj[t.name];return Array.isArray(e)?e.length>0:!!e})),action:function(){e.clearPropertyValue(o.obj,t,o,n.options)}}},e.prototype.showModalPropertyEditor=function(e,t,o){return e.showModalPropertyEditor(e,t,o,this.options)},e.prototype.createEditorSetupAction=function(e,t,o,r){var n=this;return{id:"property-grid-setup",iconName:t.isArray?"icon-fast-entry":"icon-wizard",enabled:r,title:z("pe.edit"),showTitle:!1,action:function(){return n.showModalPropertyEditor(e,t,o)}}},e.prototype.createPropertyHelpAction=function(e){var t=this;if(!e.description)return null;var o=new i.Action({title:"",tooltip:e.description,id:"property-grid-help",iconName:this.getHelpActionIconName(e),css:"spg-help-action",showTitle:!1,action:function(){e.descriptionLocation="hidden"!=e.descriptionLocation?"hidden":"underTitle",o.iconName=t.getHelpActionIconName(e)}});return o},e.prototype.getHelpActionIconName=function(e){return"hidden"!=e.descriptionLocation?"icon-description-hide":"icon-description"},e}(),rt=function(){function e(e,t,o,r,n){void 0===t&&(t=null),void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n=null),this.obj=e,this.options=t,this.parentObj=o,this.parentProperty=r,this.propertyGridDefinition=n}return e.isPropertyReadOnly=function(e,t,o,r,n){var i=e.readOnly;return t&&o&&(i=t.onIsPropertyReadOnlyCallback(o,e,i,r,n)),i},e.getClassNameProperty=function(e){if(e&&e.getClassNameProperty)return e.getClassNameProperty()},e.prototype.toJSON=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=void 0),this.createJSON(e,t)},e.prototype.createColumnsJSON=function(e,t){for(var o=[],r=(e?i.Serializer.createClass(e):this.obj)||this.obj,n=0;n<t.length;n++){var a=this.getColumnPropertyJSON(r,t[n]);a&&o.push(a)}return o},e.prototype.setupObjPanel=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=void 0),e.fromJSON(this.toJSON(t,o)),this.onQuestionsCreated(e)},e.prototype.onQuestionsCreated=function(e){for(var t=i.Serializer.getPropertiesByObj(this.obj),o={},r=0;r<t.length;r++)o[t[r].name]=t[r];var n=e.questions;for(r=0;r<n.length;r++){var a=n[r],s=o[a.name];a.property=s,a.obj=this.obj,a.creatorOptions=this.options;var l=this.getVisibilityOnEvent(s);if(a.readOnly=a.readOnly||this.isPropertyReadOnly(s),a.visible=a.visible&&l,s.visibleIf&&l&&(a.visibleIf="propertyVisibleIf() = true"),a.visible&&(s.overridingProperty||s.enableIf)&&(a.readOnly||(a.enableIf="propertyEnableIf() = true"),s.overridingProperty)){a.onUpdateCssClassesCallback=function(e){e.questionWrapper="spg-boolean-wrapper--overriding"};var c=this.createOverridingQuestion(e,a,s.overridingProperty);a.parent.addElement(c,a.parent.elements.indexOf(a)+1)}a.descriptionLocation="hidden";var p=G.getPropertyHelpInEditor(this.obj.getType(),s.name,s.type);p&&(a.description=p),tt.onCreated(this.obj,a,s,this.options,this.propertyGridDefinition),this.options.onPropertyEditorCreatedCallback(this.obj,s,a)}},e.prototype.getVisibilityOnEvent=function(e,t){return void 0===t&&(t=""),this.options.onCanShowPropertyCallback(this.obj,e,t,this.parentObj,this.parentProperty)},e.prototype.isPropertyReadOnly=function(t){return e.isPropertyReadOnly(t,this.options,this.obj,this.parentObj,this.parentProperty)},e.prototype.createOverridingQuestion=function(e,t,o){var r=i.Serializer.createClass("linkvalue");r.name=t.name+"_overridingProperty",r.startWithNewLine=!1,r.property=t.property,r.obj=t.obj,r.visibleIf="propertyEnableIf() = false";var n=e.getQuestionByName(o);return r.linkValueText=G.getString("pe.overridingPropertyPrefix"),r.titleLocation="hidden",r.onUpdateCssClassesCallback=function(e){e.questionWrapper="spg-link-wrapper--overriding"},n&&(r.linkClickCallback=function(){n.focus(!1,!0)}),r},e.prototype.getClasPropName=function(){if(this.parentObj&&this.parentProperty)return this.parentProperty.name;var t=e.getClassNameProperty(this.obj);return t&&this.obj[t]?this.obj[t]:void 0},e.prototype.createJSON=function(e,t){void 0===t&&(t=void 0);var o=void 0,r=this.getClasPropName();r&&("itemvalue"===(o=this.obj.getType())&&(o+="[]"),o+="@"+r);for(var n=new Ye(this.obj,null,o,void 0,this.parentObj,this.parentProperty,this.propertyGridDefinition).getTabs(),i={},s=0;s<n.length;s++)!1!==n[s].visible&&(i[n[s].name]=this.createPanelProps(n[s],t));var l={elements:[]};for(var c in i)if(c==a.propertyGrid.generalTabName&&e){var p=i[c].elements;for(s=0;s<p.length;s++)l.elements.push(p[s])}else l.elements.push(i[c]);return l},e.prototype.createPanelProps=function(e,t,o){var r=this;void 0===o&&(o=!1);for(var n=this.createPanelJSON(e.name,e.title,o),i=0;i<e.properties.length;i++){var a=e.properties[i],s=this.createQuestionJSON(this.obj,a.property,a.title,!1,t);a.onSameLine&&(s.startWithNewLine=!1,this.updateQuestionJSONOnSameLine(s),n.elements.length>0&&this.updateQuestionJSONOnSameLine(n.elements[n.elements.length-1])),s&&n.elements.push(s)}return Array.isArray(e.tabs)&&e.tabs.forEach((function(e){var o=r.createPanelProps(e,t,!0);o.title===e.name&&delete o.title,o&&n.elements.push(o)})),n},e.prototype.updateQuestionJSONOnSameLine=function(e){e.titleLocation="left",e.minWidth="50px"},e.prototype.createPanelJSON=function(e,t,o){var r={type:"panel",name:e,title:this.getPanelTitle(e,t),elements:[]};return o||(r.state="collapsed"),r},e.prototype.createQuestionJSON=function(e,t,o,r,n){if(void 0===r&&(r=!1),!this.isPropertyVisible(t,r?"list":"")&&r)return null;var i=tt.getJSON(e,t,this.options,n,this.propertyGridDefinition);if(!i)return null;i.name=t.name,i.title=this.getQuestionTitle(t,e.getType(),o),this.isQuestionTitleHidden(t)&&(i.titleLocation="hidden"),i.visible=t.visible,i.isReadOnly=t.readOnly,i.isRequired=t.isRequired,i.requiredErrorText=G.getString("pe.propertyIsEmpty"),["page","panelbase"].indexOf(t.className)&&"name"===i.name&&(i.isRequired=!0,i.requiredErrorText=G.getString("pe.propertyIsEmpty"));var a=G.getPropertyPlaceholder(e.getType(),t.name);return a&&(i.placeholder=a),i},e.prototype.getColumnPropertyJSON=function(e,t){if(!e)return null;var o=i.Serializer.findProperty(e.getType(),t);if(!o)return null;var r=this.createQuestionJSON(e,o,"",!0,void 0);return r?(o.isUnique&&(r.isUnique=o.isUnique),r.type&&(r.cellType=r.type,delete r.type),"buttongroup"===r.cellType&&(r.cellType="dropdown"),"fileedit"===r.cellType&&(r.cellType="text"),o.visibleIf&&(r.visibleIf="propertyVisibleIf() = true"),r.isReadOnly&&(r.readOnly=r.isReadOnly,delete r.isReadOnly),r):null},e.prototype.isPropertyVisible=function(e,t){return!!e.visible&&(!t||!e.showMode||t==e.showMode)},e.prototype.getPanelTitle=function(e,t){if(t)return t;var o=G.getString("pe.tabs."+e);if("object"==typeof o)for(var r in o)if(i.Serializer.isDescendantOf(this.obj.getType(),r))return o[r];return o},e.prototype.getQuestionTitle=function(e,t,o){if(e.displayName)return e.displayName;if(o&&o!==e.name)return o;var r=t;return this.parentProperty&&(r+="@"+this.parentProperty.name),G.getPropertyNameInEditor(r,e.name)},e.prototype.isQuestionTitleHidden=function(e){return""===e.displayName},e}(),nt=function(){function e(e,t,o){void 0===e&&(e=null),void 0===t&&(t=new s),void 0===o&&(o=null),this.surveyInstanceCreatedArea="property-grid",this.isCellCreating=!1,this.options=t,this.propertyGridDefinition=o,this.options.enableLinkFileEditor&&tt.register(new pt),this.obj=e}return e.prototype.refresh=function(){this.setObj(this.objValue)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},set:function(e){this.objValue!==e&&this.setObj(e)},enumerable:!1,configurable:!0}),e.prototype.selectProperty=function(e,t){if(void 0===t&&(t=!0),this.survey){var o=this.survey.getQuestionByName(e);if(o){for(var r=this.survey.getAllPanels(),n=0;n<r.length;n++){var i=r[n];i===o.parent?i.expand():i.collapse()}t&&o.focus()}}},e.prototype.setObjFromAction=function(e,t){this.changedFromActionCallback?this.changedFromActionCallback(e,t):this.setObj(e)},e.prototype.setObj=function(e){var t=this;this.objValue=e,this.classNameProperty=this.obj?rt.getClassNameProperty(this.obj):"",this.classNameValue=this.classNameProperty?this.obj[this.classNameProperty]:void 0,this.titleActionsCreator=this.obj?new ot(this.obj,this.options):void 0;var o=this.getSurveyJSON();this.options.readOnly&&(o.mode="display"),this.surveyValue&&(this.surveyValue.onValidateQuestion.clear(),this.surveyValue.onValueChanging.clear(),this.surveyValue.onValueChanged.clear(),this.surveyValue.onMatrixCellValueChanging.clear(),this.surveyValue.onMatrixCellValidate.clear(),this.surveyValue.onMatrixCellValueChanged.clear(),this.surveyValue.editingObj=void 0,this.surveyValue.data={},this.surveyValue.dispose()),this.surveyValue=this.createSurvey(o,(function(e){e.questionErrorLocation="bottom",e.getCss().list={},e.css=We;var o=e.createNewPage("p1");t.obj&&(new rt(t.obj,t.options,null,null,t.propertyGridDefinition).setupObjPanel(o,!1),e.enterKeyAction="loseFocus",e.addPage(o),e.getAllQuestions().forEach((function(e){tt.onSetup(t.obj,e,e.property,t.options)})),e.checkErrorsMode="onValueChanging")})),this.obj&&(this.survey.onValueChanged.add((function(e,o){t.onValueChanged(o)})),this.survey.onValueChanging.add((function(e,o){t.onValueChanging(o)})),this.survey.onValidateQuestion.add((function(e,o){t.onValidateQuestion(o)})),this.survey.onGetQuestionTitleActions.add((function(e,o){t.titleActionsCreator.onGetQuestionTitleActions(o),t.onGetQuestionTitleActions(o,t.options);var r=o.question;t.options.onPropertyEditorUpdateTitleActionsCallback(t.obj,r.property,r,o.titleActions)})),this.survey.onGetPanelTitleActions.add((function(e,t){t.titleActions.splice(0,t.titleActions.length)})),this.survey.onMatrixCellCreated.add((function(e,o){t.onMatrixCellCreated(o)})),this.survey.onMatrixCellValueChanging.add((function(e,o){t.onMatrixCellValueChanging(o)})),this.survey.onMatrixCellValidate.add((function(e,o){t.onMatrixCellValidate(o)})),this.survey.onMatrixCellValueChanged.add((function(e,o){t.onMatrixCellValueChanged(o)})),this.survey.onMatrixAllowRemoveRow.add((function(e,o){o.allow=t.getMatrixAllowRemoveRow(o.question,o.row)})),this.survey.onMatrixRowRemoving.add((function(e,o){o.allow=t.getMatrixOnRowRemoving(o.question,o.row)})),this.survey.onMatrixRowAdded.add((function(e,o){t.onMatrixRowAdded(o)})),this.survey.onGetMatrixRowActions.add((function(e,o){t.onGetMatrixRowAction(o)})),this.survey.onUpdateQuestionCssClasses.add((function(e,o){t.onUpdateQuestionCssClasses(o)})),this.survey.onElementContentVisibilityChanged.add((function(e,o){if(!a.propertyGrid.allowExpandMultipleCategories){var r=o.element;r&&r.isPanel&&r.isExpanded&&t.collapseOtherPanels(r)}})),this.survey.onAfterRenderQuestion.add((function(e,o){t.onAfterRenderQuestion(o)})),this.survey.onTextMarkdown.add((function(e,t){var o;"description"===t.name&&(t.html=(o=t.text,(new Xe).parse(o)))})),this.survey.editingObj=this.obj,this.objValueChangedCallback&&this.objValueChangedCallback(),this.updateDependedPropertiesEditors(),this.survey.onFocusInPanel.add((function(e,o){if(t.currentlySelectedPanel!==o.panel){var r=o.panel.getFirstQuestionToFocus(!1,!0);t.currentlySelectedProperty=r?r.name:"",t.currentlySelectedPanel=o.panel}})),this.survey.onFocusInQuestion.add((function(e,o){t.currentlySelectedProperty=o.question.name,t.currentlySelectedPanel=o.question.parent})),this.survey.onUploadFiles.add((function(e,o){var r="survey"==o.question.obj.getType()?void 0:"imageitemvalue"==o.question.obj.getType()?o.question.obj.locOwner:o.question.obj,n="imageitemvalue"==o.question.obj.getType()?o.question.obj:void 0;t.options.uploadFiles(o.files,r,(function(e,t){return o.callback(e,[{content:t,file:o.files[0]}])}),{element:o.question.obj,item:n,elementType:o.question.obj.getType(),propertyName:o.name})})),this.survey.getAllQuestions().map((function(e){return e.allowRootStyle=!1})),this.survey.onQuestionCreated.add((function(e,t){t.question.allowRootStyle=!1})),this.options.onPropertyGridSurveyCreatedCallback(this.obj,this.survey))},Object.defineProperty(e.prototype,"options",{get:function(){return this.optionsValue},set:function(e){this.optionsValue=e||new s},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.validate=function(){if(this.survey)return!this.survey.hasErrors(!0,!0)},e.prototype.collapseCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.collapse()},e.prototype.expandCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.expand()},e.prototype.collapseAllCategories=function(){this.collapseAllCategoriesExcept(null)},e.prototype.expandAllCategories=function(){this.survey.getAllPanels().forEach((function(e){e.parent.isPanel||e.expand()}))},e.prototype.collapseOtherPanels=function(e){this.collapseAllCategoriesExcept(e)},e.prototype.collapseAllCategoriesExcept=function(e){this.survey.getAllPanels().forEach((function(t){t===e||t.parent.isPanel||t.collapse()}))},e.prototype.createSurvey=function(e,t){return this.options.createSurvey(e,this.surveyInstanceCreatedArea,this,t)},e.prototype.getSurveyJSON=function(){var e={};return $e(e,!0,!1),e},e.prototype.validateQuestionValue=function(e,t,o,r){if(t.isRequired&&(i.Helpers.isValueEmpty(r)||t.valueChangingEmpty))return this.getErrorTextOnValidate(G.getString("pe.propertyIsEmpty"),o.name,e,r);if(this.isPropNameInValid(e,o,r)||t.nameHasError)return this.getErrorTextOnValidate(G.getString("pe.propertyNameIsIncorrect"),o.name,e,r);var n=tt.validateValue(e,t,o,r);return this.getErrorTextOnValidate(n,o.name,e,r)},e.prototype.getErrorTextOnValidate=function(e,t,o,r){var n=this.options.onGetErrorTextOnValidationCallback(t,o,r);return n||e},e.prototype.onValidateQuestion=function(e){var t=e.question;t&&t.property&&(e.error=this.validateQuestionValue(this.obj,t,t.property,e.value))},e.prototype.onValueChanging=function(e){var t=e.question;if(t&&t.property&&!i.Helpers.isTwoValueEquals(e.value,e.oldValue,!1,!1,!1)){tt.onValueChanging(this.obj,t.property,t,e);var o={obj:this.obj,propertyName:t.property.name,value:e.oldValue,newValue:e.value,doValidation:!1};if(this.options.onValueChangingCallback(o),e.value=o.newValue,t.property.isRequired){var r=i.Helpers.isValueEmpty(e.value);t.valueChangingEmpty=r}var n=this.isPropNameInValid(this.obj,t.property,e.value);t.nameHasError=n}},e.prototype.isPropNameInValid=function(e,t,o){return!(!e.isQuestion||"name"!==t.name||!o)&&(o=o.toLowerCase(),["item","choice","row","panel"].indexOf(o)>-1)},e.prototype.onValueChanged=function(e){var t=this,o=e.question;if(o&&o.property&&(o.valueChangingEmpty=!1,o.nameHasError=!1,this.changeDependedProperties(o,(function(e){return t.survey.getQuestionByName(e)}),(function(e){return t.survey.getValue(e)})),tt.onValueChanged(this.obj,o.property,o),this.classNameProperty&&e.name===this.classNameProperty&&this.classNameValue!==e.value&&(this.setObj(this.obj),this.survey))){var r=this.survey.getQuestionByName(e.name);r&&r.focus()}},e.prototype.changeDependedProperties=function(e,t,o){var r=e.property;if(r){var n=r.getDependedProperties();if(n)for(var a=0;a<n.length;a++){var s=n[a],l=t(s);if(l){this.updateDependedPropertiesEditor(l);var c=o(s);i.Helpers.isTwoValueEquals(l.value,c,!1,!1,!1)||(l.value=c),tt.onMasterValueChanged(e.obj,l.property,l)}}}},e.prototype.updateDependedPropertiesEditor=function(e){var t=e.obj;if(t){var o=e.property;o&&o.onPropertyEditorUpdate&&o.onPropertyEditorUpdate(t,e)}},e.prototype.updateDependedPropertiesEditors=function(){for(var e=this.survey.getAllQuestions(),t=0;t<e.length;t++)this.updateDependedPropertiesEditor(e[t])},e.prototype.onAfterRenderQuestion=function(e){tt.onAfterRenderQuestion(this.obj,e.question.property,e)},e.prototype.onMatrixCellCreated=function(e){this.isCellCreating=!0,tt.onMatrixCellCreated(this.obj,e.question.property,e),this.isCellCreating=!1;var t=e.row.editingObj;if(t){var o=i.Serializer.findProperty(t.getType(),e.columnName);if(o){var r=this.getMatrixAllowEditRow(e.question,e.row);e.cellQuestion.readOnly=!r||rt.isPropertyReadOnly(o,this.options,t,this.obj,e.question.property)}}},e.prototype.onMatrixCellValueChanging=function(e){if(!this.isCellCreating){var t={obj:e.row.editingObj,propertyName:e.columnName,value:e.oldValue,newValue:e.value,doValidation:!1};this.options.onValueChangingCallback(t),e.value=t.newValue}},e.prototype.onMatrixCellValidate=function(e){if(!this.isCellCreating){var t=e.row.getQuestionByColumnName(e.columnName);t&&t.property&&(e.error=this.validateQuestionValue(e.row.editingObj,t,t.property,e.value))}},e.prototype.onGetMatrixRowAction=function(e){var t=this;tt.onGetMatrixRowAction(this.obj,e.question.property,e,(function(o){t.setObjFromAction(o,e.question.name)}))},e.prototype.onUpdateQuestionCssClasses=function(e){tt.onUpdateQuestionCssClasses(this.obj,e.question.property,e)},e.prototype.onGetQuestionTitleActions=function(e,t){tt.onGetQuestionTitleActions(this.obj,e.question.property,e,t)},e.prototype.onMatrixCellValueChanged=function(e){if(!this.isCellCreating){var t=e.row.getQuestionByName(e.columnName);t&&this.changeDependedProperties(t,(function(t){return e.row.getQuestionByName(t)}),(function(t){return e.row.getValue(t)})),tt.onMatrixCellValueChanged(this.obj,e.question.property,e)}},e.prototype.getMatrixAllowRemoveRow=function(e,t){return void 0===t.allowDeleteRow&&this.calculateMatrixAllowOperations(e,t),t.allowDeleteRow},e.prototype.getMatrixOnRowRemoving=function(e,t){return this.options.onCollectionItemDeletingCallback(this.obj,e.property,e.value,t.editingObj)},e.prototype.getMatrixAllowEditRow=function(e,t){return!e.readOnly&&(void 0===t.allowEditRow&&this.calculateMatrixAllowOperations(e,t),t.allowEditRow)},e.prototype.calculateMatrixAllowOperations=function(e,t){var o={allowDelete:this.onMatrixAllowRemoveRow(e,t),allowEdit:!0,allowAdd:void 0};this.options.onCollectionItemAllowingCallback(this.obj,e.property,e.value,t.editingObj,o),t.allowDeleteRow=o.allowDelete,t.allowEditRow=o.allowEdit},e.prototype.onMatrixAllowRemoveRow=function(e,t){var o=tt.onMatrixAllowRemoveRow(this.obj,e.property,t);return this.options.onCanDeleteItemCallback(this.obj,t.editingObj,o)},e.prototype.onMatrixRowAdded=function(e){var t=e.row.editingObj;i.Serializer.isDescendantOf(t.getType(),"itemvalue")&&this.options.onItemValueAddedCallback(this.obj,e.question.property.name,e.row.editingObj,e.question.value),i.Serializer.isDescendantOf(t.getType(),"matrixdropdowncolumn")&&this.options.onMatrixDropdownColumnAddedCallback(this.obj,e.row.editingObj,e.question.value)},e}(),it=function(){function e(){}return e.prototype.showModalPropertyEditor=function(e,t,o,r,n){var a=this,s=o.obj,l=e.createPropertyEditorSetup(s,t,o,r);if(!l)return null;if("condition"!==t.type&&(l.editSurvey.css=i.defaultV2Css),o.isReadOnly&&(l.editSurvey.mode="display"),!i.settings.showDialog)return l;var c=i.surveyLocalization.currentLocale,p=G.currentLocale;i.surveyLocalization.currentLocale=p;var u=i.settings.showDialog({componentName:"survey",data:{survey:l.editSurvey,model:l.editSurvey},onApply:function(){return a.onModalPropertyEditorClosed(e,t,o,r,"apply"),n&&n("apply"),l.apply()},onCancel:function(){a.onModalPropertyEditorClosed(e,t,o,r,"cancel"),n&&n("cancel")},cssClass:"sv-property-editor",title:o.title,displayMode:r.isMobileView?"overlay":"popup"},r.rootElement);if(o.isReadOnly){var d=u.footerToolbar.getActionById("apply");d&&(d.visible=!1)}return u.locale=p,i.surveyLocalization.currentLocale=c,this.onModalPropertyEditorShown(e,t,o,r),r.onPropertyGridShowModalCallback(s,t,o,l,u),l},e.prototype.onModalPropertyEditorShown=function(e,t,o,r){},e.prototype.onModalPropertyEditorClosed=function(e,t,o,r,n){},e.prototype.isSupportGrouping=function(){return!1},e.prototype.hasPreviousElementForGrouping=function(e){if(!e||!e.parent)return!1;var t=e.parent.elements.indexOf(e);if(!(t<1)){var o=e.parent.elements[t-1],r=e.parent.elements[t-2];return o.getType()===e.getType()||t>1&&!o.startWithNewLine&&r.property===o.property&&r.getType()===e.getType()}},e.prototype.onUpdateQuestionCssClasses=function(e,t){this.isSupportGrouping()&&this.hasPreviousElementForGrouping(t.question)&&(t.cssClasses.mainRoot+=" spg-row-narrow__question")},e}(),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e,t){return"boolean"==e.type||"switch"==e.type},t.prototype.getJSON=function(e,t,o){var r={type:"boolean",default:!1,renderAs:"checkbox",titleLocation:"hidden"},n=t.getChoices(e,(function(e){}));if(Array.isArray(n)&&n.length>=2){for(var i=[],a=0;a<2;a++){var s=n[a].value||n[a];i.push({value:s,text:G.getPropertyValueInEditor(t.name,s)})}var l=(t.getDefaultValue(e)||i[0].value)===n[1].value?1:0,c=0===l?1:0;r.valueTrue=i[l].value,r.valueFalse=i[c].value,r.labelTrue=i[l].text,r.labelFalse=i[c].text}return r},t.prototype.isSupportGrouping=function(){return!0},t}(it),st=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.updateMaxLength=function(e,t){return e.maxLength>0&&(t.maxLength=e.maxLength),t},t.prototype.updateType=function(e,t,o){return!o.maxLength&&t.hasDefaultPropertyValue(e.name)&&(o.type=o.type+"withreset",o.renderAs=o.type),o},t.prototype.onCreated=function(e,t,o,r){if(t instanceof i.QuestionTextBase&&(t.onKeyDownPreprocess=function(e){(e.ctrlKey||e.metaKey)&&-1!==[89,90].indexOf(e.keyCode)&&(t.isInputTextUpdate?(r.findSuitableShortcuts(e).forEach((function(e){e.execute(r.selectedElement)})),e.preventDefault()):e.target.value==t.value&&r.findSuitableShortcuts(e).forEach((function(e){e.execute(r.selectedElement)})))}),"title"===o.name&&(t.allowSpaceAsAnswer=!0),"textwithreset"==t.getType()||"commentwithreset"==t.getType()){t.resetValueAdorner.resetValueCallback=function(){e.resetPropertyValue(o.name)},t.resetValueAdorner.caption=G.getString("pe.resetToDefaultCaption");var n=function(){return!o.isDefaultValue(o.getValue(e))};t.resetValueAdorner.allowResetValue=n(),e.registerFunctionOnPropertyValueChanged(o.name,(function(){t.resetValueAdorner.allowResetValue=n()}))}},t}(it),lt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"string"==e.type},t.prototype.isDefault=function(){return!0},t.prototype.getJSON=function(e,t,o){var r=this.updateType(t,e,this.updateMaxLength(t,{type:"text"}));return t.isRequired&&(r.textUpdateMode="onBlur"),t.dataList&&(r.dataList=t.dataList),r},t}(st),ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"datetime"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"text",inputType:"date"}},t}(it),pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"url"===e.type||"file"===e.type},t.prototype.getJSON=function(e,t,o){return{type:"fileedit",storeDataAsText:!1}},t.prototype.onCreated=function(e,t,o,r){if(["image","imageitemvalue"].indexOf(e.getType())>-1){var n="imageitemvalue"==e.getType()?e.locOwner:e;n&&(n.registerFunctionOnPropertyValueChanged("contentMode",(function(e){t.acceptedTypes=N(e)})),t.acceptedTypes=N(n.contentMode))}else t.acceptedTypes=N("image");t.onChooseFilesCallback=function(o,n){r.chooseFiles(o,n,{element:e,elementType:e.getType(),propertyName:t.name})}},t}(it),ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"color"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"color",allowEmptyValue:!0}},t}(it),dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"coloralpha"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"coloralpha",descriptionLocation:"hidden"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return e},t.valueToDataCallback=function(e){return e}},t}(it),ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"number"==e.type||"responsiveImageSize"==e.type},t.prototype.getJSON=function(e,t,o){var r={type:"text",inputType:"number",textUpdateMode:"onBlur"};return void 0!==t.minValue&&(r.min=t.minValue),void 0!==t.maxValue&&(r.max=t.maxValue),r},t.prototype.onValueChanging=function(e,t,o,r){r.value||0===r.value||(void 0!==t.defaultValue?r.value=t.defaultValue:t.isRequired||""!==r.value?r.value=void 0!==t.minValue&&t.minValue>0?t.minValue:0:r.value=void 0)},t}(it),gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"spinedit"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"spinedit",descriptionLocation:"hidden"}},t}(it),ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"string"==e.type&&("imageHeight"==e.name||"imageWidth"==e.name)},t.prototype.isDefault=function(){return!1},t.prototype.onCreated=function(t,o,r,n){e.prototype.onCreated.call(this,t,o,r,n);o.valueFromDataCallback=function(e){var o,r,n,a;return(o=t.imageHeight,r=t.imageWidth,n=i.Serializer.findProperty(t.getType(),"imageHeight"),a=i.Serializer.findProperty(t.getType(),"imageWidth"),!(!n&&!a)&&n.isDefaultValue(o)&&a.isDefaultValue(r))?void 0:e}},t}(lt),mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"text"===e.type},t.prototype.getJSON=function(e,t,o){return this.updateType(t,e,this.updateMaxLength(t,{type:"comment"}))},t}(st),yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"html"===e.type},t.prototype.getJSON=function(e,t,o){return this.updateMaxLength(t,{type:"comment"})},t}(st),bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"string[]"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return Array.isArray(e)?e.join("\n"):""},t.valueToDataCallback=function(e){return e?Array.isArray(e)&&!e.split?e:e.split("\n"):[]}},t}(it),vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"boolean"!==e.type&&(this.isLocaleProp(e)||e.hasChoices)},t.prototype.getJSON=function(e,t,o){var r=this.getChoices(e,t),n={type:this.renderAsButtonGroup(t,r)?"buttongroup":"dropdown",choices:r,showOptionsCaption:!1};return this.updateObjBasedOnEmptyValueItem(t,r,n),n},t.prototype.getChoices=function(e,t){return t.getChoices(e,(function(e){}))},t.prototype.updateObjBasedOnEmptyValueItem=function(e,t,o){var r=this.getEmptyJsonItemValue(e,t);r&&(o.showOptionsCaption=!0,o.allowClear=!0,r.text&&(o.optionsCaption=r.text))},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return a.propertyGrid.useButtonGroup},enumerable:!1,configurable:!0}),t.prototype.renderAsButtonGroup=function(e,t){if("dropdown"===e.type)return!1;if("buttongroup"===e.type)return!0;if(this.isLocaleProp(e))return!1;if(!this.canRenderAsButtonGroup||!t||0==t.length||t.length>4)return!1;for(var o=0,r=0;r<t.length;r++){var n=this.getLocalizedText(e,t[r].value?t[r].value:t[r]);o+=n?n.length:0}return o<a.propertyGrid.maxCharsInButtonGroup},t.prototype.onCreated=function(e,t,o){this.setChoices(e,t,o),t.displayValueCallback=function(e){return e||t.optionsCaption}},t.prototype.onMasterValueChanged=function(e,t,o){this.setChoices(e,o,t),o.isEmpty()||i.ItemValue.getItemByValue(o.choices,o.value)||o.clearValue()},t.prototype.setChoicesCore=function(e,t,o){o&&Array.isArray(o)&&0!=o.length&&(this.updateObjBasedOnEmptyValueItem(t,o,e),e.choices=this.choicesFromPropChoices(t,o))},t.prototype.isLocaleProp=function(e){return"locale"===e.name},t.prototype.getLocalizedText=function(e,t){var o;if(this.isLocaleProp(e)&&(o=G.getLocaleName(t)))return o;if("cellType"===e.name&&(o=G.getString("qt."+t)))return o;return null===t?null:G.getPropertyValueInEditor(e.name,t)},t.prototype.choicesFromPropChoices=function(e,t){for(var o=[],r=0;r<t.length;r++){var n=this.getJsonItem(e,t[r]);i.Helpers.isValueEmpty(n.value)||o.push(n)}return o},t.prototype.getJsonItem=function(e,t){var o={value:void 0!==t.value?t.value:t},r=t.text?t.text:"";return r||(r=this.getLocalizedText(e,o.value)),r&&r!=o.value&&(o.text=r),o},t.prototype.setChoices=function(e,t,o){var r=this,n=o.getChoices(e,(function(e){r.setChoicesCore(t,o,e)}));this.setChoicesCore(t,o,n)},t.prototype.getEmptyJsonItemValue=function(e,t){if(!t)return null;for(var o=0;o<t.length;o++){var r=t[o],n=void 0!==r.value?r.value:r;if(i.Helpers.isValueEmpty(n))return this.getJsonItem(e,r)}return null},t}(it),xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"set"==e.type||"multiplevalues"==e.type},t.prototype.getJSON=function(t,o,r){var n=e.prototype.getJSON.call(this,t,o,r),a=!!i.Serializer.findClass("tagbox");return n.type=a?"tagbox":"checkbox",n.hasSelectAll=!a,n},t}(vt),wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return e.hasChoices&&"page"==e.name},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onCreated=function(t,o,r){e.prototype.onCreated.call(this,t,o,r),o.valueFromDataCallback=function(e){return e?e.name:""},o.valueToDataCallback=function(e){if(e&&t&&t.getSurvey())return t.getSurvey().getPageByName(e)}},t}(vt),jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"question"==e.type},t.prototype.getJSON=function(e,t,o){var r={type:"dropdown",optionsCaption:G.getString("pe.conditionSelectQuestion"),choices:this.getChoices(e,t,o)};return"question"==t.type&&(r.allowClear=!1),r},t.prototype.getChoices=function(e,t,o){var r=this,n=Ue.getSurvey(e);if(!n)return[];var i=this.getQuestions(n,e);i||(i=[]);var s=!!o&&o.showTitlesInExpressions,l=i.map((function(e){var t=s?e.locTitle.renderedHtml:e.name;return o&&(t=o.getObjectDisplayName(e,"property-grid:property-editor","property-editor",t)),{value:r.getItemValue(e),text:t}}));return"asc"===a.logic.questionSortOrder&&te.sortItems(l),l},t.prototype.getQuestions=function(e,t){return e.getAllQuestions()},t.prototype.getItemValue=function(e){return e.name},t}(it),Ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"question_selectbase"==e.type},t.prototype.isQuestionFit=function(e){return i.Serializer.isDescendantOf(e.getType(),"selectbase")},t.prototype.getQuestions=function(t,o){for(var r=e.prototype.getQuestions.call(this,t,o),n=[],i=0;i<r.length;i++){var a=r[i];a!==o&&this.isQuestionFit(a)&&n.push(a)}return n},t}(jt),St=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"question_carryforward"==e.type},t.prototype.isQuestionFit=function(t){return t.isValueArray||e.prototype.isQuestionFit.call(this,t)},t}(Ct),Tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"questionvalue"==e.type},t.prototype.getItemValue=function(e){return e.getValueName()},t.prototype.getQuestions=function(t,o){return e.prototype.getQuestions.call(this,t,o).filter((function(e){return!i.Serializer.isDescendantOf(e.getType(),"nonvalue")}))},t}(jt);tt.register(new at),tt.register(new lt),tt.register(new ht),tt.register(new gt),tt.register(new mt),tt.register(new yt),tt.register(new vt),tt.register(new xt),tt.register(new wt),tt.register(new bt),tt.register(new jt),tt.register(new Tt),tt.register(new Ct),tt.register(new St),tt.register(new ft),tt.register(new ut),tt.register(new dt),tt.register(new ct),i.QuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return new i.QuestionButtonGroupModel(e)}));var Pt,Et={root:"st-root-modern",container:"st-container-modern",header:"st-title st-container-modern__title",body:"st-body",bodyEmpty:"st-body st-body--empty",footer:"st-footer st-body__footer st-clearfix",title:"",description:"",logo:"st-logo",logoImage:"st-logo__image",headerText:"st-header__text",navigationButton:"",bodyNavigationButton:"st-navigation-btn",completedPage:"st-completedpage",navigation:{complete:"st-btn st-footer__complete-btn",prev:"st-btn st-footer__prev-btn",next:"st-btn st-footer__next-btn",start:"st-btn st-footer__start-btn",preview:"st-btn st-footer__preview-btn",edit:"st-btn st-footer__edit-btn"},panel:{title:"st-title st-panel__title",titleExpandable:"st-panel__title--expandable",titleOnExpand:"st-panel__title--expanded",titleOnError:"st-panel__title--error",description:"st-description st-panel__description",container:"st-element st-panel st-row__panel",content:"st-panel__content",icon:"st-panel__icon",iconExpanded:"st-panel__icon--expanded",footer:"st-panel__footer",requiredText:"st-panel__required-text"},paneldynamic:{root:"st-paneldynamic",navigation:"st-paneldynamic__navigation",title:"st-title st-question__title",button:"st-btn",buttonRemove:"st-paneldynamic__remove-btn",buttonAdd:"st-paneldynamic__add-btn",progressTop:"st-paneldynamic__progress st-paneldynamic__progress--top",progressBottom:"st-paneldynamic__progress st-paneldynamic__progress--bottom",buttonPrev:"st-paneldynamic__prev-btn",buttonNext:"st-paneldynamic__next-btn",progressContainer:"st-paneldynamic__progress-container",progress:"st-progress",progressBar:"st-progress__bar",progressText:"st-paneldynamic__progress-text",separator:"st-paneldynamic__separator",panelWrapper:"st-paneldynamic__panel-wrapper",panelWrapperInRow:"st-paneldynamic__panel-wrapper--in-row"},progress:"st-progress st-body__progress",progressBar:"st-progress__bar",progressText:"st-progress__text",progressTextInBar:"st-hidden",page:{root:"st-page st-body__page",title:"st-title st-page__title",description:"st-description st-page__description"},pageTitle:"st-title st-page__title",pageDescription:"st-description st-page__description",row:"st-row st-clearfix",question:{mainRoot:"st-element st-question st-row__question",flowRoot:"st-element st-question st-row__question st-row__question--flow",asCell:"st-table__cell",header:"st-question__header",headerLeft:"st-question__header--location--left",headerTop:"st-question__header--location--top",headerBottom:"st-question__header--location--bottom",content:"st-question__content",contentLeft:"st-question__content--left",titleLeftRoot:"",titleOnAnswer:"st-question__title--answer",titleOnError:"st-question__title--error",title:"st-title st-question__title",requiredText:"st-question__required-text",number:"st-question__num",description:"st-description st-question__description",descriptionUnderInput:"st-description st-question__description",comment:"st-comment",required:"st-question--required",titleRequired:"st-question__title--required",indent:20,footer:"st-question__footer",formGroup:"st-question__form-group",hasError:"",disabled:"st-question--disabled"},image:{root:"st-image",image:"sv_image_image"},error:{root:"st-question__erbox",icon:"",item:"",locationTop:"st-question__erbox--location--top",locationBottom:"st-question__erbox--location--bottom"},checkbox:{root:"st-selectbase",item:"st-item st-checkbox st-selectbase__item",itemSelectAll:"st-checkbox--selectall",itemNone:"st-checkbox--none",itemDisabled:"st-item--disabled st-checkbox--disabled",itemChecked:"st-item--checked st-checkbox--checked",itemHover:"st-item--allowhover st-checkbox--allowhover",itemInline:"st-selectbase__item--inline",label:"st-selectbase__label",labelChecked:"",itemControl:"st-visuallyhidden st-item__control st-checkbox__control",itemDecorator:"st-item__svg st-checkbox__svg",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-checkbox__decorator",other:"st-comment st-question__other",column:"st-selectbase__column"},radiogroup:{root:"st-selectbase",item:"st-item st-radio st-selectbase__item",itemInline:"st-selectbase__item--inline",label:"st-selectbase__label",labelChecked:"",itemDisabled:"st-item--disabled st-radio--disabled",itemChecked:"st-item--checked st-radio--checked",itemHover:"st-item--allowhover st-radio--allowhover",itemControl:"st-visuallyhidden st-item__control st-radio__control",itemDecorator:"st-item__svg st-radio__svg",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-radio__decorator",other:"st-comment st-question__other",clearButton:"st-btn st-selectbase__clear-btn",column:"st-selectbase__column"},boolean:{mainRoot:"st-question st-row__question st-question--boolean",root:"",item:"st-boolean",control:"st-boolean__control st-visuallyhidden",itemChecked:"st-boolean--checked",itemIndeterminate:"st-boolean--indeterminate",itemDisabled:"st-boolean--disabled",label:"st-boolean__label",switch:"st-boolean__switch",disabledLabel:"st-checkbox__label--disabled",itemDecorator:"st-checkbox__hidden",materialDecorator:"st-checkbox__rectangle",sliderText:"",slider:"st-boolean__thumb"},text:{root:"st-input st-text",small:"st-row__question--small",controlDisabled:"st-input--disabled",onError:"st-input--error"},multipletext:{root:"st-multipletext",item:"st-multipletext__item",itemTitle:"st-multipletext__item-title",row:"st-multipletext__row",cell:"st-multipletext__cell"},dropdown:{root:"st-selectbase",small:"st-row__question--small",control:"st-input st-dropdown",other:"st-comment st-question__other",onError:"st-input--error",label:"st-selectbase__label",item:"st-item st-radio st-selectbase__item",itemDisabled:"st-item--disabled st-radio--disabled",itemChecked:"st-item--checked st-radio--checked",itemHover:"st-item--allowhover st-radio--allowhover",itemControl:"st-visuallyhidden st-item__control st-radio__control",itemDecorator:"st-item__svg st-radio__svg",controlDisabled:"st-input--disabled",controlLabel:"st-item__control-label",materialDecorator:"st-item__decorator st-radio__decorator"},imagepicker:{root:"st-imagepicker",item:"st-imagepicker__item",itemInline:"st-imagepicker__item--inline",itemChecked:"st-imagepicker__item--checked",itemDisabled:"st-imagepicker__item--disabled",itemHover:"st-imagepicker__item--allowhover",label:"st-imagepicker__label",itemControl:"st-imagepicker__control",image:"st-imagepicker__image",itemText:"st-imagepicker__text",clearButton:"st-btn",other:"st-comment st-question__other"},matrix:{mainRoot:"st-question st-row__question st-scrollable",tableWrapper:"st-matrix",root:"st-table",noHeader:"st-table--no-header",rowError:"st-matrix__row--error",cell:"st-table__cell st-matrix__cell",headerCell:"st-table__cell st-table__cell--header",rowTextCell:"st-table__cell st-table__cell--row-text",label:"st-item st-radio st-matrix__label",itemValue:"st-visuallyhidden st-item__control st-radio__control",itemChecked:"st-radio--checked",itemDisabled:"st-item--disabled st-radio--disabled",itemHover:"st-radio--allowhover",materialDecorator:"st-item__decorator st-radio__decorator",itemDecorator:"st-item__svg st-radio__svg",cellText:"st-matrix__text",cellTextSelected:"st-matrix__text--checked",cellTextDisabled:"st-matrix__text--disabled"},matrixdropdown:{mainRoot:"st-question st-row__question st-scrollable",root:"st-table",noHeader:"st-table--no-header",cell:"st-table__cell",headerCell:"st-table__cell st-table__cell--header",rowTextCell:"st-table__cell st-table__cell--row-text"},matrixdynamic:{mainRoot:"st-question st-row__question st-scrollable",root:"st-table st-matrixdynamic",noHeader:"st-table--no-header",cell:"st-table__cell",headerCell:"st-table__cell st-table__cell--header",rowTextCell:"st-table__cell st-table__cell--row-text",button:"st-btn",detailRow:"st-table__row st-table__row--detail",detailButton:"st-table__cell--detail-button",detailButtonExpanded:"st-table__cell--detail-button--expanded",detailIcon:"st-detail-panel__icon",detailIconExpanded:"st-detail-panel__icon--expanded",detailPanelCell:"st-table__cell--detail-panel",actionsCell:"st-table__cell st-table__cell--actions",buttonAdd:"st-matrixdynamic__add-btn",buttonRemove:"st-matrixdynamic__remove-btn",iconAdd:"",iconRemove:""},rating:{root:"st-rating",item:"st-rating__item",itemHover:"st-rating__item--allowhover",selected:"st-rating__item--selected",minText:"st-rating__item-text st-rating__min-text",itemText:"st-rating__item-text",maxText:"st-rating__item-text st-rating__max-text",itemDisabled:"st-rating__item--disabled"},comment:{root:"st-comment",small:"st-row__question--small"},expression:"",file:{root:"st-file",other:"st-comment st-question__other",placeholderInput:"st-visuallyhidden",preview:"st-file__preview",fileSign:"st-hidden",fileSignBottom:"st-file__sign",fileDecorator:"st-file__decorator",fileInput:"st-visuallyhidden",noFileChosen:"st-description st-file__no-file-chosen",chooseFile:"st-btn st-file__choose-btn",disabled:"st-file__choose-btn--disabled",removeButton:"st-hidden",removeButtonBottom:"st-btn st-file__clean-btn",removeFile:"st-hidden",removeFileSvg:"st-file__remove-svg",wrapper:"st-file__wrapper"},signaturepad:{root:"st-signaturepad sjs_sp_container",small:"st-row__question--small",controls:"sjs_sp_controls",placeholder:"sjs_sp_placeholder",clearButton:"sjs_sp_clear"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}}};function It(e,t){if(!Array.isArray(e))return null;for(var o=0;o<e.length;o++)if(e[o].id===t)return e[o];return null}function Ot(e,t,o){var r=It(t,"remove-row");r&&(r.component="sv-action-bar-item",r.iconName="icon-delete",r.innerCss="spg-action-button spg-action-button--danger",r.title=e.removeRowText,r.showTitle=!1,r.visibleIndex=10,r.action=function(){e.removeRowUI(o)})}function Vt(e){e.forEach((function(e){e.innerCss=(e.innerCss||"")+" spg-action-button--muted"}))}o(10),i.FunctionFactory.Instance.register("localeEnableIf",(function(e){if(Pt||!this.question||!this.row)return!1;var t=this.question.parentQuestion;if(!t)return!1;Pt=!0;var o=t.visibleRows.indexOf(this.row);if(Pt=!1,o<=0)return!1;var r=t.value;if(!Array.isArray(r))return!0;var n=r[o];if(!n||n.isSelected)return!0;for(var i=0,s=1;s<r.length;s++)r[s].isSelected&&i++;return i<a.translation.maximumSelectedLocales}));var Nt=function(e){function t(t,o){var r=e.call(this)||this;return r.name=t,r.translation=o,r}return Y(t,e),Object.defineProperty(t.prototype,"isGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.fillLocales=function(e){},t.prototype.mergeLocaleWithDefault=function(e){},t.prototype.makeObservable=function(){this.fireOnObjCreating()},t.prototype.deleteLocaleStrings=function(e){},t.prototype.applyEditLocale=function(e){},t.prototype.fireOnObjCreating=function(e){void 0===e&&(e=null),this.translation&&(e||(e=this),this.translation.fireOnObjCreating(e))},t}(i.Base),kt=function(e){function t(t,o){var r=e.call(this)||this;return r.locString=t,r.locale=o,r.text=r.locString.getLocaleText(r.locale),r}return Y(t,e),t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),this.isReadOnly||"text"!==t||this.locString.setLocaleText(this.locale,r)},t.prototype.getType=function(){return"translationitemstring"},Z([Object(i.property)()],t.prototype,"text",void 0),Z([Object(i.property)()],t.prototype,"placeholder",void 0),t}(i.Base),At=function(e){function t(t,o,r,n,i,a){void 0===r&&(r=""),void 0===a&&(a=null);var s=e.call(this,t,n)||this;s.name=t,s.locString=o,s.defaultValue=r,s.context=i,s.property=a,s.translation&&(s.readOnly=s.translation.readOnly),s.hashValues={};var l=s;return s.afterRender=function(e,t){l.translation&&l.translation.translateItemAfterRender(l,e,t.locale)},s.fireOnObjCreating(),s}return Y(t,e),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.property?this.property.maxLength:-1},enumerable:!1,configurable:!0}),t.prototype.makeObservable=function(){for(var t in e.prototype.makeObservable.call(this),this.hashValues)this.fireOnObjCreating(this.hashValues[t])},t.prototype.getType=function(){return"translationitem"},Object.defineProperty(t.prototype,"text",{get:function(){return this.customText?this.customText:this.localizableName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localizableName",{get:function(){var e=this.context&&this.context.getType&&this.context.getType();return G.getPropertyNameInEditor(e,this.name)},enumerable:!1,configurable:!0}),t.prototype.getLocText=function(e){return this.locString.getLocaleText(e)},t.prototype.setLocText=function(e,t){this.locString.setLocaleText(e,t),this.translation.tranlationChangedCallback&&this.translation.tranlationChangedCallback(e,this.name,t,this.context)},t.prototype.applyEditLocale=function(e){var t=this.values(e);t&&t.text&&this.setLocText(e,t.text)},t.prototype.values=function(e){var t;if(!this.hashValues[e]){var o=new kt(this.locString,e);o.isReadOnly=!!(null===(t=this.translation)||void 0===t?void 0:t.getEditLocale()),e||(o.placeholder=this.defaultValue),this.hashValues[e]=o,this.fireOnObjCreating(o)}return this.hashValues[e]},t.prototype.fillLocales=function(e){for(var t=this.getKeys(),o=0;o<t.length;o++){var r=t[o];r&&e.indexOf(r)<0&&r!==i.LocalizableString.defaultLocale&&e.push(r)}},t.prototype.toJSON=function(){var e=this,t=this.locString.getJson(),o=Object.keys(this.hashValues);return o.length>0&&o.forEach((function(o){var r=e.hashValues[o].text;r&&(t||(t={}),"string"==typeof t&&(t={default:t}),t[o]=r)})),(t=this.correctJSON(t))&&"string"!=typeof t?t:{default:t}},t.prototype.correctJSON=function(e){if(!e||"string"==typeof e)return e;if(Array.isArray(e))return e.join("\n");for(var t in e)Array.isArray(e[t])&&(e[t]=e[t].join("\n"));return e},t.prototype.getKeys=function(){return this.locString.getLocales()},t.prototype.mergeLocaleWithDefault=function(e){var t=this.locString.getLocaleText(e);t&&(this.locString.setLocaleText("",t),this.locString.setLocaleText(e,null))},t.prototype.deleteLocaleStrings=function(e){this.setLocText(e,void 0)},t.prototype.getDefaultLocaleText=function(e){void 0===e&&(e=!1);var t=this.locString.getLocaleText("");return t||(t=this.getPlaceholder("",e)),t},t.prototype.getPlaceholder=function(e,t){void 0===t&&(t=!1);var o=e&&"default"!==e?e:i.surveyLocalization.defaultLocale,r=t?"":G.getString("ed.translationPlaceHolder",o);return this.context instanceof i.SurveyModel?i.surveyLocalization.getString(this.name,e)||r:this.context instanceof i.PageModel||"title"!==this.name?"choices"===this.context.ownerPropertyName&&"itemvalue"===this.context.getType()&&(this.getPlaceholderText(e)||this.getItemValuePlaceholderText())||r:this.getPlaceholderText(e)||this.context.name},t.prototype.getTextForExport=function(e){var t=this.locString.getLocaleText(e);return t||(e.indexOf("-")<0?"":this.getPlaceholderText(e))},t.prototype.getPlaceholderText=function(e){if(!e||"default"===e)return"";var t=this.getRootDialect(e);return this.locString.getLocaleText(t)},t.prototype.getRootDialect=function(e){var t=e.indexOf("-");return t<0||(e=e.substring(0,t))===i.surveyLocalization.defaultLocale?"":e},t.prototype.getItemValuePlaceholderText=function(){var e=this.context.value;return i.Helpers.isValueEmpty(e)?"":e.toString()},Z([Object(i.property)({defaultValue:!1})],t.prototype,"readOnly",void 0),t}(Nt),_t=function(e){function t(t,o,r,n,i){void 0===r&&(r=null),void 0===n&&(n=""),void 0===i&&(i=!1);var a=e.call(this,t,r)||this;return a.name=t,a.obj=o,a.text=n,a.hasIndent=i,a.isRootValue=!1,a.removeLocale=function(e){a.translation&&a.translation.removeLocale(e)},a.text||(a.text=t),a.reset(),a.fireOnObjCreating(),a}return Y(t,e),t.prototype.getType=function(){return"translationgroup"},Object.defineProperty(t.prototype,"items",{get:function(){return this.itemValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locItems",{get:function(){return this.itemValues.filter((function(e){return e instanceof At}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allLocItems",{get:function(){var e=new Array;return this.fillLocItems(e),e},enumerable:!1,configurable:!0}),t.prototype.fillLocItems=function(e){this.itemValues.forEach((function(t){t.isGroup?t.fillLocItems(e):e.push(t)}))},Object.defineProperty(t.prototype,"isRoot",{get:function(){return this.isRootValue},enumerable:!1,configurable:!0}),t.prototype.setAsRoot=function(){this.isRootValue=!0},t.prototype.setParent=function(e){this.parentValue=e},Object.defineProperty(t.prototype,"parent",{get:function(){return this.parentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullName",{get:function(){var e=this.obj.name===this.name||this.isRoot?"_props":"",t=this.name+e;if(this.isRoot||!this.parent)return t;var o=this.parent.getNameForChild();return(o?o+"_":"")+t},enumerable:!1,configurable:!0}),t.prototype.getNameForChild=function(){return this.isRoot?"":this.isFinalNameObj?this.name:this.fullName},Object.defineProperty(t.prototype,"isFinalNameObj",{get:function(){return this.obj.isQuestion||this.obj.isPage||this.obj.isPanel},enumerable:!1,configurable:!0}),t.prototype.getItemByName=function(e){for(var t=0;t<this.itemValues.length;t++)if(this.itemValues[t].name==e)return this.itemValues[t];return null},Object.defineProperty(t.prototype,"groups",{get:function(){return this.itemValues.filter((function(e){return e instanceof t}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGroup",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locales",{get:function(){return this.translation?this.translation.locales:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeLocaleText",{get:function(){return G.getString("pe.remove")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localeCount",{get:function(){return Array.isArray(this.locales)?this.locales.length:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locWidth",{get:function(){var e=this.localeCount;return e<2?"100%":Math.floor(100/e).toString()+"%"},enumerable:!1,configurable:!0}),t.prototype.getLocaleName=function(e){return this.translation?this.translation.getLocaleName(e):G.getLocaleName(e)},t.prototype.reset=function(){this.itemValues=[],this.fillItems()},t.prototype.fillLocales=function(e){for(var t=0;t<this.items.length;t++)this.items[t].fillLocales(e)},t.prototype.makeObservable=function(){e.prototype.makeObservable.call(this);for(var t=0;t<this.items.length;t++)this.items[t].makeObservable()},Object.defineProperty(t.prototype,"showAllStrings",{get:function(){return!this.translation||this.translation.showAllStrings},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){if(this.locItems.length>0)return!0;for(var e=this.groups,t=0;t<e.length;t++)if(e[t].hasItems)return!0;return!1},enumerable:!1,configurable:!0}),t.prototype.mergeLocaleWithDefault=function(e){this.itemValues.forEach((function(t){return t.mergeLocaleWithDefault(e)}))},t.prototype.deleteLocaleStrings=function(e){this.items.forEach((function(t){return t.deleteLocaleStrings(e)}))},t.prototype.applyEditLocale=function(e){this.items.forEach((function(t){return t.applyEditLocale(e)}))},t.prototype.fillItems=function(){if(this.isItemValueArray(this.obj))this.createItemValuesLocale();else if(this.obj&&this.obj.getType){for(var e=this.getLocalizedProperties(this.obj),o=0;o<e.length;o++){var r=e[o],n=this.createTranslationItem(this.obj,e[o]);n&&this.itemValues.push(n)}e=this.getArrayProperties(this.obj);for(o=0;o<e.length;o++){r=e[o];var i=this.obj[r.name];this.isItemValueArray(i)?this.canShowProperty(r,Array.isArray(i)&&i.length>0)&&this.addNewGroup(new t(r.name,i,this.translation,G.getPropertyName(r.name),!0)):this.createGroups(i,r)}this.sortItems()}},t.prototype.sortItems=function(){a.translation.sortByName&&this.itemValues.sort((function(e,t){return e.name?t.name?e.name.localeCompare(t.name):1:-1}))},t.prototype.getLocalizedProperties=function(e){for(var t=[],o=i.Serializer.getPropertiesByObj(e),r=0;r<o.length;r++){var n=o[r];n.isSerializable&&n.isLocalizable&&"url"!==n.type&&"file"!==n.type&&(!n.readOnly&&n.visible&&t.push(n))}return t},t.prototype.getArrayProperties=function(e){for(var t=[],o=i.Serializer.getPropertiesByObj(e),r=0;r<o.length;r++){var n=o[r];if(!1!==n.isSerializable){var a=e[n.name];a&&Array.isArray(a)&&a.length>0&&t.push(n)}}return t},t.prototype.canShowProperty=function(e,t){return!(this.translation&&!this.translation.canShowProperty(this.obj,e,t))},t.prototype.createTranslationItem=function(e,t){var o,r=this.getDefaultValue(e,t),n=e[t.serializationProperty];if(!n)return null;if(!this.showAllStrings&&!r&&n.isEmpty)return null;var i=null===(o=this.translation)||void 0===o?void 0:o.getEditLocale();return i&&n.getLocaleText(i)?null:this.canShowProperty(t,n.isEmpty)?new At(t.name,n,r,this.translation,e,t):null},t.prototype.getDefaultValue=function(e,t){if("title"==t.name&&t.isLocalizable&&t.serializationProperty){var o=e[t.serializationProperty];if(o&&!e.isPage&&!e.isPanel&&(o.onGetTextCallback||o.onRenderedHtmlCallback))return e.name}return""},t.prototype.isItemValueArray=function(e){return!!e&&Array.isArray(e)&&e.length>0&&!!e[0]&&!!e[0].getType&&!!e[0].setData&&!!e[0].setLocText},t.prototype.createGroups=function(e,o){for(var r=0;r<e.length;r++){var n=e[r];if(n&&n.getType){var i=n.name,a=i;if(!i){var s="["+r.toString()+"]";i=o.name+s,a=G.getPropertyName(o.name)+s}this.addNewGroup(new t(i,n,this.translation,a))}}},t.prototype.addNewGroup=function(e){e.setParent(this),e.hasItems&&this.itemValues.push(e)},t.prototype.createItemValuesLocale=function(){for(var e,t=null===(e=this.translation)||void 0===e?void 0:e.getEditLocale(),o=0;o<this.obj.length;o++){var r=this.obj[o],n=this.showAllStrings||!r.locText.isEmpty||isNaN(r.value);if(t&&r.locText.getLocaleText(t)&&(n=!1),n){var i=new At(r.value,r.locText,r.value,this.translation,r);this.itemValues.push(i),this.addCustomPropertiesForItemValue(this.obj[o],i)}}},t.prototype.addCustomPropertiesForItemValue=function(e,t){for(var o=this.getLocalizedProperties(e),r=0;r<o.length;r++)if("text"!=o[r].name){var n=this.createTranslationItem(e,o[r]);n&&(n.customText=t.text+" ("+n.localizableName+")",n.name=e.value+"."+n.name,this.itemValues.push(n))}},Z([Object(i.property)({defaultValue:!0})],t.prototype,"showHeader",void 0),t}(Nt),Lt=function(e){function t(t,o,r){void 0===o&&(o=null),void 0===r&&(r=!0);var n=e.call(this)||this;n.options=o,n.hasUI=r,n.chooseLanguageActions=[],n.options||(n.options=new s);var i=n;return n.exportToCSVFileUI=function(){i.exportToSCVFile(a.translation.exportFileName)},n.importFromCSVFileUI=function(e){e.files.length<1||(i.importFromCSVFile(e.files[0]),e.value="")},n.settingsSurveyValue=n.createSettingsSurvey(),n.surveyValue=t,n.setupToolbarItems(),n.updateChooseLanguageActions(),n}return Y(t,e),t.prototype.getProcessedTranslationItemText=function(e,t,o,r){return this.options.getProcessedTranslationItemText(e,t,o,r)},t.prototype.getType=function(){return"translation"},t.prototype.getEditLocale=function(){return this.editLocale},t.prototype.setEditMode=function(e){this.editLocale=e,this.addLocale(e)},Object.defineProperty(t.prototype,"isEditMode",{get:function(){return!!this.editLocale},enumerable:!1,configurable:!0}),t.prototype.applyEditLocale=function(){this.isEditMode&&this.root&&this.root.applyEditLocale(this.editLocale)},t.prototype.makeObservable=function(e){this.onBaseObjCreatingCallback=e,this.fireOnObjCreating(this),this.root.makeObservable()},t.prototype.fireOnObjCreating=function(e){this.onBaseObjCreatingCallback&&this.onBaseObjCreatingCallback(e)},Object.defineProperty(t.prototype,"settingsSurvey",{get:function(){return this.settingsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localesQuestion",{get:function(){return this.settingsSurvey.getQuestionByName("locales")},enumerable:!1,configurable:!0}),t.prototype.deleteLocaleStrings=function(e){this.root||this.reset(),this.root&&(this.root.deleteLocaleStrings(e),this.removeLocale(e),this.updateChooseLanguageActions(),this.reset())},t.prototype.createSettingsSurvey=function(){var e=this,t=this.getSettingsSurveyJSON();$e(t);var o=this.options.createSurvey(t,"translation_settings",this,(function(e){e.css=We,e.css.root+=" st-properties",e.rootCss+=" st-properties"}));return o.onValueChanged.add((function(t,o){"locales"==o.name&&e.updateLocales()})),o.getQuestionByName("locales").lockedRowCount=1,o.onMatrixRowRemoving.add((function(t,o){e.removingLocale=o.question.value[o.rowIndex].name})),o.onMatrixRowRemoved.add((function(t,o){e.removingLocale&&e.deleteLocaleStrings(e.removingLocale)})),o.onGetQuestionTitleActions.add((function(t,o){o.titleActions=[e.addLanguageAction]})),o.onGetMatrixRowActions.add((function(t,o){if(Ot(o.question,o.actions,o.row),e.options.getHasMachineTranslation()&&It(o.actions,"remove-row")&&Array.isArray(o.question.value)){var r=o.question,n=r.visibleRows.indexOf(o.row);if(n>=0&&n<r.value.length){var a=r.value[n].name;o.actions.splice(0,0,new i.Action({iconName:"icon-language",locTooltipName:"ed.translateUsigAI",location:"end",action:function(){return e.showTranslationEditor(a)}}))}}Vt(o.actions)})),o},t.prototype.calcIsChooseLanguageEnabled=function(){this.isChooseLanguageEnabled=this.chooseLanguageActions.filter((function(e){return e.visible})).length>0},t.prototype.updateLocales=function(){var e=[""],t=this.getSelectedLocales();Array.isArray(t)||(t=[]),this.options.translationLocalesOrder=t,t.forEach((function(t){return e.push(t)})),this.locales=e,this.canMergeLocaleWithDefault=this.hasLocale(this.defaultLocale),this.localesQuestion.allowRowsDragAndDrop=e.length>2},t.prototype.getSettingsSurveyJSON=function(){return{elements:[{type:"matrixdynamic",name:"locales",title:G.getString("ed.translationLanguages"),confirmDelete:!0,titleLocation:"top",confirmDeleteText:G.getString("ed.translationDeleteLanguage"),columns:[{name:"isSelected",cellType:"boolean",renderAs:"checkbox",enableIf:"localeEnableIf()"},{name:"displayName",cellType:"expression",expression:"{row.displayName}"}],showHeader:!1,allowAddRows:!1,rowCount:0}]}},t.prototype.getSurveyLocales=function(){for(var e=new Array,t=i.surveyLocalization.supportedLocales,o=Array.isArray(t)&&t.length>0?t:i.surveyLocalization.getLocales(),r={},n=0;n<o.length;n++)this.addLocaleIntoChoices(o[n],e,r);o=this.getVisibleLocales();for(n=0;n<o.length;n++)this.addLocaleIntoChoices(o[n],e,r);return[e,o]},t.prototype.importFromCSVFileDOM=function(){var e=this;document&&(this.inputFileElement||(this.inputFileElement=document.createElement("input"),this.inputFileElement.type="file",this.inputFileElement.style.display="none",this.inputFileElement.onchange=function(){e.importFromCSVFileUI(e.inputFileElement)}),this.inputFileElement.click())},t.prototype.updateSettingsSurveyLocales=function(){var e=this.getSurveyLocales(),t=(e[0],e[1]),o=[];t||(t=[]);for(var r=0;r<t.length;r++)this.localeInitialVisibleCallback&&!this.localeInitialVisibleCallback(t[r])||o.push(t[r]);var n=a.translation.maximumSelectedLocales;n>0&&o.length>n&&o.splice(n),this.setSelectedLocales(o)},t.prototype.resetStringsSurvey=function(){this.hasUI&&(this.stringsSurvey=this.createStringsSurvey(),this.stringsHeaderSurvey=this.createStringsHeaderSurvey(),this.updateReadOnly())},t.prototype.getSurveyStringsArea=function(){},t.prototype.getSurveyStringsHeaderArea=function(){},t.prototype.onSurveyStringsCreated=function(e){},t.prototype.createStringsSurvey=function(){var e=this,t={autoGrowComment:!0,allowResizeComment:!1};$e(t,!1);var o=this.options.createSurvey(t,"translation_strings",this,(function(t){t.lazyRendering=!0,t.skeletonComponentName="sd-translation-line-skeleton",t.startLoadingFromJson(),t.css=Et,t.addNewPage("page"),e.addTranslationGroupIntoStringsSurvey(t.pages[0],e.root),t.data=e.getStringsSurveyData(t),t.endLoadingFromJson(),e.onSurveyStringsCreated(t)}),this.getSurveyStringsArea()),r=function(e,t){var o=i.ItemValue.getItemByValue(e.rows,t);return o?o.translationData:null};return o.onMatrixCellCreated.add((function(t,o){if(o.cell.question instanceof i.QuestionCommentModel){var n=o.cell.question,a=r(o.question,o.row.name);e.setPlaceHolder(n,a,o.columnName);var s=!!a&&a.locString.getIsMultiple();n.acceptCarriageReturn=s,a&&(n.maxLength=a.maxLength),s||(n.rows=1)}})),o.onMatrixCellValueChanging.add((function(t,o){var n=r(o.question,o.row.name);n&&(o.value=e.getProcessedTranslationItemText(o.columnName,n.locString,o.value,n.context))})),o.onMatrixCellValueChanged.add((function(t,o){var n=r(o.question,o.row.name);if(n){n.setLocText(o.columnName,o.value);var i=o.columnName;o.row.cells.forEach((function(t){"default"!==i&&0!==t.column.name.indexOf(i+"-")||e.setPlaceHolder(t.question,n,t.column.name)}))}})),o.onUpdatePanelCssClasses.add((function(e,t){t.panel.__translationHasIndent&&(t.cssClasses.panel.content+=" st-panel-indent")})),o.currentPage=o.pages[0],o},t.prototype.setPlaceHolder=function(e,t,o){e.placeholder=t.getPlaceholder(o)},t.prototype.createStringsHeaderSurvey=function(){var e=this,t={};return $e(t,!1),this.options.createSurvey(t,"translation_strings_header",this,(function(t){t.css=Et;var o=t.addNewPage("page"),r=i.Serializer.createClass("matrixdropdown");r.name="stringsHeader",r.titleLocation="hidden",e.addLocaleColumns(r),o.addQuestion(r),t.currentPage=t.pages[0]}),this.getSurveyStringsHeaderArea())},t.prototype.addTranslationGroupIntoStringsSurvey=function(e,t){for(var o=0;o<t.items.length;o++)if(!t.items[o].isGroup){var r=t.items[o],n=i.Serializer.createClass("matrixdropdown");n.cellType="comment",n.titleLocation="hidden",n.name=t.fullName+o,n.showHeader=!1,e.addQuestion(n),this.addLocaleColumns(n);var a=new i.ItemValue(r.name,r.text);a.translationData=r,n.rows.push(a)}for(o=0;o<t.items.length;o++)if(t.items[o].isGroup){r=t.items[o];var s=i.Serializer.createClass("panel");s.name=r.name,e.addElement(s),s.title=r.text,r.hasIndent&&(s.__translationHasIndent=!0),this.addTranslationGroupIntoStringsSurvey(s,r)}},t.prototype.addLocaleColumns=function(e){var t=this.getSelectedLocales();e.addColumn("default",this.getLocaleName("")).readOnly=this.isEditMode;for(var o=0;o<t.length;o++)e.addColumn(t[o],this.getLocaleName(t[o]))},t.prototype.getStringsSurveyData=function(e){for(var t={},o=e.getAllQuestions(),r=0;r<o.length;r++)t[o[r].name]=this.getStringsQuestionData(o[r]);return t},t.prototype.updateStringsSurveyData=function(){var e=this.stringsSurvey;e&&(e.data=this.getStringsSurveyData(e))},t.prototype.getStringsQuestionData=function(e){for(var t={},o=0;o<e.rows.length;o++){var r=e.rows[o],n=r.translationData.toJSON();i.Helpers.isValueEmpty(n)||(t[r.value]=n)}return t},t.prototype.updateHeaderStringsSurveyColumns=function(){if(this.stringsHeaderSurvey){var e=this.stringsHeaderSurvey.getQuestionByName("stringsHeader");e.columns=[],this.addLocaleColumns(e)}},t.prototype.updateStringsSurveyColumns=function(){if(this.stringsSurvey)for(var e=this.stringsSurvey.getAllQuestions(),t=0;t<e.length;t++){var o=e[t];o.beginUpdate(),o.columns=[],this.addLocaleColumns(o),o.endUpdate()}},t.prototype.addLocaleIntoChoices=function(e,t,o){e&&!o[e]&&(o[e]=!0,t.push(new i.ItemValue(e,this.getLocaleName(e))))},t.prototype.addLocaleIntoValue=function(e,t){var o=this.getVisibleLocales();if(o.indexOf(e)<0&&(o.push(e),this.setVisibleLocales(o)),t){var r=this.getSelectedLocales();r.indexOf(e)<0&&r.length<a.translation.maximumSelectedLocales&&(r.push(e),this.setSelectedLocales(r))}},t.prototype.isLocaleVisible=function(e,t){return t!==i.surveyLocalization.defaultLocale&&e.indexOf(t)<0},t.prototype.setupToolbarItems=function(){var e=this;this.chooseLanguageActions=this.getSurveyLocales()[0].map((function(t){return new i.Action({id:t.value,title:e.getLocaleName(t.value),data:t})})),this.addLanguageAction=Object(i.createDropdownActionModel)({id:"svc-translation-choose-language",iconName:"icon-add",enabled:new i.ComputedUpdater((function(){return e.isChooseLanguageEnabled}))},{items:this.chooseLanguageActions,allowSelection:!1,onSelectionChanged:function(t){e.addLocale(t.id)}})},t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),"canMergeLocaleWithDefault"===t&&(this.mergeLocaleWithDefaultText=this.getMergeLocaleWithDefaultText()),"locales"===t&&(this.updateHeaderStringsSurveyColumns(),this.updateStringsSurveyColumns())},t.prototype.getMergeLocaleWithDefaultText=function(){if(!this.canMergeLocaleWithDefault)return"";var e=this.getLocaleName(this.defaultLocale);return G.getString("ed.translationMergeLocaleWithDefault").format(e)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},set:function(e){this.surveyValue=e,this.setVisibleLocales([]),this.reset()},enumerable:!1,configurable:!0}),t.prototype.reset=function(e){if(void 0===e&&(e=!0),e||!this.root){var t=this.filteredPage?this.filteredPage:this.survey,o=this.filteredPage?t.name:"survey";this.root=new _t(o,t,this),this.root.setAsRoot(),this.root.reset(),this.resetLocales(),this.isEmpty=!this.root.hasItems,this.updateSettingsSurveyLocales(),this.updateLocales(),this.resetStringsSurvey(),this.updateChooseLanguageActions()}},t.prototype.updateReadOnly=function(){this.stringsSurvey&&(this.stringsSurvey.mode=this.readOnly?"display":"edit")},t.prototype.canShowProperty=function(e,t,o){var r=!o||te.isPropertyVisible(e,t,this.options);return this.translationStringVisibilityCallback?this.translationStringVisibilityCallback(e,t.name,r):r},Object.defineProperty(t.prototype,"defaultLocale",{get:function(){return i.surveyLocalization.defaultLocale},enumerable:!1,configurable:!0}),t.prototype.getLocaleName=function(e){return G.getLocaleName(e,this.defaultLocale)},t.prototype.removeLocale=function(e){if(this.hasLocale(e)){var t=this.locales.indexOf(e),o=this.locales;o.splice(t,1),this.locales=o,this.canMergeLocaleWithDefault=this.hasLocale(this.defaultLocale)}},t.prototype.hasLocale=function(e){return this.locales.indexOf(e)>-1},t.prototype.addLocale=function(e){this.hasLocale(e)||this.addLocaleIntoValue(e,!0),this.updateChooseLanguageActions()},t.prototype.updateChooseLanguageActions=function(){var e=this,t=this.chooseLanguageActions,o=this.getVisibleLocales();Array.isArray(t)&&t.forEach((function(t){return t.visible=e.isLocaleVisible(o,t.data.value)})),this.calcIsChooseLanguageEnabled()},t.prototype.resetLocales=function(){var e=[""];this.root.fillLocales(e);var t=this.options.translationLocalesOrder;if(Array.isArray(t)&&t.length>0){var o=function(e,t,o){var r=o.indexOf(e),n=o.indexOf(t);return r<0&&(r=100),n<0&&(n=100),r<n?-1:r>n?1:0};e.sort((function(r,n){var i=o(r,n,t);return 0===i?o(r,n,e):i}))}this.setSelectedAndVisibleLocales(e,this.getSelectedLocales(),!0)},t.prototype.getSelectedLocales=function(){return this.getSelectedLocalesCore(!0)},t.prototype.setSelectedLocales=function(e){this.setSelectedAndVisibleLocales(this.getVisibleLocales(),e,!0)},t.prototype.getVisibleLocales=function(){return this.getSelectedLocalesCore(!1)},t.prototype.setVisibleLocales=function(e){this.setSelectedAndVisibleLocales(e,this.getSelectedLocales(),!1)},t.prototype.getSelectedLocalesCore=function(e){if(!this.localesQuestion)return[];var t=this.localesQuestion.value;if(!Array.isArray(t)||0===t.length)return[];var o=[];return t.forEach((function(t){!t.name||e&&!t.isSelected||o.push(t.name)})),o},t.prototype.setSelectedAndVisibleLocales=function(e,t,o){var r=this;if(this.localesQuestion){Array.isArray(t)||(t=[]);var n=[];o&&t.forEach((function(t){e.indexOf(t)<0&&e.push(t)}));var i=this.defaultLocale;n.push({isSelected:!0,name:"",displayName:this.getLocaleName("")}),this.getEditLocale()?n.push({isSelected:!0,name:this.getEditLocale()}):e.forEach((function(e){e&&n.push({isSelected:e===i||t.indexOf(e)>-1,name:e,displayName:r.getLocaleName(e)})})),this.localesQuestion.value=n}},Object.defineProperty(t.prototype,"noStringsText",{get:function(){return G.getString("ed.translationNoStrings")},enumerable:!1,configurable:!0}),t.prototype.exportToCSV=function(){this.root||this.reset();var e=[],o=[],r=this.locales;o.push("description ↓ - language →");for(var n=0;n<r.length;n++)o.push(r[n]?r[n]:"default");e.push(o);var i={};for(var s in this.fillItemsHash("",this.root,i),i){var l=[s],c=i[s];for(n=0;n<r.length;n++){var p=r[n],u=c.getTextForExport(p);u=u||0!=n?u:c.defaultValue,u=this.options.getTranslationExportedText(c.context,c.name,c.locString,p,u),l.push(u||0!=n?u:c.defaultValue)}e.push(l)}var d=a.translation.exportPrefix;return d||(d=""),d+Object(Fe.unparse)(e,{quoteChar:'"',escapeChar:'"',delimiter:t.csvDelimiter,header:!0,newline:t.newLineDelimiter,skipEmptyLines:!1,columns:null})},t.prototype.importFromNestedArray=function(e){var o=this,r=e.shift().slice(1);"default"===r[0]&&(r[0]="");var n=new t(this.survey,this.options,!1);n.showAllStrings=!0;var i={};this.fillItemsHash("",n.root,i),e.forEach((function(e){var t=e.shift().trim();if(t){var n=i[t];n&&o.updateItemWithStrings(t,n,e,r)}})),this.reset(),this.importFinishedCallback&&this.importFinishedCallback()},t.prototype.exportToSCVFile=function(e){if(window){var t=this.exportToCSV(),o=new Blob([t],{type:"text/csv"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(o,e);else{var r=window.document.createElement("a");r.href=window.URL.createObjectURL(o),r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}},t.prototype.importFromCSVFile=function(e){var t=this;Object(Fe.parse)(e,{complete:function(e,o){t.importFromNestedArray(e.data)}})},t.prototype.mergeLocaleWithDefault=function(){this.reset(!1),this.hasLocale(this.defaultLocale)&&(this.root.mergeLocaleWithDefault(this.defaultLocale),this.setVisibleLocales([]),this.setSelectedLocales([]),this.reset())},t.prototype.createTranslationEditor=function(e){var t=this,o=new Mt(this.survey,e,this.options);return o.onApply=function(){t.reset()},o},t.prototype.showTranslationEditor=function(e){this.createTranslationEditor(e).showDialog()},t.prototype.translateItemAfterRender=function(e,t,o){if(this.translateItemAfterRenderCallback){if(Array.isArray(t))for(var r=0;r<t.length;r++)if("TEXTAREA"==t[r].tagName){t=t[r];break}this.translateItemAfterRenderCallback(e,t,o)}},t.prototype.updateItemWithStrings=function(e,t,o,r){for(var n=0;n<o.length&&n<r.length;n++){var i=o[n].trim();i&&(this.importItemCallback&&(i=this.importItemCallback(e,r[n],i)),i&&(t.values(r[n]).text=i))}},t.prototype.fillItemsHash=function(e,t,o){var r=this,n=e?e+"."+t.name:t.name;t.locItems.forEach((function(e){o[n+"."+e.name]=e})),t.groups.forEach((function(e){return r.fillItemsHash(n,e,o)}))},t.prototype.dispose=function(){this.isEmpty=!0,this.stringsSurvey&&(this.stringsSurvey.dispose(),this.stringsSurvey=void 0),this.stringsHeaderSurvey&&(this.stringsHeaderSurvey.dispose(),this.stringsHeaderSurvey=void 0),this.settingsSurveyValue&&(this.settingsSurveyValue.dispose(),this.settingsSurveyValue=void 0),this.importFinishedCallback=void 0,this.availableTranlationsChangedCallback=void 0,this.tranlationChangedCallback=void 0,e.prototype.dispose.call(this)},t.csvDelimiter=",",t.newLineDelimiter="\n",Z([Object(i.propertyArray)()],t.prototype,"locales",void 0),Z([Object(i.property)()],t.prototype,"canMergeLocaleWithDefault",void 0),Z([Object(i.property)()],t.prototype,"mergeLocaleWithDefaultText",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.updateReadOnly()}})],t.prototype,"readOnly",void 0),Z([Object(i.property)()],t.prototype,"root",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.reset()}})],t.prototype,"showAllStrings",void 0),Z([Object(i.property)({onSet:function(e,t){t.reset()}})],t.prototype,"filteredPage",void 0),Z([Object(i.property)()],t.prototype,"stringsSurvey",void 0),Z([Object(i.property)()],t.prototype,"stringsHeaderSurvey",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isEmpty",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isChooseLanguageEnabled",void 0),t}(i.Base),Dt=function(e){function t(t,o,r){var n=e.call(this,t,o,!0)||this;return n.surveyStringsCreatedCallback=r,n}return Y(t,e),t.prototype.getSurveyStringsArea=function(){return"translation-tab:table-popup-editor"},t.prototype.getSurveyStringsHeaderArea=function(){return"translation-tab:table-header-popup-editor"},t.prototype.onSurveyStringsCreated=function(e){this.surveyStringsCreatedCallback(e)},t}(Lt),Mt=function(){function e(e,t,o){var r=this;this.fromLocales=[],this.survey=e,this.options=o,this.locale=t,this.translationValue=new Dt(this.survey,this.options,(function(e){r.setupNavigationButtons(e)})),this.translation.setEditMode(this.locale),this.translation.reset(),this.fillFromLocales();var n=this.translation.stringsSurvey.navigationBar.getActionById("svc-translation-fromlocale");n&&(n.visible=this.fromLocales.length>0)}return Object.defineProperty(e.prototype,"translation",{get:function(){return this.translationValue},enumerable:!1,configurable:!0}),e.prototype.showDialog=function(){var e=this,t=G.getString("ed.translationDialogTitle")+" ("+this.translation.getLocaleName(this.locale)+")";if(0===this.translation.stringsSurvey.getAllQuestions(!0).length){var o=new i.LocalizableString(this.translation.stringsSurvey);o.text=G.getString("ed.translationNoStrings");var r=i.settings.showDialog({componentName:"sv-string-viewer",data:{locStr:o,locString:o,model:o},onApply:function(){return!0},title:t,displayMode:"popup"},this.options.rootElement).footerToolbar.actions;return r.splice(1,r.length-1),void(r[0].title="OK")}i.settings.showDialog({componentName:"survey",data:{survey:this.translation.stringsSurvey,model:this.translation.stringsSurvey},onApply:function(){return e.apply(),!0},onHide:function(){e.dispose()},cssClass:"sv-property-editor st-translation-dialog",title:t,displayMode:this.options.isMobileView?"overlay":"popup"},this.options.rootElement).locale=G.currentLocale},e.prototype.doMachineTranslation=function(){var e=this,t=this.fromLocale||this.translation.defaultLocale;t||(t="en");var o=this.createStringsToTranslate(),r=[];o.forEach((function(t){r.push(e.getTextToTranslate(t))}));this.options.doMachineTranslation(t,this.locale,r,(function(t){if(Array.isArray(t)){for(var r=0;r<Math.min(o.length,t.length);r++)o[r].values(e.locale).text=t[r];e.translation.updateStringsSurveyData()}}))},e.prototype.apply=function(){this.translation.applyEditLocale(),this.onApply&&this.onApply()},e.prototype.cancel=function(){this.dispose()},e.prototype.dispose=function(){this.translationValue.dispose()},e.prototype.setFromLocale=function(e){this.fromLocale!==e&&(this.fromLocale=e,this.updateMatricesColumns())},e.prototype.updateMatricesColumns=function(){var e=this;this.translation.stringsHeaderSurvey.getAllQuestions().forEach((function(t){return e.updateMatrixColumns(t)}));for(var t=this.translation.stringsSurvey.getAllQuestions(),o=0;o<t.length;o++)this.updateMatrixColumns(t[o],0===o)},e.prototype.updateMatrixColumns=function(e,t){void 0===t&&(t=!1);3===e.columns.length&&e.columns.splice(1,1);var o=this.fromLocale;if(o){var r=new i.MatrixDropdownColumn(o,this.translation.getLocaleName(o));r.readOnly=!0,e.columns.splice(1,0,r)}if(t&&(e.showHeader=e.columns.length>2,e.showHeader)){var n=e.columns;n[0].title=this.translation.getLocaleName(""),n[1].title=this.getHeaderTitle("translationSource",n[1].name),n[2].title=this.getHeaderTitle("translationTarget",n[2].name)}},e.prototype.getHeaderTitle=function(e,t){return G.getString("ed."+e)+this.translation.getLocaleName(t)},e.prototype.fillFromLocales=function(){var e=this;this.fromLocales=[],this.createStringsToTranslate().forEach((function(t){t.fillLocales(e.fromLocales)}))},e.prototype.setupNavigationButtons=function(e){var t=this,o=e.navigationBar.actions;o.splice(0,o.length),this.options.getHasMachineTranslation()&&(e.addNavigationItem(this.createLocaleFromAction()),e.addNavigationItem(new i.Action({id:"svc-translation-machine",iconName:"icon-language",css:"svc-translation-machine",locTitleName:"ed.translateUsigAI",component:"sv-action-bar-item",action:function(){t.doMachineTranslation()}}))),e.addNavigationItem(Rt((function(){t.translation.importFromCSVFileDOM()}),!1,!0)),e.addNavigationItem(qt((function(){t.translation.exportToCSVFileUI()}),!0)),e.showNavigationButtons="top"},e.prototype.createStringsToTranslate=function(){var e=this,t=new Array;this.fromLocale;return this.translation.root.allLocItems.forEach((function(o){e.getTextToTranslate(o)&&t.push(o)})),t},e.prototype.getTextToTranslate=function(e){var t=this.fromLocale||"",o=e.getLocText(t);return o||t||(o=e.getDefaultLocaleText(!0)),o},e.prototype.createLocaleFromAction=function(){var e=this,t=new i.Action({id:"svc-translation-fromlocale",component:"sv-action-bar-item-dropdown",css:"svc-translation-machine-from"}),o=this.getActionTranslateFromText(""),r=new i.ListModel([{id:null,title:o}],(function(o){var r=o.id||"";e.setFromLocale(r),t.title=e.getActionTranslateFromText(r),n.toggleVisibility()}),!0),n=new i.PopupModel("sv-list",{model:r},"bottom","center");return n.onShow=function(){var t=[{id:null,title:o}];e.fromLocales.forEach((function(o){t.push({id:o,title:e.getActionTranslateFromText(o)})})),n.contentComponentData.model.setItems(t)},t.popupModel=n,t.title=o,t.action=function(){n.toggleVisibility()},t},e.prototype.getActionTranslateFromText=function(e){return e=e||"",G.getString("ed.translateUsigAIFrom")+this.translation.getLocaleName(e)},e}();function Rt(e,t,o){return void 0===o&&(o=!1),new i.Action({id:"svc-translation-import",iconName:"icon-load",locTitleName:"ed.translationImportFromSCVButton",locTooltipName:"ed.translationImportFromSCVButton",mode:o?"large":"small",component:"sv-action-bar-item",needSeparator:t,action:e})}function qt(e,t){return void 0===t&&(t=!1),new i.Action({id:"svc-translation-export",iconName:"icon-download",locTitleName:"ed.translationExportToSCVButton",locTooltipName:"ed.translationExportToSCVButton",mode:t?"large":"small",component:"sv-action-bar-item",action:e})}var Ht=function(){function e(e){this.creator=e,e.addPluginTab("translation",this),this.sidebarTab=this.creator.sidebar.addTab("translation"),this.sidebarTab.caption=G.getString("ed.translationPropertyGridTitle"),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.activate=function(){var e=this;this.model=new Lt(this.creator.survey,this.creator),this.model.settingsSurvey.locale=this.creator.locale,this.model.readOnly=this.creator.readOnly,this.model.translationStringVisibilityCallback=function(t,o,r){var n={obj:t,propertyName:o,visible:r};return!e.creator.onTranslationStringVisibility.isEmpty&&e.creator.onTranslationStringVisibility.fire(e.creator,n),n.visible},this.model.localeInitialVisibleCallback=function(t){var o={locale:t,isSelected:!0};return e.creator.onTranslationLocaleInitiallySelected.fire(e.creator,o),o.isSelected},this.model.importItemCallback=function(t,o,r){var n={locale:o,name:t,text:r};return e.creator.onTranslationImportItem.fire(e.creator,n),n.text},this.model.importFinishedCallback=function(){e.creator.onTranslationImported.fire(e.creator,{})},this.sidebarTab.model=this.model.settingsSurvey,this.sidebarTab.componentName="survey-widget",this.creator.sidebar.activeTab=this.sidebarTab.id,this.mergeLocaleWithDefaultAction.title=this.createMergeLocaleWithDefaultActionTitleUpdater(),this.mergeLocaleWithDefaultAction.tooltip=this.createMergeLocaleWithDefaultActionTitleUpdater(),this.mergeLocaleWithDefaultAction.visible=this.model.canMergeLocaleWithDefault,this.filterPageAction.visible=this.creator.survey.pageCount>1,this.updateFilterPageAction(!0),this.filterStringsAction.visible=!0,this.updateFilterStrigsAction(!0),this.importCsvAction.visible=!0,this.exportCsvAction.visible=!0,this.filterPageAction.data.setItems([{id:null,title:this.showAllPagesText}].concat(this.creator.survey.pages.map((function(t){return{id:t.name,title:e.getPageDisplayText(t)}}))),!1),this.model.onPropertyChanged.add((function(t,o){"filteredPage"===o.name&&e.updateFilterPageAction(),"showAllStrings"===o.name&&e.updateFilterStrigsAction(),"canMergeLocaleWithDefault"===o.name&&(e.mergeLocaleWithDefaultAction.visible=e.model.canMergeLocaleWithDefault),"mergeLocaleWithDefaultText"===o.name&&(e.mergeLocaleWithDefaultAction.title=e.model.mergeLocaleWithDefaultText,e.mergeLocaleWithDefaultAction.tooltip=e.model.mergeLocaleWithDefaultText)})),this.model.reset()},e.prototype.update=function(){this.model&&(this.model.survey=this.creator.survey,this.model.filteredPage=null,this.updateFilterPageAction(!0))},e.prototype.deactivate=function(){return this.model&&this.model.dispose(),this.model=void 0,this.sidebarTab.visible=!1,this.filterStringsAction.visible=!1,this.filterPageAction.visible=!1,this.mergeLocaleWithDefaultAction.title=void 0,this.mergeLocaleWithDefaultAction.tooltip=void 0,this.mergeLocaleWithDefaultAction.visible=!1,this.importCsvAction.visible=!1,this.exportCsvAction.visible=!1,!0},e.prototype.createMergeLocaleWithDefaultActionTitleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){var t=e.creator.locale;return t||(t="en"),G.getString("ed.translationMergeLocaleWithDefault").format(i.surveyLocalization.defaultLocale)}))},Object.defineProperty(e.prototype,"selectLanguageOptionsCaption",{get:function(){return G.getString("ed.translationAddLanguage")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllStringsText",{get:function(){return G.getString("ed.translationShowAllStrings")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showUsedStringsOnlyText",{get:function(){return G.getString("ed.translationShowUsedStringsOnly")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllPagesText",{get:function(){return G.getString("ed.translationShowAllPages")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exportToCSVText",{get:function(){return G.getString("ed.translationExportToSCVButton")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"importFromCSVText",{get:function(){return G.getString("ed.translationImportFromSCVButton")},enumerable:!1,configurable:!0}),e.prototype.createActions=function(){var e=this,t=[];return this.createFilterPageAction(),t.push(this.filterPageAction),this.createFilterStringsAction(),t.push(this.filterStringsAction),this.mergeLocaleWithDefaultAction=new i.Action({id:"svd-translation-merge_locale_withdefault",visible:!1,component:"sv-action-bar-item",mode:"small",needSeparator:!0,action:function(){e.model.mergeLocaleWithDefault()}}),t.push(this.mergeLocaleWithDefaultAction),this.importCsvAction=Rt((function(){e.model.importFromCSVFileDOM()}),!0),this.importCsvAction.visible=!1,t.push(this.importCsvAction),this.exportCsvAction=qt((function(){e.model.exportToCSVFileUI()})),this.exportCsvAction.visible=!1,t.push(this.exportCsvAction),t},e.prototype.createFilterPageAction=function(){var e=this;this.filterPageAction=Object(i.createDropdownActionModel)({id:"svc-translation-filter-page",title:this.getFilterPageActionTitle(),visible:!1,mode:"small"},{items:[{id:null,title:this.showAllPagesText}],allowSelection:!0,onSelectionChanged:function(t){e.model.filteredPage=t.id?e.creator.survey.getPageByName(t.id):null},horizontalPosition:"center"})},e.prototype.createFilterStringsAction=function(){var e=this;this.filterStringsAction=Object(i.createDropdownActionModel)({id:"svc-translation-show-all-strings",title:this.getFilterStringsActionTitle(),visible:!1,mode:"small"},{items:[{id:"show-all-strings",locTitleName:"ed.translationShowAllStrings"},{id:"show-used-strings-only",locTitleName:"ed.translationShowUsedStringsOnly"}],allowSelection:!0,onSelectionChanged:function(t){e.model.showAllStrings="show-all-strings"===t.id},horizontalPosition:"center"})},e.prototype.updateFilterStrigsAction=function(e){void 0===e&&(e=!1);var t=this.getFilterStringsActionTitle();if(this.filterStringsAction.title=t,e){this.filterStringsAction.needSeparator=this.filterPageAction.visible;var o=this.filterStringsAction.data;o.selectedItem=o.actions.filter((function(e){return e.title===t}))[0]}},e.prototype.updateFilterPageAction=function(e){if(void 0===e&&(e=!1),this.filterPageAction.title=this.getFilterPageActionTitle(),e){var t=this.filterPageAction.data,o=this.model.filteredPage?this.model.filteredPage.name:null;t.selectedItem=t.actions.filter((function(e){return e.id===o}))[0]}},e.prototype.getFilterPageActionTitle=function(){return this.model&&this.model.filteredPage&&this.getPageDisplayText(this.model.filteredPage)||this.showAllPagesText},e.prototype.getFilterStringsActionTitle=function(){return this.model&&!this.model.showAllStrings?this.showUsedStringsOnlyText:this.showAllStringsText},e.prototype.getPageDisplayText=function(e){return this.creator.getObjectDisplayName(e,"translation-tab","survey-translation",e.title)},e}(),Bt={root:"",container:"",header:"",body:"sl-body",bodyEmpty:"",footer:"",title:"",description:"",logo:"",logoImage:"",headerText:"",navigationButton:"",completedPage:"",navigation:{complete:"",prev:"",next:"",start:"",preview:"",edit:""},panel:{title:"",titleExpandable:"",titleOnExpand:"",titleOnError:"",description:"",container:"sl-panel",content:"",icon:"",iconExpanded:"",footer:"sl-panel__footer",requiredText:"sl-panel__required-text"},paneldynamic:{mainRoot:"",root:"",navigation:"",title:"",button:"",buttonRemove:"",buttonAdd:"svc-logic-operator sl-paneldynamic__add-btn",progressTop:"",progressBottom:"",buttonPrev:"",buttonNext:"",progressContainer:"",progress:"",progressBar:"",progressText:"",separator:"sv-hidden",panelWrapper:"",panelsContainer:"",panelWrapperList:"",panelWrapperInRow:"sl-panel-wrapper--in-row"},progress:"",progressBar:"",progressText:"",progressTextInBar:"",page:{root:"",title:"",description:""},pageTitle:"",pageDescription:"",row:"sl-row",rowMultiple:"sl-row--multiple",question:{mainRoot:"sl-question",flowRoot:"",asCell:"",header:"sl-question__header",headerLeft:"sl-question__header--left",headerTop:"",headerBottom:"",content:"",contentLeft:"",titleLeftRoot:"",titleOnAnswer:"",titleOnError:"",title:"sl-question__title",requiredText:"sl-question__required-text",number:"",description:"",descriptionUnderInput:"",comment:"",required:"",titleRequired:"",indent:0,footer:"",formGroup:"",hasError:"",disabled:""},image:{root:""},error:{root:"",icon:"",item:"",locationTop:"",locationBottom:""},checkbox:{root:"",item:"",itemSelectAll:"",itemNone:"",itemDisabled:"",itemChecked:"",itemHover:"",itemInline:"",label:"",labelChecked:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",column:""},radiogroup:{root:"",item:"",itemInline:"",label:"",labelChecked:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",clearButton:"",column:""},boolean:{mainRoot:"",root:"",item:"",control:"",itemChecked:"",itemIndeterminate:"",itemDisabled:"",label:"",switch:"",disabledLabel:"",itemDecorator:"",materialDecorator:"",sliderText:"",slider:""},text:{root:"",small:"",controlDisabled:"",onError:""},multipletext:{root:"",item:"",itemTitle:"",row:"",cell:""},dropdown:{root:"",popup:"",small:"",control:"sl-dropdown",selectWrapper:"",other:"",onError:"",label:"",item:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlDisabled:"",controlLabel:"",materialDecorator:"",controlValue:"sl-dropdown__value",chevronButton:"",chevronButtonSvg:"",chevronButtonIconId:""},imagepicker:{root:"",item:"",itemInline:"",itemChecked:"",itemDisabled:"",itemHover:"",label:"",itemControl:"",image:"",itemText:"",clearButton:"",other:""},matrix:{mainRoot:"",tableWrapper:"",root:"",row:"",rowAdditional:"",rowError:"",cell:"",headerCell:"",label:"",itemValue:"",itemChecked:"",itemDisabled:"",itemHover:"",materialDecorator:"",itemDecorator:"",cellText:"",cellTextSelected:"",cellTextDisabled:""},matrixdropdown:{tableWrapper:"",mainRoot:"",root:"",row:"",rowAdditional:"",cell:"",headerCell:""},matrixdynamic:{tableWrapper:"",mainRoot:"sl-question st-row__question st-scrollable",root:"sl-table st-matrixdynamic",noHeader:"",row:"sl-table__row",rowAdditional:"sl-table__row--additional",cell:"sl-table__cell",headerCell:"sl-table__cell st-table__cell--header",button:"sl-btn",detailRow:"sl-table__row st-table__row--detail",detailButton:"sl-table__cell--detail-button",detailButtonExpanded:"sl-table__cell--detail-button--expanded",detailIcon:"sl-detail-panel__icon",detailIconExpanded:"sl-detail-panel__icon--expanded",detailPanelCell:"sl-table__cell--detail-panel",actionsCell:"sl-table__cell sl-table__cell--actions st-table__cell--actions",buttonAdd:"sl-matrixdynamic__add-btn",buttonRemove:"sl-matrixdynamic__remove-btn",iconAdd:"",iconRemove:""},rating:{root:"",item:"",itemHover:"",selected:"",minText:"",itemText:"",maxText:"",itemDisabled:""},comment:{mainRoot:"",root:"spg-input spg-comment sl-comment",small:""},expression:"",file:{root:"",other:"",placeholderInput:"",preview:"",fileSign:"",fileSignBottom:"",fileDecorator:"",fileInput:"",noFileChosen:"",chooseFile:"",disabled:"",removeButton:"",removeButtonBottom:"",removeFile:"",removeFileSvg:"",wrapper:""},signaturepad:{root:"",small:"",controls:"",placeholder:"",clearButton:""},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"",body:"",header:{root:"",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},list:{root:"sv-list__container sl-list",itemBody:"sv-list__item-body sd-list__item-body sl-list__item-body"},embeddedsurvey:{mainRoot:"sl-embedded-survey"},actionBar:i.defaultActionBarCss},Qt=function(){this.conjunction="and",this.operator=a.logic.defaultOperators.default},Ft=function(e){function t(t){var o=e.call(this)||this;return o.survey=t,o}return Y(t,e),t.prototype.getOperatorText=function(){var e=this.operator;return"equal"==e?"=":"notequal"==e?"<>":"greater"==e?">":"less"==e?"<":"greaterorequal"==e?">=":"lessorequal"==e?"<=":e},t.prototype.getValueText=function(){var e=this.value;if(!e)return e;if(!Array.isArray(e))return this.valToText(e);for(var t="[",o=0;o<e.length;o++)t+=this.valToText(e[o]),o<e.length-1&&(t+=", ");return t+="]"},Object.defineProperty(t.prototype,"isValueRequired",{get:function(){return"empty"!==this.operator&&"notempty"!==this.operator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){return!(!this.questionName||this.isValueRequired&&i.Helpers.isValueEmpty(this.value))},enumerable:!1,configurable:!0}),t.prototype.toExpression=function(){var e=E(this.getQuestionValueByName())+" "+this.getOperatorText();return this.isValueRequired&&(e+=" "+this.getValueText()),e},t.prototype.getQuestionValueByName=function(){var e=this.survey.getQuestionByName(this.questionName);return e&&e.name!=e.getValueName()&&this.questionName!=e.getValueName()?this.questionName.replace(e.name,e.getValueName()):this.questionName},t.prototype.valToText=function(e){return"true"==e||"false"==e||this.isNumeric(e)?e:"["==e[0]?e.replace(/(?!^)(['])(?!$)/g,"\\$1"):(this.isQuote(e[0])||(e="'"+e),this.isQuote(e[e.length-1])||(e+="'"),e.replace(/(?!^)(['"])(?!$)/g,"\\$1"))},t.prototype.isNumeric=function(e){return!("string"==typeof e&&e.length>1&&"0"===e[0]&&"x"!==e[1])&&!isNaN(e)},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t}(Qt),Ut=function(){function e(e){void 0===e&&(e=null),this.hasValue=e}return e.prototype.build=function(e){if(!e)return[];var t;return(t=(new i.ConditionsParser).parseExpression(e))?this.buildEditorItems(t):[]},e.prototype.buildEditorItems=function(e){var t=[];return this.buildEditorItemsCore(e,t,"")||(t=[]),t},e.prototype.buildEditorItemsCore=function(e,t,o){if("unary"==e.getType())return this.buildEditorItemsAddUnaryOperand(e,t);if("binary"!==e.getType())return!1;var r=e;return!(r.isArithmetic&&!r.isConjunction)&&(r.isConjunction?this.buildEditorItemsAddConjunction(r,t,o):this.buildEditorItemsAddBinaryOperand(r,t))},e.prototype.buildEditorItemsAddConjunction=function(e,t,o){var r=e.conjunction;if("or"==r&&o&&o!=r)return!1;if(!this.buildEditorItemsCore(e.leftOperand,t,r))return!1;var n=t.length;return!!this.buildEditorItemsCore(e.rightOperand,t,r)&&(t[n].conjunction=e.conjunction,!0)},e.prototype.buildEditorItemsAddBinaryOperand=function(e,t){var o=this.getOperandByType(e,"variable"),r=this.getArrayValueFromOperand(e),n=r?null:this.getOperandByType(e,"const");if(!o||!n&&!r&&this.canShowValueByOperator(e.operator))return!1;if(!this.isVariableInSurvey(o.variable))return!1;var i=new Qt;return i.questionName=o.variable,i.operator=e.leftOperand!==o?this.getOppositeOperator(e.operator):e.operator,r&&(i.value=r),n&&(i.value=n.correctValue),t.push(i),!0},e.prototype.isVariableInSurvey=function(e){return!this.hasValue||this.hasValue(e)},e.prototype.getArrayValueFromOperand=function(e){var t=this.getOperandByType(e,"array");if(!t||!t.values)return null;var o=t.values;if(!Array.isArray(o)||0==o.length)return null;for(var r=[],n=0;n<o.length;n++){var i=o[n];if(i){if("const"!=i.getType())return null;r.push(i.correctValue)}}return 0==r.length?null:r},e.prototype.buildEditorItemsAddUnaryOperand=function(e,t){var o=e.operator;if("empty"!==o&&"notempty"!=o)return!1;var r=e.expression;if(null==r||"variable"!=r.getType())return!1;var n=r.variable;if(!this.isVariableInSurvey(n))return!1;var i=new Qt;return i.questionName=n,i.operator=o,t.push(i),!0},e.prototype.getOppositeOperator=function(e){return"less"==e?"greater":"greater"==e?"less":"lessorequal"==e?"greaterorequal":"greaterorequal"==e?"lessorequal":e},e.prototype.getOperandByType=function(e,t){return e.rightOperand?e.leftOperand.getType()!==t&&e.rightOperand.getType()!==t||e.leftOperand.getType()==t&&e.rightOperand.getType()==t?null:e.leftOperand.getType()==t?e.leftOperand:e.rightOperand:null},e.prototype.canShowValueByOperator=function(e){return"empty"!=e&&"notempty"!=e},e}();i.FunctionFactory.Instance.register("questionValueVisibleIf",(function(e){return 2===e.length&&(!(!e[0]||!e[1])&&("empty"!==e[1]&&"notempty"!==e[1]))}));var Wt=function(e){function t(t,o,r,n){void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n="");var i=e.call(this,r)||this;return i.propertyName=n,i.addConditionQuestionsHash={},i.isModalValue=!0,i.isSettingPanelValues=!1,i.calculatedValueQuestion=null,i.surveyValue=t,i.objectValue=o,i.panelValue=i.editSurvey.getQuestionByName("panel"),i.textEditorValue=i.editSurvey.getQuestionByName("textEditor"),i.options.maxLogicItemsInCondition&&(i.panel.maxPanelCount=i.options.maxLogicItemsInCondition),i.allConditionQuestions=i.createAllConditionQuestions(),i.editSurvey.onValueChanged.add((function(e,t){i.onValueChanged(t)})),i.editSurvey.onDynamicPanelAdded.add((function(e,t){i.onPanelAdded()})),i.editSurvey.onDynamicPanelRemoved.add((function(e,t){0==t.question.panelCount&&t.question.addPanel(),i.panel.panelCount>0&&(i.panel.panels[0].getQuestionByName("questionName").titleLocation="left")})),i.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){i.onPanelValueChanged(t.panel,t.name)})),i.editSurvey.css=Bt,i.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){i.onUpdateQuestionCssClasses(t)})),i.text=i.object&&i.propertyName?i.object[i.propertyName]:"",i.updatePlaceholderVisibileIf(),i}return Y(t,e),t.canParseExpression=function(e){return!e||!!(new i.ConditionsParser).parseExpression(e)},t.canBuildExpression=function(e){return!e||!!t.canParseExpression(e)&&(new Ut).build(e).length>0},t.isOperatorEnabled=function(e,o){if(!e)return!0;if(!o||0==o.length)return!0;for(var r=[],n=[],i=0;i<o.length;i++){var a=o[i];"!"==a[0]?n.push(a.substring(1)):r.push(a)}return t.isClassContains(e,r,n)},t.isClassContains=function(e,t,o){for(var r=i.Serializer.findClass(e);r;){if(t.indexOf(r.name)>-1)return!0;if(o.indexOf(r.name)>-1)return!1;r=r.parentName?i.Serializer.findClass(r.parentName):null}return 0==t.length},Object.defineProperty(t.prototype,"title",{get:function(){return this.panel.title},set:function(e){this.panel.title=e,this.textEditor.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModal",{get:function(){return this.isModalValue},set:function(e){e!==this.isModalValue&&(this.isModalValue=e,this.updatePlaceholderVisibileIf())},enumerable:!1,configurable:!0}),t.prototype.updatePlaceholderVisibileIf=function(){if(this.panel){var e="";this.isModal&&(e="{panel.questionName} empty and {panelIndex} == 0"),this.panel.template.getQuestionByName("placeholder").visibleIf=e}},t.prototype.getSurveyJSON=function(){return{elements:[{type:"paneldynamic",titleLocation:"hidden",name:"panel",panelRemoveButtonLocation:"right",panelAddText:G.getString("pe.addCondition"),minPanelCount:1,maxPanelCount:1,startWithNewLine:!1,templateElements:[{name:"conjunction",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,titleLocation:"hidden",showOptionsCaption:!1,visibleIf:"{panelIndex} > 0",choices:[{value:"and",text:G.getString("pe.and")},{value:"or",text:G.getString("pe.or")}]},{name:"questionName",type:"dropdown",renderAs:"logicoperator",title:G.getString("pe.if"),titleLocation:"left",showOptionsCaption:!1,startWithNewLine:!1,isRequired:!0},{name:"operator",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,titleLocation:"hidden",startWithNewLine:!1,showOptionsCaption:!1,isRequired:!0,enableIf:"{panel.questionName} notempty"},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"questionValue",type:"text",visible:!1},{name:"placeholder",type:"html",visible:!1,html:"<div class='svc-logic-placeholder'><span class=\"svc-logic-placeholder__text\">"+G.getString("pe.emptyLogicPopupMessage")+"<span></div>"}]},{type:"comment",titleLocation:"hidden",name:"textEditor",textUpdateMode:"onTyping",placeholder:G.getString("pe.emptyExpressionPlaceHolder"),visible:!1}]}},t.prototype.getSurveyCreationReason=function(){return"condition-builder"},Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.isModal||t.canBuildExpression(e)?(this.textEditor.value=e,this.showBuilder(e)):(this.panel.panelCount=0,this.showTextEditor(e))},enumerable:!1,configurable:!0}),t.prototype.isModified=function(e){if(this.textEditor.visible)return e!=this.text;var t=this.getEditorItems(),o=e?(new i.ConditionsParser).parseExpression(e):null;if(!o)return!(1==t.length&&!t[0].questionName);if(!this.isReady)return!0;var r=(new i.ConditionsParser).parseExpression(this.text);return!o.isEqual(r)},Object.defineProperty(t.prototype,"context",{get:function(){return this.contextValue},set:function(e){e!==this.context&&(this.contextValue=e,this.updateNamesOnContextChanged(),this.onContextChanged&&this.onContextChanged(e))},enumerable:!1,configurable:!0}),t.prototype.processText=function(e){this.panel.panelCount=0;var t=(new Ut).build(e);this.buildPanels(t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"object",{get:function(){return this.objectValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textEditor",{get:function(){return this.textEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){if(this.textEditor.visible)return t.canParseExpression(this.textEditor.value);for(var e=0;e<this.panel.panels.length;e++)if(!this.createEditorItemFromPanel(this.panel.panels[e]).isReady)return!1;return!0},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.panel.panels.length||!(this.panel.panels.length>1)&&!this.createEditorItemFromPanel(this.panel.panels[0]).questionName},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return!this.isReady&&(this.hasErrors(),this.errorText=_e("expressionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.apply=function(){return!this.hasErrorInUI()&&(this.object&&this.propertyName?(this.object[this.propertyName]=this.text,!0):void 0)},t.prototype.setIsFastEntry=function(e){e?this.showTextEditor(this.text):this.panel.visible||this.showBuilder(this.text)},t.prototype.buildPanels=function(e){this.panel.panelCount=e.length;for(var t=0;t<e.length;t++)this.setItemToPanel(e[t],this.panel.panels[t]);0==this.panel.panelCount&&this.panel.addPanel()},t.prototype.setupConditionOperator=function(e,o){var r=this,n=o.getQuestionByName("operator");n.choices=this.getOperators(),n.value=e.operator,n.onOpened.add((function(e,n){var i=o.getQuestionByName("questionName").value,s=r.getQuestionConditionJson(i),l=s?s.type:null,c=r.getConditionQuestion(i);n.choices.forEach((function(e,o){var n=t.isOperatorEnabled(l,a.operators[e.value]);n=r.options.isConditionOperatorEnabled(i,c,e.value,n),e.setIsEnabled(n),e.setIsVisible(n)}))}))},t.prototype.setupConditionQuestionName=function(e,t){var o=t.getQuestionByName("questionName");o.choices=this.getConditionQuestions(),o.titleLocation=0==this.panel.panels.indexOf(t)?"left":"hidden";var r=this.getQuestionNameToPanel(e.questionName);this.getConditionQuestion(r)&&(o.value=r)},t.prototype.setupRemoveQuestion=function(e){var t=e.getQuestionByName("removeAction").parentQuestion,o=e.getQuestionByName("removeAction");o.linkClickCallback=function(){t&&t.removePanelUI(e)},o.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",o.linkValueText=""},t.prototype.setItemToPanel=function(e,t){this.isSettingPanelValues=!0,t.getQuestionByName("conjunction").value=e.conjunction,this.setupConditionOperator(e,t),this.setupConditionQuestionName(e,t),t.getQuestionByName("questionValue")&&(t.getQuestionByName("questionValue").value=e.value,this.updateSurveyVariable(e)),this.setupRemoveQuestion(t),this.isSettingPanelValues=!1},t.prototype.updateSurveyVariable=function(e){this.editSurvey.setVariable(e.questionName,e.value)},t.prototype.getConditionQuestions=function(){if(!this.context)return this.allConditionQuestions;for(var e=[],t=0;t<this.allConditionQuestions.length;t++){var o=this.allConditionQuestions[t];o.context&&o.context!==this.context||e.push(o)}return e},t.prototype.getText=function(){if(this.textEditor.visible)return this.textEditor.value;for(var e="",t=this.getEditorItems(),o=0;o<t.length&&t[o].isReady;o++)e&&(e+=" "+t[o].conjunction+" "),e+=t[o].toExpression();return e},t.prototype.getEditorItems=function(){for(var e=[],t=0;t<this.panel.panels.length;t++)e.push(this.createEditorItemFromPanel(this.panel.panels[t]));return e},t.prototype.createEditorItemFromPanel=function(e){var t=new Ft(this.survey);return t.conjunction=e.getQuestionByName("conjunction").value,t.questionName=this.getQuestionNameFromPanel(e.getQuestionByName("questionName").value),t.operator=e.getQuestionByName("operator").value,e.getQuestionByName("questionValue")&&(t.value=e.getQuestionByName("questionValue").value,this.updateSurveyVariable(t)),t},t.prototype.getQuestionNameFromPanel=function(e){if(!this.context||!e)return e;var t=this.context.getValueName()+".";return e.replace(t,"")},t.prototype.getContextIndexInfo=function(e,t){return void 0===t&&(t=""),te.getQuestionContextIndexInfo(e,t)},t.prototype.getQuestionNameToPanel=function(e){if(!this.context||!e)return e;var t=this.getContextIndexInfo(e);return t&&0===t.index?this.context.getValueName()+"."+e:e},t.prototype.getContextFromPanels=function(){if(this.object)return null;for(var e=0;e<this.panel.panels.length;e++){var t=this.panel.panels[e].getQuestionByName("questionName").value,o=this.getContextByQuestionName(t);if(o)return o}return null},t.prototype.updateNamesOnContextChanged=function(){for(var e=0;e<this.panel.panels.length;e++)this.panel.panels[e].getQuestionByName("questionName").choices=this.getConditionQuestions()},t.prototype.getContextByQuestionName=function(e){if(!e)return null;var t=this.getContextIndexInfo(e,".");return t?(e=e.substring(0,t.index),this.survey.getQuestionByValueName(e)):null},t.prototype.createAllConditionQuestions=function(){if(!this.survey)return[];var e=[],t=this.survey.getAllQuestions(),o=this.getContextObject(),r=a.logic.questionSortOrder;if(t.length>0){for(var n=0;n<t.length;n++){if(o!=(s=t[n])){var i=o||(!this.context||this.context===s);s.addConditionObjectsByContext(e,i)}}r=this.options.onConditionQuestionsGetListCallback(this.propertyName,this.object,this,e);for(n=0;n<e.length;n++){e[n].value=e[n].name;var s=e[n].question?e[n].question:e[n];if(!this.options.showTitlesInExpressions){var l=e[n].name,c=s.valueName;c&&0==l.indexOf(c)&&(l=l.replace(c,s.name));l=l.replace("-unwrapped",""),e[n].text=this.options.getObjectDisplayName(s,"condition-editor","condition",l)}this.addConditionQuestionsHash[e[n].name]=s}}var p=this.survey.getVariableNames();return this.addSurveyCalculatedValues(p),this.addValuesIntoConditionQuestions(p,e),"asc"===r&&te.sortItems(e),e},t.prototype.getContextObject=function(){if(this.object&&this.object.isDescendantOf("itemvalue")){var e=this.object.locOwner;if(e&&e.getType)return e.locOwner&&e.locOwner.isDescendantOf("matrixdropdowncolumn")?e.locOwner:e}return this.object},t.prototype.addValuesIntoConditionQuestions=function(e,t){for(var o=0;o<e.length;o++){var r=e[o].name?e[o].name:e[o];this.addConditionQuestionsHash[r]=this.getCalculatedValueQuestion(),t.push({value:r,text:r,question:this.getCalculatedValueQuestion()})}},t.prototype.addSurveyCalculatedValues=function(e){this.survey.calculatedValues.forEach((function(t){var o=e.indexOf(t.name.toLowerCase());o>-1&&e.splice(o,1),e.push(t.name)}))},t.prototype.getCalculatedValueQuestion=function(){return this.calculatedValueQuestion||(this.calculatedValueQuestion=i.Serializer.createClass("text"),this.calculatedValueQuestion.name="question"),this.calculatedValueQuestion},t.prototype.getOperators=function(){var e=[],t=a.operators;for(var o in t)e.push(new i.ItemValue(o,G.getString("op."+o)));return e},t.prototype.rebuildQuestionValue=function(e){e.getQuestionByName("questionValue")&&e.getQuestionByName("questionValue").clearValue();var t=e.getQuestionByName("questionName").value,o=this.getQuestionConditionJson(t,e.getQuestionByName("operator").value);o||(o={type:"text"}),o.isRequired=!0,te.updateQuestionJson(o),o.enableIf="{panel.questionName} notempty and {panel.operator} != 'empty' and {panel.operator} != 'notempty'";var r=i.Serializer.createClass(o.type);delete o.type,(new i.JsonObject).toObject(o,r),r||(r=i.Serializer.createClass("text",o));var n=e.getQuestionByName("questionValue");if(n&&e.removeElement(n),this.canShowQuestionValue(e)){var a=r.title;if(r.name="questionValue",r.visibleIf="questionValueVisibleIf({panel.questionName}, {panel.operator})",r.title=a,r.description="",r.titleLocation="top",r.hasComment=!1,r.showOtherItem){var s=this.getConditionQuestion(t);if(s&&s.getStoreOthersAsComment&&s.getStoreOthersAsComment()){var l=r.otherItem;r.choices.push(new i.ItemValue(l.value,l.title)),l.value="#"+l.value+"#",r.showOtherItem=!1}}e.addElement(r)}},t.prototype.rebuildQuestionValueOnOperandChanging=function(e){var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value),o=e.getQuestionByName("questionValue");!o||!o.isReadOnly&&o.isVisible||o.clearValue(),!o||t&&t.type==o.getType()||this.rebuildQuestionValue(e)},t.prototype.canShowQuestionValue=function(e){var t=e.getQuestionByName("operator");if(!t)return!1;this.updateOperatorEnables(e);for(var o=t.choices,r=0;r<o.length;r++)if(o[r].isEnabled){var n=o[r].value;if("empty"!==n&&"notempty"!=n)return!0}return!1},t.prototype.getConditionQuestion=function(e){return this.addConditionQuestionsHash[e]},t.prototype.getQuestionConditionJson=function(e,o){var r="",n=this.getConditionQuestion(e);if(!n)return null;o||(o=this.getDefaultOperatorByQuestion(n)),0==e.indexOf(n.getValueName())&&(r=e.substring(n.getValueName().length));var i=this.getContextIndexInfo(e);i&&0==i.index&&(r=e.substring(i.name.length)),r||(r=e),r&&"."==r[0]&&(r=r.substring(1));var a=n&&n.getConditionJson?n.getConditionJson(o,r):null;return a?(a.choicesFromQuestion&&this.updateChoicesFromQuestion(a),"expression"==a.type&&(a.type="text"),"anyof"==o&&(t.isClassContains(a.type,["checkbox"],[])||(a.type="checkbox")),a):null},t.prototype.updateChoicesFromQuestion=function(e){var t=this.getConditionQuestion(e.choicesFromQuestion);if(t){delete e.choicesFromQuestion;var o=t.toJSON();o.choices&&(e.choices=o.choices),o.choicesByUrl&&(e.choicesByUrl=o.choicesByUrl)}},t.prototype.updateOperatorEnables=function(e){var o=e.getQuestionByName("questionName");if(o){var r=this.getQuestionConditionJson(o.value),n=r?r.type:null,i=e.getQuestionByName("operator");if(i){for(var s=i.choices,l=!0,c=i.value,p=0;p<s.length;p++){var u=t.isOperatorEnabled(n,a.operators[s[p].value]);s[p].setIsEnabled(u),s[p].setIsVisible(u),s[p].value==c&&(l=s[p].isEnabled)}l||(i.value=this.getFirstEnabledOperator(s))}}},t.prototype.updateQuestionsWidth=function(e){var t=e.getQuestionByName("questionValue"),o=e.getQuestionByName("conjunction"),r=e.getQuestionByName("questionName"),n=e.getQuestionByName("operator"),i=!!t&&!t.startWithNewLine,a=!o||!o.isVisible;a||(o.minWidth="50px",o.width="15%"),r.minWidth="50px",r.width=a?"40%":"25%",n.minWidth="50px",n.width=i?"25%":"60%",t&&(t.minWidth="50px",t.width=i?"35%":"")},Object.defineProperty(t.prototype,"defaultOperator",{get:function(){return a.logic.defaultOperators.default},enumerable:!1,configurable:!0}),t.prototype.getDefaultOperatorByQuestionName=function(e){return this.getDefaultOperatorByQuestion(this.getConditionQuestion(e))},t.prototype.getDefaultOperatorByQuestion=function(e){if(e){var t=a.logic.defaultOperators;if(t[e.getType()])return t[e.getType()]}return this.defaultOperator},t.prototype.getFirstEnabledOperator=function(e){for(var t=0;t<e.length;t++)if(e[t].isEnabled)return e[t].value;return this.defaultOperator},t.prototype.onPanelAdded=function(){this.setItemToPanel(new Qt,this.panel.panels[this.panel.panels.length-1])},t.prototype.onPanelValueChanged=function(e,t){"questionName"==t&&(this.context=this.getContextFromPanels(),this.rebuildQuestionValue(e),this.isSettingPanelValues||(e.getQuestionByName("operator").value=this.getDefaultOperatorByQuestionName(e.getQuestionByName("questionName").value))),"operator"==t&&this.rebuildQuestionValueOnOperandChanging(e),this.updateOperatorEnables(e),this.updateQuestionsWidth(e)},t.prototype.onUpdateQuestionCssClasses=function(e){var t=e.cssClasses,o=e.question;t.answered="svc-logic-question--answered","conjunction"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--conjunction "),"questionName"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--question",t.error.root="svc-logic-operator__error",t.onError="svc-logic-operator--error"),"operator"===o.name&&(o.allowRootStyle=!1,t.control+=" svc-logic-operator svc-logic-operator--operator"),"removeAction"===o.name&&(o.allowRootStyle=!1,t.mainRoot+=" svc-logic-condition-remove-question"),("questionValue"===o.name||o.isContentElement)&&(P(t,o.getType()),t.mainRoot+=" svc-logic-question-value sd-element--with-frame",t.error.root="svc-logic-operator__error"),"panel"===o.name&&(t.root+=" svc-logic-paneldynamic",t.buttonAdd+=" svc-logic-operator--operator",t.iconRemove="svc-icon-remove",t.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",t.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",t.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onValueChanged=function(e){if("panel"===e.question.name&&e.value.length>0){var t=this.options.maxLogicItemsInCondition>0?this.options.maxLogicItemsInCondition:100;e.question.maxPanelCount=1!==e.value.length||e.value[0].questionName?t:1,this.panel.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))}this.setTitle()},t.prototype.setTitle=function(){var e=this.isReady?this.text:"";this.title=this.options.onConditionGetTitleCallback(e,e||G.getString("pe.ruleIsNotSet"))},t.prototype.showTextEditor=function(e){this.panel.visible=!1,this.textEditor.value=e,this.textEditor.visible=!0},t.prototype.showBuilder=function(e){(this.isModal||this.getCanShowBuilder(e))&&(this.textEditor.visible=!1,this.processText(e),this.panel.visible=!0)},t.prototype.getCanShowBuilder=function(e){return t.canBuildExpression(e)},t}(et),Gt=function(){function e(e,t,o){this.panel=e,this.initialLogicAction=t,this.logicType=o}return e.createActionModel=function(e,t,o,r){return o&&o.hasSelectorChoices?o.name.indexOf("_setValue")>-1?new Jt(e,t,o,r):new zt(e,t,o,r):new Zt(e,t,o)},e.prototype.updateCurrentLogicAction=function(e){return!1},e.prototype.afterUpdateInitialLogicAction=function(){},e.prototype.resetElements=function(){},e.prototype.getSelectedElement=function(){return null},e.prototype.updateInitialLogicAction=function(){this.initialLogicAction=this.currentLogicAction,this.afterUpdateInitialLogicAction&&this.afterUpdateInitialLogicAction()},e.prototype.setInitialElementValue=function(e,t,o){o&&0!==e.choices.filter((function(e){return e.value===o})).length?e.value=o:e.value=t&&t.logicType==this.logicType?t.elementName:void 0},e}(),zt=function(e){function t(t,o,r,n){var i=e.call(this,t,o,r)||this;return i.selectorElementsHash=n,i}return Y(t,e),t.prototype.getSelectorOptionsText=function(e){var t=e.baseClass,o="page"==t?"pe.conditionSelectPage":"panel"==t?"pe.conditionSelectPanel":"pe.conditionSelectQuestion";return G.getString(o)},t.prototype.getElementBySelectorName=function(e){var t=e.getQuestionByName("elementSelector").value;return t?this.selectorElementsHash[t]:null},t.prototype.updateCurrentLogicAction=function(e){var t=this.getElementBySelectorName(this.panel);return(!this.initialLogicAction||this.initialLogicAction.logicType!=this.logicType||!!t&&this.initialLogicAction.element!=t)&&(this.currentLogicAction=new Re(this.logicType,t,e),!0)},t.prototype.resetElements=function(){this.panel.getQuestionByName("elementSelector").visible=!1},t.prototype.updatePanelElements=function(e,t){var o=this.panel.getQuestionByName("elementSelector");o.visible=!0,o.choices=t,o.allowClear=!1,o.optionsCaption=this.getSelectorOptionsText(this.logicType),this.setInitialElementValue(o,this.initialLogicAction,e)},t.prototype.getSelectedElement=function(){return this.panel.getQuestionByName("elementSelector").value},t}(Gt),Jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.updatePanelElements=function(t,o){e.prototype.updatePanelElements.call(this,t,o),this.getValueIfQuestion().placeholder=G.getString("ed.lg.setValueExpressionPlaceholder"),this.getValueIfPanel().visible=!0,this.setValueExpressionValue()},t.prototype.afterUpdateInitialLogicAction=function(){var e=this.getElementBySelectorName(this.panel);e&&(e.setValueExpression=this.panel.getQuestionByName("setValueExpression").value)},t.prototype.setValueExpressionValue=function(){var e=this.getElementBySelectorName(this.panel);e&&(this.getValueIfQuestion().value=e.setValueExpression)},t.prototype.getValueIfPanel=function(){return this.panel.getElementByName("setValueIfPanel")},t.prototype.getValueIfQuestion=function(){return this.panel.getQuestionByName("setValueExpression")},t.prototype.resetElements=function(){e.prototype.resetElements.call(this),this.getValueIfPanel().visible=!1,this.getValueIfQuestion().clearValue()},t}(zt),Zt=function(e){function t(t,o,r){var n=e.call(this,t,o,r)||this;return n.isTrigger=!0,n}return Y(t,e),t.prototype.recreateQuestion=function(e,t,o,r){var n=o?e.getQuestionByName(o):null;if(n){var a=e.getElementByName("triggerEditorPanel"),s=i.Serializer.createClass("panel");new rt(t,r).setupObjPanel(s,!0,"logic");var l=s.getQuestionByName(o);if(l){var c=a.elements.indexOf(n);a.blockAnimations(),a.addElement(l,c),n.delete(),a.releaseAnimations()}"setValue"===l.name&&this.updateSetValueQuestion(l),this.updateVisibilityPanel(a),s.dispose()}},t.prototype.updateSetValueQuestion=function(e){var t=e.obj,o=t.getSurvey();if(o||(o=t.owner),t.setToName&&o){var r=o.getQuestionByValueName(t.setToName);e.title=r.title,e.titleLocation="top"}},t.prototype.updateRunExpressionQuestion=function(e){e.titleLocation="hidden",e.placeholder=G.getString("pe.emptyExpressionPlaceHolder")},t.prototype.createElementPanelObj=function(){var e=this.initialLogicAction,t=e&&e.logicType==this.logicType?e.element:null,o=this.logicType.createNewObj(t);return this.setPanelObj(o),o},t.prototype.getQuestions=function(){var e=this,t=this.panel.getElementByName("triggerQuestionsPanel");return 0!==t.elements.length&&this.logicType.questionNames?t.elements.filter((function(t){return-1!==e.logicType.questionNames.indexOf(t.name)})):null},t.prototype.resetPanel=function(e){var t=this.panel.getElementByName(e);t.questions.forEach((function(e){e.clearValue()})),t.elements.splice(0,t.elements.length),t.visible=!1},t.prototype.updateVisibilityPanel=function(e){e.elements.length>0?e.visible=e.elements.filter((function(e){return e.visible})).length>0:e.visible=!1},t.prototype.updatePanelQuestionsValue=function(e){var t=this;e.onSurveyLoad(),e.questions.forEach((function(e){i.Helpers.isValueEmpty(t.panelObj[e.getValueName()])||(e.value=t.panelObj[e.getValueName()])}))},t.prototype.afterUpdateInitialLogicAction=function(){this.setPanelObj(this.initialLogicAction.element),this.panelObj&&this.logicType.saveNewElement(this.panelObj)},t.prototype.updateCurrentLogicAction=function(e){if(!(!this.initialLogicAction||this.initialLogicAction.logicType!=this.logicType)){for(var t=this.initialLogicAction.element,o=this.panelObj.toJSON(),r=Object.keys(o),n=Object.keys(t.toJSON()),i=[],a=0;a<n.length;a++){var s=n[a];r.indexOf(s)<0&&i.push(s)}t.fromJSON(o),this.currentLogicAction=this.initialLogicAction;for(a=0;a<i.length;a++)t[i[a]]=void 0;return!1}return this.currentLogicAction=new Re(this.logicType,this.panelObj,e),!0},t.prototype.updatePanel=function(e,t,o,r){this.panelObj&&(this.panelObj[e]=t,this.logicType&&this.logicType.dependedOnPropertyName===e&&this.recreateQuestion(this.panel,this.panelObj,this.logicType.dynamicPropertyName,o),this.panel.runCondition(r.getAllValues(),{survey:r}))},t.prototype.setPanelObj=function(e){var t=this,o=this.panelObj;o&&(o.onPropertyValueChangedCallback=void 0),this.panelObj=e,e&&(e.onPropertyValueChangedCallback=function(e,r,n,i,a){if(t.panel&&!t.panel.isDisposed){var s=t.panel.getQuestionByName(e);s&&(s.value=n)}else o.onPropertyValueChangedCallback=void 0})},t.prototype.resetElements=function(){this.setPanelObj(null),this.resetPanel("triggerQuestionsPanel"),this.resetPanel("triggerEditorPanel")},t.prototype.updatePanelElements=function(e,t){var o=this,r=this.panel.getElementByName("triggerEditorPanel"),n=this.panel.getElementByName("triggerQuestionsPanel"),i=this.createElementPanelObj();new rt(i,t).setupObjPanel(r,!0,"logic"),r.title="";var a=r.getQuestionByName("runExpression");(a&&this.updateRunExpressionQuestion(a),this.logicType.questionNames)&&r.elements.filter((function(e){return-1!==o.logicType.questionNames.indexOf(e.name)})).forEach((function(e){var t=e;"dropdown"===t.getType()&&(t.allowClear=!1,t.renderAs="logicoperator"),n.addQuestion(t)}));r.getElementByName(this.logicType.propertyName).visible=!1,this.updateVisibilityPanel(n),this.updatePanelQuestionsValue(n),this.updateVisibilityPanel(r),this.updatePanelQuestionsValue(r);var s=this.getQuestions();s&&e&&s.forEach((function(t){o.setInitialElementValue(t,o.initialLogicAction,e),e=null}))},t.prototype.getSelectedElement=function(){var e=this.getQuestions();if(e){var t=e[0];return!!t&&t.value}},t}(Gt);i.FunctionFactory.Instance.register("logicTypeVisibleIf",(function(e){if(!this.question||!this.question.parentQuestion||1!=e.length)return!0;var t=this.question.parentQuestion.panels;if(t.length<2)return!0;for(var o=0;o<t.length;o++){var r=t[o].getQuestionByName("logicTypeName");if(r!=this.question&&r.value==e[0])return!1}return!0}));var Kt=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this,o)||this;return r.options=o,r.initialSelectedElements={},r.isModifiedValue=!1,r.selectorElementsHash={},r.options||(r.options=new s),r.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){"logicTypeName"==t.name&&r.onLogicTypeChanged(t.panel);var o=r.getActionModelByPanel(t.panel);o.isTrigger&&o.updatePanel(t.name,t.value,r.options,r.editSurvey)})),r.editSurvey.onDynamicPanelRemoved.add((function(e,t){if(!r.isBuildingPanels){var o=r.getActionModelByPanel(t.panel);o&&o.initialLogicAction&&r.editableItem.removeAction(o.initialLogicAction),0==r.panel.panelCount&&r.panel.addPanel(),r.panel.panelCount>0&&(r.panels[0].getQuestionByName("logicTypeName").title=G.getString("pe.then"))}})),r.editSurvey.onDynamicPanelAdded.add((function(e,t){if(!r.isBuildingPanels){var o=r.panels[r.panel.panelCount-1];r.onPanelAdded(o,null)}})),r.editSurvey.css=Bt,r.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){r.onUpdateQuestionCssClasses(t)})),r.editSurvey.onUpdatePanelCssClasses.add((function(e,t){r.onUpdatePanelCssClasses(t)})),r.editSurvey.onQuestionAdded.add((function(e,t){r.onQuestionAdded(t)})),r.editSurvey.onGetQuestionTitleActions.add((function(e,t){r.onGetQuestionTitleActions(t)})),r.editSurvey.onValueChanged.add((function(e,t){r.onValueChanged(t)})),r.setEditableItem(t),r}return Y(t,e),Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),t.prototype.setEditableItem=function(e){this.editableItemValue=e,this.buildInitialSelectedElements(),this.buildPanels(),this.resetModified()},Object.defineProperty(t.prototype,"survey",{get:function(){return this.editableItem.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModified",{get:function(){return this.isModifiedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.editSurvey.getQuestionByName("panel")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panels",{get:function(){return this.panel.panels},enumerable:!1,configurable:!0}),t.prototype.getActionModelByPanel=function(e){return e.actionModel},t.prototype.setActionModelByPanel=function(e,t){e.actionModel=t},Object.defineProperty(t.prototype,"context",{get:function(){return this.contextValue},set:function(e){e!==this.context&&(this.contextValue=e,this.updatePanelsOnContextChanged())},enumerable:!1,configurable:!0}),t.prototype.getLogicTypeByPanel=function(e){return this.getLogicTypeByName(e.getQuestionByName("logicTypeName").value)},t.prototype.getSurveyJSON=function(){return{clearInvisibleValues:"onHidden",elements:[{type:"paneldynamic",name:"panel",title:_e("actionsEditorTitle"),titleLocation:"hidden",panelAddText:_e("addNewAction"),panelRemoveButtonLocation:"right",panelCount:0,minPanelCount:1,maxPanelCount:1,templateElements:[{name:"logicTypeName",type:"dropdown",renderAs:"logicoperator",searchEnabled:!1,allowClear:!1,title:G.getString("pe.then"),titleLocation:"left",isRequired:!0,optionsCaption:_e("selectedActionCaption"),requiredErrorText:this.getLocString("pe.conditionActionEmpty")},{name:"logicTypeDescription",type:"html",startWithNewLine:!1,visible:!1},{name:"elementSelector",type:"dropdown",renderAs:"logicoperator",allowClear:!1,titleLocation:"hidden",isRequired:!0,startWithNewLine:!1,visible:!1},{name:"triggerQuestionsPanel",type:"panel",startWithNewLine:!1,visible:!1},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"triggerEditorPanel",type:"panel",visible:!1},{name:"setValueIfPanel",visible:!1,type:"panel",elements:[{name:"setValueExpression",type:"comment",titleLocation:"hidden"}]}]}]}},t.prototype.getSurveyCreationReason=function(){return"logic-item-editor"},t.prototype.resetModified=function(){this.isModifiedValue=!1},t.prototype.isEmpty=function(){return 0===this.panels.length||!(this.panels.length>1)&&!this.getActionModelByPanel(this.panels[0])},t.prototype.apply=function(){if(this.editSurvey.hasErrors())return!1;for(var e=0;e<this.panels.length;e++)this.applyPanel(this.panels[e]);return this.resetModified(),!0},t.prototype.getEditingActions=function(){var e=this;return this.panels.map((function(t){var o=e.getActionModelByPanel(t);return o.updateCurrentLogicAction(e.survey),o.currentLogicAction||o.initialLogicAction})).filter((function(e){return!!e}))},t.prototype.onUpdateQuestionCssClasses=function(e){var t,o=e.cssClasses,r=e.question;o.answered="svc-logic-question--answered","logicTypeName"===r.name&&(r.allowRootStyle=!1,o.control+=" svc-logic-operator svc-logic-operator--action",o.error.root="svc-logic-operator__error",o.onError="svc-logic-operator--error");var n=["elementSelector","setToName","fromName","gotoName"];n.indexOf(r.name)>-1&&(r.allowRootStyle=!1,"setToName"!==r.name&&"fromName"!==r.name||(r.titleLocation="left",r.startWithNewLine=!1),o.control+=" svc-logic-operator svc-logic-operator--question",o.error.root="svc-logic-operator__error",o.onError="svc-logic-operator--error"),(r.isContentElement||this.isSetValueInternalQuestion(r))&&(P(o,r.getType()),o.mainRoot+=" svc-logic-question-value sd-element--with-frame");var a=null===(t=r.parent)||void 0===t?void 0:t.name;if(n.indexOf(r.name)<0&&("triggerEditorPanel"===a||"setValueIfPanel"===a)){var s=r.getType();P(o,s),!i.defaultV2Css[s]&&We[s]&&(T(o,We.question),T(o,We[s]));var l=r.parent.elements.filter((function(e){return n.indexOf(e.name)<0&&"expression"!==e.name}));("runExpression"!==r.name&&"comment"!==s||Array.isArray(l)&&l.length>1)&&(o.mainRoot+=" svc-logic-question-value sd-element--with-frame")}"removeAction"===r.name&&(r.allowRootStyle=!1,o.mainRoot+=" svc-logic-condition-remove-question"),"panel"===r.name&&(o.root+=" svc-logic-paneldynamic",o.buttonAdd+=" svc-logic-operator--action ",o.iconRemove="svc-icon-remove",o.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",o.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",o.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.isSetValueInternalQuestion=function(e){if(this.isSetValueInternalQuestionCore(e))return!0;if(this.isSetValueInternalQuestionCore(e.parentQuestion))return!0;var t=e.parent;return t&&this.isSetValueInternalQuestionCore(t.parentQuestion)},t.prototype.isSetValueInternalQuestionCore=function(e){return"setValue"===(null==e?void 0:e.name)},t.prototype.onUpdatePanelCssClasses=function(e){var t=e.panel,o=e.cssClasses,r=t.name;"triggerEditorPanel"!==r&&"setValueIfPanel"!==r||(o.panel.container+=" svc-logic_trigger-editor"),"triggerQuestionsPanel"===r&&(t.allowRootStyle=!1,o.panel.container+=" svc-logic_trigger-questions"),this.isSetValueInternalQuestionCore(t.parentQuestion)&&P(o,t.getType())},t.prototype.onValueChanged=function(e){this.isModifiedValue=!0,e.question.maxPanelCount=1!==e.value.length||e.value[0].logicTypeName?100:1,this.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))},t.prototype.onQuestionAdded=function(e){"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.titleLocation="left",e.question.startWithNewLine=!1)},t.prototype.onGetQuestionTitleActions=function(e){"setValue"===e.question.name&&(e.titleActions=[])},t.prototype.applyPanel=function(e){var t=this.getActionModelByPanel(e);t.updateCurrentLogicAction(this.survey)&&(this.editableItem.replaceAction(t.currentLogicAction,t.initialLogicAction),t.updateInitialLogicAction())},t.prototype.buildInitialSelectedElements=function(){if(this.initialSelectedElements={},this.editableItem)for(var e=0;e<this.editableItem.actions.length;e++){var t=this.editableItem.actions[e];if(this.isElementSelectorVisible(t.logicType)){var o=t.logicTypeName;this.initialSelectedElements[o]||(this.initialSelectedElements[o]=[]),this.initialSelectedElements[o].push(t.element)}}},t.prototype.buildPanels=function(){if(this.panel.panelCount=0,this.editableItem){this.logicTypeChoices=this.getLogicTypeChoices();for(var e=0;e<this.editableItem.actions.length;e++)this.onPanelAdded(this.panel.addPanel(),this.editableItem.actions[e]);0==this.panel.panelCount&&this.onPanelAdded(this.panel.addPanel(),null)}},t.prototype.onPanelAdded=function(e,t){var o=e.getQuestionByName("logicTypeName");if(o.title=this.panel.panelCount>1?G.getString("pe.and"):G.getString("pe.then"),o.choices=this.logicTypeChoices,o.allowClear=!1,t){var r=Gt.createActionModel(e,t,this.getLogicTypeByName(t.logicTypeName),this.selectorElementsHash);this.setActionModelByPanel(e,r),o.value=t.logicTypeName}var n=e.getQuestionByName("removeAction"),i=n.parentQuestion;return n.linkClickCallback=function(){i&&i.removePanelUI(e)},n.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",n.linkValueText="",e},t.prototype.updatePanelsOnContextChanged=function(){if(this.logicTypeChoices=this.getLogicTypeChoices(),this.context)for(var e=this.panels.length-1;e>=0;e--){var t=this.panels[e];this.isPanelSupportContext(t)||(0===e&&1===this.panels.length?t.getQuestionByName("logicTypeName").clearValue():this.panel.removePanel(e))}for(e=0;e<this.panels.length;e++)this.updateSelectorOnContextChanged(this.panels[e])},t.prototype.isPanelSupportContext=function(e){var t=this.getLogicTypeByPanel(e);return!!t&&t.supportContext(this.context)},t.prototype.updateSelectorOnContextChanged=function(e){var t=e.getQuestionByName("logicTypeName");t.choices=this.logicTypeChoices,t.allowClear=!1;var o=this.getLogicTypeByPanel(e);if(this.isElementSelectorVisible(o)){var r=e.getQuestionByName("elementSelector");r.choices=this.getSelectorChoices(o),r.allowClear=!1}},t.prototype.getLogicTypeChoices=function(){for(var e=[],t=this.editableItem.getVisibleLogicTypes(),o=0;o<t.length;o++){var r=t[o];if(!this.context||r.supportContext(this.context)){var n=new i.ItemValue(r.name,r.displayName);r.isUniqueItem&&(n.visibleIf="logicTypeVisibleIf({item})"),e.push(n)}}return e},t.prototype.onLogicTypeChanged=function(e){var t=this.getLogicTypeByPanel(e);e.getQuestionByName("logicTypeDescription").html=t?t.description:"";var o,r=this.getActionModelByPanel(e);if(r&&(o=r.getSelectedElement(),r.resetElements()),t){var n=Gt.createActionModel(e,r?r.initialLogicAction:null,t,this.selectorElementsHash);this.setActionModelByPanel(e,n),n.isTrigger?n.updatePanelElements(o,this.options):n.updatePanelElements(o,this.getSelectorChoices(n.logicType))}},t.prototype.getLogicTypeByName=function(e){if(!e)return null;for(var t=this.editableItem.getVisibleLogicTypes(),o=0;o<t.length;o++)if(t[o].name==e)return t[o];return null},t.prototype.isElementSelectorVisible=function(e){return!!e&&e.hasSelectorChoices},t.prototype.getLocString=function(e){return G.getString(e)},t.prototype.getElementText=function(e,t){var o="";return t&&(o=e.locTitle.renderedHtml),o||(o=e.name),e.isQuestion&&(o=this.options.getObjectDisplayName(e,"logic-tab:question-selector","condition",o)),o},t.prototype.getSelectorChoices=function(e){if(!e.hasSelectorChoices)return[];for(var t=e.getSelectorChoices(this.survey,this.context),o=[],r=this.options.showTitlesInExpressions,n=0;n<t.length;n++){var s="",l="",c=t[n],p=e.getParentElement(c);p&&(s=p.name+".",l=this.getElementText(p,r)+".");var u=this.getElementText(c,r),d=s+c.name,h=new i.ItemValue(d,l+u);this.selectorElementsHash[d]=c,c[e.propertyName]&&!this.isElementInInitialSelection(e.name,c)&&(h.enableIf="1=2",h.visibleIf="1=2"),o.push(h)}return"asc"===a.logic.questionSortOrder&&te.sortItems(o),o},t.prototype.isElementInInitialSelection=function(e,t){return!!this.initialSelectedElements[e]&&this.initialSelectedElements[e].indexOf(t)>-1},t}(et);o(11);var Yt=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this,t,o)||this;return r.survey=t,r.options=o,r.itemUIHash={},r.options||(r.options=new s),r.setupToolbarItems(),r.update(),r}return Y(t,e),t.prototype.update=function(t,o){var r=this;void 0===t&&(t=null),void 0===o&&(o=null),e.prototype.update.call(this,t,o);var n=this.options.createSurvey(this.getLogicItemSurveyJSON(),"logic-items",this,(function(e){e.css=Bt}));this.itemsSurveyValue=n,this.itemsSurvey.onMatrixRowRemoving.add((function(e,t){var o=r.visibleItems[t.rowIndex];t.allow=r.canRemoveItem(o)})),this.itemsSurvey.onMatrixRowRemoved.add((function(e,t){var o=r.visibleItems[t.rowIndex],n=o===r.editableItem;r.removeItem(o,!1),n&&(r.mode="view",r.updateNewActionState()),r.expressionEditorCanShowBuilder=!!r.editableItem})),this.itemsSurvey.onGetMatrixRowActions.add((function(e,t){!function(e,t,o){var r=It(t,"show-detail");if(r){r.component="sv-action-bar-item",r.iconName="icon-logic-expand",r.innerCss="sl-table__action-button sl-table__detail-button",r.iconSize=48,r.showTitle=!1,r.action=function(){o.showHideDetailPanelClick()};var n=function(){r.iconName=o.isDetailPanelShowing?"icon-logic-collapse":"icon-logic-expand"};e.registerFunctionOnPropertyValueChanged("isRowShowing"+o.id,n),n()}}(t.question,t.actions,t.row),function(e,t,o){Ot(e,t,o);var r=It(t,"remove-row");r&&(r.css="sl-table__action-button sl-table__remove-button")}(t.question,t.actions,t.row)})),this.updateItemsSurveyData(),this.onReadOnlyChanged()},t.prototype.dispose=function(){for(var t in e.prototype.dispose.call(this),this.itemUIHash){var o=this.itemUIHash[t];o.expressionEditor.dispose(),o.itemEditor.dispose()}this.itemUIHash={}},t.prototype.addNewUI=function(){0!=this.items.length&&this.items[this.items.length-1].isNew||this.addNew();var e=this.matrixItems.visibleRows;e[e.length-1].showDetailPanel()},t.prototype.toggleExpressionEditorIsFastEntry=function(){this.expressionEditorIsFastEntry=!this.expressionEditorIsFastEntry,this.expressionEditor&&this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry)},t.prototype.updateEditableItemIsModifiedState=function(){this.editableItem&&(this.editableItem.isModified=!!this.itemEditor&&!!this.expressionEditor&&(this.itemEditor.isModified||this.expressionEditor.isModified(this.editableItem.expression)))},t.prototype.getUnsavedItems=function(){for(var e=[],t=0;t<this.visibleItems.length;t++){var o=this.visibleItems[t],r=this.findLogicItemUI(o);r&&(o.isNew?r.expressionEditor.isEmpty()&&r.itemEditor.isEmpty()||e.push(o):o.isModified&&e.push(o))}return e},t.prototype.getErroredItem=function(e){for(var t=0;t<e.length;t++){var o=e[t];if(this.isErroredItem(o))return o}return null},t.prototype.isErroredItem=function(e){var t=this.findLogicItemUI(e);return!!t&&(t.expressionEditor.hasErrors()||t.itemEditor.hasErrors())},t.prototype.showErroredItem=function(e){var t=this.visibleItems.indexOf(e),o=this.matrixItems.visibleRows,r=t>-1&&t<o.length?o[t]:null;r&&(o.forEach((function(e){return e.hideDetailPanel()})),this.mode="view",r.showDetailPanel(),this.hasErrorInUI())},t.prototype.saveItem=function(e){this.isErroredItem(e)||(this.options&&this.options.startUndoRedoTransaction(),this.doItemApply(e),this.options&&this.options.stopUndoRedoTransaction())},t.prototype.tryLeaveUI=function(e){var t=this;this.updateEditableItemIsModifiedState();var o=this.getUnsavedItems();if(0===o.length)return e&&e(!0),!0;var r=this.getErroredItem(o),n=function(){o.forEach((function(e){return t.saveItem(e)})),e&&e(!0)};if(!r)return n(),!0;var i=function(){t.showErroredItem(r),e&&e(!1)};return this.confirmLeavingOnError(n,i)?void 0:(i(),!1)},t.prototype.confirmLeavingOnError=function(e,t){if(!i.settings.showDialog)return!1;var o=new i.LocalizableString(void 0);o.text=this.getLocString("ed.lg.uncompletedRule_text");var r=i.settings.showDialog({componentName:"sv-string-viewer",data:{locStr:o,locString:o,model:o},onApply:function(){return e(),!0},onCancel:function(){return t(),!0},title:this.getLocString("ed.lg.uncompletedRule_title"),displayMode:"popup"},this.options.rootElement),n=r.footerToolbar,a=n.getActionById("apply");return n.getActionById("cancel").title=this.getLocString("ed.lg.uncompletedRule_cancel"),a.title=this.getLocString("ed.lg.uncompletedRule_apply"),a.innerCss+=" svc-logic-tab__leave-apply-button",r.width="800px",!0},t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),"items"===t&&this.updateItemsSurveyData()},t.prototype.onReadOnlyChanged=function(){var e=this;this.itemsSurvey&&(this.itemsSurvey.mode=this.readOnly?"display":"edit",Object.keys(this.itemUIHash||{}).forEach((function(t){e.updateEditModeLogicItem(e.itemUIHash[t])})))},Object.defineProperty(t.prototype,"expressionEditor",{get:function(){return this.expressionEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditor",{get:function(){return this.itemEditorValue},enumerable:!1,configurable:!0}),t.prototype.getExpressionEditor=function(e){return this.getLogicItemUI(e).expressionEditor},t.prototype.getLogicItemEditor=function(e){return this.getLogicItemUI(e).itemEditor},t.prototype.updateEditModeLogicItem=function(e){e&&(e.expressionEditor.editSurvey.mode=this.readOnly?"display":"edit",e.itemEditor.editSurvey.mode=this.readOnly?"display":"edit")},t.prototype.getLogicItemUI=function(e){var t=this.findLogicItemUI(e);if(!t){var o=e.getContext();t={expressionEditor:this.createExpressionPropertyEditor(),itemEditor:new Kt(e,this.options)},this.updateEditModeLogicItem(t),t.expressionEditor.context=o,t.itemEditor.context=o,t.expressionEditor.text=e.expression,t.expressionEditor.onContextChanged=function(e){t.itemEditor.context=e},this.itemUIHash[e.id]=t}return t},t.prototype.findLogicItemUI=function(e){return this.itemUIHash[e.id]},Object.defineProperty(t.prototype,"expressionSurvey",{get:function(){return this.expressionEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditorSurvey",{get:function(){return this.itemEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemsSurvey",{get:function(){return this.itemsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.items.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrixItems",{get:function(){return this.itemsSurvey.getQuestionByName("items")},enumerable:!1,configurable:!0}),t.prototype.onStartEditing=function(){e.prototype.onStartEditing.call(this),this.expressionEditorValue=this.getExpressionEditor(this.editableItem),this.itemEditorValue=this.getLogicItemEditor(this.editableItem),this.expressionEditorIsFastEntry=!1,this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry),this.expressionEditorCanShowBuilder=Wt.canBuildExpression(this.expressionEditor.text)},t.prototype.onEndEditing=function(){this.updateEditableItemIsModifiedState(),e.prototype.onEndEditing.call(this),this.expressionEditorValue=null,this.itemEditorValue=null},t.prototype.onEditableItemApply=function(){this.doItemApply(this.editableItem),this.editableItem.isSuitable(this.questionFilter,this.actionTypeFilter)?this.updateItemsSurveyData():(this.questionFilter="",this.actionTypeFilter="")},t.prototype.doItemApply=function(e){var t=this.findLogicItemUI(e);t&&(t.expressionEditor.apply(),t.itemEditor.apply(),e.apply(t.expressionEditor.text),e.actions.length!=t.itemEditor.panels.length&&t.itemEditor.setEditableItem(e),t.itemEditor.resetModified(),e.isNew=!1)},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return this.expressionEditor.hasErrorInUI()?(this.errorText=this.expressionEditor.errorText,!0):!!this.itemEditor.hasErrors()&&(this.errorText=_e("actionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.getExpressionText=function(){return this.expressionEditor.text},t.prototype.getEditingActions=function(){return this.itemEditor.getEditingActions()},t.prototype.getLogicItemSurveyJSON=function(){var e=this.survey.creator,t=e&&e.useTableViewInLogicTab?this.getTwoColumnsLayout():this.getOneColumnLayout();return $e(t),t},t.prototype.getTwoColumnsLayout=function(){return{elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,columns:[{cellType:"linkvalue",name:"conditions",title:this.getLocString("ed.lg.conditions")},{cellType:"linkvalue",name:"actions",title:this.getLocString("ed.lg.actions")}]}]}},t.prototype.getOneColumnLayout=function(){return{elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",showColumnHeader:!1,detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,showHeader:!1,columns:[{cellType:"linkvalue",name:"rules",showTooltip:!0,width:"100%"}]}]}},t.prototype.createExpressionPropertyEditor=function(){var e=this,t=new Wt(this.survey,null,this.options);return t.isModal=!1,t.editSurvey.onValueChanged.add((function(t,o){"textEditor"===o.name&&(e.expressionEditorCanShowBuilder=Wt.canBuildExpression(o.value))})),t},t.prototype.getVisibleItems=function(){var e=this;return this.items.filter((function(t){return t.isNew||t.isSuitable(e.questionFilter,e.actionTypeFilter)}))},t.prototype.getDataFromItem=function(e){var t=this.survey.creator;return t&&t.useTableViewInLogicTab?{conditions:e.expressionText,actions:e.actionsText}:{rules:this.getLogicItemDisplayText(e)}},t.prototype.getLogicItemDisplayText=function(e){var t=e.getDisplayText();return this.options?this.options.onLogicGetTitleCallback(e.expression,e.expressionText,t,e):t},t.prototype.updateItemsSurveyData=function(){var e=this;if(this.itemsSurvey){var t=[];this.visibleItems=this.getVisibleItems(),this.visibleItems.forEach((function(o){t.push(e.getDataFromItem(o))})),this.matrixItems.onHasDetailPanelCallback=function(e){return!0},this.matrixItems.onCreateDetailPanelCallback=function(t,o){t.onDetailPanelShowingChanged=function(){if(e.expressionEditorCanShowBuilder=t.isDetailPanelShowing,t.isDetailPanelShowing){if("view"===e.mode){var r=e.visibleItems[t.rowIndex-1];e.editItem(r)}var n=o.getQuestionByName("conditions"),i=o.getQuestionByName("actions");n.embeddedSurvey=e.expressionEditor.editSurvey,i.embeddedSurvey=e.itemEditorValue.editSurvey,e.updateRowIsAdditionalClasses(t.rowIndex-1,!1)}else e.mode="view",e.updateRenderedRows();e.updateNewActionState()},o.addNewQuestion("embeddedsurvey","conditions"),o.addNewQuestion("embeddedsurvey","actions"),o.footerActions.push({id:"saveDetailPanel",innerCss:"sl-panel__done-button",title:e.getLocString("pe.doneEditing"),action:function(){e.saveEditableItem()&&t.hideDetailPanel(!0)}})},this.matrixItems.onCellCreatedCallback=function(e){e.cell.question.linkClickCallback=function(){e.row.isDetailPanelShowing?e.row.hideDetailPanel():e.row.showDetailPanel()},e.cell.question.showClear=!1,e.cell.question.allowClear=!1},this.matrixItems.value=t,this.updateRenderedRows()}},t.prototype.updateRenderedRows=function(){var e=this;this.visibleItems.forEach((function(t,o){e.updateRowIsAdditionalClasses(o,e.visibleItems[o].isModified||e.visibleItems[o].isNew)}))},t.prototype.updateRowIsAdditionalClasses=function(e,t){this.matrixItems.renderedTable&&(this.matrixItems.renderedTable.rows.filter((function(e){return e.visible}))[e].isAdditionalClasses=t)},t.prototype.updateNewActionState=function(){this.addNewButton.enabled="new"!==this.mode},t.prototype.setupToolbarItems=function(){var e=this;this.addNewButton=new i.Action({id:"svd-logic-addNew",title:this.addNewText,tooltip:this.addNewText,component:"sv-action-bar-item",enabled:!0,action:function(){e.addNewUI()}})},Object.defineProperty(t.prototype,"addNewText",{get:function(){return _e("addNewItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyTabPlaceholder",{get:function(){return _e("empty_tab")},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"itemsSurveyValue",void 0),Z([Object(i.property)()],t.prototype,"expressionEditorIsFastEntry",void 0),Z([Object(i.property)()],t.prototype,"expressionEditorCanShowBuilder",void 0),Z([Object(i.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"questionFilter",void 0),Z([Object(i.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"actionTypeFilter",void 0),t}(Qe),Xt=function(){function e(e){this.creator=e,e.addPluginTab("logic",this),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)}))}return e.prototype.activate=function(){var e=this;this.model=new Yt(this.creator.survey,this.creator),this.filterQuestionAction.title=this.createFilterQuestionTitleUpdater(),this.filterQuestionAction.visible=!0,this.filterActionTypeAction.title=this.createFilterTypeTitleUpdater(),this.filterActionTypeAction.visible=!0,this.fastEntryAction&&(this.fastEntryAction.visible=!0,this.fastEntryAction.active=this.model.expressionEditorIsFastEntry,this.fastEntryAction.enabled=!1),this.model.onPropertyChanged.add((function(t,o){e.fastEntryAction&&"expressionEditorIsFastEntry"===o.name&&(e.fastEntryAction.active=e.model.expressionEditorIsFastEntry),e.fastEntryAction&&"expressionEditorCanShowBuilder"===o.name&&(e.fastEntryAction.enabled=e.model.expressionEditorCanShowBuilder)}))},e.prototype.createFilterTypeTitleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){var t=e.creator.locale;t||(t="en");var o=e.model.actionTypeFilter,r=e.showAllActionTypesText;return o?e.model.getTypeByName(o).displayName:r}))},e.prototype.createFilterQuestionTitleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){var t=e.creator.locale;t||(t="en");var o=e.model.questionFilter,r=e.showAllQuestionsText;return o||r}))},e.prototype.update=function(){this.model&&this.model.update(this.creator.survey)},e.prototype.canDeactivateAsync=function(e){var t=this;this.model?this.model.tryLeaveUI((function(o){o?e():t.creator.notify(G.getString("ed.lg.expressionInvalid"),"error")})):e()},e.prototype.deactivate=function(){return this.disposeObjs(),!0},e.prototype.dispose=function(){this.disposeObjs()},e.prototype.disposeObjs=function(){this.filterActionTypeAction.title=void 0,this.filterQuestionAction.title=void 0,this.model&&(this.model.dispose(),this.model=void 0),this.filterQuestionAction.visible=!1,this.filterActionTypeAction.visible=!1,this.fastEntryAction&&(this.fastEntryAction.visible=!1)},e.prototype.createActions=function(){var e=this,t=[],o=new i.ListModel([{id:null,title:this.showAllQuestionsText}],(function(t){e.model.questionFilter=t.id?t.id:"",r.toggleVisibility()}),!0);o.locOwner=this.creator;var r=new i.PopupModel("sv-list",{model:o},"bottom","center");r.onShow=function(){var t=e.model.getUsedQuestions().map((function(t){return{id:t.name,title:e.creator.getObjectDisplayName(t,"logic-tab:question-filter","condition",t.name)}}));te.sortItems(t,"title"),r.contentComponentData.model.setItems([{id:null,title:e.showAllQuestionsText}].concat(t))},this.filterQuestionAction=new i.Action({id:"svc-logic-filter-question",visible:!1,component:"sv-action-bar-item-dropdown",popupModel:r,action:function(){r.toggleVisibility()}}),t.push(this.filterQuestionAction);var n=new i.ListModel([{id:null,title:this.showAllActionTypesText}],(function(t){e.model.actionTypeFilter=t.id?t.id:"",a.toggleVisibility()}),!0);n.locOwner=this.creator;var a=new i.PopupModel("sv-list",{model:n},"bottom","center");return a.onShow=function(){var t=e.model.getUsedActionTypes().map((function(e){return{id:e.name,title:e.displayName}}));te.sortItems(t,"title"),a.contentComponentData.model.setItems([{id:null,title:e.showAllActionTypesText}].concat(t))},this.filterActionTypeAction=new i.Action({id:"svc-logic-filter-actiontype",visible:!1,component:"sv-action-bar-item-dropdown",popupModel:a,action:function(){a.toggleVisibility()}}),t.push(this.filterActionTypeAction),this.creator.allowEditExpressionsInTextEditor&&(this.fastEntryAction=new i.Action({id:"svc-logic-fast-entry",iconName:"icon-fast-entry",locTitleName:"pe.fastEntry",visible:!1,component:"sv-action-bar-item",action:function(){e.model.toggleExpressionEditorIsFastEntry()}}),t.push(this.fastEntryAction)),t},Object.defineProperty(e.prototype,"showAllQuestionsText",{get:function(){return _e("showAllQuestions")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showAllActionTypesText",{get:function(){return _e("showAllActionTypes")},enumerable:!1,configurable:!0}),e}(),$t=function(){function e(){this._ignoreChanges=!1,this._isExecuting=!1,this._preparingTransaction=null,this._transactions=[],this._currentTransactionIndex=-1,this.transactionCounter=0}return e.prototype.onPropertyValueChanged=function(e,t,o,r,n){if(!Ue.isCopyObject(r)&&!this.isIgnoring&&!0!==r.ignoreUndoRedo){var i=this._preparingTransaction,a=n?new oo(e,r,n):new to(e,t,o,r);if(!i)return(i=new eo(e)).addAction(a),void this._addTransaction(i);i.addAction(a)}},e.prototype.isCorrectProperty=function(e,t){var o=i.Serializer.getOriginalProperty(e,t);return!!o&&o.isSerializable},e.prototype.tryMergeTransaction=function(e,t,o){if("name"===t)return!1;var r=this._getCurrentTransaction();return!(!r||0==r.actions.length)&&r.actions[r.actions.length-1].tryMerge(e,t,o)},e.prototype.isCopyObject=function(e){},e.prototype._cutOffTail=function(){this._currentTransactionIndex+1!==this._transactions.length&&(this._transactions.length=this._currentTransactionIndex+1)},Object.defineProperty(e.prototype,"isIgnoring",{get:function(){return this._ignoreChanges||this._isExecuting},enumerable:!1,configurable:!0}),e.prototype._addTransaction=function(e){e.isEmpty()||(this._cutOffTail(),this._transactions[this._currentTransactionIndex]!==e&&(this._transactions.push(e),this._currentTransactionIndex++),this.canUndoRedoCallback())},e.prototype._getCurrentTransaction=function(){var e=this._currentTransactionIndex;return this._transactions[e]},e.prototype._getNextTransaction=function(){var e=this._currentTransactionIndex;return this._transactions[e+1]},e.prototype.notifyChangesFinished=function(e,t){void 0===t&&(t=!1),e.actions.length>0&&this.changesFinishedCallback&&this.changesFinishedCallback(e.actions,t)},e.prototype.canUndoRedoCallback=function(){},e.prototype.startTransaction=function(e){this.isIgnoring||(this.transactionCounter++,this._preparingTransaction||(this._preparingTransaction=new eo(e)))},e.prototype.stopTransaction=function(){this.isIgnoring||(this.transactionCounter>0&&this.transactionCounter--,!this._preparingTransaction||this.transactionCounter>0||(this._addTransaction(this._preparingTransaction),0===this.transactionCounter&&this.notifyChangesFinished(this._preparingTransaction),this._preparingTransaction=null))},e.prototype.setUndoCallbackForTransaction=function(e){this._preparingTransaction&&(this._preparingTransaction.undoCallback=e)},Object.defineProperty(e.prototype,"isProcessingUndoRedo",{get:function(){return!0===this._isExecuting},enumerable:!1,configurable:!0}),e.prototype.canUndo=function(){return!!this._getCurrentTransaction()},e.prototype.undo=function(){var e=this._getCurrentTransaction();this.canUndo()&&(this._isExecuting=!0,e.rollback(),this._isExecuting=!1,this._currentTransactionIndex--,this.canUndoRedoCallback(),this.notifyChangesFinished(e,!0))},e.prototype.canRedo=function(){return!!this._getNextTransaction()},e.prototype.redo=function(){var e=this._getNextTransaction();this.canRedo()&&(this._isExecuting=!0,e.apply(),this._isExecuting=!1,this._currentTransactionIndex++,this.canUndoRedoCallback(),this.notifyChangesFinished(e))},e.prototype.suspend=function(){this._ignoreChanges=!0},e.prototype.resume=function(){this._ignoreChanges=!1},e}(),eo=function(){function e(e){this._name=e,this._actions=[],this.undoCallback=function(){}}return e.prototype.apply=function(){for(var e=this._actions,t=0;t<e.length;t++){e[t].apply()}},e.prototype.rollback=function(){for(var e=this._actions,t=e.length-1;t>=0;t--){e[t].rollback()}this.undoCallback()},e.prototype.addAction=function(e){this._actions.push(e)},e.prototype.isEmpty=function(){return 0===this._actions.length},Object.defineProperty(e.prototype,"actions",{get:function(){return this._actions},enumerable:!1,configurable:!0}),e}(),to=function(){function e(e,t,o,r){this._propertyName=e,this._oldValue=t,this._newValue=o,this._sender=r,this.tickCount=(new Date).getTime()}return e.prototype.apply=function(){this._sender[this._propertyName]=this._newValue},e.prototype.rollback=function(){this._sender[this._propertyName]=this._oldValue},e.prototype.getChanges=function(e){return void 0===e&&(e=!1),{object:this._sender,propertyName:this._propertyName,oldValue:e?this._newValue:this._oldValue,newValue:e?this._oldValue:this._newValue}},e.prototype.getDeletedElement=function(e){},e.prototype.getInsertedElement=function(e){},e.prototype.getIndex=function(){return-1},e.prototype.tryMerge=function(t,o,r){if(t!==this._sender||o!==this._propertyName||r==this._oldValue)return!1;var n=i.Serializer.getOriginalProperty(t,o);return!(!n||"string"!==n.type&&"text"!==n.type)&&(!((new Date).getTime()-this.tickCount>e.maximumMergeTime)&&(this._newValue=r,!0))},e.maximumMergeTime=1e3,e}(),oo=function(){function e(e,t,o){this._propertyName=e,this._sender=t,this._index=0,this._itemsToAdd=[],this._deletedItems=[],this.survey=t.getSurvey(),this._index=o.index,this._itemsToAdd=o.itemsToAdd,this._deletedItems=o.deletedItems}return e.prototype.apply=function(){this.rollback()},e.prototype.rollback=function(){if(this._sender=this.getSenderElement(),this._sender){var e=this._sender[this._propertyName],t=this._index,o=this._itemsToAdd.length,r=this.getItemsToAdd();this._deletedItems=e.splice.apply(e,[t,o].concat(r)),this._itemsToAdd=[].concat(r)}},e.prototype.getChanges=function(){return{object:this._sender,propertyName:this._propertyName,oldValue:this._deletedItems,newValue:this._itemsToAdd}},e.prototype.getDeletedElement=function(e){return this.getMovedElement(this._deletedItems,this._itemsToAdd,e)},e.prototype.getInsertedElement=function(e){return this.getMovedElement(this._itemsToAdd,this._deletedItems,e)},e.prototype.getIndex=function(){return this._index},e.prototype.getMovedElement=function(e,t,o){var r=o?t:e;if(Array.isArray(r)&&1===r.length)return r[0]},e.prototype.tryMerge=function(e,t,o){return!1},e.prototype.getSenderElement=function(){if(!this._sender.isDisposed||!this.survey)return this._sender;var e=this._sender.name;return!0===this._sender.isPage?this.survey.getPageByName(e):!0===this._sender.isPanel?this.survey.getPanelByName(e):!0===this._sender.isQuestion?this.survey.getQuestionByName(e):this._sender},e.prototype.getItemsToAdd=function(){for(var e=[],t=0;t<this._deletedItems.length;t++){var o=this._deletedItems[t];if(o.isDisposed&&o.getType){var r=o.toJSON();(o=i.Serializer.createClass(o.getType())).fromJSON(r)}e.push(o)}return e},e}(),ro=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.undoRedoManager=void 0,o.onBeforeUndo=new i.EventBase,o.onBeforeRedo=new i.EventBase,o.updateSurvey(),o}return Y(t,e),t.prototype.onSurveyPropertyValueChangedCallback=function(e,t,o,r,n){this.undoRedoManager&&this.undoRedoManager.isCorrectProperty(r,e)&&(this.undoRedoManager.tryMergeTransaction(r,e,o)?this.creator.notifySurveyPropertyChanged({name:e,target:r,oldValue:t,newValue:o}):(this.undoRedoManager.startTransaction(e+" changed"),this.undoRedoManager.onPropertyValueChanged(e,t,o,r,n),this.creator.updateElementsOnLocaleChanged(r,e),this.creator.updateConditionsOnNameChanged(r,e,t),this.undoRedoManager.stopTransaction()))},t.prototype.updateSurvey=function(){var e=this,t=this.creator.survey;t&&(t.onPropertyValueChangedCallback=function(t,o,r,n,i){e.onSurveyPropertyValueChangedCallback(t,o,r,n,i)}),this.undoRedoManager=new $t,this.undoRedoManager.changesFinishedCallback=function(t,o){if(!e.notifySurveyMoveItem(t,o))for(var r=t.length-1;r>=0;r--){var n=t[r];if(n){var i=n.getChanges(o);e.creator.notifySurveyPropertyChanged({name:i.propertyName,target:i.object,oldValue:i.oldValue,newValue:i.newValue})}}},this.undoRedoManager.canUndoRedoCallback=function(){e.updateUndeRedoActions()}},t.prototype.notifySurveyMoveItem=function(e,t){e.length;var o=e[0],r=e[1];if(!o||!r)return!1;var n=o.getChanges(t),i=r.getChanges(t);if(n.object!==i.object||n.propertyName!==i.propertyName)return!1;var a=o.getDeletedElement(t),s=o.getInsertedElement(t),l=r.getDeletedElement(t),c=r.getInsertedElement(t);if(a===s||a!==c&&s!==l)return!1;var p=a?o.getIndex():r.getIndex(),u=s?o.getIndex():r.getIndex();return this.creator.notifySurveyItemMoved({arrayName:n.propertyName,parent:n.object,element:a||s,indexFrom:t?u:p,indexTo:t?p:u}),!0},t.prototype.selectElementAfterUndo=function(){this.selectElementAfterUndoCore(this.creator.selectedElement)},t.prototype.selectElementAfterUndoCore=function(e){!e||e.isDisposed||!e.getSurvey()||this.creator.isObjQuestion(e)&&!e.parent?this.creator.selectElement(this.creator.survey):this.creator.selectElement(e)},t.prototype.undo=function(){if(this.undoRedoManager){this.undoRedoManager.suspend();var e={canUndo:this.undoRedoManager.canUndo()};this.onBeforeUndo.fire(this.creator,e),this.creator.onBeforeUndo.fire(this.creator,e),e.canUndo&&(this.undoRedoManager.undo(),this.selectElementAfterUndo()),this.undoRedoManager.resume()}},t.prototype.redo=function(){if(this.undoRedoManager){var e={canRedo:this.undoRedoManager.canRedo()};if(this.onBeforeRedo.fire(this.creator,e),this.creator.onBeforeRedo.fire(this.creator,e),e.canRedo){this.undoRedoManager.redo();this.selectElementAfterUndo()}}},t.prototype.startTransaction=function(e){void 0===e&&(e=""),this.undoRedoManager&&this.undoRedoManager.startTransaction(e)},t.prototype.stopTransaction=function(){this.undoRedoManager&&this.undoRedoManager.stopTransaction()},t.prototype.createActions=function(){var e=this,t=[];return this.undoAction=new i.Action({id:"action-undo",iconName:"icon-undo",locTitleName:"ed.undo",showTitle:!1,visible:new i.ComputedUpdater((function(){return"designer"===e.creator.activeTab})),needSeparator:new i.ComputedUpdater((function(){return e.creator.isMobileView})),action:function(){return e.undo()}}),this.redoAction=new i.Action({id:"action-redo",iconName:"icon-redo",locTitleName:"ed.redo",showTitle:!1,visible:new i.ComputedUpdater((function(){return"designer"===e.creator.activeTab})),action:function(){return e.redo()}}),t.push(this.undoAction),t.push(this.redoAction),this.updateUndeRedoActions(),t},t.prototype.updateUndeRedoActions=function(){this.undoAction.enabled=this.undoRedoManager.canUndo(),this.redoAction.enabled=this.undoRedoManager.canRedo()},Z([Object(i.property)()],t.prototype,"undoRedoManager",void 0),t}(i.Base),no=function(){function e(e){var t=this;this.creator=e,this.model=void 0,this.model=new ro(e),this.model.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),e.registerShortcut("undo",{affectedTab:"designer",hotKey:{ctrlKey:!0,keyCode:90},macOsHotkey:{keyCode:90},execute:function(){return t.model.undo()}}),e.registerShortcut("redo",{affectedTab:"designer",hotKey:{ctrlKey:!0,keyCode:89},macOsHotkey:{keyCode:89},execute:function(){return t.model.redo()}})}return e.prototype.activate=function(){},e.prototype.deactivate=function(){return!0},e.prototype.update=function(){},e.prototype.addFooterActions=function(){this.model.undoAction&&this.creator.footerToolbar.actions.splice(2,0,this.model.undoAction),this.model.redoAction&&this.creator.footerToolbar.actions.splice(3,0,this.model.redoAction)},e}();function io(e,t){return void 0===t&&(t="undoRedoManager"),function(o,r,n){var i=n.value;return n.value=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=this[t];try{a&&a.startTransaction(e||r);var s=i.apply(this,o);return s}finally{a&&a.stopTransaction()}},n}}function ao(e){return void 0===e&&(e="undoRedoManager"),function(t,o,r){var n=r.value;return r.value=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var r=this[e];try{r&&r.suspend();var i=n.apply(this,t);return i}finally{r&&r.resume()}},r}}var so=function(e){function t(t,o,r,n){var i=e.call(this,{id:"sv_item_selector_"+t.toString(),title:r})||this;return i.data=o,i.level=n,i}return Y(t,e),t.prototype.hasText=function(e){return!e||(this.textInLow||(this.textInLow=this.title.toLocaleLowerCase()),this.textInLow.indexOf(e)>-1)},t}(i.Action),lo=function(){function e(e,t,o){void 0===o&&(o=void 0),this.creator=e,this.getObjectDisplayName=o,this.surveyValue=t,this.rebuild()}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.itemsValue},enumerable:!1,configurable:!0}),e.prototype.getItemByObj=function(e){for(var t=this.items,o=0;o<t.length;o++)if(t[o].data===e)return t[o];return null},e.prototype.filterByText=function(e){this.filteredTextInLow=e?e.toLocaleLowerCase():"",this.updateItemsVisibility()},e.prototype.rebuild=function(){var e=[];this.deepestLevel=0;var t=this.createItem(this.survey,null);e.push(t);for(var o=0;o<this.survey.pages.length;o++){var r=this.survey.pages[o],n=t;if(!this.creator||"single"!==this.creator.pageEditMode){var i=this.createItem(r,t);e.push(i),n=i}this.buildElements(e,this.getElements(r),n)}this.itemsValue=e},e.prototype.updateItemsVisibility=function(){for(var e=this.deepestLevel;e>=0;e--)this.updateItemsLevelVisibility(e)},e.prototype.updateItemsLevelVisibility=function(e){for(var t=0;t<this.items.length;t++){var o=this.items[t];o.level===e&&(o.visible=this.hasVisibleChildren(t)||o.hasText(this.filteredTextInLow))}},e.prototype.hasVisibleChildren=function(e){for(var t=this.items[e].level,o=e+1;o<this.items.length;o++){if(this.items[o].level<=t)return!1;if(this.items[o].visible)return!0}return!1},e.prototype.getElements=function(e){return te.getElements(e)},e.prototype.buildElements=function(e,t,o){for(var r=0;r<t.length;r++){var n=t[r],i=this.createItem(n,o);e.push(i),this.buildElements(e,this.getElements(n),i)}},e.prototype.createItem=function(t,o){var r=new so(e.uniqueId++,t,this.getText(t),null!=o?o.level+1:0);return r.level>this.deepestLevel&&(this.deepestLevel=r.level),r},e.prototype.getText=function(e){return this.getObjectDisplayName?this.getObjectDisplayName(e,"property-grid-header:element-list","property-grid",void 0):te.getObjectName(e,!1)},e.uniqueId=0,e}(),co=function(e){function t(t,o){void 0===o&&(o=void 0);var r=e.call(this)||this;return r.creator=t,r.getObjectDisplayName=o,r}return Y(t,e),Object.defineProperty(t.prototype,"list",{get:function(){return this.listModelValue},enumerable:!1,configurable:!0}),t.prototype.show=function(e,t,o){var r=this;this.selector=new lo(this.creator,e,this.getObjectDisplayName);var n=this.selector.getItemByObj(t);this.listModelValue?(this.listModelValue.setItems(this.selector.items),this.listModelValue.selectedItem=n):(this.listModelValue=new i.ListModel(this.selector.items,(function(e){o(e.data)}),!0,n),this.listModelValue.setOnFilterStringChangedCallback((function(e){r.selector.filterByText(e)}))),this.isVisible=!0},t.prototype.refresh=function(){this.listModelValue.refresh()},Z([Object(i.property)()],t.prototype,"isVisible",void 0),t}(i.Base),po=function(e){function t(){var t=e.call(this)||this;return t.highlightedEditorClass=" spg-editor--highlighted",t.searchActionBar=new i.ActionContainer,t.filterStringPlaceholder=z("ed.propertyGridFilteredTextPlaceholder"),t.propertyGridNoResultsFound=z("ed.propertyGridNoResultsFound"),t.allMatches=[],t.initActionBar(),t}return Y(t,e),t.prototype.expandAllParents=function(e){e&&(e.isCollapsed&&e.expand(),this.expandAllParents(e.parent),this.expandAllParents(e.parentQuestion))},t.prototype.switchHighlightedEditor=function(e){var t=this;this.currentMatchIndex=e;var o=this.currentMatch;this.currentMatch=this.allMatches[e],null==o||o.updateElementCss(),this.currentMatch&&o!==this.currentMatch&&(this.currentMatch.updateElementCss(),this.expandAllParents(this.currentMatch),setTimeout((function(){A(t.currentMatch.id)}),10)),this.updatedMatchCounterText(e)},t.prototype.updatedMatchCounterText=function(e){var t=this.allMatches.length;if(1===t)this.matchCounterText="";else if(this.currentMatch){var o=e+1;this.matchCounterText=[o,t].join("/")}else this.matchCounterText=this.filterString?this.propertyGridNoResultsFound:""},t.prototype.navigateToEditor=function(e){e<0&&(e=this.allMatches.length-1),e>=this.allMatches.length&&(e=0),this.switchHighlightedEditor(e)},t.prototype.getAllMatches=function(e){var t=i.settings.comparator.normalizeTextCallback,o=t(e,"search");return o=o.toLocaleLowerCase().trim(),this.survey.getAllQuestions().filter((function(e){return e.isVisible})).filter((function(e){var r=e.name+"|"+e.title+"|"+e.description;return r&&(r=(r=t(r,"search")).toLocaleLowerCase().trim()),-1!==r.indexOf(o)}))},t.prototype.setFiterString=function(e){if(e)if(this.allMatches=this.getAllMatches(e),0!==this.allMatches.length){var t=this.allMatches.indexOf(this.currentMatch);this.switchHighlightedEditor(-1===t?0:t)}else this.reset();else this.reset()},t.prototype.reset=function(){this.allMatches=[],this.currentMatchIndex=-1;var e=this.currentMatch;this.currentMatch=void 0,null==e||e.updateElementCss(),this.updatedMatchCounterText(-1)},t.prototype.initActionBar=function(){var e=this,t=[];t.push(new i.Action({id:"svd-grid-search-prev",iconName:"icon-previous_16x16",component:"sv-action-bar-item",title:z("ed.prevFocus"),showTitle:!1,iconSize:16,innerCss:"spg-search-editor_bar-item",visible:new i.ComputedUpdater((function(){return e.allMatches.length>1})),action:function(){e.allMatches.length>0&&e.navigateToEditor(e.currentMatchIndex-1)}})),t.push(new i.Action({id:"svd-grid-search-next",iconName:"icon-next_16x16",component:"sv-action-bar-item",title:z("ed.nextFocus"),showTitle:!1,iconSize:16,innerCss:"spg-search-editor_bar-item",visible:new i.ComputedUpdater((function(){return e.allMatches.length>1})),action:function(){e.allMatches.length>0&&e.navigateToEditor(e.currentMatchIndex+1)}})),t.push(new i.Action({id:"svd-grid-search-close",iconName:"icon-clear_16x16",component:"sv-action-bar-item",title:z("ed.close"),showTitle:!1,iconSize:16,innerCss:"spg-search-editor_bar-item",visible:new i.ComputedUpdater((function(){return!!e.filterString})),action:function(){e.clearFilterString()}})),this.searchActionBar.setItems(t)},t.prototype.setSurvey=function(e){if(this.clearFilterString(),this.survey=e,this.survey){var t=this;this.survey.onUpdateQuestionCssClasses.add((function(e,o){var r=o.cssClasses;o.question===t.currentMatch&&(r.mainRoot+=t.highlightedEditorClass)}))}},t.prototype.clearFilterString=function(){this.filterString=""},t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),"filterString"===t&&this.setFiterString(r)},t.prototype.dispose=function(){this.searchActionBar.dispose(),e.prototype.dispose.call(this)},Z([Object(i.property)()],t.prototype,"survey",void 0),Z([Object(i.property)()],t.prototype,"isVisible",void 0),Z([Object(i.property)()],t.prototype,"filterString",void 0),Z([Object(i.property)()],t.prototype,"matchCounterText",void 0),Z([Object(i.property)()],t.prototype,"allMatches",void 0),t}(i.Base),uo=function(e){function t(t,o){var r=e.call(this)||this;return r.propertyGridModel=t,r.creator=o,r.searchManager=new po,r.searchEnabled=a.propertyGrid.enableSearch,r.selectedElementName=r.getTitle(),r.propertyGridModel.objValueChangedCallback=function(){r.onSurveyChanged()},r.propertyGridModel.changedFromActionCallback=function(e,t){r.selectionController&&r.selectionController.selectFromAction(e,t)},r.initActions(),r.creator.onPropertyChanged.add((function(e,t){"sidebarLocation"===t.name&&(r.selectorPopupModel.horizontalPosition="right"==r.creator.sidebarLocation?"left":"right")})),r.onSurveyChanged(),r}return Y(t,e),t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),this.nextSelectionAction&&"hasNext"===t&&(this.nextSelectionAction.enabled=this.hasNext),this.prevSelectionAction&&"hasPrev"===t&&(this.prevSelectionAction.enabled=this.hasPrev)},Object.defineProperty(t.prototype,"selectionController",{get:function(){return this.creator.selectionHistoryController},enumerable:!1,configurable:!0}),t.prototype.onSurveyChanged=function(){var e=this;this.survey=this.propertyGridModel.survey,this.searchManager.setSurvey(this.survey),this.survey&&this.survey.onValueChanged.add((function(t,o){"name"!=o.name&&"title"!=o.name||e.updateTitle()})),this.updateTitle(),this.selectionController&&(this.hasPrev=this.selectionController.hasPrev,this.hasNext=this.selectionController.hasNext)},t.prototype.updateTitle=function(){var e=this.getTitle();this.selectedElementName=e,this.objectSelectionAction.title=this.selectedElementName},t.prototype.getTitle=function(){var e=this.getSelectedObj();if(!e)return"";var t=te.getObjectName(e,this.propertyGridModel.options.showObjectTitles);return this.propertyGridModel.options.getObjectDisplayName(e,"property-grid-header:selected-element","property-grid-title",t)},t.prototype.getSelectedObj=function(){return this.propertyGridModel.obj},t.prototype.initActions=function(){var e=this;a.propertyGrid.showNavigationButtons&&(this.prevSelectionAction=new i.Action({id:"svd-grid-history-prev",iconName:"icon-arrow-left",component:"sv-action-bar-item",title:z("ed.prevSelected"),showTitle:!1,enabled:this.hasPrev,action:function(){e.selectionController.prev()}}),this.nextSelectionAction=new i.Action({id:"svd-grid-history-next",iconName:"icon-arrow-right",component:"sv-action-bar-item",title:z("ed.nextSelected"),showTitle:!1,enabled:this.hasNext,action:function(){e.selectionController.next()}}));var t=new co(this.creator,(function(t,o,r,n){return e.propertyGridModel.options.getObjectDisplayName(t,o,r,n)}));this.selectorPopupModel=new i.PopupModel("svc-object-selector",{model:t},"bottom","center"),this.selectorPopupModel.cssClass+=" svc-object-selector",this.selectorPopupModel.displayMode=this.creator.isTouch?"overlay":"popup",this.objectSelectionAction=new i.Action({id:"svd-grid-object-selector",title:this.selectedElementName,css:"sv-action--object-selector sv-action-bar-item--secondary",component:"sv-action-bar-item-dropdown",disableHide:!0,action:function(){t.show(e.selectionController.creator.survey,e.propertyGridModel.obj,(function(t){e.selectionController.selectFromAction(t,"name"),e.selectorPopupModel.toggleVisibility()})),e.selectorPopupModel.toggleVisibility(),t.list.scrollToSelectedItem()},popupModel:this.selectorPopupModel})},t.prototype.dispose=function(){this.searchManager.dispose(),this.nextSelectionAction.dispose(),this.prevSelectionAction.dispose(),this.objectSelectionAction.dispose(),this.selectorPopupModel.dispose(),e.prototype.dispose.call(this)},Z([Object(i.property)()],t.prototype,"hasPrev",void 0),Z([Object(i.property)()],t.prototype,"hasNext",void 0),Z([Object(i.property)()],t.prototype,"survey",void 0),Z([Object(i.property)()],t.prototype,"selectedElementName",void 0),Z([Object(i.property)({onSet:function(e,t){t.searchManager.isVisible=e}})],t.prototype,"searchEnabled",void 0),t}(i.Base),ho=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.onPagesChanged=o.addEvent(),o.onCurrentPageChanged=o.addEvent(),o.currentPageChangedFunc=function(e,t){o.page2Display=o.survey.currentPage,o.onCurrentPageChanged.fire(o,{})},o.onSurveyChanged(),o}return Y(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pages",{get:function(){return this.survey.pages},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e,this.page2Display=e},enumerable:!1,configurable:!0}),t.prototype.selectPage=function(e){this.currentPage=e,this.creator.selectElement(e)},t.prototype.getDisplayName=function(e){return e?this.creator.getObjectDisplayName(e,"page-selector"):""},t.prototype.raisePagesChanged=function(){this.page2Display=this.survey.currentPage,this.onPagesChanged.fire(this,{})},t.prototype.onSurveyChanged=function(){this.removeFunctions(),this.surveyValue=this.creator.survey,this.surveyValue&&(this.raisePagesChanged(),this.page2Display=this.survey.currentPage,this.surveyValue.onCurrentPageChanged.add(this.currentPageChangedFunc))},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.removeFunctions()},t.prototype.removeFunctions=function(){this.surveyValue&&!this.surveyValue.isDisposed&&this.surveyValue.onCurrentPageChanged.remove(this.currentPageChangedFunc)},Z([Object(i.property)()],t.prototype,"page2Display",void 0),t}(i.Base);var go=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.insideEmptyContainer=null,t.prevIsEdge=null,t.dragOverIndicatorElement=null,t.isDraggedElementSelected=!1,t.doBanDropHere=function(){t.removeDragOverMarker(t.dragOverIndicatorElement),t.removeDragOverMarker(t.dropTarget)},t.doDrop=function(){var e;if(t.dropTarget){var o=t.parentElement,r=t.draggedElement,n=t.draggedElement,a=n.parent||n.page;a&&(o.survey.startMovingQuestion(),a.removeElement(n));var s=(null===(e=t.dragOverIndicatorElement)||void 0===e?void 0:e.isPanel)?t.dragOverIndicatorElement:t.dropTarget;return(s.isPanel||s.isPage)&&t.dragOverLocation==i.DragTypeOverMeEnum.InsideEmptyPanel?s.insertElement(n):(s.parent||s.page).insertElement(n,s,function(){switch(t.dragOverLocation){case 4:return"top";case 5:return"right";case 6:return"bottom";case 7:return"left";default:return"bottom"}}()),o.survey.stopMovingQuestion(),r}},t}return Y(t,e),Object.defineProperty(t.prototype,"draggedElementType",{get:function(){return"survey-element"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxNestedPanels",{get:function(){return this.onGetMaxNestedPanels?this.onGetMaxNestedPanels():-1},enumerable:!1,configurable:!0}),t.prototype.startDragToolboxItem=function(e,t,o){var r=this.createElementFromJson(t);r.toolboxItemTitle=o.title,r.toolboxItemIconName=o.iconName,this.startDrag(e,r)},t.prototype.startDragSurveyElement=function(e,t,o){this.isDraggedElementSelected=o,this.startDrag(e,t)},t.prototype.getShortcutText=function(t){return t.toolboxItemTitle||e.prototype.getShortcutText.call(this,t)},t.prototype.createDraggedElementShortcut=function(e,t,o){var r=document.createElement("div"),n=document.createElement("span");return n.className="svc-dragged-element-shortcut__text",n.innerText=e,r.appendChild(this.createDraggedElementIcon()),r.appendChild(n),r.className=this.getDraggedElementClass(),r},t.prototype.createDraggedElementIcon=function(){var e=document.createElement("span"),t='<svg class="sv-svg-icon" role="img" style="width: 24px; height: 24px;"><use xlink:href="#'+this.draggedElement.toolboxItemIconName+'"></use></svg>';return e.className="svc-dragged-element-shortcut__icon",e.innerHTML=t,e},t.prototype.getDraggedElementClass=function(){var e="svc-dragged-element-shortcut";return this.isDraggedElementSelected&&(e+=" svc-dragged-element-shortcut--selected"),e},t.prototype.createElementFromJson=function(e){var t=this.createNewElement(e);return t.setSurveyImpl?t.setSurveyImpl(this.survey):t.setData(this.survey),t.renderWidth="100%",t},t.prototype.createNewElement=function(e){var t=i.Serializer.createClass(e.type);return(new i.JsonObject).toObject(e,t),t},t.prototype.findDropTargetNodeByDragOverNode=function(e){if(e.closest(".svc-row--ghost")){var t="[data-sv-drop-target-survey-element='sv-drag-drop-ghost-survey-element-name']",o=e.closest(t)||e.querySelector(t);if(o)return o}return e.closest(this.dropTargetDataAttributeName)},t.prototype.getDropTargetByDataAttributeValue=function(e,o,r){if(this.removeDragOverMarker(this.dragOverIndicatorElement),this.dragOverIndicatorElement=null,!e){var n=o.parentElement.closest(this.dropTargetDataAttributeName);e=this.getDataAttributeValueByNode(n)}if(!e)throw new Error("Can't find drop target survey element name");if(e===t.ghostSurveyElementName)return this.prevDropTarget;if("newGhostPage"===e)return t.newGhostPage;var i,a,s=this.survey.getPageByName(e);if(s)return 0!==s.elements.length?null:s;if(this.survey.pages.forEach((function(t){var o=t.getElementByName(e);o&&(i=o,a=o)})),"paneldynamic"===i.getType()&&this.insideEmptyContainer&&(i=i.template),"matrixdropdown"!==i.getType()&&"matrixdynamic"!==i.getType()||"none"===i.detailPanelMode||!this.insideEmptyContainer?i.isPanel&&(i=this.getPanelDropTarget(o,i,r)):i=i.detailPanel,!i.page){var l=o.parentElement.closest("[data-sv-drop-target-page]");e=l.dataset.svDropTargetPage;var c=this.survey.getPageByName(e);i.__page=c}return this.dragOverIndicatorElement=a,i},t.prototype.isDropTargetValid=function(e,o,r){if(void 0===r&&(r=i.DragTypeOverMeEnum.Top),!e)return!1;if(e===this.draggedElement)return!1;if("paneldynamic"===this.draggedElement.getType()&&e===this.draggedElement.template)return!1;if(this.maxNestedPanels>=0&&this.draggedElement.isPanel){var n=te.getElementDeepLength(e);if(r!==i.DragTypeOverMeEnum.InsideEmptyPanel&&e.isPanel&&n--,this.maxNestedPanels<n)return!1}return!t.restrictDragQuestionBetweenPages||!this.shouldRestricDragQuestionBetweenPages(e)},t.prototype.shouldRestricDragQuestionBetweenPages=function(e){var t=this.draggedElement.page,o=e.isPage?e:e.page;return t&&t!==o},t.prototype.getPanelDropTarget=function(e,t,o){return 0!==t.questions.length&&(e=this.findDeepestDropTargetChild(e),t=this.getDropTargetByNode(e,o)),t},t.prototype.findDeepestDropTargetChild=function(e){for(var t=this.dropTargetDataAttributeName,o=e;e;)o=e,e=e.querySelector(t);return o},t.prototype.isAllowDragOver=function(e,t){if(!this.survey||this.survey.onDragDropAllow.isEmpty)return!0;var o={allow:!0,parent:this.parentElement,source:this.draggedElement,toElement:this.parentElement,draggedElement:this.draggedElement,fromElement:this.draggedElement.parent,target:e,insertAfter:void 0,insertBefore:void 0};return t!==i.DragTypeOverMeEnum.Bottom&&t!==i.DragTypeOverMeEnum.Right||(o.insertAfter=e),t!==i.DragTypeOverMeEnum.Top&&t!==i.DragTypeOverMeEnum.Left||(o.insertBefore=e),this.survey.onDragDropAllow.fire(this.survey,o),o.allow},t.prototype.dragOverCore=function(e,t){if(this.removeDragOverMarker(this.dragOverIndicatorElement),this.removeDragOverMarker(this.dropTarget),this.isSameElement(e))this.allowDropHere=!1;else if(this.dropTarget=e,this.dragOverLocation=t,this.parentElement=this.dropTarget.isPage?this.dropTarget:this.dropTarget.page||this.dropTarget.__page,this.isAllowDragOver(e,t)){var o=this.dragOverIndicatorElement||this.dropTarget;if(t==i.DragTypeOverMeEnum.InsideEmptyPanel)o.dragTypeOverMe=i.DragTypeOverMeEnum.InsideEmptyPanel;else{var r=this.parentElement.dragDropFindRow(o);r&&r.elements.length>1&&(this.dragOverLocation===i.DragTypeOverMeEnum.Top||this.dragOverLocation===i.DragTypeOverMeEnum.Bottom)?(r.dragTypeOverMe=this.dragOverLocation,this.dragOverIndicatorElement=r):o.dragTypeOverMe=this.dragOverLocation}}else this.allowDropHere=!1},t.prototype.isSameElement=function(e){for(;e;){if(e===this.draggedElement)return!0;e=e.parent}return!1},t.prototype.dragOver=function(e){var t=this.findDropTargetNodeFromPoint(e.clientX,e.clientY);if(t){this.insideEmptyContainer=!function(e,t){var o=e.getBoundingClientRect();return t-o.top<=go.edgeHeight||o.bottom-t<=go.edgeHeight}(t,e.clientY)&&!function(e,t){var o=e.getBoundingClientRect();return t-o.left<=go.edgeHeight||o.right-t<=go.edgeHeight}(t,e.clientX);var o=this.getDropTargetByNode(t,e),r=function(e,t,o){var r=o.getBoundingClientRect(),n=r.height/r.width,s=e-r.x,l=t-r.y;return a.dragDrop.allowDragToTheSameLine?l>=n*s?l>=-n*s+r.height?i.DragTypeOverMeEnum.Bottom:i.DragTypeOverMeEnum.Left:l>=-n*s+r.height?i.DragTypeOverMeEnum.Right:i.DragTypeOverMeEnum.Top:l>=r.height/2?i.DragTypeOverMeEnum.Bottom:i.DragTypeOverMeEnum.Top}(e.clientX,e.clientY,t);o&&(o.isPanel||o.isPage)&&0===o.elements.length&&(o.isPage||this.insideEmptyContainer)&&(r=i.DragTypeOverMeEnum.InsideEmptyPanel),this.isDropTargetValid(o,t,r)?(this.allowDropHere=!0,this.dragOverCore(o,r)):this.banDropHere()}else this.banDropHere()},t.prototype.onStartDrag=function(){this.draggedElement.isDragMe=!0},t.prototype.getElementIndexInPanel=function(e,t){if(!t)return-1;var o=t.elements.indexOf(e);if(0==t.index)return o;var r=t.panel.rows[t.index-1],n=r.elements[r.elements.length-1];return o+t.panel.elements.indexOf(n)+1},t.prototype.moveElementInPanel=function(e,t,o,r){var n=t.parent.elements.indexOf(t);r>n&&r--,t===o&&n===r||(e.removeElement(t),e.addElement(o,r))},t.prototype.removeDragOverMarker=function(e){var t;e&&(e.dragTypeOverMe=null);var o=null===(t=this.parentElement)||void 0===t?void 0:t.dragDropFindRow(e);o&&(o.dragTypeOverMe=null)},t.prototype.clear=function(){this.insideEmptyContainer=null,this.removeDragOverMarker(this.prevDropTarget),this.removeDragOverMarker(this.dropTarget),this.removeDragOverMarker(this.dragOverIndicatorElement),this.draggedElement&&(this.draggedElement.isDragMe=!1),e.prototype.clear.call(this)},t.prototype.getTargetParent=function(e){var t=e.isPage||e.isPanel?e:e.parent;return"paneldynamic"===e.getType()&&(t=e.templateValue),t},t.prototype.getTargetRow=function(e){var t;return this.getTargetParent(e).rows.forEach((function(o){-1!==o.elements.indexOf(e)&&(t=o)})),t},t.newGhostPage=null,t.restrictDragQuestionBetweenPages=!1,t.edgeHeight=30,t.nestedPanelDepth=-1,t.ghostSurveyElementName="sv-drag-drop-ghost-survey-element-name",t}(i.DragDropCore);o(12);var fo=i.settings.allowShowEmptyTitleInDesignMode,mo=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.pagesControllerValue=new ho(t),o.initSurvey(),o}return Y(t,e),Object.defineProperty(t.prototype,"displayPageDropTarget",{get:function(){return this.pagesController.page2Display===this.newPage?"newGhostPage":this.pagesController.page2Display.name},enumerable:!1,configurable:!0}),t.prototype.createNewPage=function(){var e=this;if(!this.creator.canAddPage())return null;var t=this.survey.createNewPage("");t.ignoreUndoRedo=!0,this.creator.setNewNames(t),t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0),t.setSurveyImpl(this.survey),t.updateElementCss();var o=function(r,n){"elements"===n.name&&t.elements.length>0&&e.creator.addPage(t,!0,(function(){return t.onPropertyChanged.remove(o),t.showTitle=!0,t.showDescription=!0,delete t.ignoreUndoRedo,!(e.survey.pages.indexOf(t)>-1)}))};return t.num=this.survey.pages.length+1,t.onPropertyChanged.add(o),go.newGhostPage=t,t},Object.defineProperty(t.prototype,"canShowNewPage",{get:function(){return!(!this.survey||"single"===this.creator.pageEditMode||!this.creator.allowModifyPages)},enumerable:!1,configurable:!0}),t.prototype.isModifiedPage=function(e){return Object.keys(e.toJSON()).filter((function(e){return"name"!==e})).length>0},Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pagesController",{get:function(){return this.pagesControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isToolboxVisible",{get:function(){return this.creator.showToolbox&&("right"===this.creator.toolboxLocation||"left"===this.creator.toolboxLocation)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.creator.isMobileView?z("ed.surveyPlaceHolderMobile"):z("ed.surveyPlaceHolder")},enumerable:!1,configurable:!0}),t.prototype.onDesignerSurveyPropertyChanged=function(e,t){if(e&&!this.isUpdatingNewPage){if(this.isUpdatingNewPage=!0,"elements"===t&&e.isDescendantOf("page")){var o=!1;0===e.elements.length&&(o=this.checkLastPageToDelete()),this.checkNewPage(o)}"pages"===t&&e.isDescendantOf("survey")&&this.checkNewPage(!0),this.isUpdatingNewPage=!1}},t.prototype.calculateDesignerCss=function(){return this.survey.css.container+" "+this.survey.css.container+"--"+this.survey.calculatedWidthMode},t.prototype.initSurvey=function(){var e=this;this.survey&&(this.showNewPage=!1,this.newPage=void 0,this.checkNewPage(!1),this.cssUpdater&&this.cssUpdater.dispose(),this.cssUpdater=new i.ComputedUpdater((function(){return e.calculateDesignerCss()})),this.designerCss=this.cssUpdater,this.pagesController.onSurveyChanged())},t.prototype.checkNewPage=function(e){var t=0===this.survey.getAllQuestions().length&&0===this.survey.pageCount;if(this.showPlaceholder=t,this.pageCount=this.survey.pageCount,this.showPlaceholder||this.canShowNewPage){var o=this.survey.pages;(!this.newPage||o.length>0&&this.newPage===o[o.length-1])&&(this.newPage=this.createNewPage(),this.showNewPage=!!this.newPage),this.newPage&&(this.newPage.showTitle=!t,this.newPage.showDescription=!t)}else this.showNewPage=!1,this.newPage=void 0;e&&(this.newPage&&(this.newPage.num=this.survey.pages.length+1,this.newPage.startLoadingFromJson(),this.newPage.name=te.getNewPageName(this.survey.pages),this.newPage.endLoadingFromJson()),this.pagesController.raisePagesChanged())},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.cssUpdater&&this.cssUpdater.dispose()},t.prototype.checkLastPageToDelete=function(){if(0===this.survey.pageCount||this.survey.isQuestionDragging)return!1;var e=this.survey.pages[this.survey.pageCount-1];return!(e.elements.length>0||e.isConverting)&&(!te.isPagePropertiesAreModified(e)&&(e.delete(),0===this.survey.pageCount&&this.creator.selectElement(this.survey),!0))},t.prototype.clickDesigner=function(){this.creator.selectedElement=this.creator.survey},t.prototype.getRootCss=function(){var e=this.survey.css.root;return(this.creator.showPageNavigator&&this.survey.pageCount>1||"bypage"===this.creator.pageEditMode)&&(e+=" svc-tab-designer--with-page-navigator"),this.showPlaceholder&&(e+=" svc-tab-designer--with-place-holder"),e+=" svc-tab-designer--"+this.creator.pageEditMode+"-mode"},Z([Object(i.property)()],t.prototype,"newPage",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showNewPage",void 0),Z([Object(i.property)()],t.prototype,"pageCount",void 0),Z([Object(i.property)()],t.prototype,"designerCss",void 0),Z([Object(i.property)()],t.prototype,"showPlaceholder",void 0),t}(i.Base),yo=function(){function e(e){var t=this;this.creator=e,e.addPluginTab("designer",this);var o=new nt(e.survey,e);this.propertyGrid=new uo(o,e),this.propertyGridTab=this.creator.sidebar.addTab("propertyGrid","svc-property-grid",this.propertyGrid,(function(){var e=[];return t.propertyGrid.prevSelectionAction&&(t.propertyGrid.prevSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.prevSelectionAction)),t.propertyGrid.nextSelectionAction&&(t.propertyGrid.nextSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.nextSelectionAction)),t.propertyGrid.objectSelectionAction&&(t.propertyGrid.objectSelectionAction.visible=t.createVisibleUpdater(),e.push(t.propertyGrid.objectSelectionAction)),e})),this.toolboxTab=this.creator.sidebar.addTab("toolbox","svc-toolbox",e),this.creator.onPropertyChanged.add((function(e,o){"toolboxLocation"===o.name&&(t.toolboxTab.visible&&"sidebar"!==o.newVal&&(t.propertyGridTab.visible=!0),t.toolboxTab.visible="sidebar"===o.newVal)})),this.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),e.registerShortcut("delete",{affectedTab:"designer",hotKey:{keyCode:46},macOsHotkey:{keyCode:46},execute:function(){return t.creator.deleteCurrentElement()}})}return Object.defineProperty(e.prototype,"isSurveySelected",{get:function(){return this.creator.isElementSelected(this.creator.survey)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSettingsActive",{get:function(){return this.creator.showSidebar&&this.isSurveySelected},enumerable:!1,configurable:!0}),e.prototype.createVisibleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){return"designer"===e.creator.activeTab}))},e.prototype.activate=function(){this.model=new mo(this.creator),this.creator.sidebar.activeTab=this.propertyGridTab.id,this.creator.focusElement(void 0,!0)},e.prototype.deactivate=function(){return this.model&&this.model.dispose(),this.model=void 0,this.propertyGridTab.visible=!1,!0},e.prototype.onDesignerSurveyPropertyChanged=function(e,t){this.model&&this.model.onDesignerSurveyPropertyChanged(e,t)},e.prototype.update=function(){this.model&&this.model.initSurvey()},e.prototype.createActions=function(){var e=this,t=[],o=new i.Action({id:"svd-toolbox",iconName:"icon-toolbox",needSeparator:!0,action:function(){e.creator.showSidebar||e.creator.setShowSidebar(!0,!0),e.creator.sidebar.activeTab="toolbox"},active:new i.ComputedUpdater((function(){return"toolbox"===e.creator.sidebar.activeTab})),visible:new i.ComputedUpdater((function(){return O("designer"===e.creator.activeTab,e.creator.showToolbox,"sidebar"===e.creator.toolboxLocation)})),title:"Toolbox",showTitle:!1});return this.surveySettingsAction=new i.Action({id:"svd-settings",iconName:"icon-settings",needSeparator:new i.ComputedUpdater((function(){return O("sidebar"!==e.creator.toolboxLocation,!e.creator.isMobileView)})),action:function(){e.selectSurvey(),e.creator.isMobileView||e.creator.propertyGrid.getAllQuestions()[0].focus()},active:this.isSettingsActive,pressed:this.isSettingsActive,visible:this.createVisibleUpdater(),locTitleName:"ed.surveySettings",locTooltipName:"ed.surveySettingsTooltip",showTitle:!1}),this.saveSurveyAction=new i.Action({id:"svd-save",iconName:"icon-save",action:function(){return e.creator.saveSurveyActionHandler()},active:!1,enabled:!1,visible:new i.ComputedUpdater((function(){return O("designer"===e.creator.activeTab,e.creator.showSaveButton)})),locTitleName:"ed.saveSurvey",locTooltipName:"ed.saveSurveyTooltip",showTitle:!1}),this.designerAction=new i.Action({id:"svd-designer",iconName:"icon-config",visible:this.createVisibleUpdater(),active:!0,locTitleName:"ed.designer",showTitle:!1,action:function(){}}),this.previewAction=new i.Action({id:"svd-preview",iconName:"icon-preview",action:function(){e.creator.makeNewViewActive(e.creator.showThemeTab?"theme":"test")},visible:this.createVisibleUpdater(),locTitleName:"tabs.preview",showTitle:!1}),t.push(this.saveSurveyAction),t.push(o),t.push(this.surveySettingsAction),this.creator.onSelectedElementChanged.add((function(t,o){e.surveySettingsAction.active=e.isSettingsActive,e.surveySettingsAction.pressed=e.isSettingsActive})),this.creator.onShowSidebarVisibilityChanged.add((function(t,o){e.surveySettingsAction.active=e.isSettingsActive,e.surveySettingsAction.pressed=e.isSettingsActive})),t},e.prototype.selectSurvey=function(){this.creator.showSidebar||this.creator.setShowSidebar(!0,!0),this.creator.selectElement(this.creator.survey),this.creator.sidebar.activeTab=this.propertyGridTab.id},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.designerAction),this.creator.footerToolbar.actions.push(this.previewAction),this.creator.footerToolbar.actions.push(this.surveySettingsAction)},e}();o(13);var bo=function(){function e(e,t){var o=this;this.container=e,this.creator=t,this.resizeObserver=void 0,"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){return o.process()})),this.resizeObserver.observe(this.findCorrectParent(this.container)),this.process(),"xs"!=this.currentWidth&&"s"!=this.currentWidth&&"m"!==this.currentWidth||this.creator.setShowSidebar(!1))}return e.prototype.getScreenWidth=function(){var t,o=this;return Object.keys(e.screenSizeBreakpoints).forEach((function(r){var n=e.screenSizeBreakpoints[r];!t&&o.container&&n&&o.container.offsetWidth>=n&&(t=r)})),t||"xs"},e.prototype.initMobileView=function(){this.creator.showTabs=!1,this.creator.showToolbar=!1,this.creator.isMobileView=!0},e.prototype.resetMobileView=function(){this.creator.showTabs=void 0,this.creator.showToolbar=void 0,this.creator.isMobileView=void 0},e.prototype.procesShowToolbox=function(e){this.creator.allowShowToolbox=e},e.prototype.procesShowPageNavigator=function(e){this.creator.allowShowPageNavigator="bypage"===this.creator.pageEditMode||e},e.prototype.findCorrectParent=function(e){return(null===window||void 0===window?void 0:window.getComputedStyle)&&"inline"===window.getComputedStyle(e.parentElement).display?this.findCorrectParent(e.parentElement):e.parentElement},e.prototype._process=function(e,t,o){this.creator.updateToolboxIsCompact(e),this.procesShowToolbox(t),this.procesShowPageNavigator(t),this.creator.sidebar.flyoutMode=o,this.creator.sidebar.visible&&!o&&(this.creator.sidebar.collapsedManually=!1),this.creator.sidebar.visible&&!this.creator.sidebar.expandedManually&&o&&"right"!=this.creator.toolboxLocation&&this.creator.sidebar.collapseSidebar(),this.creator.sidebar.visible||this.creator.sidebar.collapsedManually||o||"right"==this.creator.toolboxLocation||this.creator.sidebar.expandSidebar()},e.prototype.process=function(){this.currentWidth=this.getScreenWidth(),"xl"===this.currentWidth||"xxl"===this.currentWidth?this._process(!1,!0,!1):"l"===this.currentWidth?this._process(!0,!0,!1):"m"===this.currentWidth?this._process(!0,!0,!0):this._process(!0,!1,!0),"xs"==this.currentWidth?this.initMobileView():this.resetMobileView()},e.prototype.dispose=function(){this.creator.allowShowToolbox=!0,this.creator.allowShowPageNavigator=!0,this.resizeObserver&&this.resizeObserver.disconnect()},e.screenSizeBreakpoints={xxl:1800,xl:1500,l:1200,m:900,s:600},e}(),vo=function(e){function t(t,o,r,n){var i=e.call(this)||this;return i.id=t,i.sidePanel=o,r&&(i.componentName=r),n&&(i.model=n),i}return Y(t,e),Z([Object(i.property)({onSet:function(e,t){t.sidePanel.headerText=t.caption}})],t.prototype,"caption",void 0),Z([Object(i.property)({onSet:function(e,t){t.sidePanel.updateHasVisibleTabs()}})],t.prototype,"visible",void 0),Z([Object(i.property)()],t.prototype,"model",void 0),Z([Object(i.property)()],t.prototype,"componentName",void 0),t}(i.Base),xo=function(){function e(e,t){var o=this;this.container=e,this.events={mousedown:{touch:"touchend",mouse:"mousedown",pointer:"pointerdown"},mouseup:{touch:"touchstart",mouse:"mouseup",pointer:"pointerup"},mousemove:{touch:"touchmove",mouse:"mousemove",pointer:"pointermove"}},this.onMouseDownListener=function(e){window&&(e.preventDefault(),o.originalWidth=o.getStyleValue(o.container,"width"),o.originalMouseX=e.pageX,o.currentResizer=e.target,window.addEventListener(o.getMouseEvent("mousemove"),o.resize),window.addEventListener(o.getMouseEvent("mouseup"),o.stopResize))},this.resize=function(e){var t=o.originalWidth,r=e.pageX-o.originalMouseX;o.currentResizer==o.westResizer?t-=r:t+=r,t>o.maxWidth?t=o.maxWidth:t<o.minWidth&&(t=o.minWidth),o.container.style.width=t+"px"},this.stopResize=function(e){window&&(window.removeEventListener(o.getMouseEvent("mousemove"),o.resize),window.removeEventListener(o.getMouseEvent("mouseup"),o.stopResize))},this.init(e),this.setHandles(t)}return e.prototype.setHandles=function(e){var t=!1,o=!1,r=e.split(",");r.forEach((function(e){return e.trim()})),((r=r.filter((function(e){return!!e})))||[]).forEach((function(e){"w"==e&&(t=!0),"e"==e&&(o=!0)})),this.westResizer.style.display=t?"block":"none",this.eastResizer.style.display=o?"block":"none"},e.prototype.getStyleValue=function(e,t){return window?parseFloat(window.getComputedStyle(e).getPropertyValue(t).replace("px","")):0},e.prototype.isEventSupported=function(e){var t=document.createElement("div"),o=(e="on"+e)in t;return o||(t.setAttribute(e,"return;"),o="function"==typeof t[e]),t=null,o},e.prototype.getEventPrefix=function(){return void 0===this.mouseDevice&&(this.isEventSupported("pointerdown")?this.mouseDevice="pointer":this.isEventSupported("touchstart")?this.mouseDevice="touch":this.isEventSupported("mousedown")&&(this.mouseDevice="mouse")),this.mouseDevice},e.prototype.getMouseEvent=function(e){return this.events[e][this.getEventPrefix()]},e.prototype.init=function(e){this.westResizer=this.createrResizerElement("svc-resizer svc-resizer-west"),this.eastResizer=this.createrResizerElement("svc-resizer svc-resizer-east"),this.minWidth=this.getStyleValue(e,"min-width"),this.maxWidth=this.getStyleValue(e,"max-width"),e.insertBefore(this.westResizer,e.children[0]),e.appendChild(this.eastResizer)},e.prototype.createrResizerElement=function(e){var t=document.createElement("div");return t.className=e,t.addEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),t},e.prototype.dispose=function(){this.eastResizer.removeEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),this.eastResizer.remove(),this.eastResizer=void 0,this.westResizer.removeEventListener(this.getMouseEvent("mousedown"),this.onMouseDownListener),this.westResizer.remove(),this.westResizer=void 0},e}(),wo=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o.toolbar=new i.AdaptiveActionContainer,o.sidebarLocationChangedHandler=function(e,t){"sidebarLocation"===t.name&&o.resizeManager&&o.resizeManager.setHandles(o.getCurrentHandles())},o.onSidebarVisibilityChanged=function(e,t){o.isDisposed||(o.visible=t.show)},o.creator.onShowSidebarVisibilityChanged.add(o.onSidebarVisibilityChanged),o.creator.onPropertyChanged.add(o.sidebarLocationChangedHandler),o.visible=o.creator.showSidebar,o.createActions(),o}return Y(t,e),Object.defineProperty(t.prototype,"flyoutPanelMode",{get:function(){return this.visible&&this.flyoutMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"closeText",{get:function(){return z("pe.close")},enumerable:!1,configurable:!0}),t.prototype.getTabById=function(e){return this.tabs.filter((function(t){return t.id===e}))[0]},t.prototype.createActions=function(){var e=this;this._collapseAction=new i.Action({id:"svd-grid-hide",iconName:"icon-collapse-panel",css:"svd-grid-hide",locTitleName:"ed.hidePanel",showTitle:!1,visible:new i.ComputedUpdater((function(){return O(!O(!e.creator.allowCollapseSidebar,!e.flyoutMode),e.visible)})),action:function(){e.collapseSidebar(),e.flyoutMode?e.creator.focusElement(e.creator.selectedElement,!0):(e.collapsedManually=!0,e.expandedManually=!1)}}),this.toolbar.actions.push(this._collapseAction),this.creator.allowCollapseSidebar&&(this._expandAction=new i.Action({id:"svd-grid-expand",iconName:"icon-expand-panel",css:"svd-grid-expand",needSeparator:!0,action:function(){e.expandSidebar(),e.flyoutMode||(e.collapsedManually=!1,e.expandedManually=e.flyoutMode)},locTitleName:"ed.showPanel",visible:new i.ComputedUpdater((function(){return O(e.hasVisibleTabs,!e.visible)})),showTitle:!1}))},t.prototype.getCurrentHandles=function(){return"right"==this.creator.sidebarLocation?"w":"e"},t.prototype.getExpandAction=function(){return this._expandAction},t.prototype.collapseSidebar=function(){this.creator.setShowSidebar(!1)},t.prototype.expandSidebar=function(){this.creator.setShowSidebar(!0)},t.prototype.addTab=function(e,t,o,r){var n=this,i=new vo(e,this,t,o);return this.tabs.push(i),r&&(r()||[]).forEach((function(e){return n.toolbar.actions.push(e)})),i},t.prototype.updateHasVisibleTabs=function(){this.hasVisibleTabs=(this.tabs||[]).filter((function(e){return e.visible})).length>0},t.prototype.dispose=function(){this.creator&&!this.isDisposed&&(this.creator.onShowSidebarVisibilityChanged.remove(this.onSidebarVisibilityChanged),this.creator.onPropertyChanged.remove(this.sidebarLocationChangedHandler),this.sidebarLocationChangedHandler=void 0),this.resetResizeManager(),e.prototype.dispose.call(this)},t.prototype.initResizeManager=function(e){this.resizeManager=new xo(e,this.getCurrentHandles())},t.prototype.resetResizeManager=function(){this.resizeManager&&(this.resizeManager.dispose(),this.resizeManager=void 0)},Z([Object(i.propertyArray)()],t.prototype,"tabs",void 0),Z([Object(i.property)()],t.prototype,"headerText",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"visible",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"collapsedManually",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"expandedManually",void 0),Z([Object(i.property)()],t.prototype,"hasVisibleTabs",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"flyoutMode",void 0),Z([Object(i.property)({onSet:function(e,t){t.tabs.forEach((function(e){return e.visible=!1})),t._activeTab=t.tabs.filter((function(t){return t.id===e}))[0],t._activeTab&&(t.headerText=t._activeTab.caption,t._activeTab.visible=!0)}})],t.prototype,"activeTab",void 0),t}(i.Base),jo=function(){function e(e){this.question=e}return e.createItemsNavigator=function(e){return e instanceof i.QuestionImagePickerModel?null:e instanceof i.QuestionMultipleTextModel?new So(e):e instanceof i.QuestionMatrixDropdownModel?new Po(e):e instanceof i.QuestionMatrixDynamicModel?new Eo(e):e instanceof i.QuestionMatrixModel?new To(e):e instanceof i.QuestionSelectBase?new Co(e):null},e.prototype.addNewItems=function(e,t,o,r){var n=this,a=t.slice();a.splice(o,1),r.forEach((function(t,r){var s,l;a.splice(o+r,0,(s=t,l=e.inplaceEditForValues?s:d(e.getChoicesItemBaseTitle(),a),n.question.createItemValue?n.question.createItemValue(l,s):new i.ItemValue(l,s)))})),this.question[this.getItemsPropertyName(t)]=a},e.prototype.setEventsForItem=function(e,t,o){var r=this,n=Io.get(this.getItemLocString(t,o));n.onEditComplete.clear(),n.onEditComplete.add((function(){var n=t.indexOf(o);n>=0&&n<t.length-1&&Io.get(r.getItemLocString(t,t[n+1])).activateEditor(),n==t.length-1&&(r.addNewItem(e,t),Io.get(r.getItemLocString(t,t[t.length-1])).setAutoFocus(),Io.get(r.getItemLocString(t,t[t.length-1])).activateEditor())})),n.onBackspaceEmptyString.clear(),n.onBackspaceEmptyString.add((function(){var e=t.indexOf(o),n=null;if(-1!==e){if(0==e&&t.length>=2&&(n=t[1]),e>0&&(n=t[e-1]),n){var i=Io.get(r.getItemLocString(t,n));i.setAutoFocus(),i.activateEditor()}t.splice(e,1)}})),n.onTextChanging.clear(),n.onTextChanging.add((function(n,i){var a=i.value.split(/\r?\n/).map((function(e){return(e||"").trim()})).filter((function(e){return!!e}));if(!(a.length<=1)){i.cancel=!0;var s=t.indexOf(o);r.addNewItems(e,t,s,a);var l=s+a.length;l>=t.length&&(l=t.length-1),Io.get(r.getItemLocString(t,t[l])).setAutoFocus(),Io.get(r.getItemLocString(t,t[l])).activateEditor()}}))},e.setQuestion=function(t){var o=t.element,r=e.createItemsNavigator(o);if(r){var n=t.creator,i=Io.get(o.locTitle),a=r.getItemSets(),s=a[0];i.hasEditCompleteHandler||(i.onEditComplete.add((function(){s.length&&Io.get(r.getItemLocString(s,s[0])).activateEditor()})),i.hasEditCompleteHandler=!0),a.forEach((function(e){e.forEach((function(t){r.setEventsForItem(n,e,t)}));var t=r.getItemsPropertyName(e);o.onPropertyChanged.add((function(o,i){i.name==t&&e.forEach((function(t){r.setEventsForItem(n,e,t)}))}))}))}return!!r},e}(),Co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemLocString=function(e,t){return t.locText},t.prototype.getItemSets=function(){return[this.question.choices]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null);var r=e.createNewItemValue(this.question);o&&(r.value=o)},t.prototype.getItemsPropertyName=function(e){return"choices"},t}(jo),So=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemLocString=function(e,t){return t.locTitle},t.prototype.getItemSets=function(){return[this.question.items]},t.prototype.addNewItem=function(e,t,o){void 0===o&&(o=null),this.question.addItem(o||g("text",t.map((function(e){return e.name}))))},t.prototype.getItemsPropertyName=function(e){return"items"},t.prototype.addNewItems=function(e,t,o,r){var n=t.slice(0,o).concat(r.map((function(e){return new i.MultipleTextItemModel(e)}))).concat(t.slice(o+1));this.question[this.getItemsPropertyName(t)]=n},t}(jo),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemLocString=function(e,t){return t.locText},t.prototype.getItemSets=function(){return[this.question.columns,this.question.rows]},t.prototype.addNewItem=function(e,t,o){var r,n;void 0===o&&(o=null),t==this.question.columns&&(r="Column ",n="columns"),t==this.question.rows&&(r="Row ",n="rows");var a=new i.ItemValue(g(r,t.map((function(e){return e.value}))));t.push(o||a),e.onItemValueAddedCallback(this.question,n,a,t)},t.prototype.getItemsPropertyName=function(e){return e==this.question.columns?"columns":e==this.question.rows?"rows":void 0},t}(jo),Po=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemLocString=function(e,t){return e==this.question.columns?t.locTitle:t.locText},t.prototype.addNewItem=function(t,o,r){if(void 0===r&&(r=null),o==this.question.columns){var n=new i.MatrixDropdownColumn(r||g("Column ",o.map((function(e){return e.value}))));this.question.columns.push(n),t.onMatrixDropdownColumnAddedCallback(this.question,n,this.question.columns)}o==this.question.rows&&e.prototype.addNewItem.call(this,t,o,r)},t.prototype.addNewItems=function(t,o,r,n){if(o==this.question.columns){var a=o.slice(0,r).concat(n.map((function(e){return new i.MatrixDropdownColumn(e)}))).concat(o.slice(r+1));this.question[this.getItemsPropertyName(o)]=a}else e.prototype.addNewItems.call(this,t,o,r,n)},t}(To),Eo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getItemSets=function(){return[this.question.columns]},t}(Po),Io=function(){function e(e){this.locString=e,this.hasEditCompleteHandler=!1,this.onDoActivate=new i.EventBase,this.onTextChanging=new i.EventBase,this.onEditComplete=new i.EventBase,this.onBackspaceEmptyString=new i.EventBase}return e.get=function(t){return t._stringEditorConnector||(t._stringEditorConnector=new e(t)),t._stringEditorConnector},e.prototype.setAutoFocus=function(){this.focusOnEditor=!0},e.prototype.activateEditor=function(){this.onDoActivate.fire(this.locString,{})},e}(),Oo=function(e){function t(t,o){var r=e.call(this)||this;return r.locString=t,r.creator=o,r.blurredByEscape=!1,r.focusedProgram=!1,r.characterCounter=new i.CharacterCounter,r.activate=function(){var e=r.getEditorElement();return!(!e||null==e.offsetParent)&&(e.focus(),C(e),!0)},r.justFocused=!1,r.locString=t,r.checkMarkdownToTextConversion(r.locString.owner,r.locString.name),r}return Y(t,e),t.prototype.afterRender=function(){this.connector.focusOnEditor&&this.activate()&&(this.connector.focusOnEditor=!1)},t.prototype.detachFromUI=function(){var e;null===(e=this.connector)||void 0===e||e.onDoActivate.remove(this.activate),this.getEditorElement=void 0,this.blurEditor=void 0},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.detachFromUI()},t.prototype.setLocString=function(e){var t;null===(t=this.connector)||void 0===t||t.onDoActivate.remove(this.activate),this.locString=e,this.connector=Io.get(e),this.connector.onDoActivate.add(this.activate)},t.prototype.checkConstraints=function(e){!this.compostionInProgress&&this.maxLength>0&&e.keyCode>=32&&((e.target.innerText||"").length>=this.maxLength&&e.preventDefault());13!=e.keyCode||this.locString.allowLineBreaks||e.preventDefault(),(e.ctrlKey||e.metaKey)&&-1!==[89,90,66,73].indexOf(e.keyCode)&&(e.stopImmediatePropagation(),e.preventDefault())},t.prototype.onClick=function(e){e.stopPropagation()},t.prototype.onFocus=function(e){this.focusedProgram||(this.valueBeforeEdit=this.locString.hasHtml?e.target.innerHTML:e.target.innerText,this.focusedProgram=!1),this.maxLength>0&&this.characterCounter.updateRemainingCharacterCounter(this.valueBeforeEdit,this.maxLength),this.creator&&(this.creator.selectFromStringEditor=!0),e.target.parentElement.click(),e.target.spellcheck=!0,e.target.setAttribute("tabindex",-1),this.focused=!0,this.justFocused=!0},t.prototype.checkMarkdownToTextConversion=function(e,t){if(this.creator){var o={element:e,text:null,name:t,html:""};this.creator.onHtmlToMarkdown.fire(this.creator,o),this.editAsText=null===o.text}},t.prototype.onCompositionStart=function(e){this.compostionInProgress=!0},t.prototype.onInput=function(e){var t;if(this.maxLength>0){var o=e.target.innerText||"";this.characterCounter.updateRemainingCharacterCounter(o,this.maxLength)}if(this.editAsText&&!this.compostionInProgress){var r={value:null===(t=e.target)||void 0===t?void 0:t.innerText,cancel:null};if(this.connector&&this.connector.onTextChanging.fire(this,r),r.cancel)return;this.maxLength>=0&&e.target.innerText.length>this.maxLength&&(e.target.innerText=e.target.innerText.substring(0,this.maxLength))}},t.prototype.onCompositionEnd=function(e){this.compostionInProgress=!1,this.onInput(e)},t.prototype.onBlur=function(e){var t;if(e.target.removeAttribute("tabindex"),this.blurredByEscape)return this.blurredByEscape=!1,this.locString.hasHtml?e.target.innerHTML=this.valueBeforeEdit:e.target.innerText=this.valueBeforeEdit,this.errorText=null,this.focused=!1,void(null===window||void 0===window||window.getSelection().removeAllRanges());var o=this.getClearedText(e.target);if(this.errorText=this.getErrorTextOnChanged(o),this.locString.text==o||!this.locString.text&&o==this.locString.calculatedText)this.locString.hasHtml?e.target.innerHTML=this.locString.renderedHtml:e.target.innerText=this.locString.renderedHtml,this.locString.strChanged();else{if(this.errorText)return null===(t=this.creator)||void 0===t||t.notify(this.errorText,"error"),this.focusedProgram=!0,e.target.innerText=o,void e.target.focus();this.setValueIntoLocStr(o,null==e?void 0:e.target)}this.focused=!1,null===window||void 0===window||window.getSelection().removeAllRanges()},t.prototype.getClearedText=function(e){var t=e.innerHTML,o=e.innerText;if(!this.creator)return this.locString.hasHtml?t:o;var r,n=null;if(!this.editAsText){var i={element:this.locString.owner,text:null,name:this.locString.name,html:t};this.creator.onHtmlToMarkdown.fire(this.creator,i),n=i.text}if(n)r=n;else{var a=this.locString.hasHtml?t:o;this.locString.allowLineBreaks||(a=j(a)),r=a}var s={obj:this.locString.owner,propertyName:this.locString.name,value:this.locString.text,newValue:r,doValidation:!1};return this.creator.onValueChangingCallback(s),s.newValue},t.prototype.getErrorTextOnChanged=function(e){if(!this.creator)return"";var t=this.locString.owner,o=this.creator.onGetErrorTextOnValidationCallback(this.locString.name,t,e);if(o||e)return o;var r=t.getPropertyByName&&t.getPropertyByName(this.locString.name);return r&&r.isRequired?G.getString("pe.propertyIsEmpty"):""},Object.defineProperty(t.prototype,"isInplaceForEditValues",{get:function(){return!!this.creator&&this.creator.inplaceEditForValues&&this.locString.owner instanceof i.ItemValue&&this.creator.inplaceEditForValues&&-1===["noneText","otherText","selectAllText"].indexOf(this.locString.name)},enumerable:!1,configurable:!0}),t.prototype.setValueIntoLocStr=function(e,t){if(this.isInplaceForEditValues){var o=this.locString.owner;if(o.value!==e){if(o.locOwner&&o.ownerPropertyName){var r=o.locOwner[o.ownerPropertyName];Array.isArray(r)&&i.ItemValue.getItemByValue(r,e)&&(e=d(e,r),t&&(t.innerText=e))}o.value=e}}else{var n=this.locString.storeDefaultText;this.locString.storeDefaultText=!1,this.locString.text=e,this.locString.storeDefaultText=n}},t.prototype.done=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.onPaste=function(e){if(this.editAsText){e.preventDefault();var t=e.clipboardData.getData("text/plain");this.locString.allowLineBreaks||(t=j(t));var o=window.getSelection();if(!o.rangeCount)return;o.deleteFromDocument(),o.getRangeAt(0).insertNode(document.createTextNode(t)),o.collapseToEnd(),e.target.dispatchEvent(new Event("input",{bubbles:!0}))}},t.prototype.onKeyDown=function(e){return 13!==e.keyCode||e.shiftKey||(this.blurEditor(),e.ctrlKey||e.metaKey||this.connector.onEditComplete.fire(this,{}),this.done(e)),27===e.keyCode&&(this.blurredByEscape=!0,this.blurEditor(),this.done(e)),8!==e.keyCode||e.target.innerText||(this.done(e),this.connector.onBackspaceEmptyString.fire(this,{})),this.checkConstraints(e),!0},t.prototype.onKeyUp=function(e){return 9===e.keyCode&&e.target===document.activeElement&&C(e.target),!0},t.prototype.onMouseUp=function(e){return!this.justFocused||(this.justFocused=!1,!!window&&((window.getSelection().focusNode&&window.getSelection().focusNode.parentElement!==e.target||0==window.getSelection().toString().length)&&C(e.target),!1))},t.prototype.findProperty=function(){if(this.locString.owner.getType){var e=this.locString.owner.getType();if(this.locString.name)return i.Serializer.findProperty(e,this.locString.name)}},Object.defineProperty(t.prototype,"maxLength",{get:function(){var e=this.findProperty();return!e||e.maxLength<=0?-1:e.maxLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){var e=this;if(this.placeholderValue)return this.placeholderValue;var t=this.findProperty();if(!t||!t.placeholder)return"";var o=G.getString(t.placeholder);if(o){var r=/\{([^}]+)\}/g;this.placeholderValue=new i.ComputedUpdater((function(){for(var t=o,n=r.exec(t);null!=n;)t=t.replace(r,(function(t){return""+(e.locString.owner&&e.locString.owner[n[1]])})),n=r.exec(t);return t}))}return this.placeholderValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentEditable",{get:function(){return!this.creator||this.creator.isCanModifyProperty(this.locString.owner,this.locString.name)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCharacterCounter",{get:function(){return-1!==this.maxLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getCharacterCounterClass",{get:function(){return"svc-remaining-character-counter"},enumerable:!1,configurable:!0}),t.prototype.className=function(e){return(new i.CssClassBuilder).append("svc-string-editor").append("svc-string-editor--hidden",""==e&&""==this.placeholder).append("svc-string-editor--readonly",!this.contentEditable).append("svc-string-editor--error",!!this.errorText).append("svc-string-editor--multiline",!!this.locString.allowLineBreaks).toString()},Z([Object(i.property)()],t.prototype,"errorText",void 0),Z([Object(i.property)()],t.prototype,"focused",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"editAsText",void 0),Z([Object(i.property)()],t.prototype,"placeholderValue",void 0),t}(i.Base);o(14);var Vo=function(e){function t(t,o){return e.call(this,t,o)||this}return Y(t,e),Object.defineProperty(t.prototype,"currentTheme",{get:function(){return this.surveyProvider.theme},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentThemeCssVariables",{get:function(){return this.currentTheme.cssVariables||{}},enumerable:!1,configurable:!0}),t.prototype.getTabName=function(){return"theme"},t}(Ee),No={},ko=["default","sharp","borderless","flat","plain","doubleborder","layered","solid","threedimensional","contrast"],Ao={light:{teal:"rgba(11, 128, 128, 1)",blue:"rgba(39, 114, 203, 1)",purple:"rgba(122, 70, 187, 1)",orchid:"rgba(178, 61, 153, 1)",tulip:"rgba(191, 76, 97, 1)",brown:"rgba(177, 94, 47, 1)",green:"rgba(11, 134, 75, 1)"},dark:{teal:"rgba(22, 198, 187, 1)",blue:"rgba(109, 183, 252, 1)",purple:"rgba(173, 144, 255, 1)",orchid:"rgba(232, 113, 220, 1)",tulip:"rgba(245, 131, 151, 1)",brown:"rgba(252, 187, 89, 1)",green:"rgba(140, 204, 90, 1)"}},_o=["Open Sans","Arial, sans-serif","Brush Script MT, cursive","Courier New, monospace","Garamond, serif","Georgia, serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"];function Lo(){return[{type:"dropdown",name:"family",title:z("theme.fontFamily"),titleLocation:"left",descriptionLocation:"hidden",choices:[].concat(_o),allowClear:!1},{type:"buttongroup",name:"weight",titleLocation:"hidden",descriptionLocation:"hidden",choices:[{value:"400",text:z("theme.fontWeightRegular")},{value:"600",text:z("theme.fontWeightSemiBold")},{value:"700",text:z("theme.fontWeightBold")},{value:"800",text:z("theme.fontWeightHeavy")}]},{type:"coloralpha",name:"color",colorTitle:z("theme.color"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"coloralpha",name:"placeholdercolor",colorTitle:z("theme.placeholderColor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"spinedit",name:"size",title:z("theme.size"),titleLocation:"left",descriptionLocation:"hidden",unit:"px",min:0}]}function Do(e,t,o){var r=e.contentPanel.questions[2];"allowEmptyColorValue"==t&&(r.allowEmptyValue=o)}function Mo(){i.ComponentCollection.Instance.getCustomQuestionByName("font").json.elementsJSON=Lo()}function Ro(e,t,o){void 0===e&&(e={}),Object.keys(e).forEach((function(r){var n="--sjs-font-"+t.name.toLocaleLowerCase()+"-"+r;t.defaultValue&&e[r]===t.defaultValue[r]?o[n]=void 0:o[n]=e[r]+("size"===r?"px":"")}))}function qo(e,t,o,r){if(e){e.defaultValue||(e.defaultValue={}),B(e.defaultValue,{color:t[o],placeholdercolor:r?t[r]:void 0}),e.defaultValue.size||(e.defaultValue.size=parseFloat(t["--sjs-font-size"]));var n=K({},e.defaultValue);return Object.keys(t).filter((function(t){return-1!==t.indexOf(e.name.toLocaleLowerCase())})).forEach((function(e){var o=e.split("-").pop();"size"===o&&void 0!==t[e]?n[o]=parseFloat(t[e].toString()):n[o]=t[e]})),n}}function Ho(){return[{type:"coloralpha",name:"backcolor",colorTitle:z("theme.backcolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"coloralpha",name:"hovercolor",colorTitle:z("theme.hovercolor"),colorTitleLocation:"left",titleLocation:"hidden",descriptionLocation:"hidden"},{type:"spinedit",name:"cornerRadius",title:z("theme.cornerRadius"),titleLocation:"left",descriptionLocation:"hidden",unit:"px",min:0}]}function Bo(){i.ComponentCollection.Instance.getCustomQuestionByName("backgroundcornerradius").json.elementsJSON=Ho()}function Qo(e,t,o){void 0===e&&(e={}),Object.keys(e).forEach((function(r){var n="--sjs-"+t.name.toLocaleLowerCase()+"-"+r;t.defaultValue&&e[r]===t.defaultValue[r]?o[n]=void 0:o[n]=e[r]+("cornerRadius"===r?"px":"")}))}function Fo(e,t,o,r,n){if(void 0===n&&(n=4),e){e.defaultValue||(e.defaultValue={}),B(e.defaultValue,{backcolor:t[o],hovercolor:t[r],cornerRadius:n});var i=K({},e.defaultValue);return Object.keys(t).filter((function(t){return-1!==t.indexOf(e.name.toLocaleLowerCase())})).forEach((function(e){var o=e.split("-").pop();"cornerRadius"===o&&void 0!==t[e]?i[o]=parseFloat(t[e].toString()):i[o]=t[e]})),i}}function Uo(){return{type:"paneldynamic",minPanelCount:1,panelAddText:z("theme.boxShadowAddRule"),templateElements:[{type:"spinedit",name:"x",unit:"px",title:z("theme.boxShadowX"),titleLocation:"left"},{type:"spinedit",name:"y",unit:"px",startWithNewLine:!1,title:z("theme.boxShadowY"),titleLocation:"left"},{type:"spinedit",name:"blur",unit:"px",title:z("theme.boxShadowBlur"),min:0,titleLocation:"left"},{type:"spinedit",name:"spread",unit:"px",min:0,startWithNewLine:!1,title:z("theme.boxShadowSpread"),titleLocation:"left"},{type:"coloralpha",name:"color",titleLocation:"hidden"},{type:"buttongroup",name:"isInset",titleLocation:"hidden",choices:[{text:z("theme.boxShadowDrop"),value:!1},{text:z("theme.boxShadowInner"),value:!0}]}]}}function Wo(){i.ComponentCollection.Instance.getCustomQuestionByName("shadoweffects").json.questionJSON=Uo()}function Go(e){if(Array.isArray(e)){var t=!1;if(e.forEach((function(e){for(var o in e)t=!0})),t)return e.map((function(e){var t,o,r,n,i;return(1==e.isInset?"inset ":"")+(null!==(t=e.x)&&void 0!==t?t:0)+"px "+(null!==(o=e.y)&&void 0!==o?o:0)+"px "+(null!==(r=e.blur)&&void 0!==r?r:0)+"px "+(null!==(n=e.spread)&&void 0!==n?n:0)+"px "+(null!==(i=e.color)&&void 0!==i?i:"#000000")})).join(", ")}}function zo(e){var t=Jo(e);return t.forEach((function(e){e.x=0,e.y=0,e.blur=0,e.spread=0})),Go(t)}function Jo(e){return void 0===e&&(e=""),e.split(/,(?![^(]*\))/).map((function(e){var t=e.match(/#[a-zA-Z0-9]+|rgba?\(.*?\)/),o=e.indexOf("inset")>-1,r={};o&&(e=e.replace("inset","")),t&&(r.color=t[0]);var n=e.replace(/\s+/g," ").replace(/^\s|\s$/g,"").split(" ");return r.x=parseInt(n[0])||0,r.y=parseInt(n[1])||0,r.blur=parseInt(n[2])||0,r.spread=parseInt(n[3])||0,r.isInset=o,r}))}i.ComponentCollection.Instance.getCustomQuestionByName("font")||i.ComponentCollection.Instance.add({name:"font",showInToolbox:!1,internal:!0,elementsJSON:Lo(),onInit:function(){i.Serializer.addProperties("font",[{name:"allowEmptyColorValue:boolean",default:!1,visible:!1}])},onLoaded:function(e){Do(e,"allowEmptyColorValue",e.allowEmptyColorValue)},onPropertyChanged:function(e,t,o){Do(e,t,o)},onCreated:function(e){e.contentPanel.getQuestionByName("color").visible="surveyTitle"!==e.name&&"surveyDescription"!==e.name,e.contentPanel.getQuestionByName("placeholdercolor").visible="editorFont"===e.name,e.contentPanel.getQuestionByName("family").choices=[].concat(_o)},valueToQuestion:function(e){return JSON.parse(JSON.stringify(e))},onValueChanged:function(e,t,o){}}),i.ComponentCollection.Instance.getCustomQuestionByName("backgroundcornerradius")||i.ComponentCollection.Instance.add({name:"backgroundcornerradius",showInToolbox:!1,internal:!0,elementsJSON:Ho(),onInit:function(){},onCreated:function(e){},valueToQuestion:function(e){return JSON.parse(JSON.stringify(e))},onValueChanged:function(e,t,o){}}),i.ComponentCollection.Instance.getCustomQuestionByName("shadoweffects")||i.ComponentCollection.Instance.add({name:"shadoweffects",showInToolbox:!1,internal:!0,questionJSON:Uo(),onCreated:function(e){e.valueFromDataCallback=function(e){return void 0===e?[{}]:"string"==typeof e?Jo(e):e},e.valueToDataCallback=function(e){return e?"string"==typeof e?e:Go(Array.isArray(e)?e:[e]):""},e.contentQuestion.panels.forEach((function(e){return e.questions.forEach((function(e){return e.allowRootStyle=!1}))}))}});var Zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.owner},t.prototype.fromJSON=function(t,o){e.prototype.fromJSON.call(this,t,o),t.backgroundImageOpacity&&(this.backgroundImageOpacity=100*t.backgroundImageOpacity)},t.prototype.setCssVariables=function(e){e&&(this.surveyTitle=qo(this.getPropertyByName("surveyTitle"),e),this.surveyDescription=qo(this.getPropertyByName("surveyDescription"),e),this.headerTitle=qo(this.getPropertyByName("headerTitle"),e),this.headerDescription=qo(this.getPropertyByName("headerDescription"),e));var t=e["--sjs-header-backcolor"];t&&(this.backgroundColorSwitch=this.getBackgroundColorSwitchByValue(t),this.backgroundColor="custom"===this.backgroundColorSwitch?t:void 0)},t.prototype.toJSON=function(t){var o=this,r=e.prototype.toJSON.call(this,t);delete r.type,delete r.logoPosition,delete r.headerView,100!==this.backgroundImageOpacity&&(r.backgroundImageOpacity=this.backgroundImageOpacity/100);var n={};return Object.keys(r).forEach((function(e){if("object"==typeof r[e]){var t=o.getPropertyByName(e);"font"===t.type&&(Ro(r[e],t,n),delete r[e])}})),this.setHeaderBackgroundColorCssVariable(n),r.cssVariables=n,delete r.backgroundColorSwitch,delete r.backgroundColor,r},t.prototype.saveToThemeJSON=function(e,t){var o=this.toJSON(t);B(e.cssVariables,o.cssVariables),delete o.cssVariables,Object.keys(o).length>0&&(e.header=o),e.headerView=this.headerView},t.prototype.setHeaderBackgroundColorCssVariable=function(e){var t;"none"===this.backgroundColorSwitch?e["--sjs-header-backcolor"]="transparent":"custom"===this.backgroundColorSwitch&&(e["--sjs-header-backcolor"]=null!==(t=this.backgroundColor)&&void 0!==t?t:"transparent")},t.prototype.getBackgroundColorSwitchByValue=function(e){return e?"transparent"===e?"none":"custom":"accentColor"},t.prototype.getType=function(){return"header"},t}(i.Base);function Ko(){return{family:a.themeEditor.defaultFontFamily,weight:"700",size:32}}function Yo(e){var t={family:a.themeEditor.defaultFontFamily,weight:"400",size:16};return e&&(t.weight="600"),t}function Xo(e,t){return{type:"buttongroup",name:e,visibleIf:function(e){return"advanced"===e.headerView},choices:[{value:"left"},{value:"center"},{value:"right"}],default:t}}function $o(e,t){return{type:"buttongroup",name:e,displayName:"",visibleIf:function(e){return"advanced"===e.headerView},choices:[{value:"top"},{value:"middle"},{value:"bottom"}],default:t}}i.Serializer.addClass("header",[{type:"buttongroup",name:"headerView",default:"basic",choices:[{value:"basic"},{value:"advanced"}]},{type:"buttongroup",name:"logoPosition",visibleIf:function(e){return"basic"===e.headerView},default:"left",choices:[{value:"left"},{value:"right"}]},{type:"spinedit",name:"height",visibleIf:function(e){return"advanced"===e.headerView},default:256,onPropertyEditorUpdate:function(e,t){t&&(t.unit="px",t.min=0)}},{type:"buttongroup",name:"inheritWidthFrom",visibleIf:function(e){return"advanced"===e.headerView},default:"container",choices:[{value:"survey"},{value:"container"}]},{type:"spinedit",name:"textAreaWidth",visibleIf:function(e){return"advanced"===e.headerView},default:512,onPropertyEditorUpdate:function(e,t){t&&(t.unit="px",t.min=0)}},{type:"buttongroup",name:"backgroundColorSwitch",visibleIf:function(e){return"advanced"===e.headerView},isSerializable:!1,default:"accentColor",choices:[{value:"none"},{value:"accentColor"},{value:"custom"}]},{type:"color",name:"backgroundColor",displayName:"",visibleIf:function(e){return"advanced"===e.headerView},isSerializable:!1,onPropertyEditorUpdate:function(e,t){t&&(t.allowEmptyValue=!0,t.enableIf="{composite.backgroundColorSwitch} = 'custom'")}},{name:"backgroundImage:file",visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.storeDataAsText=!1,t.acceptedTypes="image/*")}},{type:"buttongroup",name:"backgroundImageFit",displayName:"",choices:[{value:"cover"},{value:"fill"},{value:"contain"},{value:"tile"}],default:"cover",visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.enableIf="{composite.backgroundImage} notempty")}},{type:"spinedit",name:"backgroundImageOpacity",visibleIf:function(e){return"advanced"===e.headerView},default:100,onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.max=100,t.step=5,t.titleLocation="left",t.enableIf="{composite.backgroundImage} notempty")}},{type:"boolean",name:"overlapEnabled",displayName:"",visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.renderAs="checkbox")}},Xo("logoPositionX","right"),$o("logoPositionY","top"),Xo("titlePositionX","left"),$o("titlePositionY","bottom"),Xo("descriptionPositionX","left"),$o("descriptionPositionY","bottom")]),i.Serializer.addProperties("header",[{type:"font",name:"surveyTitle",visibleIf:function(e){return"basic"===e.headerView},default:Ko()},{type:"font",name:"surveyDescription",visibleIf:function(e){return"basic"===e.headerView},default:Yo()},{type:"font",name:"headerTitle",default:Ko(),visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.allowEmptyColorValue=!0)}},{type:"font",name:"headerDescription",default:Yo(!0),visibleIf:function(e){return"advanced"===e.headerView},onPropertyEditorUpdate:function(e,t){t&&(t.allowEmptyColorValue=!0)}}]);var er=o(2);function tr(){return[{name:"color",type:"color",titleLocation:"hidden"},{name:"opacity",startWithNewLine:!1,type:"spinedit",title:z("theme.opacity"),min:0,max:100,defaultValue:100,unit:"%",titleLocation:"left"}]}function or(){i.ComponentCollection.Instance.getCustomQuestionByName("coloralpha").json.elementsJSON=tr()}function rr(e,t,o){var r=e.contentPanel.questions[0];r&&("colorTitleLocation"==t&&(r.titleLocation=o),"colorTitle"==t&&(r.title=o),"choices"==t&&(r.choices=o),"allowEmptyValue"==t&&(r.allowEmptyValue=o))}function nr(e){return _(e.color,e.opacity/100)}function ir(e){var t=(e.themeName||lr.DefaultTheme.themeName||"default")+"-"+(e.colorPalette||"light");return!0===e.isPanelless&&(t+="-panelless"),t}function ar(e,t,o,r){var n=No[r];if(n)return n;for(var i=Object.keys(No).filter((function(t){return 0===t.indexOf(e+"-")})),a=0,s=i;a<s.length;a++){var l=s[a];0===l.indexOf(e+"-"+t)&&(r=e+"-"+t),0===l.indexOf(e+"-"+t+(o?"-panelless":""))&&(r=e+"-"+t+(o?"-panelless":""))}if(n=No[i[0]])return n;var c=ir({themeName:lr.DefaultTheme.themeName,colorPalette:t||"light",isPanelless:o});return No[c]||lr.DefaultTheme}function sr(e,t){if(!t){var o=ir(e);t=ar(e.themeName,e.colorPalette,e.isPanelless,o)}var r=function e(t,o){void 0===o&&(o={});var r={};return Object.keys(t).forEach((function(n){"object"==typeof t[n]?r[n]=e(t[n],o[n]):void 0!==t[n]&&t[n]!=o[n]&&(r[n]=t[n])})),r}(e,t);return Object.keys(r).forEach((function(e){-1!==e.toLowerCase().indexOf("background")&&(""!==r[e]&&r[e]!==i.Serializer.findProperty("survey",e).defaultValue||delete r[e])})),r.themeName=t.themeName||lr.DefaultTheme.themeName||"default",r.colorPalette=t.colorPalette||"light",r.isPanelless=!!t.isPanelless,r}i.ComponentCollection.Instance.getCustomQuestionByName("coloralpha")||i.ComponentCollection.Instance.add({name:"coloralpha",showInToolbox:!1,internal:!0,elementsJSON:tr(),onInit:function(){i.Serializer.addProperties("coloralpha",[{name:"choices:itemvalue[]",visible:!1},{name:"colorTitleLocation:string",default:"hidden",visible:!1},{name:"allowEmptyValue:boolean",default:!1,visible:!1},{name:"colorTitle:string",visible:!1}])},onLoaded:function(e){rr(e,"colorTitle",e.colorTitle),rr(e,"colorTitleLocation",e.colorTitleLocation),rr(e,"choices",e.choices),rr(e,"allowEmptyValue",e.allowEmptyValue)},onPropertyChanged:function(e,t,o){rr(e,t,o)},valueToQuestion:function(e){return e?nr(e):""},valueFromQuestion:function(e){return"string"==typeof e||void 0===e?M(e):e},onCreated:function(e){e.contentPanel.questions.forEach((function(e){return e.allowRootStyle=!1}))}}),Object.keys(er).forEach((function(e){var t=er[e],o={},r={};B(o,t.cssVariables),B(r,t,{cssVariables:o});var n=ir(t);No[n]=r}));var lr=function(e){function t(){var o=e.call(this)||this;return o.themeCssVariablesChanges={},o.colorCalculator=new Q,o._defaultSessionTheme=t.DefaultTheme,o.onThemeSelected=new i.EventBase,o.onThemePropertyChanged=new i.EventBase,o.onAllowModifyTheme=new i.EventBase,o.blockThemeChangedNotifications=0,Wo(),Mo(),or(),Bo(),o.setNewHeaderProperty(),o.onPropertyValueChangedCallback=function(e,t,r,n,i){o.onThemePropertyValueChangedCallback(e,t,r,n,i)},o}return Y(t,e),t.prototype.getFullThemeName=function(e){return"light"===this.colorPalette?e||this.themeName:(e||this.themeName)+"-"+this.colorPalette},Object.defineProperty(t.prototype,"defaultSessionTheme",{get:function(){return this._defaultSessionTheme},set:function(e){this._defaultSessionTheme=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssVariables",{get:function(){return this.toJSON().cssVariables||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"themeCssCustomizations",{get:function(){var e={};return B(e,this.themeCssVariablesChanges),e},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"theme"},t.prototype.setNewHeaderProperty=function(){var e=new Zo;e.owner=this,this.setPropertyValue("header",e)},t.prototype.hasVariations=function(e){var t,o,r=Object.keys(No),n=this.themeName+"-light",i=this.themeName+"-dark";this.isPanelless&&(n+="-panelless",i+="-panelless"),o=-1!==r.indexOf(n)&&-1!==r.indexOf(i);var a=this.themeName+"-"+this.colorPalette,s=a+"-panelless";return t=-1!==r.indexOf(a)&&-1!==r.indexOf(s),e?o:t},t.prototype.initializeColorCalculator=function(e){e["--sjs-primary-backcolor"]&&e["--sjs-primary-backcolor-light"]&&e["--sjs-primary-backcolor-dark"]&&this.colorCalculator.initialize(e["--sjs-primary-backcolor"],e["--sjs-primary-backcolor-light"],e["--sjs-primary-backcolor-dark"])},t.prototype.cssVariablePropertiesChanged=function(e,t,o){if("primaryColor"===e&&(this.setPropertyValue("--sjs-primary-backcolor",t),this.setThemeCssVariablesChanges("--sjs-primary-backcolor",t)),"--sjs-primary-backcolor"===e&&(this.primaryColor=t,this.colorCalculator.calculateColors(t),this.setPropertyValue("--sjs-primary-backcolor-light",this.colorCalculator.colorSettings.newColorLight),this.setPropertyValue("--sjs-primary-backcolor-dark",this.colorCalculator.colorSettings.newColorDark),this.setThemeCssVariablesChanges("--sjs-primary-backcolor-light",this.colorCalculator.colorSettings.newColorLight),this.setThemeCssVariablesChanges("--sjs-primary-backcolor-dark",this.colorCalculator.colorSettings.newColorDark)),"--sjs-shadow-inner"===e||"--sjs-shadow-small"===e){var r=zo(t);this.setPropertyValue(e+"-reset",r),this.setThemeCssVariablesChanges(e+"-reset",r)}if("scale"==e&&this.setThemeCssVariablesChanges("--sjs-base-unit",8*t/100+"px"),"fontSize"==e&&this.setThemeCssVariablesChanges("--sjs-font-size",16*t/100+"px"),"cornerRadius"==e&&this.setThemeCssVariablesChanges("--sjs-corner-radius",t+"px"),"questionBackgroundTransparency"===e||"editorPanel"===e){var n=M(this.getPropertyValue("--sjs-general-backcolor-dim-light")).color,i=this.getPropertyValue("questionBackgroundTransparency");this.setThemeCssVariablesChanges("--sjs-editor-background",_(n,i/100))}if("panelBackgroundTransparency"===e||"questionPanel"===e){n=M(this.getPropertyValue("--sjs-general-backcolor")).color;var a=this.getPropertyValue("panelBackgroundTransparency");this.setThemeCssVariablesChanges("--sjs-question-background",_(n,a/100))}"font"===o.type&&(Ro(t,o,this.themeCssVariablesChanges),this.onThemePropertyChanged.fire(this,{name:e,value:t})),"backgroundcornerradius"===o.type&&(Qo(t,o,this.themeCssVariablesChanges),this.onThemePropertyChanged.fire(this,{name:e,value:t}))},t.prototype.setThemeCssVariablesChanges=function(e,t){this.themeCssVariablesChanges[e]=t,this.onThemePropertyChanged.fire(this,{name:e,value:t})},t.prototype.initialize=function(e,o){void 0===e&&(e={}),this._defaultSessionTheme=t.DefaultTheme,this.backgroundImage="backgroundImage"in e?e.backgroundImage:null==o?void 0:o.backgroundImage,this.backgroundImageFit=void 0!==e.backgroundImageFit?e.backgroundImageFit:null==o?void 0:o.backgroundImageFit,this.backgroundImageAttachment=void 0!==e.backgroundImageAttachment?e.backgroundImageAttachment:null==o?void 0:o.backgroundImageAttachment,this.backgroundOpacity=100*((void 0!==e.backgroundOpacity?e.backgroundOpacity:null==o?void 0:o.backgroundOpacity)||1),this.loadTheme(e),this.header.logoPosition=null==o?void 0:o.logoPosition,this.undoRedoManager=new $t},Object.defineProperty(t.prototype,"header",{get:function(){return this.getPropertyValue("header")},set:function(e){e&&(this.setNewHeaderProperty(),this.header.fromJSON(e.toJSON()))},enumerable:!1,configurable:!0}),t.prototype.loadTheme=function(e){this.blockThemeChangedNotifications+=1;try{var o=ir(e),r=ar(e.themeName,e.colorPalette,e.isPanelless,o),n=sr(e,r);this.themeName=n.themeName,this.colorPalette=n.colorPalette,this.isPanelless=n.isPanelless,this.backgroundImage=e.backgroundImage||this.backgroundImage,this.backgroundImageFit=e.backgroundImageFit||this.backgroundImageFit,this.backgroundImageAttachment=e.backgroundImageAttachment||this.backgroundImageAttachment;var i={};B(i,t.DefaultTheme.cssVariables||{},r.cssVariables||{}),B(i,e.cssVariables||{},this.themeCssVariablesChanges);var a={backgroundImage:this.backgroundImage||r.backgroundImage||"",backgroundImageFit:this.backgroundImageFit||r.backgroundImageFit,backgroundImageAttachment:this.backgroundImageAttachment||r.backgroundImageAttachment,backgroundOpacity:this.backgroundOpacity/100||r.backgroundOpacity},s={};Object.keys(s).length>0&&(a.header=s),B(a,e,{cssVariables:i,themeName:this.themeName,colorPalette:this.colorPalette,isPanelless:this.isPanelless}),this.initializeColorCalculator(a.cssVariables),this.fromJSON(a)}finally{this.blockThemeChangedNotifications-=1}},t.prototype.resetTheme=function(){this.setTheme({themeName:this.defaultSessionTheme.themeName,isPanelless:this.defaultSessionTheme.isPanelless,colorPalette:this.defaultSessionTheme.colorPalette})},t.prototype.setTheme=function(e){var t=this,o=this.themeCssVariablesChanges["--sjs-header-backcolor"];this.themeCssVariablesChanges={},void 0!==o&&(this.themeCssVariablesChanges["--sjs-header-backcolor"]=o);try{this.blockThemeChangedNotifications+=1,this.iteratePropertiesHash((function(e,o){t.setPropertyValue(o,void 0)})),this.setNewHeaderProperty()}finally{this.blockThemeChangedNotifications-=1}this.loadTheme(e),this.onThemeSelected.fire(this,{theme:this.toJSON()})},t.prototype.selectTheme=function(e,t,o){void 0===t&&(t="light"),void 0===o&&(o="panels"),this.themeName=e,this.colorPalette=t,this.isPanelless="lightweight"===o;var r=this.findSuitableTheme(e);this.setTheme(r)},t.prototype.generalPropertiesChanged=function(e,t){var o;return-1!==["themeName","isPanelless","colorPalette"].indexOf(e)&&("themeName"===e&&this.loadTheme(this.findSuitableTheme(t)||((o={})[e]=t,o.isPanelless=this.isPanelless,o.colorPalette=this.colorPalette,o)),"isPanelless"===e&&this.loadTheme({themeName:this.themeName,isPanelless:t,colorPalette:this.colorPalette}),"colorPalette"===e&&this.loadTheme({themeName:this.themeName,isPanelless:this.isPanelless,colorPalette:t}),this.onThemeSelected.fire(this,{theme:this.toJSON()}),!0)},t.prototype.onThemePropertyValueChangedCallback=function(e,t,o,r,n){var i=this;if(this.undoRedoManager&&(0==this.blockThemeChangedNotifications&&this.undoRedoManager.startTransaction(e+" changed"),this.undoRedoManager.onPropertyValueChanged(e,t,o,r,n)),!(this.blockThemeChangedNotifications>0)){if(this!==r){var a=r.toJSON();a.cssVariables&&Object.keys(a.cssVariables).forEach((function(e){return i.setThemeCssVariablesChanges(e,a.cssVariables[e])})),this.onThemePropertyChanged.fire(this,{name:e,value:o})}if(0===e.indexOf("--")&&this.setThemeCssVariablesChanges(e,o),this.generalPropertiesChanged(e,o))this.undoRedoManager&&0==this.blockThemeChangedNotifications&&this.undoRedoManager.stopTransaction();else{if(this.blockThemeChangedNotifications+=1,-1!==["backgroundImage","backgroundImageFit","backgroundImageAttachment","backgroundOpacity"].indexOf(e))return this[e]=o,this.onThemePropertyChanged.fire(this,{name:e,value:o}),this.blockThemeChangedNotifications-=1,void(this.undoRedoManager&&0==this.blockThemeChangedNotifications&&this.undoRedoManager.stopTransaction());this.cssVariablePropertiesChanged(e,o,r.getPropertyByName(e)),this.blockThemeChangedNotifications-=1,this.undoRedoManager&&0==this.blockThemeChangedNotifications&&this.undoRedoManager.stopTransaction()}}},t.prototype.findSuitableTheme=function(e){var t=ir({themeName:e,colorPalette:this.colorPalette,isPanelless:this.isPanelless});return ar(e,this.colorPalette,this.isPanelless,t)},t.prototype.fromJSON=function(t,o){var r=this;if(t){var n={};B(n,t),delete n.header,delete n.cssVariables,e.prototype.fromJSON.call(this,n,o),this.header.fromJSON(t.header||{}),t.cssVariables&&(this.primaryColor=t.cssVariables["--sjs-primary-backcolor"],e.prototype.fromJSON.call(this,t.cssVariables,o),this.header.setCssVariables(t.cssVariables),this.scale=this["--sjs-base-unit"]?c(100*parseFloat(this["--sjs-base-unit"])/8):void 0,this.fontSize=this["--sjs-font-size"]?c(100*parseFloat(this["--sjs-font-size"])/16):void 0,this.cornerRadius=this["--sjs-corner-radius"]?c(parseFloat(this["--sjs-corner-radius"])):void 0,t.backgroundOpacity&&(this.backgroundOpacity=100*t.backgroundOpacity),this.questionPanel=Fo(this.getPropertyByName("questionPanel"),t.cssVariables,"--sjs-general-backcolor","--sjs-general-backcolor-dark",this.cornerRadius),this.editorPanel=Fo(this.getPropertyByName("editorPanel"),t.cssVariables,"--sjs-general-backcolor-dim-light","--sjs-general-backcolor-dim-dark",this.cornerRadius),i.Serializer.getProperties("theme").forEach((function(e){"font"===e.type&&(r[e.name]=qo(e,t.cssVariables))})),this.pageTitle=qo(this.getPropertyByName("pageTitle"),t.cssVariables,"--sjs-general-dim-forecolor"),this.pageDescription=qo(this.getPropertyByName("pageDescription"),t.cssVariables,"--sjs-general-dim-forecolor-light"),this.questionTitle=qo(this.getPropertyByName("questionTitle"),t.cssVariables,"--sjs-general-forecolor"),this.questionDescription=qo(this.getPropertyByName("questionDescription"),t.cssVariables,"--sjs-general-forecolor-light"),this.editorFont=qo(this.getPropertyByName("editorFont"),t.cssVariables,"--sjs-general-forecolor","--sjs-general-forecolor-light"))}},t.prototype.toJSON=function(t){var o=this;void 0!==this.scale&&(this["--sjs-base-unit"]=8*this.scale/100+"px"),void 0!==this.fontSize&&(this["--sjs-font-size"]=16*this.fontSize/100+"px"),void 0!==this.cornerRadius&&(this["--sjs-corner-radius"]=this.cornerRadius+"px");var r=e.prototype.toJSON.call(this,t);r.backgroundImage=this.backgroundImage||"",r.backgroundOpacity=this.backgroundOpacity/100,r.backgroundImageAttachment=this.backgroundImageAttachment,r.backgroundImageFit=this.backgroundImageFit;var n={};return Object.keys(r).forEach((function(e){if(0==e.indexOf("--"))n[e]=r[e],delete r[e];else if("object"==typeof r[e]){var t=o.getPropertyByName(e);"font"===t.type&&(Ro(r[e],t,n),delete r[e]),"backgroundcornerradius"===t.type&&(Qo(r[e],t,n),delete r[e])}})),r.cssVariables=n,this.header.saveToThemeJSON(r,t),r},t.DefaultTheme=No["default-light"],Z([Object(i.property)()],t.prototype,"backgroundImage",void 0),Z([Object(i.property)()],t.prototype,"backgroundImageFit",void 0),Z([Object(i.property)()],t.prototype,"backgroundImageAttachment",void 0),Z([Object(i.property)()],t.prototype,"backgroundOpacity",void 0),Z([Object(i.property)()],t.prototype,"themeName",void 0),Z([Object(i.property)()],t.prototype,"colorPalette",void 0),Z([Object(i.property)()],t.prototype,"isPanelless",void 0),Z([Object(i.property)()],t.prototype,"groupAppearanceAdvancedMode",void 0),Z([Object(i.property)({onSet:function(e,t){var o=_(M(t.questionPanel.backcolor).color,e/100);if(t.questionPanel.backcolor!==o){var r=K({},t.questionPanel);r.backcolor=o,t.questionPanel=r}}})],t.prototype,"panelBackgroundTransparency",void 0),Z([Object(i.property)({onSet:function(e,t){var o=_(M(t.editorPanel.backcolor).color,e/100);if(t.editorPanel.backcolor!==o){var r=K({},t.editorPanel);r.backcolor=o,t.editorPanel=r}}})],t.prototype,"questionBackgroundTransparency",void 0),Z([Object(i.property)()],t.prototype,"scale",void 0),Z([Object(i.property)()],t.prototype,"cornerRadius",void 0),Z([Object(i.property)()],t.prototype,"fontSize",void 0),Z([Object(i.property)({onSet:function(e,t){var o=M(e.backcolor).opacity;t.panelBackgroundTransparency!==o&&(t.panelBackgroundTransparency=o)}})],t.prototype,"questionPanel",void 0),Z([Object(i.property)({onSet:function(e,t){var o=M(e.backcolor).opacity;t.questionBackgroundTransparency!==o&&(t.questionBackgroundTransparency=o)}})],t.prototype,"editorPanel",void 0),t}(i.Base);i.Serializer.addClass("theme",[{type:"dropdown",name:"themeName",choices:ko.map((function(e){return{value:e,text:z("theme.names."+e)}})),category:"general"},{type:"buttongroup",name:"colorPalette",displayName:"",choices:[{value:"light"},{value:"dark"}],category:"general",enableIf:function(e){return!e||e.hasVariations(!0)}},{type:"buttongroup",name:"isPanelless",choices:[{value:!1},{value:!0}],category:"general",enableIf:function(e){return!e||e.hasVariations(!1)}},{type:"spinedit",isSerializable:!1,name:"scale",onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.step=5)}},{type:"spinedit",isSerializable:!1,name:"cornerRadius",onPropertyEditorUpdate:function(e,t){t&&(t.unit="px",t.min=0)}},{type:"spinedit",isSerializable:!1,name:"fontSize",onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.step=5)}},{type:"spinedit",isSerializable:!1,name:"panelBackgroundTransparency",default:100,onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.max=100,t.step=5)}},{type:"spinedit",isSerializable:!1,name:"questionBackgroundTransparency",default:100,onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.max=100,t.step=5)}},{type:"backgroundcornerradius",name:"editorPanel"},{type:"backgroundcornerradius",name:"questionPanel"}],(function(e){return new lr})),i.Serializer.addProperties("theme",[{name:"backgroundImage:file",onPropertyEditorUpdate:function(e,t){t&&(t.storeDataAsText=!1,t.acceptedTypes="image/*")}},{name:"backgroundImageFit",displayName:"",enableIf:function(e){return!!e.backgroundImage},choices:[{value:"auto"},{value:"contain"},{value:"cover"}],default:"cover"},{name:"backgroundImageAttachment",displayName:"",enableIf:function(e){return!!e.backgroundImage},choices:[{value:"fixed"},{value:"scroll"}],default:"scroll"},{type:"spinedit",isSerializable:!1,name:"backgroundOpacity",enableIf:function(e){return!!e.backgroundImage},default:100,onPropertyEditorUpdate:function(e,t){t&&(t.unit="%",t.min=0,t.max=100,t.step=5,t.titleLocation="left")}},{type:"header",name:"header",isSerializable:!1,onPropertyEditorUpdate:function(e,t){if(t){var o=t.contentPanel.elements,r=function(e){"panel"===e.getType()&&e.elements.forEach((function(e){r(e)}));var t=e.obj;if(t){var o=e.property;o&&o.onPropertyEditorUpdate&&o.onPropertyEditorUpdate(t,e)}};o.forEach((function(e){r(e)}))}}},{type:"color",isSerializable:!1,name:"primaryColor"},{type:"dropdown",name:"--sjs-font-family",default:a.themeEditor.defaultFontFamily,choices:[].concat(_o),onPropertyEditorUpdate:function(e,t){t&&(t.allowClear=!1,t.choices=[].concat(_o))}},{name:"--sjs-font-size",visible:!1,default:"16px"},{name:"--sjs-corner-radius",visible:!1},{name:"--sjs-base-unit",visible:!1},{name:"--sjs-corner-radius",visible:!1},{type:"font",name:"pageTitle",default:{family:a.themeEditor.defaultFontFamily,weight:"700",size:24}},{type:"font",name:"pageDescription",default:{family:a.themeEditor.defaultFontFamily,weight:"700",size:24}},{type:"shadoweffects",name:"--sjs-shadow-small"},{type:"font",name:"questionTitle",default:{family:a.themeEditor.defaultFontFamily,weight:"600",size:16}},{type:"font",name:"questionDescription",default:{family:a.themeEditor.defaultFontFamily,weight:"400",size:16}},{type:"shadoweffects",name:"--sjs-shadow-inner"},{type:"font",name:"editorFont",default:{family:a.themeEditor.defaultFontFamily,weight:"400",size:16}},{type:"coloralpha",name:"--sjs-border-default",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.borderDefault"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-border-light",displayName:"",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.borderLight"),t.colorTitleLocation="left")}},{name:"--sjs-general-backcolor",visible:!1},{name:"--sjs-general-backcolor-dark",visible:!1},{name:"--sjs-general-backcolor-dim-light",visible:!1},{name:"--sjs-general-backcolor-dim-dark",visible:!1},{name:"--sjs-general-forecolor",visible:!1},{name:"--sjs-general-forecolor-light",visible:!1},{name:"--sjs-general-dim-forecolor",visible:!1},{name:"--sjs-general-dim-forecolor-light",visible:!1},{name:"--sjs-secondary-backcolor",visible:!1},{name:"--sjs-secondary-backcolor-light",visible:!1},{name:"--sjs-secondary-backcolor-semi-light",visible:!1},{name:"--sjs-secondary-forecolor",visible:!1},{name:"--sjs-secondary-forecolor-light",visible:!1},{name:"--sjs-shadow-small-reset",visible:!1},{name:"--sjs-shadow-medium",visible:!1},{name:"--sjs-shadow-large",visible:!1},{name:"--sjs-shadow-inner-reset",visible:!1},{name:"--sjs-border-light",visible:!1},{name:"--sjs-border-default",visible:!1},{name:"--sjs-border-inside",visible:!1},{name:"--sjs-special-red",visible:!1},{name:"--sjs-special-red-light",visible:!1},{name:"--sjs-special-red-forecolor",visible:!1},{name:"--sjs-special-green",visible:!1},{name:"--sjs-special-green-light",visible:!1},{name:"--sjs-special-green-forecolor",visible:!1},{name:"--sjs-special-blue",visible:!1},{name:"--sjs-special-blue-light",visible:!1},{name:"--sjs-special-blue-forecolor",visible:!1},{name:"--sjs-special-yellow",visible:!1},{name:"--sjs-special-yellow-light",visible:!1},{name:"--sjs-special-yellow-forecolor",visible:!1},{name:"--sjs-article-font-xx-large-textDecoration",visible:!1},{name:"--sjs-article-font-xx-large-fontWeight",visible:!1},{name:"--sjs-article-font-xx-large-fontStyle",visible:!1},{name:"--sjs-article-font-xx-large-fontStretch",visible:!1},{name:"--sjs-article-font-xx-large-letterSpacing",visible:!1},{name:"--sjs-article-font-xx-large-lineHeight",visible:!1},{name:"--sjs-article-font-xx-large-paragraphIndent",visible:!1},{name:"--sjs-article-font-xx-large-textCase",visible:!1},{name:"--sjs-article-font-x-large-textDecoration",visible:!1},{name:"--sjs-article-font-x-large-fontWeight",visible:!1},{name:"--sjs-article-font-x-large-fontStyle",visible:!1},{name:"--sjs-article-font-x-large-fontStretch",visible:!1},{name:"--sjs-article-font-x-large-letterSpacing",visible:!1},{name:"--sjs-article-font-x-large-lineHeight",visible:!1},{name:"--sjs-article-font-x-large-paragraphIndent",visible:!1},{name:"--sjs-article-font-x-large-textCase",visible:!1},{name:"--sjs-article-font-large-textDecoration",visible:!1},{name:"--sjs-article-font-large-fontWeight",visible:!1},{name:"--sjs-article-font-large-fontStyle",visible:!1},{name:"--sjs-article-font-large-fontStretch",visible:!1},{name:"--sjs-article-font-large-letterSpacing",visible:!1},{name:"--sjs-article-font-large-lineHeight",visible:!1},{name:"--sjs-article-font-large-paragraphIndent",visible:!1},{name:"--sjs-article-font-large-textCase",visible:!1},{name:"--sjs-article-font-medium-textDecoration",visible:!1},{name:"--sjs-article-font-medium-fontWeight",visible:!1},{name:"--sjs-article-font-medium-fontStyle",visible:!1},{name:"--sjs-article-font-medium-fontStretch",visible:!1},{name:"--sjs-article-font-medium-letterSpacing",visible:!1},{name:"--sjs-article-font-medium-lineHeight",visible:!1},{name:"--sjs-article-font-medium-paragraphIndent",visible:!1},{name:"--sjs-article-font-medium-textCase",visible:!1},{name:"--sjs-article-font-default-textDecoration",visible:!1},{name:"--sjs-article-font-default-fontWeight",visible:!1},{name:"--sjs-article-font-default-fontStyle",visible:!1},{name:"--sjs-article-font-default-fontStretch",visible:!1},{name:"--sjs-article-font-default-letterSpacing",visible:!1},{name:"--sjs-article-font-default-lineHeight",visible:!1},{name:"--sjs-article-font-default-paragraphIndent",visible:!1},{name:"--sjs-article-font-default-textCase",visible:!1},{type:"color",name:"--sjs-general-backcolor-dim"},{type:"coloralpha",name:"--sjs-primary-backcolor",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryDefaultColor"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-primary-backcolor-dark",displayName:"",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryDarkColor"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-primary-backcolor-light",displayName:"",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryLightColor"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-primary-forecolor",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryForecolor"),t.colorTitleLocation="left")}},{type:"coloralpha",name:"--sjs-primary-forecolor-light",displayName:"",onPropertyEditorUpdate:function(e,t){t&&(t.colorTitle=z("theme.primaryForecolorLight"),t.colorTitleLocation="left")}}]),o(15);var cr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getSwitcherIconCss=function(){return(new i.CssClassBuilder).append("svc-switcher__icon").append("svc-switcher__icon--checked",this.checked).toString()},t.prototype.getActionBarItemCss=function(){return"svc-switcher "+e.prototype.getActionBarItemCss.call(this)},Z([Object(i.property)()],t.prototype,"checked",void 0),t}(i.Action),pr={theme:{properties:[{name:"header",tab:"header"},{name:"--sjs-general-backcolor-dim",tab:"background"},{name:"backgroundImage",tab:"background"},{name:"backgroundImageFit",tab:"background"},{name:"backgroundImageAttachment",tab:"background"},{name:"backgroundOpacity",tab:"background"},{name:"primaryColor",tab:"appearancecolor"},{name:"panelBackgroundTransparency",tab:"appearancecolor"},{name:"questionBackgroundTransparency",tab:"appearancecolor"},{name:"--sjs-primary-backcolor",tab:"appearanceprimarycolor"},{name:"--sjs-primary-backcolor-dark",tab:"appearanceprimarycolor"},{name:"--sjs-primary-backcolor-light",tab:"appearanceprimarycolor"},{name:"--sjs-primary-forecolor",tab:"appearanceprimarycolor"},{name:"--sjs-primary-forecolor-light",tab:"appearanceprimarycolor"},{name:"--sjs-font-family",tab:"appearancefont"},{name:"fontSize",tab:"appearancefont"},{name:"scale",tab:"appearanceother"},{name:"cornerRadius",tab:"appearanceother"},{name:"pageTitle",tab:"appearancepage"},{name:"pageDescription",tab:"appearancepage"},{name:"questionPanel",tab:"appearancequestion"},{name:"--sjs-shadow-small",tab:"appearancequestion"},{name:"questionTitle",tab:"appearancequestion"},{name:"questionDescription",tab:"appearancequestion"},{name:"editorPanel",tab:"appearanceinput"},{name:"--sjs-shadow-inner",tab:"appearanceinput"},{name:"editorFont",tab:"appearanceinput"},{name:"--sjs-border-default",tab:"appearancelines"},{name:"--sjs-border-light",tab:"appearancelines"}],tabs:[{name:"header",index:100},{name:"background",index:200},{name:"appearance",index:300},{name:"appearancecolor",parent:"appearance",index:100},{name:"appearancefont",parent:"appearance",index:200},{name:"appearanceother",parent:"appearance",index:300},{name:"appearanceprimarycolor",parent:"appearance",index:400},{name:"appearancepage",parent:"appearance",index:500},{name:"appearancequestion",parent:"appearance",index:600},{name:"appearanceinput",parent:"appearance",index:700},{name:"appearancelines",parent:"appearance",index:800}]},"header@header":{properties:[{name:"headerView"},{name:"logoPosition"},{name:"surveyTitle"},{name:"surveyDescription"},{name:"height",tab:"layout"},{name:"inheritWidthFrom",tab:"layout"},{name:"textAreaWidth",tab:"layout"},{name:"backgroundColorSwitch",tab:"background"},{name:"backgroundColor",tab:"background"},{name:"backgroundImage",tab:"background"},{name:"backgroundImageFit",tab:"background"},{name:"backgroundImageOpacity",tab:"background"},{name:"overlapEnabled",tab:"background"},{name:"headerTitle",tab:"header"},{name:"headerDescription",tab:"header"},{name:"logoPositionX",tab:"positions"},{name:"logoPositionY",tab:"positions"},{name:"titlePositionX",tab:"positions"},{name:"titlePositionY",tab:"positions"},{name:"descriptionPositionX",tab:"positions"},{name:"descriptionPositionY",tab:"positions"}],tabs:[{name:"settings"},{name:"layout",parent:"settings",index:100},{name:"background",parent:"settings",index:200},{name:"header",parent:"settings",index:300},{name:"positions",parent:"settings",index:400}]}},ur={autoGenerateProperties:!0,classes:pr},dr=function(){function e(){}return e.definition=pr,e}(),hr=function(){function e(e){var t=this;this.creator=e,this.allowModifyTheme=!0,this.simulatorCssClasses=i.surveyCss[i.defaultV2ThemeName],this._availableThemes=[].concat(ko),this.creatorPropertyChanged=function(e,o){"isMobileView"===o.name&&t.updateVisibilityOfPropertyGridGroups()},this.saveToFileHandler=F,this.autoSaveTimerId=null,this.onThemeSelected=new i.EventBase,this.onThemePropertyChanged=new i.EventBase,this.onAllowModifyTheme=new i.EventBase,e.addPluginTab("theme",this),this.simulatorCssClasses=i.surveyCss[i.defaultV2ThemeName],this.createActions().forEach((function(t){return e.toolbar.actions.push(t)})),this.propertyGrid=new nt(void 0,e,ur),this.propertyGrid.surveyInstanceCreatedArea="theme-tab:property-grid";var o=new uo(this.propertyGrid,e);this.propertyGridTab=this.creator.sidebar.addTab("theme","svc-property-grid",o),this.propertyGridTab.caption=G.getString("ed.themePropertyGridTitle"),this.themeModel=new lr,e.registerShortcut("undo_theme",{name:"undo",affectedTab:"theme",hotKey:{ctrlKey:!0,keyCode:90},macOsHotkey:{keyCode:90},execute:function(){return t.undo()}}),e.registerShortcut("redo_theme",{name:"redo",affectedTab:"theme",hotKey:{ctrlKey:!0,keyCode:89},macOsHotkey:{keyCode:89},execute:function(){return t.redo()}}),e.onPropertyChanged.add(this.creatorPropertyChanged)}return e.prototype.createVisibleUpdater=function(){var e=this;return new i.ComputedUpdater((function(){return"theme"===e.creator.activeTab}))},e.prototype.createAppearanceAdvancedModeAction=function(){var e=this,t=new cr({id:"advancedMode",component:"svc-switcher",ariaRole:"checkbox",css:"sv-theme-group_title-action",title:z("theme.advancedMode"),visible:!this.creator.isMobileView,action:function(){t.checked=!t.checked,e.propertyGrid.survey.setVariable("advancedmode",t.checked)}});t.checked=!!this.propertyGrid.survey.getVariable("advancedmode"),this.advancedModeSwitcher=t},e.prototype.addSubGroupTitle=function(e,t){if(!e.getQuestionByName(t)){var o=i.Serializer.createClass("html");o.fromJSON({name:t,visibleIf:"{advancedmode} = true",html:"<div class='spg-theme-group-caption'>"+z(t)+"</div>"}),e.addElement(o)}},e.prototype.updateSubGroups=function(e){var t=this;["appearancelines","appearanceinput","appearancequestion","appearancepage","appearanceprimarycolor"].forEach((function(e){return t.setVisibleIf(e,!0)})),["appearancecolor","appearancefont","appearanceother"].forEach((function(e){return t.setVisibleIf(e,!1)})),this.addSubGroupTitle(e.getPanelByName("appearanceprimarycolor"),"theme.pageTitle"),this.addSubGroupTitle(e.getPanelByName("appearancepage"),"theme.questionTitle"),this.addSubGroupTitle(e.getPanelByName("appearancequestion"),"theme.editorPanel"),this.addSubGroupTitle(e.getPanelByName("appearanceinput"),"theme.lines")},e.prototype.updatePropertyGridEditorsAvailability=function(){var e=this.model.survey,t=this.propertyGrid.survey.pages[0],o=null==t?void 0:t.getElementByName("header");if(o&&o.elements.length>0){var r=o.elements[0].contentPanel;this.setCoverPropertiesFromSurvey(r,e)}var n=this.propertyGrid.survey.getQuestionByName("pageTitle"),i=e.isSinglePage?e.pages[0].elements:e.pages;n&&(n.readOnly=!i.some((function(e){return!!e.title})));var a=this.propertyGrid.survey.getQuestionByName("pageDescription");a&&(a.readOnly=!i.some((function(e){return!!e.description})))},e.prototype.getPredefinedColorsItemValues=function(){var e=this;return Object.keys(Ao[this.themeModel.colorPalette]).map((function(t){return new i.ItemValue(Ao[e.themeModel.colorPalette][t],z("theme.colors."+t))}))},e.prototype.updatePropertyGridColorEditorWithPredefinedColors=function(){var e=this,t=this.propertyGrid.survey.pages[0],o=null==t?void 0:t.getElementByName("header");if(o&&o.elements.length>0){var r=o.elements[0].contentPanel.getQuestionByName("backgroundColor");r&&(r.choices=this.getPredefinedColorsItemValues())}this.propertyGrid.survey.getAllQuestions().forEach((function(t){-1!==["color","coloralpha"].indexOf(t.getType())&&(t.choices=e.getPredefinedColorsItemValues())}))},e.prototype._setPGEditorPropertyValue=function(e,t,o){e&&(e[t]=o)},e.prototype.setCoverPropertiesFromSurvey=function(e,t){this._setPGEditorPropertyValue(e.getQuestionByName("headerView"),"value",t.headerView),this._setPGEditorPropertyValue(e.getQuestionByName("logoPosition"),"value",t.logoPosition),this._setPGEditorPropertyValue(e.getQuestionByName("surveyTitle"),"readOnly",!t.hasTitle),this._setPGEditorPropertyValue(e.getQuestionByName("surveyDescription"),"readOnly",!t.hasDescription),this._setPGEditorPropertyValue(e.getQuestionByName("headerTitle"),"readOnly",!t.hasTitle),this._setPGEditorPropertyValue(e.getQuestionByName("headerDescription"),"readOnly",!t.hasDescription),this._setPGEditorPropertyValue(e.getQuestionByName("logoPositionX"),"readOnly",!t.logo),this._setPGEditorPropertyValue(e.getQuestionByName("logoPositionY"),"readOnly",!t.logo),this._setPGEditorPropertyValue(e.getQuestionByName("logoPosition"),"readOnly",!t.logo),this._setPGEditorPropertyValue(e.getQuestionByName("titlePositionX"),"readOnly",!t.title),this._setPGEditorPropertyValue(e.getQuestionByName("titlePositionY"),"readOnly",!t.title),this._setPGEditorPropertyValue(e.getQuestionByName("descriptionPositionX"),"readOnly",!t.description),this._setPGEditorPropertyValue(e.getQuestionByName("descriptionPositionY"),"readOnly",!t.description)},e.prototype.updateVisibilityOfPropertyGridGroups=function(){var e=this.propertyGrid.survey.pages[0],t=null==e?void 0:e.getElementByName("header");t&&(t.visible=!this.creator.isMobileView),this.advancedModeSwitcher&&(this.advancedModeSwitcher.visible=!this.creator.isMobileView)},e.prototype.setVisibleIf=function(e,t){var o=this.propertyGrid.survey.getPanelByName(e);o&&(o.visibleIf="{advancedmode} = "+t)},e.prototype.activate=function(){var e,t=this;this.model=new Vo(this.creator,this.simulatorCssClasses),this.themeModel.initialize(this.creator.theme,this.creator.survey),this.update(),this.propertyGrid.survey.onOpenFileChooser.clear(),this.propertyGrid.obj=this.themeModel,this.propertyGrid.survey.mode="edit",this.propertyGrid.survey.getAllQuestions().forEach((function(e){return e.readOnly=!1})),this.onAvailableThemesChanged(this.availableThemes),this.updateAllowModifyTheme(),this.propertyGrid.survey.setVariable("advancedmode",!!(null===(e=this.advancedModeSwitcher)||void 0===e?void 0:e.checked));var o=K({},We);o.root+=" spg-theme-builder-root",this.propertyGrid.survey.css=o,this.updateSubGroups(this.propertyGrid.survey),this.propertyGrid.survey.onGetPanelTitleActions.add((function(e,o){o.panel&&"appearance"==o.panel.name&&(t.createAppearanceAdvancedModeAction(),o.titleActions.push(t.advancedModeSwitcher))})),this.propertyGrid.survey.onOpenFileChooser.add((function(e,o){var r,n,i={};if(B(i,o.context,{element:t.themeModel,elementType:"theme"}),o.element){var a=o.element;i.propertyName=a.name,"settings"===(null===(n=null===(r=null==a?void 0:a.parent)||void 0===r?void 0:r.parent)||void 0===n?void 0:n.name)&&(i.elementType="header",i.element=i.element.header)}t.creator.chooseFiles(o.input,o.callback,i)})),this.propertyGrid.survey.onUpdatePanelCssClasses.add((function(e,t){var o,r;if(t.panel.hasParent){var n=null!==(o=t.panel.parent)&&void 0!==o?o:t.panel.parentQuestion;!n||n.hasParent&&"settings"!==n.name&&"settings"!==(null===(r=n.parentQuestion)||void 0===r?void 0:r.name)?(t.cssClasses.panel.container="spg-panel-group",t.cssClasses.panel.content="spg-panel-group__content"):(t.cssClasses.panel.container="spg-nested-panel",t.cssClasses.panel.content="spg-nested-panel__content")}})),this.updatePropertyGridEditorsAvailability(),this.updateVisibilityOfPropertyGridGroups(),this.updatePropertyGridColorEditorWithPredefinedColors(),this.creator.sidebar.activeTab=this.propertyGridTab.id,this.propertyGridTab.visible=!0,this.creator.expandCategoryIfNeeded()},e.prototype.update=function(){var e=this;if(this.model){this.model.simulator.landscape="portrait"!=this.creator.previewOrientation,this.model.testAgainAction=this.testAgainAction,this.model.prevPageAction=this.prevPageAction,this.model.nextPageAction=this.nextPageAction;var t={showPagesInTestSurveyTab:this.creator.showPagesInTestSurveyTab};this.model.initialize(this.creator.JSON,t),this.updateSimulatorTheme(),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction.css=this.model.showInvisibleElements?"sv-action-bar-item--active":"",this.invisibleToggleAction.visible=this.model.isRunning),this.updateUndeRedoActions(),this.themeModel.undoRedoManager.canUndoRedoCallback=function(){e.updateUndeRedoActions()},this.model.show(),this.model.onPropertyChanged.add((function(t,o){"isRunning"===o.name&&(e.invisibleToggleAction&&(e.invisibleToggleAction.visible=e.model.isRunning),e.testAgainAction.visible=!e.model.isRunning)})),this.themeModel.onThemeSelected.add((function(t,o){e.syncTheme(o.theme),e.resetTheme.enabled=ir(t.defaultSessionTheme)!==ir(o.theme),e.saveThemeAction.enabled=!0,e.onThemeSelected.fire(e,o),e.creator.isAutoSave&&e.processAutoSave(),e.propertyGrid.survey.editingObj=void 0,e.propertyGrid.survey.editingObj=t,e.updateAllowModifyTheme(),e.updatePropertyGridColorEditorWithPredefinedColors()})),this.themeModel.onThemePropertyChanged.add((function(t,o){e.syncTheme(),"--sjs-base-unit"==o.name&&e.model.survey.triggerResponsiveness(!0),"logoPosition"==o.name&&(e.creator.survey.logoPosition=o.value),e.resetTheme.enabled=!0,e.saveThemeAction.enabled=!0,e.onThemePropertyChanged.fire(e,o),e.creator.isAutoSave&&e.processAutoSave()})),this.themeModel.onAllowModifyTheme.add((function(t,o){e.onAllowModifyTheme.fire(e,o)})),this.resetTheme.enabled=ir(this.themeModel.defaultSessionTheme)!==ir(this.creator.theme)||this.isModified}},e.prototype.updateAllowModifyTheme=function(){var e=this,t={theme:this.themeModel,allow:!this.creator.readOnly};this.onAllowModifyTheme.fire(this,t),this.propertyGrid.survey.getAllQuestions().forEach((function(o){-1===["themeName","colorPalette","isPanelless"].indexOf(o.name)&&(o.readOnly=e.creator.onIsPropertyReadOnlyCallback(e.themeModel,e.themeModel.getPropertyByName(o.name),!t.allow,void 0,void 0,!1))}))},e.prototype.deactivate=function(){return this.model&&(this.simulatorCssClasses=this.model.survey.css,this.model.onPropertyChanged.clear(),this.themeModel.onThemeSelected.clear(),this.themeModel.onThemePropertyChanged.clear(),this.themeModel.onAllowModifyTheme.clear(),this.model.onSurveyCreatedCallback=void 0,this.model.dispose(),this.model=void 0),this.propertyGridTab.visible=!1,this.testAgainAction.visible=!1,this.invisibleToggleAction&&(this.invisibleToggleAction.visible=!1),!0},e.prototype.exportToFile=function(e){var t=JSON.parse(JSON.stringify(this.themeModel.toJSON())),o=JSON.stringify(t,null,4),r=new Blob([o],{type:"application/json"});this.saveToFileHandler(e,r)},e.prototype.importFromFile=function(e,t){var o=this,r=new FileReader;r.onload=function(e){var n=JSON.parse(r.result);o.themeModel&&o.themeModel.setTheme(n),t&&t(n)},r.readAsText(e)},e.prototype.createActions=function(){var e=this,t=[];return this.designerAction=new i.Action({id:"svd-designer",iconName:"icon-config",action:function(){e.creator.makeNewViewActive("designer")},visible:this.createVisibleUpdater(),locTitleName:"ed.designer",showTitle:!1}),this.prevPageAction=new i.Action({id:"prevPage",iconName:"icon-arrow-left_16x16",needSeparator:new i.ComputedUpdater((function(){return e.creator.isMobileView})),visible:!1}),this.nextPageAction=new i.Action({id:"nextPage",iconName:"icon-arrow-right_16x16",visible:!1}),this.previewAction=new i.Action({id:"svd-preview",iconName:"icon-preview",active:!0,visible:this.createVisibleUpdater(),locTitleName:"tabs.preview",showTitle:!1,action:function(){}}),this.testAgainAction=new i.Action({id:"testSurveyAgain",visible:!1,locTitleName:"ed.testSurveyAgain",action:function(){e.model.testAgain()}}),this.undoAction=new i.Action({id:"action-undo-theme",iconName:"icon-undo",locTitleName:"ed.undo",showTitle:!1,visible:this.createVisibleUpdater(),action:function(){return e.undo()}}),this.redoAction=new i.Action({id:"action-redo-theme",iconName:"icon-redo",locTitleName:"ed.redo",showTitle:!1,visible:this.createVisibleUpdater(),action:function(){return e.redo()}}),t.push(this.undoAction),t.push(this.redoAction),this.saveThemeAction=new i.Action({id:"svd-save-theme",iconName:"icon-save",action:function(){e.creator.saveThemeActionHandler(),e.saveThemeAction.enabled=!1},active:!1,enabled:!1,visible:new i.ComputedUpdater((function(){return O("theme"===e.creator.activeTab,e.creator.showSaveButton)})),locTitleName:"ed.saveTheme",locTooltipName:"ed.saveThemeTooltip",showTitle:!1}),t.push(this.saveThemeAction),this.resetTheme=new i.Action({id:"svc-reset-theme",iconName:"icon-reset",locTitleName:"ed.themeResetButton",locTooltipName:"ed.themeResetButton",mode:"small",visible:this.createVisibleUpdater(),action:function(){i.settings.confirmActionAsync(z("ed.themeResetConfirmation"),(function(t){t&&e.themeModel.resetTheme()}),z("ed.themeResetConfirmationOk"),G.currentLocale)}}),t.push(this.resetTheme),this.themeSettingsAction=new i.Action({id:"svc-theme-settings",iconName:"icon-theme",action:function(){e.creator.showSidebar||e.creator.setShowSidebar(!0,!0)},visible:this.createVisibleUpdater(),active:new i.ComputedUpdater((function(){return e.creator.showSidebar})),pressed:new i.ComputedUpdater((function(){return e.creator.showSidebar})),locTitleName:"ed.themeSettings",locTooltipName:"ed.themeSettingsTooltip",showTitle:!1}),t.push(this.themeSettingsAction),this.importAction=new i.Action({id:"svc-theme-import",iconName:"icon-load",locTitleName:"ed.themeImportButton",locTooltipName:"ed.themeImportButton",visible:this.createVisibleUpdater(),mode:"small",component:"sv-action-bar-item",needSeparator:!0,action:function(){document&&(e.inputFileElement||(e.inputFileElement=document.createElement("input"),e.inputFileElement.type="file",e.inputFileElement.style.display="none",e.inputFileElement.onchange=function(){e.inputFileElement.files.length<1||(e.importFromFile(e.inputFileElement.files[0]),e.inputFileElement.value="")}),e.inputFileElement.click())}}),t.push(this.importAction),this.exportAction=new i.Action({id:"svc-theme-export",iconName:"icon-download",locTitleName:"ed.themeExportButton",locTooltipName:"ed.themeExportButton",visible:this.createVisibleUpdater(),mode:"small",component:"sv-action-bar-item",action:function(){e.exportToFile(a.themeEditor.exportFileName)}}),t.push(this.exportAction),this.creator.showInvisibleElementsInTestSurveyTab&&(this.invisibleToggleAction=new i.Action({id:"showInvisible",iconName:"icon-invisible-items",mode:"small",locTitleName:"ts.showInvisibleElements",visible:!1,action:function(){e.model.showInvisibleElements=!e.model.showInvisibleElements,e.invisibleToggleAction.css=e.model.showInvisibleElements?"sv-action-bar-item--active":"",e.invisibleToggleAction.title=z(e.model.showInvisibleElements?"ts.hideInvisibleElements":"ts.showInvisibleElements")}})),t},e.prototype.undo=function(){var e=this.model&&this.themeModel.undoRedoManager;e&&(e.suspend(),e.canUndo()&&e.undo(),e.resume())},e.prototype.redo=function(){var e=this.model&&this.themeModel.undoRedoManager;e&&(e.suspend(),e.canRedo()&&e.redo(),e.resume())},e.prototype.updateUndeRedoActions=function(){var e=this.themeModel.undoRedoManager;this.undoAction.enabled=e.canUndo(),this.redoAction.enabled=e.canRedo()},e.prototype.addFooterActions=function(){this.creator.footerToolbar.actions.push(this.designerAction),this.creator.footerToolbar.actions.push(this.previewAction),this.creator.footerToolbar.actions.push(this.prevPageAction),this.creator.footerToolbar.actions.push(this.nextPageAction),this.invisibleToggleAction&&this.creator.footerToolbar.actions.push(this.invisibleToggleAction),this.creator.footerToolbar.actions.push(this.themeSettingsAction)},e.prototype.syncTheme=function(e){var t=e||this.themeModel.toJSON();this.creator.theme=t,this.updateSimulatorTheme(t)},e.prototype.updateSimulatorTheme=function(e){this.model.survey&&this.model.survey.applyTheme(e||this.themeModel.toJSON())},Object.defineProperty(e.prototype,"saveThemeFunc",{get:function(){return this._saveThemeFuncValue},set:function(e){this._saveThemeFuncValue=e},enumerable:!1,configurable:!0}),e.prototype.processAutoSave=function(){var e=this,t=this.saveThemeFunc;!t&&this.creator.saveThemeFunc&&(t=function(){return e.creator.saveTheme()}),t&&(this.creator.autoSaveDelay<=0?t():(this.autoSaveTimerId&&clearTimeout(this.autoSaveTimerId),this.autoSaveTimerId=setTimeout((function(){clearTimeout(e.autoSaveTimerId),e.autoSaveTimerId=null,t&&t()}),this.creator.autoSaveDelay)))},Object.defineProperty(e.prototype,"availableThemes",{get:function(){return[].concat(this._availableThemes)},set:function(e){this._availableThemes=e||[],this.onAvailableThemesChanged(e),this.updateAllowModifyTheme()},enumerable:!1,configurable:!0}),e.prototype.onAvailableThemesChanged=function(e){var t=this.propertyGrid.survey.getQuestionByName("themeName");t&&(t.choices=e.map((function(e){return{value:e,text:z("theme.names."+e)}})),-1===e.indexOf(t.value)&&this.themeModel.setTheme(this.themeModel.defaultSessionTheme)),this.propertyGrid.survey.runExpressions()},e.prototype.addTheme=function(e,t){void 0===t&&(t=!1);var o=ir(e);return No[o]=e,-1===this._availableThemes.indexOf(e.themeName)?t?(this.availableThemes=[e.themeName].concat(this.availableThemes),lr.DefaultTheme=e):this.availableThemes=this.availableThemes.concat([e.themeName]):this.availableThemes=this.availableThemes,o},e.prototype.removeTheme=function(e,t){void 0===t&&(t=!1);var o="string"==typeof e?No[e]:e,r="string"==typeof e?e:ir(o);if(o){delete No[r],lr.DefaultTheme===o&&(lr.DefaultTheme=No["default-light"]||No[Object.keys(No)[0]],this.themeModel.defaultSessionTheme=lr.DefaultTheme);var n=Object.keys(No).filter((function(e){return 0===e.indexOf(o.themeName+"-")}));if(t&&n.length>0&&n.forEach((function(e){return delete No[e]})),t||0===n.length){var i=this._availableThemes.indexOf(o.themeName);if(-1!==i){var a=this.availableThemes;a.splice(i,1),this.availableThemes=a}}}},e.prototype.getCurrentTheme=function(e){return void 0===e&&(e=!1),e?this.getThemeChanges():this.creator.theme},e.prototype.getThemeChanges=function(){return sr(this.creator.theme)},Object.defineProperty(e.prototype,"isModified",{get:function(){var e=this.getThemeChanges(),t=Object.keys(e.cssVariables).length>0,o=Object.keys(e).some((function(e){return-1!==e.toLowerCase().indexOf("background")})),r=!!e.header&&0===Object.keys(e.header).length;return t||o||r},enumerable:!1,configurable:!0}),e.DefaultTheme=No["default-light"],e}();o(16),o(17),o(18);var gr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t}(i.Action),fr=function(e){function t(t){return e.call(this,t)||this}return Y(t,e),t}(i.Action),mr=function(e){function t(){var t=e.call(this)||this;return t.dotsItem.popupModel.horizontalPosition="center",t.minVisibleItemsCount=1,t}return Y(t,e),t}(i.AdaptiveActionContainer),yr=function(e){function t(t){var o=e.call(this)||this;return o.creator=t,o}return Y(t,e),t.prototype.getRenderedActions=function(){var e=this.actions,t=this.creator.sidebar.getExpandAction(),o=e.indexOf(t);return-1!==o&&(e.splice(o,1),e.push(t)),e},t}(i.ActionContainer),br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t}(i.EventBase),vr=function(e){function t(t,o){var r=e.call(this)||this;r.options=t,r.startEditTitleOnQuestionAddedValue=!0,r.isRTLValue=!1,r.alwaySaveTextInPropertyEditorsValue=!1,r.pageEditModeValue="standard",r.newQuestions=[],r.newPanels=[],r.plugins={},r.onElementDeleting=r.addCreatorEvent(),r.onGetPropertyReadOnly=r.addCreatorEvent(),r.onSurveyInstanceCreated=r.addCreatorEvent(),r.onGetObjectDisplayName=r.addCreatorEvent(),r.onHtmlToMarkdown=r.addCreatorEvent(),r.onElementAllowOperations=r.addCreatorEvent(),r.onDefineElementMenuItems=r.addCreatorEvent(),r.onShowingProperty=r.addCreatorEvent(),r.onCanShowProperty=r.onShowingProperty,r.onPropertyGridSurveyCreated=r.addCreatorEvent(),r.onPropertyEditorCreated=r.addCreatorEvent(),r.onPropertyEditorUpdateTitleActions=r.addCreatorEvent(),r.onPropertyGridShowModal=r.addCreatorEvent(),r.onCanDeleteItem=r.addCreatorEvent(),r.onCollectionItemDeleting=r.addCreatorEvent(),r.onCollectionItemAllowOperations=r.addCreatorEvent(),r.onItemValueAdded=r.addCreatorEvent(),r.onFastEntryFinished=r.addCreatorEvent(),r.onMatrixColumnAdded=r.addCreatorEvent(),r.onSetPropertyEditorOptions=r.addCreatorEvent(),r.onGenerateNewName=r.addCreatorEvent(),r.onPropertyValidationCustomError=r.addCreatorEvent(),r.onPropertyValueChanging=r.addCreatorEvent(),r.onSurveyPropertyValueChanged=r.addCreatorEvent(),r.onConditionQuestionsGetList=r.addCreatorEvent(),r.onConditionGetTitle=r.addCreatorEvent(),r.onGetConditionOperator=r.addCreatorEvent(),r.onLogicItemDisplayText=r.addCreatorEvent(),r.onModified=r.addCreatorEvent(),r.onQuestionAdded=r.addCreatorEvent(),r.onPanelAdded=r.addCreatorEvent(),r.onPageAdded=r.addCreatorEvent(),r.onGetPageActions=r.addCreatorEvent(),r.onDesignerSurveyCreated=r.addCreatorEvent(),r.onPreviewSurveyCreated=r.addCreatorEvent(),r.onTestSurveyCreated=r.onPreviewSurveyCreated,r.onNotify=r.addCreatorEvent(),r.onSelectedElementChanging=r.addCreatorEvent(),r.onSelectedElementChanged=r.addCreatorEvent(),r.onOpenFileChooser=r.addCreatorEvent(),r.onUploadFile=r.addCreatorEvent(),r.onTranslationStringVisibility=r.addCreatorEvent(),r.onTranslationLocaleInitiallySelected=r.addCreatorEvent(),r.onTranslationImportItem=r.addCreatorEvent(),r.onTranslationImported=r.addCreatorEvent(),r.onTranslationExportItem=r.addCreatorEvent(),r.onMachineTranslate=r.addCreatorEvent(),r.onTranslationItemChanging=r.addCreatorEvent(),r.onDragDropAllow=r.addCreatorEvent(),r.onCreateCustomMessagePanel=r.addCreatorEvent(),r.maxLogicItemsInCondition=-1,r.showObjectTitles=!1,r.maxVisibleChoices=10,r.showTitlesInExpressions=!1,r.allowEditExpressionsInTextEditor=!0,r.maximumColumnsCount=a.propertyGrid.maximumColumnsCount,r.maximumChoicesCount=a.propertyGrid.maximumChoicesCount,r.minimumChoicesCount=a.propertyGrid.minimumChoicesCount,r.maximumRowsCount=a.propertyGrid.maximumRowsCount,r.maximumRateValues=a.propertyGrid.maximumRateValues,r.maxNestedPanels=-1,r.showPagesInTestSurveyTab=!0,r.showSimulatorInTestSurveyTab=!0,r.themeForPreview="defaultV2",r.hasPendingThemeChanges=!1,r._theme={cssVariables:{}},r._allowModifyPages=!0,r.showDefaultLanguageInTestSurveyTab="auto",r.showInvisibleElementsInTestSurveyTab=!0,r.allowChangeThemeInPreview=!0,r.showErrorOnFailedSave=!0,r.onActiveTabChanging=r.addCreatorEvent(),r.onActiveTabChanged=r.addCreatorEvent(),r.showSidebarValue=!0,r.onShowSidebarVisibilityChanged=r.addCreatorEvent(),r.onShowPropertyGridVisiblityChanged=r.addCreatorEvent(),r.onBeforeUndo=r.addCreatorEvent(),r.onBeforeRedo=r.addCreatorEvent(),r.onPageAdding=r.addCreatorEvent(),r.onDragStart=new i.EventBase,r.onBeforeDrop=r.onDragStart,r.onDragEnd=new i.EventBase,r.onAfterDrop=r.onDragEnd,r.onStateChanged=r.addCreatorEvent(),r.notifier=new i.Notifier({root:"svc-notifier",rootWithButtons:"",info:"svc-notifier--info",error:"svc-notifier--error",success:"svc-notifier--success",button:"",shown:"svc-notifier--shown"}),r.onKeyDownHandler=function(e){r.findSuitableShortcuts(e).forEach((function(t){(e.keyCode<48||89==e.keyCode||90==e.keyCode)&&Nr(e.target)||t.execute(r.selectedElement)}))},r.shortcuts={},r.translationLocalesOrder=[],r.autoSaveDelay=a.autoSave.delay,r.autoSaveTimerId=null,r.saveNo=0,r._syncSaveActions=function(e,t){var o=r._findAction("svd-save"),n=r._findAction("svd-save-theme");o&&n&&(e===r?n.enabled=o.enabled:o.enabled=n.enabled)},(o||"string"==typeof r.options||r.options instanceof String)&&(r.options=o||{},te.warnText("Creator constructor has one parameter, as creator options, in V2.")),r.previewOrientation=t.previewOrientation,r.toolbarValue=new yr(r),r.toolbarValue.locOwner=r,r.tabbedMenu=new mr,r.tabbedMenu.locOwner=r,r.selectionHistoryControllerValue=new ye(r),r.sidebar=new wo(r),r.setOptions(r.options),r.patchMetadata(),r.initSurveyWithJSON(void 0,!1),r.toolbox=new me(r.options&&r.options.questionTypes?r.options.questionTypes:null,r,!0),r.updateToolboxIsCompact(),r.initTabs(),r.initDragDrop(),r.syncSaveButtons=void 0!==r.options.saveSurveyAndTheme?r.options.saveSurveyAndTheme:r.options.syncSaveButtons,r.isTouch=i.IsTouch;var n=r.sidebar.getExpandAction();return n&&r.toolbar.actions.push(n),r}return Y(t,e),t.prototype.getMarkdownHtml=function(e,t){return null},t.prototype.getRenderer=function(e){return null},t.prototype.getRendererContext=function(e){return e},t.prototype.getProcessedText=function(e){return e},t.prototype.getLocale=function(){return this.locale},Object.defineProperty(t.prototype,"showPreviewTab",{get:function(){return this.showTestSurveyTab},set:function(e){this.showTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditSurveyTitle",{get:function(){return this.getPropertyValue("allowEditSurveyTitle",!0)},set:function(e){this.setPropertyVisibility("survey",e,"title","description","logo","logoFit","showTitle","logoWidth","logoHeight"),this.setPropertyValue("allowEditSurveyTitle",e),this.designerPropertyGrid&&this.designerPropertyGrid.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSurveyTitle",{get:function(){return this.allowEditSurveyTitle},set:function(e){this.allowEditSurveyTitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"haveCommercialLicense",{get:function(){return!!i.hasLicense&&Object(i.hasLicense)(1)},set:function(e){console.warn("As of v1.9.101, the haveCommercialLicense property is not supported. To activate your license, use the setLicenseKey(key) method as shown on the following page: https://surveyjs.io/remove-alert-banner")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"licenseText",{get:function(){return this.getLocString("survey.license")},enumerable:!1,configurable:!0}),t.prototype.slk=function(e){Object(i.slk)(e)},Object.defineProperty(t.prototype,"startEditTitleOnQuestionAdded",{get:function(){return!this.isMobileView&&this.startEditTitleOnQuestionAddedValue},set:function(e){this.startEditTitleOnQuestionAddedValue=e},enumerable:!1,configurable:!0}),t.prototype.changePageModifications=function(e){void 0===e&&(e=!1),this.setPropertyVisibility("survey",e,"pages"),this.setPropertyVisibility("question",e,"page"),this.setPropertyVisibility("panel",e,"page"),this.showJSONEditorTab=!0===this.options.showJSONEditorTab},Object.defineProperty(t.prototype,"pageEditMode",{get:function(){return this.pageEditModeValue},set:function(e){this.pageEditModeValue=e;var t="single"!==this.pageEditModeValue;this.changePageModifications(t),i.settings.allowShowEmptyTitleInDesignMode=t,i.settings.allowShowEmptyDescriptionInDesignMode=t,"bypage"===this.pageEditModeValue&&(this.showPageNavigator=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbarItems",{get:function(){return this.toolbarValue.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbar",{get:function(){return this.toolbarValue},enumerable:!1,configurable:!0}),t.prototype._findAction=function(e){return this.toolbarItems.filter((function(t){return t.id===e}))[0]},Object.defineProperty(t.prototype,"showingViewName",{get:function(){return this.activeTab},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDesignerShowing",{get:function(){return"designer"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showDesigner=function(){this.activeTab="designer"},Object.defineProperty(t.prototype,"isTestSurveyShowing",{get:function(){return this.isPreviewShowing},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPreviewShowing",{get:function(){return"test"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showTestSurvey=function(){this.showPreview()},t.prototype.showPreview=function(){this.activeTab="test"},t.prototype.addPluginTab=function(e,t,o,r,n){var i=this,a="test"===e?"preview":e,s=o?0==o.indexOf("ed.")?o:"":"tabs."+a;s&&(o=void 0);var l=new fr({id:e,locTitleName:s,title:o,componentContent:r||"svc-tab-"+e,data:t,action:function(){i.makeNewViewActive(e)},active:this.viewType===e,disableHide:this.viewType===e});n>=0&&n<this.tabs.length?this.tabs.splice(n,0,l):this.tabs.push(l),this.addPlugin(e,t)},t.prototype.addPlugin=function(e,t){this.plugins[e]=t},t.prototype.getPlugin=function(e){return this.plugins[e]},Object.defineProperty(t.prototype,"showPagesInPreviewTab",{get:function(){return this.showPagesInTestSurveyTab},set:function(e){this.showPagesInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSimulatorInPreviewTab",{get:function(){return this.showSimulatorInTestSurveyTab},set:function(e){this.showSimulatorInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"themeEditor",{get:function(){return this.getPlugin("theme")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"saveThemeFunc",{get:function(){return this.saveThemeFuncValue},set:function(e){this.saveThemeFuncValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"theme",{get:function(){return this._theme},set:function(e){this._theme=e,this.hasPendingThemeChanges=!0,"theme"!==this.activeTab&&this.updatePlugin(this.activeTab)},enumerable:!1,configurable:!0}),t.prototype._doSaveThemeCore=function(e){var t=this;this.setState("saving"),this.saveThemeFunc&&(this.saveNo++,this.saveThemeFunc(this.saveNo,(function(o,r){t.saveNo===o&&(r?(t.setState("saved"),t.hasPendingThemeChanges=!1):(t.setState("modified"),t.showErrorOnFailedSave&&t.notify(t.getLocString("ed.saveError"),"error")),e&&e())})))},t.prototype.saveTheme=function(){this._doSaveThemeCore()},t.prototype.saveThemeActionHandler=function(){this.syncSaveButtons?this.save():this.saveTheme()},Object.defineProperty(t.prototype,"allowModifyPages",{get:function(){return this._allowModifyPages},set:function(e){this._allowModifyPages=e,this.changePageModifications(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDefaultLanguageInPreviewTab",{get:function(){return this.showDefaultLanguageInTestSurveyTab},set:function(e){this.showDefaultLanguageInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showInvisibleElementsInPreviewTab",{get:function(){return this.showInvisibleElementsInTestSurveyTab},set:function(e){this.showInvisibleElementsInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabs",{get:function(){return this.tabbedMenu.actions},set:function(e){this.tabbedMenu.actions=e},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return G.getString(e)},t.prototype.onSetReadOnly=function(e){},Object.defineProperty(t.prototype,"locale",{get:function(){return this.getPropertyValue("locale",G.currentLocale)},set:function(e){if(G.currentLocale!==e){G.currentLocale=e,this.setPropertyValue("locale",e),this.toolbox.updateTitles(),this.refreshPlugin();var t=this.selectedElement;t&&(this.selectElement(null),this.selectElement(t)),this.locStrsChanged()}},enumerable:!1,configurable:!0}),t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.tabbedMenu.locStrsChanged(),this.toolbar.locStrsChanged()},t.prototype.refreshPlugin=function(){var e=this.currentPlugin;if(e){e.deactivate&&e.deactivate();var t=this.viewType;this.viewType="",e.activate(),this.viewType=t}},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.getPropertyValue("readOnly",!1)},set:function(e){var t=this.text;this.setPropertyValue("readOnly",e),this.onSetReadOnly(e),this.text=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRTL",{get:function(){return this.isRTLValue},set:function(e){this.isRTLValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeTab",{get:function(){return this.viewType},set:function(e){this.makeNewViewActive(e)},enumerable:!1,configurable:!0}),t.prototype.makeNewViewActive=function(e){var t=this;if(e==this.viewType)return!1;var o=this.currentPlugin;if(!o||!o.canDeactivateAsync)return this.switchViewType(e);o.canDeactivateAsync((function(){t.switchViewType(e)}))},t.prototype.switchViewType=function(e){var t,o,r=!0;if((null===(t=this.currentPlugin)||void 0===t?void 0:t.defaultAllowingDeactivate)&&void 0===(r=this.currentPlugin.defaultAllowingDeactivate()))return!1;var n={tabName:e,allow:r,model:null===(o=this.currentPlugin)||void 0===o?void 0:o.model};if(this.onActiveTabChanging.fire(this,n),n.allow){if(!this.canSwitchViewType())return!1;var i=this.activatePlugin(e);return this.viewType=e,this.onActiveTabChanged.fire(this,{tabName:e,plugin:i,model:i?i.model:void 0}),!0}},t.prototype.canSwitchViewType=function(){var e=this.currentPlugin;return!e||!e.deactivate||e.deactivate()},t.prototype.activatePlugin=function(e){var t=this.getPlugin(e);return t&&t.activate(),t},Object.defineProperty(t.prototype,"currentPlugin",{get:function(){return this.getPlugin(this.activeTab)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxCategories",{get:function(){return this.toolbox.categories},enumerable:!1,configurable:!0}),t.prototype.addCreatorEvent=function(){return this.addEvent()},t.prototype.updateToolboxIsCompact=function(e){if(this.toolbox){var t=null!=e&&null!=e;void 0!==this.toolbox.forceCompact?this.toolbox.isCompact=this.toolbox.forceCompact:"right"==this.toolboxLocation?this.toolbox.isCompact=this.showSidebar||t&&e:t&&(this.toolbox.isCompact=e)}},Object.defineProperty(t.prototype,"showToolbox",{get:function(){return this.showToolboxValue&&this.allowShowToolbox},set:function(e){!0!==e&&!1!==e&&te.warnText("showToolbox is a boolean property now."),"none"===e||!1===e||"top"===e?this.showToolboxValue=!1:(!0===e||(this.toolboxLocation=e),this.showToolboxValue=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSidebar",{get:function(){return this.showSidebarValue},set:function(e){!0===e||!1===e?this.showSidebar!==e&&(this.setShowSidebar(e,!0),this.onShowPropertyGridVisiblityChanged.isEmpty||(te.warnNonSupported("onShowPropertyGridVisiblityChanged","onShowSidebarVisibilityChanged"),this.onShowPropertyGridVisiblityChanged.fire(this,{show:e}))):te.warnText("showSidebar is a boolean property now.")},enumerable:!1,configurable:!0}),t.prototype.setShowSidebar=function(e,t){void 0===t&&(t=!1),this.showSidebarValue=e,t&&(e?this.sidebar.expandedManually=!0:this.sidebar.collapsedManually=!0),this.updateToolboxIsCompact(),this.onShowSidebarVisibilityChanged.fire(this,{show:e})},Object.defineProperty(t.prototype,"showPropertyGrid",{get:function(){return te.warnNonSupported("showPropertyGrid","showSidebar"),this.showSidebar},set:function(e){te.warnNonSupported("showPropertyGrid","showSidebar"),!0===e||!1===e?this.showSidebar=e:te.warnText("showSidebar is a boolean property.")},enumerable:!1,configurable:!0}),t.prototype.rightContainerActiveItem=function(e){te.warnNonSupported("rightContainerActiveItem")},t.prototype.leftContainerActiveItem=function(e){te.warnNonSupported("leftContainerActiveItem")},Object.defineProperty(t.prototype,"undoRedoManager",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model.undoRedoManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoRedoController",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model},enumerable:!1,configurable:!0}),t.prototype.startUndoRedoTransaction=function(e){void 0===e&&(e=""),this.undoRedoController&&this.undoRedoController.startTransaction(e)},t.prototype.stopUndoRedoTransaction=function(){this.undoRedoController&&this.undoRedoController.stopTransaction()},Object.defineProperty(t.prototype,"isProcessingUndoRedo",{get:function(){return this.undoRedoManager&&this.undoRedoManager.isProcessingUndoRedo},enumerable:!1,configurable:!0}),t.prototype.undo=function(){this.undoRedoController&&this.undoRedoController.undo()},t.prototype.redo=function(){this.undoRedoController&&this.undoRedoController.redo()},Object.defineProperty(t.prototype,"selectionHistoryController",{get:function(){return this.selectionHistoryControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e},enumerable:!1,configurable:!0}),t.prototype.canAddPage=function(e){var t={page:e,allow:!0};return this.onPageAdding.fire(this,t),t.allow},t.prototype.addPage=function(e,t,o){if(void 0===t&&(t=!0),!this.canAddPage(e))return null;if(void 0===o||o()){var r=e;return r?this.survey.addPage(r):r=this.addNewPageIntoSurvey(),t&&this.selectElement(r),r}},t.prototype.addNewPageIntoSurvey=function(){var e=te.getNewPageName(this.survey.pages);return this.survey.addNewPage(e)},t.prototype.initTabs=function(){this.initPlugins(),this.initFooterToolbar(),this.tabs.length>0&&this.makeNewViewActive(this.tabs[0].id)},t.prototype.initPlugins=function(){this.addPlugin("undoredo",new no(this)),this.showDesignerTab&&new yo(this),this.showPreviewTab&&new Oe(this),this.showThemeTab&&new hr(this),this.showLogicTab&&new Xt(this),this.showJSONEditorTab&&(we.hasAceEditor()?new we(this):new Ce(this)),this.showTranslationTab&&new Ht(this)},t.prototype.initFooterToolbar=function(){var e=this;this.footerToolbar||(this.footerToolbar=new i.ActionContainer,["designer","undoredo","test","theme"].forEach((function(t){var o=e.getPlugin(t);o&&o.addFooterActions&&o.addFooterActions()})))},t.prototype.getOptions=function(){return this.options||{}},t.prototype.setOptions=function(e){e||(e={});var t={showTestSurveyTab:"showPreviewTab",showDefaultLanguageInTestSurveyTab:"showDefaultLanguageInPreviewTab",showInvisibleElementsInPreviewTab:"showInvisibleElementsInTestSurveyTab"};for(var o in t)if(void 0!==e[o]){var r=t[o];void 0===e[r]&&(e[r]=e[o],delete e[o])}for(var o in this.options=e,e)this[o]=e[o]},t.prototype.setPropertyPlaceHolder=function(e,t,o){var r=i.Serializer.findProperty(e,t);r&&(r.placeholder=o)},t.prototype.setPropertyVisibility=function(e,t){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];if(Array.isArray(o))for(var n=0;n<o.length;n++){var a=i.Serializer.findProperty(e,o[n]);a&&(a.visible=t)}},t.prototype.patchMetadata=function(){this.setPropertyPlaceHolder("survey","title","pe.surveyTitlePlaceholder"),this.setPropertyPlaceHolder("survey","description","pe.surveyDescriptionPlaceholder"),this.setPropertyVisibility("survey",!1,"logoPosition"),"single"!==this.pageEditMode&&(this.setPropertyPlaceHolder("page","title","pe.pageTitlePlaceholder"),this.setPropertyPlaceHolder("page","description","pe.pageDescriptionPlaceholder"))},t.prototype.isCanModifyProperty=function(e,t){var o,r,n=i.Serializer.findProperty(e.getType(),t);if(e instanceof i.ItemValue){o=e.locOwner,r=i.Serializer.findProperty(o.getType(),e.ownerPropertyName||t);var a=!0;if(o instanceof i.QuestionSelectBase&&(a=o.isItemInList(e)),!1===this.getElementAllowOperations(o).allowEdit)return!1;var s={allowDelete:!0,allowEdit:a,allowAdd:!0};if(this.onCollectionItemAllowingCallback(o,n,o.getPropertyValue(null==r?void 0:r.name),e,s),!1===s.allowEdit)return!1;if(this.onIsPropertyReadOnlyCallback(o,r,null==r?void 0:r.readOnly,null,null))return!1}if(e instanceof i.SurveyElement&&!1===this.getElementAllowOperations(e).allowEdit)return!1;return!n||!this.onIsPropertyReadOnlyCallback(e,n,n.readOnly,o,r)},t.prototype.onIsPropertyReadOnlyCallback=function(e,t,o,r,n,i){if(!t)return!1;void 0===i&&(i=this.readOnly);var a=i||o;if(this.onGetPropertyReadOnly.isEmpty)return a;var s={obj:e,property:t,readOnly:a,propertyName:t.name,parentObj:r,parentProperty:n};return this.onGetPropertyReadOnly.fire(this,s),s.readOnly},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),t.prototype.addCollectionItemsJson=function(e,t){var o=new i.SurveyModel(e);this.updateAddingSurvey(o),this.addSurveyPages(o,t)},t.prototype.updateAddingSurvey=function(e){this.updateAddingPages(e),this.updateAddingPanels(e),this.updateAddingQuestions(e),this.updateAddingCalculatedValules(e),this.updateAddingArrays(e)},t.prototype.updateAddingPages=function(e){this.updateAddingElements(e,e.pages,this.survey.pages,(function(e,t){e.name=te.getNewPageName(t)}))},t.prototype.updateAddingExistingElements=function(){return[].concat(this.survey.getAllQuestions(!1,!0)).concat(this.survey.getAllPanels())},t.prototype.updateAddingPanels=function(e){this.updateAddingElements(e,e.getAllPanels(),this.updateAddingExistingElements(),(function(e,t){e.name=te.getNewPanelName(t)}))},t.prototype.updateAddingQuestions=function(e){var t=new Qe(e,this);this.updateAddingElements(e,e.getAllQuestions(!1,!0),this.updateAddingExistingElements(),(function(e,o){var r=e.name;e.name=te.getNewQuestionName(o),t.renameQuestion(r,e.name)}))},t.prototype.updateAddingCalculatedValules=function(e){var t=new Qe(e,this);this.updateAddingElements(e,e.calculatedValues,this.survey.calculatedValues,(function(e,o){var r=e.name;e.name=te.getNewName(o,"var"),t.renameQuestion(r,e.name)}))},t.prototype.updateAddingArrays=function(e){var t=this;e.triggers.forEach((function(e){return t.survey.triggers.push(e)})),e.completedHtmlOnCondition.forEach((function(e){return t.survey.completedHtmlOnCondition.push(e)})),e.calculatedValues.forEach((function(e){return t.survey.calculatedValues.push(e)}))},t.prototype.updateAddingElements=function(e,t,o,r){var n=[],i={};o.forEach((function(e){e.name&&(i[e.name]=e)})),t.forEach((function(e){e.name&&i[e.name]&&n.push(e)}));var a=o.concat(t);n.forEach((function(e){r(e,a)}))},t.prototype.addSurveyPages=function(e,t){(void 0===t||t>=this.survey.pages.length)&&(t=-1);for(var o=0;o<e.pages.length;o++)t<0?this.survey.pages.push(e.pages[o]):this.survey.pages.splice(t+o,0,e.pages[o])},t.prototype.initSurveyWithJSON=function(e,t){var o=this;e||(e={logoPosition:"right"}),this.existingPages={};var r=this.createSurvey({},"designer",void 0,(function(t){t.css=i.defaultV2Css,t.setIsMobile(!!o.isMobileView),t.setDesignMode(!0),t.lazyRendering=!0,t.setJsonObject(e),t.isEmpty&&t.setJsonObject(o.getDefaultSurveyJson())}));r.pages.forEach((function(e){o.existingPages[e.id]=!0})),r.onQuestionAdded.add((function(e,t){o.doOnQuestionAdded(t.question,t.parentPanel)})),r.onPanelAdded.add((function(e,t){o.doOnPanelAdded(t.panel,t.parentPanel)})),r.onPageAdded.add((function(e,t){o.existingPages[t.page.id]||(o.existingPages[t.page.id]=!0,o.doOnPageAdded(t.page))})),r.onDragDropAllow.add((function(e,t){t.survey=e,o.onDragDropAllow.fire(o,t)})),this.setSurvey(r),this.updatePlugin(this.activeTab),"designer"!==this.activeTab&&this.updatePlugin("designer"),this.undoRedoController&&this.undoRedoController.updateSurvey()},t.prototype.updatePlugin=function(e){var t=this.getPlugin(this.activeTab);t&&t.update&&t.update()},t.prototype.initDragDrop=function(){this.initDragDropSurveyElements(),this.initDragDropChoices()},t.prototype.initDragDropSurveyElements=function(){var e=this;go.restrictDragQuestionBetweenPages=a.dragDrop.restrictDragQuestionBetweenPages,this.dragDropSurveyElements=new go(null,this),this.dragDropSurveyElements.onGetMaxNestedPanels=function(){return e.maxNestedPanels};var t=!1;this.dragDropSurveyElements.onDragStart.add((function(o,r){t=!o.draggedElement.parent,e.onDragStart.fire(o,r),e.startUndoRedoTransaction("drag drop")})),this.dragDropSurveyElements.onDragEnd.add((function(o,r){e.stopUndoRedoTransaction();var n=t&&e.startEditTitleOnQuestionAdded;e.selectElement(r.draggedElement,void 0,!1,n),t=!1,e.onDragEnd.fire(o,r)}))},t.prototype.initDragDropChoices=function(){var e=this;this.dragDropChoices=new i.DragDropChoices(null,this),this.dragDropChoices.onDragStart.add((function(t,o){e.startUndoRedoTransaction("drag drop")})),this.dragDropChoices.onDragEnd.add((function(t,o){e.stopUndoRedoTransaction(),e.selectElement(o.draggedElement,void 0,!1)}))},t.prototype.updateElementsOnLocaleChanged=function(e,t){if("survey"===e.getType()&&"locale"===t)for(var o=this.survey.pages,r=0;r<o.length;r++)o[r].locStrsChanged()},t.prototype.updateConditionsOnNameChanged=function(e,t,o){if(this.isObjQuestion(e)){if("name"!==t||e.valueName||this.updateLogicOnQuestionNameChanged(o,e.name),"valueName"===t){var r=o||e.name,n=e.valueName?e.valueName:e.name;this.updateLogicOnQuestionNameChanged(r,n)}"name"===t&&e.isDescendantOf("selectbase")&&this.updateChoicesFromQuestionOnColumnNameChanged(o,e.name)}"name"===t&&e.isDescendantOf("matrixdropdowncolumn")&&this.updateLogicOnColumnNameChanged(e,o,e.name)},t.prototype.getSurveyLogicForUpdate=function(){return this.surveyLogicForUpdate&&this.surveyLogicForUpdate.survey!==this.survey&&(this.surveyLogicForUpdate=void 0),this.surveyLogicForUpdate||(this.surveyLogicForUpdate=this.createSurveyLogicForUpdate()),this.surveyLogicForUpdate},t.prototype.clearSurveyLogicForUpdate=function(e,t,o){!this.surveyLogicRenaming&&this.surveyLogicForUpdate&&e&&t&&this.needClearSurveyLogicForUpdate(e,t,o)&&(this.surveyLogicForUpdate=void 0)},t.prototype.needClearSurveyLogicForUpdate=function(e,t,o){if(Array.isArray(o))return!0;var r=i.Serializer.findProperty(e.getType(),t);return!!r&&["expression","condition","questionvalue","question"].indexOf(r.type)>-1},t.prototype.updateSurveyLogicValues=function(e,t,o){e&&t&&!i.Helpers.isValueEmpty(o)&&"value"===t&&e.isDescendantOf("itemvalue")&&this.updateSurveyLogicItemValue(e,o)},t.prototype.updateSurveyLogicItemValue=function(e,t){if(e.locOwner&&a.logic.updateExpressionsOnChanging.choiceValue&&!(["choices","rateValues","columns","rows"].indexOf(e.ownerPropertyName)<0)){this.surveyLogicRenaming=!0;var o=this.getSurveyLogicForUpdate();"rows"===e.ownerPropertyName?o.renameRowValue(e,t):o.renameItemValue(e,t),this.surveyLogicRenaming=!1}},t.prototype.createSurveyLogicForUpdate=function(){return new Qe(this.survey,this)},t.prototype.updateLogicOnQuestionNameChanged=function(e,t){e!==t&&a.logic.updateExpressionsOnChanging.questionName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameQuestion(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateLogicOnColumnNameChanged=function(e,t,o){t&&t!==o&&a.logic.updateExpressionsOnChanging.columnName&&(this.surveyLogicRenaming=!0,this.getSurveyLogicForUpdate().renameColumn(e,t),this.surveyLogicRenaming=!1)},t.prototype.updateChoicesFromQuestionOnColumnNameChanged=function(e,t){this.getAllQuestions().forEach((function(o){o.choicesFromQuestion===e&&(o.choicesFromQuestion=t)}))},t.prototype.isObjQuestion=function(e){return this.isObjThisType(e,"question")},t.prototype.isObjPage=function(e){return this.isObjThisType(e,"page")},t.prototype.isObjThisType=function(e,t){for(var o=i.Serializer.findClass(e.getType());o&&o.parentName;){if(o.name===t)return!0;o=i.Serializer.findClass(o.parentName)}return!!o&&o.name===t},t.prototype.onDragDropItemStart=function(){this.addNewElementReason="DROPPED_FROM_TOOLBOX"},t.prototype.doOnQuestionAdded=function(e,t){e.name=this.generateUniqueName(e,e.name);var o={question:e,page:this.getPageByElement(e),reason:this.addNewElementReason};this.addNewElementReason=void 0,this.onQuestionAdded.fire(this,o)},t.prototype.doOnPanelAdded=function(e,t){var o={panel:e,page:this.getPageByElement(e),reason:this.addNewElementReason};this.onPanelAdded.fire(this,o),this.addNewElementReason=void 0},t.prototype.doOnPageAdded=function(e){var t={page:e};this.onPageAdded.fire(this,t),this.setModified({type:"PAGE_ADDED",newValue:t.page})},t.prototype.getPageByElement=function(e){return this.survey.getPageByElement(e)},t.prototype.getDefaultSurveyJson=function(){var e=a.defaultNewSurveyJSON;return e.pages&&e.pages.length>0&&e.pages[0].name&&(e.pages[0].name=G.getString("ed.newPageName")+"1"),e},t.prototype.setSurvey=function(e){this.surveyValue&&this.surveyValue.dispose(),this.surveyValue=e,this.selectElement(e),this.selectionHistoryController.reset()},t.prototype.getSurveyTextFromDesigner=function(){if(!this.survey)return"";var e=this.survey.toJSON();e=this.singlePageJSON(e);var t=a.jsonEditor.indentation;return this.generateValidJSON?JSON.stringify(e,null,t):(new $).stringify(e,null,t)},t.prototype.setTextValue=function(e){this.setSurveyJSONTextCallback&&this.setSurveyJSONTextCallback(e)},t.prototype.changeText=function(e,t){if(void 0===t&&(t=!1),this.setTextValue(e),e){var o=new de(e);o.isJsonCorrect||o.survey?this.initSurveyWithJSON(o.survey.toJSON(),t):this.viewType="editor"}else this.initSurveyWithJSON(void 0,t)},Object.defineProperty(t.prototype,"text",{get:function(){return this.getSurveyJSONTextCallback?this.getSurveyJSONTextCallback().text:this.getSurveyTextFromDesigner()},set:function(e){this.changeText(e,!0)},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){if("editor"!=this.viewType)return(new i.JsonObject).toJsonObject(this.survey);var e=this.text,t=new de(e);return t.isJsonCorrect?(new i.JsonObject).toJsonObject(t.survey):null},t.prototype.getObjectDisplayName=function(e,t,o,r){void 0===o&&(o=void 0),void 0===r&&(r=void 0),r||(r=te.getObjectName(e,this.showObjectTitles));var n={obj:e,displayName:r,area:t,reason:o};return this.onGetObjectDisplayName.fire(this,n),n.displayName},t.prototype.createSurvey=function(e,t,o,r,n){var i,a=this.createSurveyCore(e,t);return"designer"!==t&&"test"!==t&&"theme"!==t&&(a.fitToContainer=!1),"designer"!==t&&"modal-question-editor"!==t||jr(a,this),a.needRenderIcons=!1,"designer"!=t&&"test"!=t&&"theme"!==t&&(a.locale=G.currentLocale,e.clearInvisibleValues||(a.clearInvisibleValues="onComplete")),r&&r(a),n=n||this.getSurveyInstanceCreatedArea(t),this.onSurveyInstanceCreated.fire(this,{survey:a,reason:t,area:n,model:o||(null===(i=this.currentPlugin)||void 0===i?void 0:i.model)}),"designer"===t&&this.onDesignerSurveyCreated.fire(this,{survey:a}),"test"!==t&&"theme"!==t||this.onPreviewSurveyCreated.fire(this,{survey:a}),a},t.prototype.getSurveyInstanceCreatedArea=function(e){var t={designer:"designer-tab",test:"preview-tab","default-value":"default-value-popup-editor","condition-builder":"logic-rule:condition-editor","logic-item-editor":"logic-rule:action-editor","logic-items":"logic-tab:condition-list",theme:"theme-tab",translation_settings:"translation-tab:language-list",translation_strings:"translation-tab:table",translation_strings_header:"translation-tab:table-header","cells-editor":"matrix-cell-values-popup-editor","fast-entry":"table-values-popup-editor","modal-question-editor":"matrix-cell-question-popup-editor"},o=t[e];return o||e},t.prototype.createSurveyCore=function(e,t){return void 0===e&&(e={}),new i.SurveyModel(e)},Object.defineProperty(t.prototype,"state",{get:function(){return this._stateValue?this._stateValue:""},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){this._stateValue=e,this.onStateChanged.fire(this,{val:e}),e&&(this.notify(this.getLocString("ed."+e)),this._updateSaveActions())},t.prototype.setModified=function(e){void 0===e&&(e=null),this.setState("modified"),this.onModified.fire(this,e),this.isAutoSave&&this.doAutoSave()},t.prototype.notifySurveyPropertyChanged=function(e){this.clearSurveyLogicForUpdate(e.target,e.name,e.newValue),this.updateSurveyLogicValues(e.target,e.name,e.oldValue);var t=this.currentPlugin;t&&t.onDesignerSurveyPropertyChanged&&t.onDesignerSurveyPropertyChanged(e.target,e.name),this.onSurveyPropertyValueChanged.isEmpty||(e.propertyName=e.name,e.obj=e.target,e.value=e.newValue,this.onSurveyPropertyValueChanged.fire(this,e)),e.type="PROPERTY_CHANGED",this.setModified(e)},t.prototype.notifySurveyItemMoved=function(e){e.type="ELEMENT_REORDERED",this.setModified(e)},t.prototype.notify=function(e,t){void 0===t&&(t="info"),this.onNotify.isEmpty?this.notifier.notify(e,t):this.onNotify.fire(this,{message:e,type:t})},t.prototype.convertQuestion=function(e,t){var o=ee.convertObject(e,t,this.getDefaultElementJSON(e.getType()),this.getDefaultElementJSON(t));return this.setModified({type:"QUESTION_CONVERTED",className:t,oldValue:e,newValue:o}),o},t.prototype.getDefaultElementJSON=function(e){var t;if(!this.toolbox)return null;var o=null===(t=this.toolbox.getItemByName(e))||void 0===t?void 0:t.json;return o?i.Helpers.createCopy(o):null},t.prototype.singlePageJSON=function(e){if("single"===this.pageEditMode){var t=e.pages;Array.isArray(t)&&t.length>0&&(void 0!==t[0].elements&&(e.elements=t[0].elements),delete e.pages)}return e},Object.defineProperty(t.prototype,"JSON",{get:function(){var e=this.survey.toJSON();return this.singlePageJSON(e)},set:function(e){"editor"==this.viewType?this.setTextValue(JSON.stringify(e)):this.initSurveyWithJSON(e,!0)},enumerable:!1,configurable:!0}),t.prototype.loadSurvey=function(e){var t=this;(new i.dxSurveyService).loadSurvey(e,(function(e,o,r){e&&o&&(t.JSON=o)}))},t.prototype.doClickQuestionCore=function(e,t,o,r){void 0===t&&(t="ADDED_FROM_TOOLBOX"),void 0===o&&(o=-1),void 0===r&&(r=null),0==this.survey.pageCount&&this.addNewPageIntoSurvey();var n=this.currentPage;"bypage"===this.pageEditMode&&(n=this.getPlugin("designer").model.pagesController.page2Display);var i=this.getSelectedSurveyElement();if(i&&i.parent&&i.page==n&&i!==r){if(!r)for(;i.parent&&i.parent.isPanel;)i=i.parentQuestion?i.parentQuestion:i.parent;n=i.parent,o<0&&(o=n.elements.indexOf(i))>-1&&o++}r&&(n=r),this.addNewElementReason=t;var a=this.findRowByElement(i,n);e.setVisibleIndex(-1),a&&this.isRowMultiline(a)?this.addElemenMultiline(n,e,o,a):n.addElement(e,o),this.addNewElementReason="",this.setModified({type:t,question:e})},t.prototype.isRowMultiline=function(e){return e.elements.length>1},t.prototype.findRowByElement=function(e,t){return e?e.isPage?e.rows[e.rows.length-1]:t.rows.find((function(t){return-1!==t.elements.indexOf(e)})):null},t.prototype.addElemenMultiline=function(e,t,o,r){var n=r.elements.length,i=r.elements[n-1];i.startWithNewLine=!0,e.addElement(t,o),i.startWithNewLine=!1},t.prototype.setNewNames=function(e){this.newQuestions=[],this.newPanels=[],this.newQuestionChangedNames={},this.setNewNamesCore(e),this.updateNewElementExpressions(e)},t.prototype.updateNewElementExpressions=function(e){var t=this.createSurvey({},"updateNewElementExpressions",void 0,(function(t){t.setDesignMode(!0),e.isPage?t.addPage(e):(t.addNewPage("p1"),t.pages[0].addElement(e))})),o=new Qe(t);for(var r in this.newQuestionChangedNames)o.renameQuestion(r,this.newQuestionChangedNames[r])},t.prototype.getAllQuestions=function(e){return void 0===e&&(e=!0),this.getAllElements(!1,e)},t.prototype.getAllPanels=function(e){return void 0===e&&(e=!0),this.getAllElements(!0,e)},t.prototype.getAllElements=function(e,t){var o=te.getAllElements(this.survey,e);return t&&(te.addElements(this.newPanels,e,o),te.addElements(this.newQuestions,e,o)),o},t.prototype.getNewName=function(e,t){return"page"==e?te.getNewPageName(this.survey.pages):t?this.getNewPanelName():this.getNewQuestionName()},t.prototype.getNewQuestionName=function(){return te.getNewQuestionName(this.getAllQuestions())},t.prototype.getNewPanelName=function(){return te.getNewPanelName(this.getAllPanels())},t.prototype.setNewNamesCore=function(e){var t=this,o=e.getType(),r=this.getNewName(o,e.isPanel);if(r!=e.name&&(this.newQuestionChangedNames[e.name]=r,e.name=r),e.isPanel||e.isPage){e.isPanel&&this.newPanels.push(e),e.elements.forEach((function(e){return t.setNewNamesCore(e)}))}else{this.newQuestions.push(e);var n=Array.isArray(e.templateElements)?e.templateElements:Array.isArray(e.detailElements)?e.detailElements:void 0;n&&n.forEach((function(e){return t.setNewNamesCore(e)}))}},t.prototype.createNewElement=function(e){var t=i.Serializer.createClass(e.type);return(new i.JsonObject).toObject(e,t),this.setNewNames(t),t},t.prototype.copyElement=function(e){var t=(new i.JsonObject).toJsonObject(e);return t.type=e.getType(),this.createNewElement(t)},t.prototype.fastCopyQuestion=function(e){var t=this.copyElement(e),o=e.parent?e.parent.elements.indexOf(e)+1:-1;if(o>-1){var r=e.parent.elements;o<r.length&&!1===r[o].startWithNewLine&&(t.startWithNewLine=!1)}return this.doClickQuestionCore(t,"ELEMENT_COPIED",o,e.parent),t},Object.defineProperty(t.prototype,"selectedElement",{get:function(){return this.selectedElementValue},set:function(e){this.selectElement(e)},enumerable:!1,configurable:!0}),t.prototype.refreshDesigner=function(){"designer"===this.activeTab&&this.changeText(this.text)},t.prototype.deleteCurrentObject=function(){this.deleteCurrentElement()},t.prototype.deleteCurrentElement=function(){this.deleteObject(this.selectedElement)},t.prototype.deleteElement=function(e){this.deleteObject(e)},t.prototype.copyPage=function(e){var t=this,o=this.copyElement(e),r=this.survey.pages.indexOf(e);r>-1?this.survey.pages.splice(r+1,0,o):this.survey.pages.push(o),o.questions.forEach((function(e){t.addNewElementReason="ELEMENT_COPIED",t.doOnQuestionAdded(e,e.parent)}));var n=o.getPanels();return Array.isArray(n)&&n.forEach((function(e){return t.doOnPanelAdded(e,e.parent)})),this.addNewElementReason="",o},t.prototype.deleteObjectCore=function(e){if(e.isPage){var t=this.getNextPage(e);this.survey.removePage(e),this.selectElement(t||this.survey)}else{if(1===this.survey.pageCount){var o=this.survey.pages[0];if(1===o.elements.length&&e===o.elements[0]&&!te.isPagePropertiesAreModified(o))return void this.deleteObjectCore(o)}this.deletePanelOrQuestion(e)}this.setModified({type:"OBJECT_DELETED",target:e}),this.updateConditionsOnRemove(e)},t.prototype.getNextPage=function(e){var t=this.survey.pages.indexOf(e);return t<0||1==this.survey.pages.length?null:(t==this.survey.pages.length-1?t--:t++,t<0||t>this.survey.pages.length-1?null:this.survey.pages[t])},t.prototype.deleteObject=function(e){this.checkOnElementDeleting(e)&&this.deleteObjectCore(e)},t.prototype.updateConditionsOnRemove=function(e){if(a.logic.updateExpressionsOnDeleting.question){if(te.getObjectType(e)==X.Question)t=[e];else var t=e.questions;if(t)for(var o=new Qe(this.survey,this),r=0;r<t.length;r++)o.removeQuestion(t[r].getValueName())}},t.prototype.checkOnElementDeleting=function(e){var t={element:e,elementType:te.getObjectType(e),allowing:!0};return this.onElementDeleting.fire(this,t),t.allowing},t.prototype.isElementSelected=function(e){return!(!e||e.isDisposed)&&e.getPropertyValue("isSelectedInDesigner")},t.prototype.selectElement=function(e,t,o,r){if(void 0===o&&(o=!0),void 0===r&&(r=!1),!e||!e.isDisposed&&e.getSurvey()&&(!e.isQuestion&&!e.isPanel||e.parent)){var n=this.selectedElement;n!==e&&(this.selectedElementValue=this.onSelectingElement(e),n!==this.selectedElementValue&&(n&&!n.isDisposed&&n.setPropertyValue("isSelectedInDesigner",!1),this.selectedElementValue&&this.selectedElementValue.setPropertyValue("isSelectedInDesigner",!0))),(n!==e||t)&&this.selectionChanged(this.selectedElement,t,!!o);var i=this.getSelectedSurveyElement();n!==e&&document&&i&&this.focusElement(e,o,i,t,r)}},t.prototype.focusElement=function(e,t,o,r,n){var i=this;void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n=null),o||(o=this.getSelectedSurveyElement()),setTimeout((function(){if(o&&(t||n&&(!o.hasTitle||o.isPanel))){var a=document.getElementById(o.id);if(a){var s=!i.rootElement||i.rootElement.clientHeight-64>a.clientHeight?"center":"start";if(a.scrollIntoView({block:s}),!r&&a.parentElement){var l="string"==typeof t?a.parentElement.querySelector(t):a.parentElement;l&&l.focus()}}}n&&e&&Io.get(e.locTitle).activateEditor()}),100)},t.prototype.getSelectedSurveyElement=function(){var e=this.selectedElement;return e&&"survey"!=e.getType()&&e.isInteractiveDesignElement&&e.id?e:null},t.prototype.onSelectingElement=function(e){var t={newSelectedElement:e};return this.onSelectedElementChanging.fire(this,t),t.newSelectedElement},Object.defineProperty(t.prototype,"designerPropertyGrid",{get:function(){var e=this.sidebar.getTabById(this.sidebar.activeTab);return e&&e.model?e.model.propertyGridModel:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyGrid",{get:function(){return this.designerPropertyGrid.survey},enumerable:!1,configurable:!0}),t.prototype.collapsePropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.collapseCategory(e)},t.prototype.expandPropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.expandCategory(e)},t.prototype.collapseAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.collapseAllCategories()},t.prototype.expandAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.expandAllCategories()},t.prototype.collapseAllPropertyTabs=function(){this.collapseAllPropertyGridCategories()},t.prototype.expandAllPropertyTabs=function(){this.expandAllPropertyGridCategories()},t.prototype.expandPropertyTab=function(e){this.expandPropertyGridCategory(e)},t.prototype.collapsePropertyTab=function(e){this.collapsePropertyGridCategory(e)},t.prototype.validateSelectedElement=function(){var e=!0;return this.selectedElement?(this.designerPropertyGrid&&(e=this.designerPropertyGrid.validate()),e):e},t.prototype.deleteLocaleStrings=function(e){new Lt(this.survey).deleteLocaleStrings(e)},t.prototype.getPropertyGridExpandedCategory=function(){if(this.designerPropertyGrid){for(var e=this.designerPropertyGrid.survey.getAllPanels(),t=0;t<e.length;t++)if(e[t].isExpanded)return e[t].name;return""}},t.prototype.expandCategoryIfNeeded=function(){var e=a.propertyGrid.defaultExpandedTabName;if(e&&!this.getPropertyGridExpandedCategory()&&!this.survey.isEmpty){var t=this.designerPropertyGrid.survey.getPanelByName(e);t&&t.expand()}},t.prototype.selectionChanged=function(e,t,o){void 0===o&&(o=!0),this.survey.currentPage=this.getCurrentPageByElement(e),this.selectionHistoryController.onObjSelected(e),this.designerPropertyGrid&&(this.designerPropertyGrid.obj=e,t||(t=this.designerPropertyGrid.currentlySelectedProperty),t&&this.designerPropertyGrid.selectProperty(t,o||!this.selectFromStringEditor),this.expandCategoryIfNeeded(),this.selectFromStringEditor=!1);var r={newSelectedElement:e};this.onSelectedElementChanged.fire(this,r)},t.prototype.getCurrentPageByElement=function(e){if(e)return e.isPage?e:e.page?e.page:e.parentQuestion?this.getCurrentPageByElement(e.parentQuestion):void 0},t.prototype.clickToolboxItem=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o="ADDED_FROM_TOOLBOX"),this.readOnly||(void 0===e.getType&&(e=this.createNewElement(e)),this.survey.lazyRendering=!1,this.doClickQuestionCore(e,o,-1,t),this.selectElement(e,null,!0,this.startEditTitleOnQuestionAdded))},t.prototype.getJSONForNewElement=function(e){var t=this.createNewElement(e);return(e=t.toJSON()).type=t.getType(),e},t.prototype.chooseFiles=function(e,t,o){this.onOpenFileChooser.isEmpty?Object(i.chooseFiles)(e,t):this.onOpenFileChooser.fire(this,{input:e,element:o&&o.element||this.survey,elementType:o&&o.elementType,item:o&&o.item,propertyName:o&&o.propertyName,callback:t,context:o})},t.prototype.uploadFiles=function(e,t,o,r){if(this.onUploadFile.isEmpty){var n=new FileReader;n.onload=function(e){o("success",n.result)},n.readAsDataURL(e[0])}else this.onUploadFile.fire(this,{question:t,files:e||[],callback:o,element:r&&r.element||this.survey,elementType:r&&r.elementType,propertyName:r&&r.propertyName,context:r})},Object.defineProperty(t.prototype,"rootElement",{get:function(){return this._rootElementValue},enumerable:!1,configurable:!0}),t.prototype.setRootElement=function(e){this._rootElementValue=e,this.initKeyboardShortcuts(e),this.initResponsivityManager(e)},t.prototype.unsubscribeRootElement=function(){this.removeKeyboardShortcuts(this._rootElementValue),this.resetResponsivityManager()},t.prototype.initKeyboardShortcuts=function(e){e&&e.addEventListener("keydown",this.onKeyDownHandler)},t.prototype.removeKeyboardShortcuts=function(e){e&&e.removeEventListener("keydown",this.onKeyDownHandler)},t.prototype.findSuitableShortcuts=function(e){var t=this,o=[];return Object.keys(this.shortcuts||{}).map((function(e){return t.shortcuts[e]})).filter((function(e){return!e.affectedTab||e.affectedTab===t.activeTab})).forEach((function(t){var r=e.metaKey?t.macOsHotkey:t.hotKey;r&&!!r.ctrlKey==!!e.ctrlKey&&!!r.shiftKey==!!e.shiftKey&&r.keyCode===e.keyCode&&o.push(t)})),o},t.prototype.registerShortcut=function(e,t){this.shortcuts[e]=t},t.prototype.unRegisterShortcut=function(e){delete this.shortcuts[e]},t.prototype.deletePanelOrQuestion=function(e){var t=this,o=e.parent,r=o.elements,n=r.indexOf(e);n==r.length-1&&n--,e.questions&&e.questions.forEach((function(e){return t.updateConditionsOnRemove(e)})),e.delete(!1),!o.isPage||"single"!==this.pageEditMode&&0!==r.length||(o=this.survey),this.selectElement(n>-1?r[n]:o)},t.prototype.onCanShowObjectProperty=function(e,t,o,r,n){var i={obj:e,property:t,canShow:!0,showMode:o,parentObj:r,parentProperty:n};return this.onCanShowProperty.fire(this,i),i.canShow},t.prototype.canDeleteItem=function(e,t,o){var r={obj:e,item:t,canDelete:o};return this.onCanDeleteItem.fire(this,r),r.canDelete},t.prototype.getErrorOnPropertyChanging=function(e,t,o){if("name"!==t)return null;if(te.getObjectType(e)===X.Unknown)return null;return(te.getObjectType(e)===X.Column?!!e.colOwner&&!this.isNameUniqueInArray(e.colOwner.columns,e,o):this.generateUniqueName(e,o)!==o)?this.getLocString("pe.propertyNameIsNotUnique"):null},t.prototype.generateUniqueName=function(e,t){var o={element:e,name:t,isDone:!0},r=[];do{if(this.generateUniqueNameCore(o),!o.isDone&&r.indexOf(o.name)>-1){o.name=this.checkForUniqueName(e,o.name);break}r.push(o.name)}while(!o.isDone);return o.name},t.prototype.generateUniqueNameCore=function(e){e.name=this.checkForUniqueName(e.element,e.name);var t={element:e.element,name:e.name};this.onGenerateNewName.fire(this,t),e.name!==t.name&&(e.name=t.name,e.name=this.checkForUniqueName(e.element,e.name),e.isDone=e.name===t.name)},t.prototype.checkForUniqueName=function(e,t){for(;!this.isNameUnique(e,t,!1);)t=te.generateNewName(t);return t},t.prototype.isNameUnique=function(e,t,o){return void 0===o&&(o=!0),!!this.isNameUniqueInArray(this.survey.pages,e,t)&&(!!this.isNameUniqueInArray(this.getAllPanels(o),e,t)&&this.isNameUniqueInArray(this.getAllQuestions(o),e,t))},t.prototype.isNameUniqueInArray=function(e,t,o){if(!Array.isArray(e))return!0;o=o.toLowerCase();for(var r=0;r<e.length;r++)if(e[r]!=t&&e[r].name.toLowerCase()==o)return!1;return!0},t.prototype.doPropertyGridChanged=function(){},Object.defineProperty(t.prototype,"alwaySaveTextInPropertyEditors",{get:function(){return this.alwaySaveTextInPropertyEditorsValue},set:function(e){this.alwaySaveTextInPropertyEditorsValue=e},enumerable:!1,configurable:!0}),t.prototype.onCanShowPropertyCallback=function(e,t,o,r,n){return void 0===o&&(o=null),this.onCanShowObjectProperty(e,t,o,r,n)},t.prototype.onPropertyGridSurveyCreatedCallback=function(e,t){var o={obj:e,survey:t};this.onPropertyGridSurveyCreated.fire(this,o)},t.prototype.onPropertyEditorCreatedCallback=function(e,t,o){var r={obj:e,property:t,editor:o};this.onPropertyEditorCreated.fire(this,r)},t.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,o,r){var n={obj:e,property:t,editor:o,titleActions:r};this.onPropertyEditorUpdateTitleActions.fire(this,n)},t.prototype.onPropertyGridShowModalCallback=function(e,t,o,r,n){var i={obj:e,property:t,editor:o,popupEditor:r,popupModel:n};this.onPropertyGridShowModal.fire(this,i)},t.prototype.onCanDeleteItemCallback=function(e,t,o){if(t&&t.isPage){if("bypage"===this.pageEditMode)return t!==this.survey.currentPage;if("single"===this.pageEditMode)return!1}return this.canDeleteItem(e,t,o)},t.prototype.onCollectionItemDeletingCallback=function(e,t,o,r){var n;if((null===(n=r)||void 0===n?void 0:n.isPage)&&!this.checkOnElementDeleting(r))return!1;if(this.onCollectionItemDeleting.isEmpty)return!0;var i={obj:e,property:t,propertyName:t.name,collection:o,item:r,allowDelete:!0};return this.onCollectionItemDeleting.fire(this,i),i.allowDelete},t.prototype.onCollectionItemAllowingCallback=function(e,t,o,r,n){if(!this.onCollectionItemAllowOperations.isEmpty){var i={obj:e,property:t,propertyName:t&&t.name,collection:o,item:r,allowEdit:n.allowEdit,allowDelete:n.allowDelete,allowAdd:n.allowAdd};this.onCollectionItemAllowOperations.fire(this,i),n.allowEdit=i.allowEdit,n.allowDelete=i.allowDelete,n.allowAdd=i.allowAdd}},t.prototype.onItemValueAddedCallback=function(e,t,o,r){var n={obj:e,propertyName:t,newItem:o,itemValues:r};this.onItemValueAdded.fire(this,n)},t.prototype.onFastEntryCallback=function(e,t){var o={items:e,lines:t};return this.onFastEntryFinished.fire(this,o),o.items},t.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,o){var r={newColumn:t,matrix:e,columns:o};this.onMatrixColumnAdded.fire(this,r)},t.prototype.onSetPropertyEditorOptionsCallback=function(e,t,o){var r={propertyName:e,obj:t,editorOptions:o};this.onSetPropertyEditorOptions.fire(this,r)},t.prototype.onGetErrorTextOnValidationCallback=function(e,t,o){var r=this.getErrorOnPropertyChanging(t,e,o);if(r)return r;var n={propertyName:e,obj:t,value:o,error:""};return this.onPropertyValidationCustomError.fire(this,n),n.error},t.prototype.onValueChangingCallback=function(e){this.onPropertyValueChanging.fire(this,e)},t.prototype.onGetElementEditorTitleCallback=function(e,t){return t},t.prototype.onConditionQuestionsGetListCallback=function(e,t,o,r){if(this.onConditionQuestionsGetList.isEmpty)return a.logic.questionSortOrder;var n={propertyName:e,obj:t,editor:o,sortOrder:"asc",list:r};if(this.onConditionQuestionsGetList.fire(this,n),n.list!==r){r.splice(0,r.length);for(var i=0;i<n.list.length;i++)r.push(n.list[i])}return n.sortOrder},t.prototype.onConditionGetTitleCallback=function(e,t){var o={expression:e,title:t};return this.onConditionGetTitle.fire(this,o),o.title},t.prototype.isConditionOperatorEnabled=function(e,t,o,r){if(this.onGetConditionOperator.isEmpty)return r;var n={questionName:e,question:t,questionType:t?t.getType():"",operator:o,show:r};return this.onGetConditionOperator.fire(this,n),n.show},t.prototype.onLogicGetTitleCallback=function(e,t,o,r){if(this.onLogicItemDisplayText.isEmpty)return o;var n={expression:e,expressionText:t,text:o,logicItem:r};return this.onLogicItemDisplayText.fire(this,n),n.text},t.prototype.getProcessedTranslationItemText=function(e,t,o,r){if(this.onTranslationItemChanging.isEmpty)return o;var n={locale:e,obj:r,locString:t,newText:o};return this.onTranslationItemChanging.fire(this,n),n.newText},t.prototype.getTranslationExportedText=function(e,t,o,r,n){if(this.onTranslationExportItem.isEmpty)return n;var i={obj:e,name:t,locString:o,locale:r,text:n};return this.onTranslationExportItem.fire(this,i),i.text},t.prototype.getHasMachineTranslation=function(){return!this.onMachineTranslate.isEmpty},t.prototype.doMachineTranslation=function(e,t,o,r){this.getHasMachineTranslation()?this.onMachineTranslate.fire(this,{fromLocale:e,toLocale:t,strings:o,callback:r}):r(void 0)},t.prototype.doAutoSave=function(){var e=this,t=function(){return e.doSave()};if(this.autoSaveDelay<=0)t();else{this.autoSaveTimerId&&clearTimeout(this.autoSaveTimerId);var o=this;this.autoSaveTimerId=setTimeout((function(){clearTimeout(o.autoSaveTimerId),o.autoSaveTimerId=null,t()}),this.autoSaveDelay)}},t.prototype._doSaveCore=function(e){var t=this;this.setState("saving"),this.saveSurveyFunc&&(this.saveNo++,this.saveSurveyFunc(this.saveNo,(function(o,r){t.saveNo===o&&(r?t.setState("saved"):(t.setState("modified"),t.showErrorOnFailedSave&&t.notify(t.getLocString("ed.saveError"),"error")),e&&e())})))},t.prototype.saveSurvey=function(){this._doSaveCore()},t.prototype.doSave=function(){this._doSaveCore()},t.prototype.saveSurveyActionHandler=function(){this.syncSaveButtons?this.save():this.saveSurvey()},t.prototype._updateSaveActions=function(){var e=this._findAction("svd-save");if(e&&(e.enabled="modified"===this.state,e.active="modified"===this.state),this.syncSaveButtons){var t=this._findAction("svd-save-theme");t&&(t.enabled=this.hasPendingThemeChanges,t.active=this.hasPendingThemeChanges)}},t.prototype.save=function(){var e=this,t=function(){e.hasPendingThemeChanges&&e._doSaveThemeCore((function(){e._updateSaveActions()}))};"modified"===this.state?this._doSaveCore((function(){t()})):t()},Object.defineProperty(t.prototype,"saveSurveyFunc",{get:function(){return this.saveSurveyFuncValue},set:function(e){this.saveSurveyFuncValue=e,this.showSaveButton=null!=e&&!this.isAutoSave},enumerable:!1,configurable:!0}),t.prototype.convertCurrentQuestion=function(e){var t=this.selectedElement;if(t&&t.getType()!==e){var o=te.getObjectType(t);o!==X.Question&&o!==X.Panel||(this.addNewElementReason="ELEMENT_CONVERTED",t=this.convertQuestion(t,e),this.selectElement(t,null,"#convertTo button"))}},t.prototype.getAddNewQuestionText=function(e){if(void 0===e&&(e=null),e||(e=this.currentAddQuestionType),e){var t=this.getLocString("ed.addNewTypeQuestion"),o=this.toolbox.items.filter((function(t){return t.name==e}));if(Array.isArray(o)&&o.length>0&&t&&t.format)return t.format(o[0].title)}return this.getLocString("ed.addNewQuestion")},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return this.getAddNewQuestionText()},enumerable:!1,configurable:!0}),t.prototype.getAvailableToolboxItems=function(e,t){void 0===t&&(t=!0);var o=[].concat(this.toolbox.items);if(!e||this.maxNestedPanels<0)return o;if(!t&&e.isPanel)return o;if(this.maxNestedPanels<te.getElementDeepLength(e))for(var r=o.length-1;r>=0;r--)o[r].isPanel&&o.splice(r,1);return o},t.prototype.getQuestionTypeSelectorModel=function(e,t){var o=this,r=t&&t.isPanel?t:null,n=function(){return o.getAvailableToolboxItems(t).map((function(e){return o.createIActionBarItemByClass(e.name,e.title,e.iconName,e.needSeparator)}))},a=Object(i.createDropdownActionModel)({iconName:"icon-more",title:this.getLocString("ed.addNewQuestion")},{items:n(),onSelectionChanged:function(t){o.currentAddQuestionType=t.id,o.addNewQuestionInPage(e,r)},onShow:function(){a.popupModel.contentComponentData.model.setItems(n())},allowSelection:!1,verticalPosition:"bottom",horizontalPosition:"center",displayMode:this.isTouch?"overlay":"popup"});return a},t.prototype.getUpdatedPageAdornerFooterActions=function(e,t){var o={page:e.page,addNewQuestion:function(t){e.addNewQuestion(e,void 0,t)},actions:t};return this.onGetPageActions.fire(this,o),o.actions},t.prototype.addNewQuestionInPage=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null),o||(o=this.currentAddQuestionType),o||(o=a.designer.defaultAddQuestionType),e(o);var r={type:o},n=this.toolbox.getItemByName(o);n&&n.json&&(r=n.json);var i=this.createNewElement(r);this.clickToolboxItem(i,t,"ADDED_FROM_PAGEBUTTON")},t.prototype.createIActionBarItemByClass=function(e,t,o,r){var n=new i.Action({title:t,id:e,iconName:o});return n.needSeparator=r,n},t.prototype.onElementMenuItemsChanged=function(e,t){this.onDefineElementMenuItems.fire(this,{obj:e,items:t})},t.prototype.getElementAllowOperations=function(e){var t={obj:e,element:e,allowDelete:!0,allowCopy:!0,allowDragging:!0,allowChangeType:!0,allowChangeInputType:!0,allowChangeRequired:!0,allowShowSettings:void 0,allowEdit:void 0};return this.onElementAllowOperations.fire(this,t),t},t.prototype.getChoicesItemBaseTitle=function(){return this.getLocString("ed.choices_Item")||i.surveyLocalization.getString("choices_Item")},t.prototype.getNextItemValue=function(e){return d(this.getChoicesItemBaseTitle(),e.choices)},t.prototype.createNewItemValue=function(e,t,o){void 0===t&&(t=!0);var r=this.getNextItemValue(e),n=e.createItemValue(r);if(n.text=h(e.choices),e.choices.push(n),o&&o(n),t){var i=n.ownerPropertyName?n.ownerPropertyName:"choices";this.onItemValueAddedCallback(e,i,n,e.choices)}return n},t.prototype.onPropertyValueChanged=function(t,o,r){var n=this;e.prototype.onPropertyValueChanged.call(this,t,o,r),"viewType"===t&&this.tabs.forEach((function(e){var t=n.viewType===e.id;e.active=t,e.disableHide=t}))},t.prototype.initResponsivityManager=function(e){this.responsivityManager=new bo(e,this)},t.prototype.resetResponsivityManager=function(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)},Object.defineProperty(t.prototype,"showPageNavigator",{get:function(){return this.showPageNavigatorValue&&this.allowShowPageNavigator},set:function(e){this.showPageNavigatorValue=e},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){var t=this;this.isCreatorDisposed=!0,this.tabs=[],Object.keys(this.plugins).forEach((function(e){var o=t.plugins[e];"function"==typeof o.deactivate&&o.deactivate(),"function"==typeof o.dispose&&o.dispose()})),e.prototype.dispose.call(this)},Z([Object(i.property)({defaultValue:!0})],t.prototype,"showDesignerTab",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showJSONEditorTab",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showTestSurveyTab",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showThemeTab",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showTranslationTab",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showLogicTab",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"useTableViewInLogicTab",void 0),Z([Object(i.property)({defaultValue:200})],t.prototype,"pageHoverDelay",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"inplaceEditForValues",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"previewShowResults",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isAutoSave",void 0),Z([Object(i.property)()],t.prototype,"showOptions",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showSearch",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"generateValidJSON",void 0),Z([Object(i.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),Z([Object(i.property)({defaultValue:"landscape"})],t.prototype,"previewOrientation",void 0),Z([Object(i.property)()],t.prototype,"surveyValue",void 0),Z([Object(i.property)()],t.prototype,"viewType",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"allowShowToolbox",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showToolboxValue",void 0),Z([Object(i.property)()],t.prototype,"showSidebarValue",void 0),Z([io()],t.prototype,"addPage",null),Z([ao()],t.prototype,"doOnQuestionAdded",null),Z([ao()],t.prototype,"doOnPanelAdded",null),Z([ao()],t.prototype,"doOnPageAdded",null),Z([io()],t.prototype,"deleteObject",null),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){var o=t.getPlugin("theme");o&&(e?(t.onModified.add(t._syncSaveActions),o.onThemePropertyChanged.add(t._syncSaveActions),o.onThemeSelected.add(t._syncSaveActions)):(t.onModified.remove(t._syncSaveActions),o.onThemePropertyChanged.remove(t._syncSaveActions),o.onThemeSelected.remove(t._syncSaveActions)))}})],t.prototype,"syncSaveButtons",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showSaveButton",void 0),Z([io()],t.prototype,"convertCurrentQuestion",null),Z([io()],t.prototype,"addNewQuestionInPage",null),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showHeaderInEmptySurvey",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"allowShowPageNavigator",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showPageNavigatorValue",void 0),Z([Object(i.property)({getDefaultValue:function(){return a.layout.showTabs}})],t.prototype,"showTabs",void 0),Z([Object(i.property)({getDefaultValue:function(){return a.layout.showToolbar}})],t.prototype,"showToolbar",void 0),Z([Object(i.property)({getDefaultValue:function(){return a.layout.allowCollapseSidebar}})],t.prototype,"allowCollapseSidebar",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.survey.setIsMobile(!!e)}})],t.prototype,"isMobileView",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isTouch",void 0),Z([Object(i.property)({defaultValue:"left",onSet:function(e,t){t.toolbox&&(t.toolbox.setLocation(e),t.updateToolboxIsCompact())}})],t.prototype,"toolboxLocation",void 0),Z([Object(i.property)({defaultValue:"right"})],t.prototype,"sidebarLocation",void 0),Z([Object(i.property)({defaultValue:!1,onSet:function(e,t){if(!e)throw new Error("Creator is disposed")}})],t.prototype,"isCreatorDisposed",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"enableLinkFileEditor",void 0),t}(i.Base),xr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t}(vr),wr=function(){function e(){}return Object.defineProperty(e,"currentTheme",{get:function(){te.warnNonSupported("StylesManager")},set:function(e){te.warnNonSupported("StylesManager")},enumerable:!1,configurable:!0}),e.applyTheme=function(e){te.warnNonSupported("StylesManager")},e}();function jr(e,t){e.creator=t,e.isPopupEditorContent=!1;var o=e.getElementWrapperComponentName;e.getElementWrapperComponentName=function(t,r){return Tr(t,r,e.isPopupEditorContent)||o.call(e,t,r)};var r=e.getQuestionContentWrapperComponentName;e.getQuestionContentWrapperComponentName=function(t,o){return Pr(t)||r.call(e,t,o)};var n=e.getElementWrapperComponentData;e.getElementWrapperComponentData=function(o,r){return Er(o,r,t)||n.call(e,o,r)},e.getRowWrapperComponentName=function(e){return"svc-row"},e.getRowWrapperComponentData=function(e){return{creator:t,row:e}},e.getItemValueWrapperComponentName=function(e,t){return Ir(e,t)},e.getItemValueWrapperComponentData=function(e,o){return Or(e,o,t)},e.getRendererForString=function(e,o){if(!t.readOnly&&Vr(e,o))return Sr},e.getRendererContextForString=function(e,o){return!t.readOnly&&Vr(e,o.name)?{creator:t,element:e,locStr:o}:o}}function Cr(e){for(var t=e;t;){if(t.isContentElement)return!0;t=t.parentQuestion}return!1}var Sr="svc-string-editor";function Tr(e,t,o){if("logo-image"===t)return"svc-logo-image";if("cell"===t||"column-header"===t||"row-header"===t){if(Cr(function(e){return e?e.row?e.row.data:e.column?e.column.colOwner:null:null}(e)))return;return"svc-matrix-cell"}if(!Cr(e)){if(e instanceof i.Question){var r=e.isDescendantOf("dropdown")||e.isDescendantOf("tagbox");return o?r?"svc-cell-dropdown-question":"svc-cell-question":e.customWidget?"svc-widget-question":r?"svc-dropdown-question":e.isDescendantOf("image")?"svc-image-question":"svc-question"}if(e instanceof i.PanelModel)return"svc-panel"}}function Pr(e){if(e.isDescendantOf("rating")&&!Cr(e))return"svc-rating-question-content"}function Er(e,t,o){return"logo-image"===t?o:"cell"===t||"column-header"===t||"row-header"===t?{creator:o,element:e,question:e.question,row:e.row,column:e.column}:Tr(e,t,!1)?e instanceof i.Question||e instanceof i.PanelModel?o:null:void 0}function Ir(e,t){return Cr(t)?i.SurveyModel.TemplateRendererComponentName:t.isDescendantOf("imagepicker")?"svc-image-item-value":"svc-item-value"}function Or(e,t,o){return t.isContentElement?e:{creator:o,question:t,item:e}}function Vr(e,t){return!(e.parentQuestion instanceof i.QuestionMatrixDropdownModelBase&&(e.data||Cr(e.parentQuestion)))&&(!Cr(e)||e.isEditableTemplateElement)}function Nr(e){if(!e.tagName)return!1;var t=e.tagName.toLowerCase();return-1!==["input","textarea"].indexOf(t)||-1!==["span","div"].indexOf(t)&&e.isContentEditable}function kr(e,t){te.warnNonSupported("registerAdorner","This functionality is no longer supported.")}function Ar(e){void 0===e&&(e=void 0),te.warnNonSupported("removeAdorners","This functionality is no longer supported.")}var _r=function(e){function t(t,o){var r=e.call(this)||this;return r.item=t,r.creator=o,r.click=function(e){r.allowAdd&&r.creator.clickToolboxItem(r.item.json)},r.onPointerUp=function(e){r._node.classList.remove("svc-toolbox__tool--pressed"),r._node=null,document.removeEventListener("pointerup",r.onPointerUp)},r.startDragToolboxItem=function(e,t){var o=r.creator.getJSONForNewElement(r.item.json);return r.dragDropHelper.startDragToolboxItem(e,o,r.item),!0},r.dragOrClickHelper=new i.DragOrClickHelper(r.startDragToolboxItem),r}return Y(t,e),Object.defineProperty(t.prototype,"allowAdd",{get:function(){return!this.creator.readOnly},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){var t;if(this.allowAdd){if(0===this.item.id.indexOf("dotsItem-id"))return!0;this.dragOrClickHelper.onPointerDown(e),this._node=e.currentTarget,this._node.classList.add("svc-toolbox__tool--pressed"),document.addEventListener("pointerup",this.onPointerUp),null===(t=this.creator)||void 0===t||t.onDragDropItemStart()}},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),t}(i.Base);o(19),o(20);var Lr=function(e){function t(t,o){var r=e.call(this)||this;return r.pagesController=t,r.pageEditMode=o,r.pagesChangedFunc=function(e,t){r.buildItems()},r.currentPagesChangedFunc=function(e,t){r.currentPage=r.pagesController.currentPage},r.pcPropertyChangedHandler=function(e,t){"toolboxLocation"===t.name&&("sidebar"==r.pagesController.creator.toolboxLocation?r.popupModel.horizontalPosition="right":r.popupModel.horizontalPosition=r.pagesController.creator.toolboxLocation)},r.togglePageSelector=function(e){return r.popupModel.toggleVisibility()},r.icon="icon-select-page",r.pagesController.onPagesChanged.add(r.pagesChangedFunc),r.pagesController.onCurrentPageChanged.add(r.currentPagesChangedFunc),r.pageListModel=new i.ListModel([],(function(e){r.pagesController.selectPage(e.data),r.popupModel.toggleVisibility()}),!0),r.popupModel=new i.PopupModel("sv-list",{model:r.pageListModel}),r.pagesController&&(r.popupModel.horizontalPosition=r.pagesController.creator.toolboxLocation),r.popupModel.onShow=function(){r.pageListModel.selectedItem=r.getActionBarByPage(r.pagesController.currentPage),r.isPopupOpened=!0},r.popupModel.onHide=function(){r.isPopupOpened=!1},r.pagesController.creator.onPropertyChanged&&r.pagesController.creator.onPropertyChanged.add(r.pcPropertyChangedHandler),r.buildItems(),r}return Y(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.stopItemsContainerHeightObserver(),this.pagesController.onPagesChanged.remove(this.pagesChangedFunc),this.pagesController.onCurrentPageChanged.remove(this.currentPagesChangedFunc),this.pagesController.creator.onPropertyChanged&&(this.pagesController.creator.onPropertyChanged.remove(this.pcPropertyChangedHandler),this.pcPropertyChangedHandler=void 0),this.pageListModel&&this.pageListModel.dispose(),this.popupModel&&this.popupModel.dispose(),this._scrollableContainer=void 0,this._itemsContainer=void 0},t.prototype.getActionBarByPage=function(e){for(var t=0;t<this.items.length;t++)if(this.items[t].data===e)return this.items[t];return null},t.prototype.setItems=function(e){this.items=e,this.pageListModel.setItems(e),this.updateVisibility()},t.prototype.buildItems=function(){this.currentPage=this.pagesController.currentPage||this.pagesController.pages[0];for(var e=[],t=this.pagesController.pages,o=0;o<t.length;o++)e.push(this.createActionBarItem(t[o]));if("bypage"===this.pagesController.creator.pageEditMode){var r=this.pagesController.creator.getPlugin("designer").model.newPage;r&&e.push(this.createActionBarItem(r))}this.setItems(e)},t.prototype.patchContainerOffset=function(e){for(;e;){if(-1!==e.className.indexOf("svc-tab-designer--with-page-navigator"))return void(e.offsetParent.scrollTop=0);e=e.parentElement}},t.prototype.createActionBarItem=function(e){var t=this,o={id:e.id,title:new i.ComputedUpdater((function(){var o=e.name,r=e.title;return t.pagesController?t.pagesController.getDisplayName(e):r||o}))};return o.active=new i.ComputedUpdater((function(){return e===t.currentPage})),o.action=function(o){t.scrollToPage(e)},o.data=e,this.createActionBarCore(o)},Object.defineProperty(t.prototype,"isByPageMode",{get:function(){return"bypage"===this.pagesController.creator.pageEditMode},enumerable:!1,configurable:!0}),t.prototype.scrollToPage=function(e){var t=this;if("bypage"===this.pageEditMode)return this.pagesController.currentPage=e,this.currentPage=e,void this.pagesController.creator.selectElement(this.pagesController.currentPage);var o=document.getElementById(e.id);if(o){var r=this.pagesController.pages.indexOf(e)===this.pagesController.pages.length-1;this._scrollableContainer?(this._scrollableContainer.scrollTo(this._scrollableContainer.scrollLeft,o.offsetTop-20),this.patchContainerOffset(o),r&&setTimeout((function(){t._scrollableContainer.scrollTo(t._scrollableContainer.scrollLeft,o.offsetTop-20),t.patchContainerOffset(o)}),50)):(o.scrollIntoView({block:"start"}),this.patchContainerOffset(o),r&&setTimeout((function(){o.scrollIntoView({block:"start"}),t.patchContainerOffset(o)}),50))}},t.prototype.createActionBarCore=function(e){return new i.Action(e)},Object.defineProperty(t.prototype,"pageSelectorCaption",{get:function(){return z("ed.selectPage")},enumerable:!1,configurable:!0}),t.prototype.onContainerScroll=function(e){var t=e.scrollTop,o=e.clientHeight,r=t+o,n=[],i=void 0,a=0;return this.pagesController.pages.forEach((function(e){var o=document.getElementById(e.id);if(o){var s=o.offsetTop,l=s+o.clientHeight;if(!(s<r||l>t))return;var c=s-t,p=r-l,u=o.clientHeight;c<0&&(u+=c),p<0&&(u+=p),(u/=o.clientHeight)>0&&(n.push({page:e,visiblePart:u}),u>a&&(a=u,i=e))}})),this.currentPage=i,n},t.prototype.stopItemsContainerHeightObserver=function(){this._itemsContainer=void 0,this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),this.isDisposed||(this.visibleItemsStartIndex=0,this.visibleItemsCount=Number.MAX_VALUE)},t.prototype.setScrollableContainer=function(e){this._scrollableContainer=e},t.prototype.setItemsContainer=function(e){var t=this;this.stopItemsContainerHeightObserver(),this._itemsContainer=e,this._resizeObserver=new ResizeObserver((function(e,o){return t.updateVisibleItems(e[0].contentBoxSize[0].blockSize)})),this._resizeObserver.observe(e)},t.prototype.updateVisibleItems=function(e){if(this.updateVisibility(),!this.isByPageMode){var o=e-t.PAGE_NAVIGATION_MENU_ITEM_HEIGHT;this.visibleItemsCount=Math.floor(o/t.PAGE_NAVIGATION_ITEM_HEIGHT);var r=this.pagesController.pages.indexOf(this.currentPage),n=0;r>=this.visibleItemsCount&&(n=this.items.length-r-1<this.visibleItemsCount/2?this.items.length-this.visibleItemsCount:r-Math.floor(this.visibleItemsCount/2)),this.visibleItemsStartIndex=n}},t.prototype._updateVisibility=function(){this.hasScrolling=!this._scrollableContainer||this._scrollableContainer.scrollHeight>this._scrollableContainer.clientHeight,this.visible=this.items.length>1&&(this.hasScrolling||this.isByPageMode),this.isByPageMode&&(this.visibleItemsStartIndex=0,this.visibleItemsCount=this.items.length)},t.prototype.updateVisibility=function(){var e=this;setTimeout((function(){e._updateVisibility()}),10)},Object.defineProperty(t.prototype,"visibleItems",{get:function(){return this.items.length<=this.visibleItemsCount?this.items:this.items.slice(this.visibleItemsStartIndex,this.visibleItemsStartIndex+this.visibleItemsCount)},enumerable:!1,configurable:!0}),t.PAGE_NAVIGATION_MENU_ITEM_HEIGHT=44,t.PAGE_NAVIGATION_ITEM_HEIGHT=36,Z([Object(i.property)({defaultValue:!0})],t.prototype,"hasScrolling",void 0),Z([Object(i.propertyArray)()],t.prototype,"items",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"visible",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isPopupOpened",void 0),Z([Object(i.property)({onSet:function(e,t){var o=t.pagesController.pages.indexOf(e);if(!(o>=t.visibleItemsStartIndex&&o<t.visibleItemsStartIndex+t.visibleItemsCount)){var r=t.visibleItemsStartIndex;if(o<t.visibleItemsStartIndex&&(r=o),o>=t.visibleItemsStartIndex+t.visibleItemsCount&&(r=o-t.visibleItemsCount+1),t.visibleItemsStartIndex!==r)if(t.visible&&t._itemsContainer){var n=t._itemsContainer.querySelectorAll(".svc-page-navigator__selector + div")[0];if(n){var i="svc-page-navigator__items--"+(t.visibleItemsStartIndex<r?"up":"down");n.className=i,setTimeout((function(){n.className="",t.visibleItemsStartIndex=r}),250)}}else t.visibleItemsStartIndex=r}}})],t.prototype,"currentPage",void 0),Z([Object(i.property)({defaultValue:0})],t.prototype,"visibleItemsStartIndex",void 0),Z([Object(i.property)({defaultValue:Number.MAX_VALUE})],t.prototype,"visibleItemsCount",void 0),t}(i.Base),Dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.needToShrink=function(e,t,o){return"start"==e.innerItem.location&&t||"start"!=e.innerItem.location&&o},t.prototype.setModeForActions=function(e,t,o){var r=this;void 0===o&&(o=[]),this.visibleActions.forEach((function(n){-1==o.indexOf(n.id)?r.needToShrink(n,e,t)?n.mode=n.innerItem.iconName?"small":"removed":n.mode="large":n.mode="removed"}))},t.prototype.calcItemSize=function(e,t,o,r){return void 0===r&&(r=[]),-1!=r.indexOf(e.id)?0:this.needToShrink(e,t,o)?e.innerItem.iconName?e.minDimension:0:e.maxDimension},t.prototype.fit=function(e,t){var o=this;if(!(e<=0)){this.dotsItem.visible=!1;var r=this.visibleActions;e>=r.reduce((function(e,t){return e+t.maxDimension}),0)?r.forEach((function(e){return e.mode="large"})):e>=r.reduce((function(e,t){return e+o.calcItemSize(t,!1,!0)}),0)?this.setModeForActions(!1,!0):e>=r.reduce((function(e,t){return e+o.calcItemSize(t,!1,!0,["convertInputType"])}),0)?this.setModeForActions(!1,!0,["convertInputType"]):e>=r.reduce((function(e,t){return e+o.calcItemSize(t,!0,!0)}),0)?this.setModeForActions(!0,!0):(this.visibleActions.forEach((function(e){"convertTo"!=e.id?"convertInputType"!=e.id?e.mode="popup":e.mode="removed":e.mode="small"})),this.dotsItem.visible=!0,this.hiddenItemsListModel.setItems(r.filter((function(e){return"popup"==e.mode})).map((function(e){return e.innerItem}))))}},t}(i.AdaptiveActionContainer),Mr=function(e){function t(t,o){var r=e.call(this)||this;return r.creator=t,r.surveyElement=o,r.selectedPropPageFunc=function(e,t){"isSelectedInDesigner"===t.name&&r.onElementSelectedChanged(t.newValue)},r.sidebarFlyoutModeChangedFunc=function(e,t){"flyoutMode"===t.name&&r.updateActionsProperties()},r.actionContainer=new Dr,r.actionContainer.dotsItem.iconSize=16,r.actionContainer.dotsItem.popupModel.horizontalPosition="center",r.setSurveyElement(o),r.creator.sidebar.onPropertyChanged.add(r.sidebarFlyoutModeChangedFunc),r.setShowAddQuestionButton(!0),r}return Y(t,e),t.prototype.detachElement=function(e){e&&e.onPropertyChanged.remove(this.selectedPropPageFunc)},t.prototype.attachElement=function(e){e&&e.onPropertyChanged.add(this.selectedPropPageFunc)},t.prototype.setSurveyElement=function(e){if(this.detachElement(this.surveyElement),this.surveyElement=e,this.attachElement(this.surveyElement),this.surveyElement){var t=[];this.buildActions(t),this.creator.onElementMenuItemsChanged(this.surveyElement,t),this.actionContainer.actions.forEach((function(e){return e.dispose&&e.dispose()})),this.actionContainer.setItems(t),this.updateActionsProperties()}},t.prototype.checkActionProperties=function(){this.creator.isElementSelected(this.surveyElement)&&this.updateActionsProperties()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.detachElement(this.surveyElement),this.actionContainer.isDisposed||this.actionContainer.dispose(),this.creator.sidebar.onPropertyChanged.remove(this.sidebarFlyoutModeChangedFunc),this.selectedPropPageFunc=void 0,this.sidebarFlyoutModeChangedFunc=void 0},t.prototype.onElementSelectedChanged=function(e){e&&this.updateActionsProperties()},t.prototype.updateActionsProperties=function(){this.isDisposed||this.updateElementAllowOptions(this.creator.getElementAllowOperations(this.surveyElement),this.isOperationsAllow())},t.prototype.updateElementAllowOptions=function(e,t){if(this.allowDragging=t&&e.allowDragging,this.allowEditOption=null==e.allowEdit||!!e.allowEdit,this.updateActionVisibility("delete",t&&e.allowDelete),this.updateActionVisibility("duplicate",t&&e.allowCopy),void 0===e.allowShowSettings){var o=void 0!==e.allowEdit?t&&e.allowEdit:this.creator.sidebar.flyoutMode;this.updateActionVisibility("settings",o)}else this.updateActionVisibility("settings",e.allowShowSettings);this.setShowAddQuestionButton(!1!==e.allowEdit)},t.prototype.isOperationsAllow=function(){return!this.creator.readOnly},t.prototype.updateActionVisibility=function(e,t){var o=this.getActionById(e);o&&o.visible!=t&&(o.visible=t)},t.prototype.getActionById=function(e){for(var t=this.actionContainer.actions,o=0;o<t.length;o++)if(t[o].id===e)return t[o];return null},t.prototype.buildActions=function(e){var t=this;e.push(new i.Action({id:"duplicate",iconName:"icon-duplicate_16x16",css:"svc-action-bar-item--right sv-action-bar-item--secondary",title:this.creator.getLocString("survey.duplicate"),visibleIndex:10,iconSize:16,action:function(){t.duplicate()}})),e.push(new i.Action({id:"settings",iconName:"icon-settings_16x16",css:"svc-action-bar-item--right sv-action-bar-item--secondary",title:this.creator.getLocString("ed.settings"),locTooltipName:"ed.settingsTooltip",visibleIndex:20,iconSize:16,action:function(){t.creator.setShowSidebar(!0,!0),t.creator.isMobileView||t.creator.propertyGrid.getAllQuestions()[0].focus()}})),e.push(new i.Action({id:"delete",iconName:"icon-delete_16x16",css:"svc-action-bar-item--right sv-action-bar-item--secondary",title:this.creator.getLocString("pe.delete"),visibleIndex:30,iconSize:16,action:function(){t.delete()}}))},Object.defineProperty(t.prototype,"allowEdit",{get:function(){return!!this.creator&&!this.creator.readOnly&&this.allowEditOption},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showAddQuestionButton",{get:function(){return this.getPropertyValue("showAddQuestionButton")},enumerable:!1,configurable:!0}),t.prototype.setShowAddQuestionButton=function(e){this.setPropertyValue("showAddQuestionButton",e&&this.allowEdit&&a.designer.showAddQuestionButton)},t.prototype.duplicate=function(){},t.prototype.delete=function(){this.creator.deleteElement(this.surveyElement)},Z([Object(i.property)({defaultValue:!0})],t.prototype,"allowDragging",void 0),t}(i.Base);o(21);var Rr=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.addGhostPage=function(e){void 0===e&&(e=!0);var t=r.page;r.isGhost&&(!!r.creator.addPage(t,e,(function(){return t.unRegisterFunctionOnPropertiesValueChanged(["title","description"],"add_ghost"),t.name=te.getNewPageName(r.creator.survey.pages),!0}))&&(r.creator.survey.currentPage=t));e&&r.creator.selectElement(t)},r.actionContainer.sizeMode="small",r.questionTypeSelectorModel=r.creator.getQuestionTypeSelectorModel((function(e){r.currentAddQuestionType=e,r.addGhostPage()})),r.attachElement(o),r}return Y(t,e),t.prototype.updateDragTypeOverMe=function(){var e;this.isDisposed||(this.dragTypeOverMe=null===(e=this.page)||void 0===e?void 0:e.dragTypeOverMe)},t.prototype.updateShowPlaceholder=function(e){this.showPlaceholder=!this.isGhost&&0===(e||this.page.elements).length},t.prototype.attachElement=function(t){var o=this;e.prototype.attachElement.call(this,t),this.dragTypeOverMe=null,t&&(t.surveyChangedCallback=function(){o.isPageLive=!!t.survey},this.calcIsGhostPage(t)&&(this.updateActionsProperties(),t.registerFunctionOnPropertiesValueChanged(["title","description"],(function(){o.addGhostPage(),o.updateShowPlaceholder()}),"add_ghost"),this.patchPageForDragDrop(t,this.addGhostPage)),t.registerFunctionOnPropertiesValueChanged(["dragTypeOverMe"],(function(){o.updateDragTypeOverMe()})),t.registerFunctionOnPropertiesValueChanged(["elements"],(function(e){o.updateShowPlaceholder(e)})),this.updateShowPlaceholder(),t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0),this.checkActionProperties(),this.dragTypeOverMe=t.dragTypeOverMe)},t.prototype.detachElement=function(t){t&&(t.unRegisterFunctionOnPropertiesValueChanged(["dragTypeOverMe"]),t.unRegisterFunctionOnPropertiesValueChanged(["title","description"],"add_ghost"),t.surveyChangedCallback=void 0),e.prototype.detachElement.call(this,t),this.isDisposed||(this.dragTypeOverMe=null)},t.prototype.onElementSelectedChanged=function(t){e.prototype.onElementSelectedChanged.call(this,t),this.isSelected=t,t&&"bypage"===this.creator.pageEditMode&&this.setSurveyElement(this.creator.selectedElement),t&&this.onPageSelectedCallback&&this.onPageSelectedCallback()},t.prototype.patchPageForDragDrop=function(e,t){e._isGhost=!0,e._addGhostPageViewModel=function(){delete e._isGhost,delete e._addGhostPageViewModel,t()}},t.prototype.dispose=function(){this.detachElement(this.page),e.prototype.dispose.call(this),this.onPropertyValueChangedCallback=void 0},t.prototype.calcIsGhostPage=function(e){return this.creator.survey.pages.indexOf(e)<0},Object.defineProperty(t.prototype,"isGhost",{get:function(){return this.calcIsGhostPage(this.page)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.creator.isMobileView?z("ed.pagePlaceHolderMobile"):z("ed.pagePlaceHolder")},enumerable:!1,configurable:!0}),t.prototype.isOperationsAllow=function(){return e.prototype.isOperationsAllow.call(this)&&!this.isGhost&&"single"!==this.creator.pageEditMode&&this.creator.allowModifyPages},t.prototype.getPage=function(){return this.surveyElement},Object.defineProperty(t.prototype,"page",{get:function(){return this.getPage()},enumerable:!1,configurable:!0}),t.prototype.addNewQuestion=function(e,t,o){var r=this;this.creator.addNewQuestionInPage((function(e){r.addGhostPage(!1),r.creator.survey.currentPage=r.page}),null,o||this.currentAddQuestionType||a.designer.defaultAddQuestionType)},t.prototype.select=function(e,t){e.isGhost||("single"!==e.creator.pageEditMode?(e.creator.selectElement(e.page,void 0,!1),this.onPageSelectedCallback&&this.onPageSelectedCallback()):e.creator.selectElement(e.creator.survey,void 0,!1)),t.stopPropagation(),t.cancelBubble=!0},Object.defineProperty(t.prototype,"css",{get:function(){var e="";return this.dragTypeOverMe&&this.showPlaceholder?e="svc-question__content--drag-over-inside":this.dragTypeOverMe&&0===this.page.elements.length&&this.creator.survey.pages.length>0&&(e="svc-page--drag-over-empty",a.designer.showAddQuestionButton||(e+=" svc-page--drag-over-empty-no-add-button")),this.isGhost?e+" svc-page__content--new":(this.creator.isElementSelected(this.page)&&(e+=" svc-page__content--selected"),e)},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){w(e,t,this.creator.pageHoverDelay)},t.prototype.hoverStopper=function(e,t){e.__svc_question_processed=!0},t.prototype.duplicate=function(){var e=this.creator.copyPage(this.page);this.creator.selectElement(e)},t.prototype.delete=function(){this.creator.deleteElement(this.page)},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return!this.currentAddQuestionType&&this.creator?this.creator.getLocString("ed.addNewQuestion"):this.creator?this.creator.getAddNewQuestionText(this.currentAddQuestionType):""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"footerActionsBar",{get:function(){var e=this;if(!this._footerActionsBar){this._footerActionsBar=new i.ActionContainer,this._footerActionsBar.containerCss="svc-page__footer",this._footerActionsBar.cssClasses={item:"svc-btn",itemTitle:"svc-text svc-text--normal svc-text--bold"};var t=[{css:"svc-add-new-question-action",visible:new i.ComputedUpdater((function(){return e.showAddQuestionButton})),component:"svc-add-new-question-btn",data:this}];t=this.creator.getUpdatedPageAdornerFooterActions(this,t),this.footerActionsBar.setItems(t)}return this._footerActionsBar},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isPageLive",void 0),Z([Object(i.property)()],t.prototype,"showPlaceholder",void 0),Z([Object(i.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),Z([Object(i.property)({defaultValue:null})],t.prototype,"dragTypeOverMe",void 0),t}(Mr);o(22);var qr=function(e){function t(t,o,r){var n=e.call(this)||this;return n.creator=t,n.row=o,n.templateData=r,n}return Y(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){var e="svc-row";return 1===this.row.elements.length&&"sv-drag-drop-ghost-survey-element-name"===this.row.elements[0].name&&(e+=" svc-row--ghost"),this.row.dragTypeOverMe===i.DragTypeOverMeEnum.Top&&(e+=" svc-row--drag-over-top"),this.row.dragTypeOverMe===i.DragTypeOverMeEnum.Bottom&&(e+=" svc-row--drag-over-bottom"),e},enumerable:!1,configurable:!0}),t}(i.Base);o(23);var Hr=function(e){function t(t,o,r){var n=e.call(this,t,o)||this;return n.templateData=r,n.startDragSurveyElement=function(e){var t=n.surveyElement,o=n.creator.selectedElement===t;return n.dragDropHelper.startDragSurveyElement(e,t,o),!0},n.questionTypeSelectorModel=n.creator.getQuestionTypeSelectorModel((function(e){n.currentAddQuestionType=e}),n.surveyElement),n.actionContainer.sizeMode="small",o.isQuestion&&o.setCanShowOptionItemCallback&&o.setCanShowOptionItemCallback((function(e){return!t.readOnly&&(e!==n.surveyElement.newItem||(t.maximumChoicesCount<1||o.choices.length<t.maximumChoicesCount))})),n.checkActionProperties(),n.dragOrClickHelper=new i.DragOrClickHelper(n.startDragSurveyElement),jo.setQuestion(n),n}return Y(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),t.prototype.select=function(e,t){if(e.surveyElement.isInteractiveDesignElement){var o=e.creator,r=e.surveyElement,n=null===document||void 0===document?void 0:document.activeElement;return o.selectedElement!==r&&n&&n.blur&&"input"===n.tagName.toLocaleLowerCase()&&n.blur(),t.stopPropagation(),t.cancelBubble=!0,o.selectElement(r,void 0,!1),!0}},t.prototype.rootCss=function(){return this.surveyElement.isQuestion&&!this.surveyElement.startWithNewLine?" svc-question__adorner--start-with-new-line":""},t.prototype.css=function(){if(!this.surveyElement.isInteractiveDesignElement)return"";var e="svc-question__content";return e+="function"==typeof this.surveyElement.getType?" svc-question__content--"+this.surveyElement.getType():"",this.creator.isElementSelected(this.surveyElement)&&(e+=" svc-question__content--selected"),this.isEmptyElement&&(e+=" svc-question__content--empty"),this.isEmptyTemplate&&(e+=" svc-question__content--empty-template"),this.isDragMe?e+=" svc-question__content--dragged":e=e.replace(" svc-question__content--dragged",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.InsideEmptyPanel?e+=" svc-question__content--drag-over-inside":e=e.replace(" svc-question__content--drag-over-inside",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.Left?e+=" svc-question__content--drag-over-left":e=e.replace(" svc-question__content--drag-over-left",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.Right?e+=" svc-question__content--drag-over-right":e=e.replace(" svc-question__content--drag-over-right",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.Top?e+=" svc-question__content--drag-over-top":e=e.replace(" svc-question__content--drag-over-top",""),this.dragTypeOverMe===i.DragTypeOverMeEnum.Bottom?e+=" svc-question__content--drag-over-bottom":e=e.replace(" svc-question__content--drag-over-bottom",""),e},Object.defineProperty(t.prototype,"isDragMe",{get:function(){return this.surveyElement.isDragMe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTypeOverMe",{get:function(){return this.element.dragTypeOverMe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isBannerShowing",{get:function(){return this.isUsingCarryForward||this.isUsingRestfull||this.isMessagePanelVisible},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUsingCarryForward",{get:function(){var e;return null===(e=this.element)||void 0===e?void 0:e.isUsingCarryForward},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUsingRestfull",{get:function(){var e;return null===(e=this.element)||void 0===e?void 0:e.isUsingRestful},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMessagePanelVisible",{get:function(){var e;return null===(e=this.element)||void 0===e?void 0:e.getPropertyValue("isMessagePanelVisible")},enumerable:!1,configurable:!0}),t.prototype.createBannerParams=function(){return this.createCarryForwardParams()||this.createUsingRestfulParams()||this.createCustomMessagePanel()},t.prototype.createCarryForwardParams=function(){var e,t=this;if(!this.isUsingCarryForward)return null;var o=null===(e=this.element)||void 0===e?void 0:e.choicesFromQuestion;if(!o)return null;var r=this.creator.survey.getQuestionByName(o);return r?{actionText:r.name,text:this.creator.getLocString("ed.carryForwardChoicesCopied"),onClick:function(){t.creator.selectElement(r)}}:null},t.prototype.createUsingRestfulParams=function(){var e=this;return this.isUsingRestfull?{actionText:this.creator.getLocString("ed.choicesLoadedFromWebLinkText"),text:this.creator.getLocString("ed.choicesLoadedFromWebText"),onClick:function(){e.creator.selectElement(e.element,"choicesByUrl")}}:null},t.prototype.createCustomMessagePanel=function(){if(!this.isMessagePanelVisible)return null;var e={question:this.element,actionText:"",messageText:"",onClick:function(){}};return this.creator&&this.creator.onCreateCustomMessagePanel.fire(this.creator,e),e.text=e.messageText,e},t.prototype.dispose=function(){this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isRequired","isRequiredAdorner"),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("inputType","inputTypeAdorner"),this.surveyElement.setCanShowOptionItemCallback&&this.surveyElement.setCanShowOptionItemCallback(void 0),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"isDraggable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){this.surveyElement.isInteractiveDesignElement&&w(e,t)},t.prototype.updateActionsProperties=function(){if(!this.isDisposed){e.prototype.updateActionsProperties.call(this);for(var t=this.actionContainer.visibleActions,o=!1,r=t.length-1;r>=0;r--)"convertTo"===t[r].id&&(o=!0),t[r].innerItem.location||(t[r].innerItem.location=o?"start":"end")}},t.prototype.updateElementAllowOptions=function(t,o){e.prototype.updateElementAllowOptions.call(this,t,o),this.updateActionVisibility("convertTo",o&&t.allowChangeType),this.updateActionVisibilityByProp("isrequired","isRequired",o&&t.allowChangeRequired),this.updateActionVisibilityByProp("convertInputType","inputType",t.allowChangeInputType),this.updateActionVisibilityByProp("convertInputType","rateDisplayMode",t.allowChangeInputType)},t.prototype.updateActionVisibilityByProp=function(e,t,o){var r=i.Serializer.findProperty(this.surveyElement.getType(),t);if(r){var n=this.creator.onIsPropertyReadOnlyCallback(this.surveyElement,r,r.readOnly,null,null);this.updateActionVisibility(e,o&&!n)}},Object.defineProperty(t.prototype,"isEmptyElement",{get:function(){if(this.surveyElement instanceof i.QuestionHtmlModel)return!this.surveyElement.html;if(this.surveyElement instanceof i.PanelModelBase){var e=this.surveyElement;return!e.rows||e.rows.length<=0||0===e.elements.length}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEmptyTemplate",{get:function(){return this.surveyElement instanceof i.QuestionPanelDynamicModel&&0==this.surveyElement.templateElements.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.surveyElement instanceof i.QuestionHtmlModel?z("ed.htmlPlaceHolder"):this.creator.isMobileView?z("ed.panelPlaceHolderMobile"):z("ed.panelPlaceHolder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropSurveyElements},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequired",{get:function(){return this.surveyElement.isRequired},set:function(e){this.surveyElement.isRequired=e},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){this.dragOrClickHelper.onPointerDown(e)},t.prototype.getConvertToTypesActions=function(){var e=this,t=this.creator.getAvailableToolboxItems(this.element,!1),o=[];t.forEach((function(e){-1==o.indexOf(e.typeName)&&o.push(e.typeName)}));var r=ee.getConvertToClasses(this.currentType,o,!0),n=[],i=null;return r.forEach((function(t){var o=e.creator.toolbox.items.filter((function(e){return e.name==t}));if(Array.isArray(o)&&o.length>0){var r=o[0],a=i&&r.category!=i.category,s=e.creator.createIActionBarItemByClass(r.name,r.title,r.iconName,a);i=r,n.push(s)}})),n},Object.defineProperty(t.prototype,"currentType",{get:function(){return this.surveyElement.getType()},enumerable:!1,configurable:!0}),t.prototype.createConvertToAction=function(){var e,t=this,o=this.getConvertToTypesActions(),r=o.length>0,n=this.getSelectedItem(o,this.currentType),i={id:"convertTo",enabled:r,visibleIndex:0,title:n?n.title:G.getString("qt."+this.currentType),iconName:null===(e=this.creator.toolbox.getItemByName(this.element.getType()))||void 0===e?void 0:e.iconName},a=this.createDropdownModel(i,o,(function(e){var o=t.getConvertToTypesActions();e.setItems(o),e.selectedItem=t.getSelectedItem(o,t.currentType)}),(function(e){t.creator.convertCurrentQuestion(e.id)}));return a.disableHide=!0,a},t.prototype.createConvertInputType=function(){var e=this,t=null;if("text"===this.surveyElement.getType()&&(t=i.Serializer.findProperty("text","inputType")),"rating"===this.surveyElement.getType()&&(t=i.Serializer.findProperty("rating","rateDisplayMode")),!t||!x(this.surveyElement,t.name))return null;var o=t.name,r=this.surveyElement.getPropertyValue(o),n=t.getChoices(this.surveyElement,(function(e){})),a=function(){var e=[];return n.forEach((function(o){e.push({id:o,title:G.getPropertyValueInEditor(t.name,o)})})),e},s={id:"convertInputType",visibleIndex:1,title:G.getPropertyValueInEditor(t.name,r)},l=this.createDropdownModel(s,a(),(function(t){var r=a();t.setItems(r),t.selectedItem=e.getSelectedItem(r,e.surveyElement.getPropertyValue(o))}),(function(t){var r=e.getUpdatedPropertyValue(o,t.id);e.surveyElement.setPropertyValue(o,r)}));return l.disableShrink=!0,this.surveyElement.registerFunctionOnPropertyValueChanged(o,(function(){var t=e.getSelectedItem(a(),e.surveyElement.getPropertyValue(o));t&&(l.popupModel.contentComponentData.model.selectedItem=t,l.title=t.title)}),"inputTypeAdorner"),l.removePriority=1,l},t.prototype.getSelectedItem=function(e,t){var o=e.filter((function(e){return e.id===t}));return o.length>0?o[0]:void 0},t.prototype.createDropdownModel=function(e,t,o,r){var n=Object(i.createDropdownActionModel)({id:e.id,css:"sv-action--convertTo sv-action-bar-item--secondary",iconName:e.iconName,iconSize:24,title:e.title,enabled:e.enabled,visibleIndex:e.visibleIndex,disableShrink:!1,location:"start",action:function(e){}},{items:t,onSelectionChanged:r,allowSelection:!0,horizontalPosition:"center",onShow:function(){var e=n.popupModel.contentComponentData.model;o(e)}});return n.popupModel.displayMode=this.creator.isTouch?"overlay":"popup",n.data.locOwner=this.creator,n},t.prototype.createRequiredAction=function(){var e=this;this.surveyElement.isRequired;var t=new i.Action({id:"isrequired",ariaChecked:new i.ComputedUpdater((function(){return e.isRequired})),ariaRole:"checkbox",css:"svc-action-bar-item--right sv-action-bar-item--secondary",title:this.creator.getLocString("pe.isRequired"),visibleIndex:20,iconName:"icon-required",iconSize:16,action:function(){e.creator.isCanModifyProperty(e.surveyElement,"isRequired")&&(e.isRequired=e.getUpdatedPropertyValue("isRequired",!e.isRequired))}});return t.innerCss=new i.ComputedUpdater((function(){return(new i.CssClassBuilder).append("svc-required-action").append("svc-required-action--active",e.isRequired).toString()})),t.innerItem.title=new i.ComputedUpdater((function(){return e.isRequired?e.creator.getLocString("pe.removeRequiredMark"):e.creator.getLocString("pe.markRequired")})),t},t.prototype.getUpdatedPropertyValue=function(e,t){var o={obj:this.element,propertyName:e,value:this.element[e],newValue:t,doValidation:!1};return this.creator.onValueChangingCallback(o),o.newValue},t.prototype.buildActions=function(t){e.prototype.buildActions.call(this,t);var o=this.surveyElement;t.push(this.createConvertToAction());var r=this.createConvertInputType();r&&t.push(r),t[t.length-1].css+=" sv-action--convertTo-last",void 0!==o.isRequired&&v(o,"isRequired")&&x(o,"isRequired")&&t.push(this.createRequiredAction())},t.prototype.duplicate=function(){var e=this;setTimeout((function(){var t=e.creator.fastCopyQuestion(e.surveyElement);e.creator.selectElement(t)}),1)},t.prototype.addNewQuestion=function(){this.creator.addNewQuestionInPage((function(e){}),this.surveyElement instanceof i.PanelModelBase?this.surveyElement:null,this.currentAddQuestionType||a.designer.defaultAddQuestionType)},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return!this.currentAddQuestionType&&this.creator?this.creator.getLocString("ed.addNewQuestion"):this.creator?this.creator.getAddNewQuestionText(this.currentAddQuestionType):""},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"isDragged",void 0),Z([Object(i.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),t}(Mr);o(3);var Br=function(e){function t(t,o,r){var n=e.call(this,t,o,r)||this;return n.switchCollapse=function(){n.isCollapsed=!n.isCollapsed},n.surveyElement.registerFunctionOnPropertyValueChanged("isSelectedInDesigner",(function(){n.leftFocus()}),"dropdownCollapseChecker"),n.visibleCount=t.maxVisibleChoices,n.isCollapsed=n.isCollapsed&&n.needToCollapse,n}return Y(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemComponent",{get:function(){return this.surveyElement.isDescendantOf("dropdown")?"survey-radiogroup-item":"survey-checkbox-item"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needToCollapse",{get:function(){return this.visibleCount>0&&this.question.visibleChoices.length>this.visibleCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCollapseView",{get:function(){return this.isCollapsed},enumerable:!1,configurable:!0}),t.prototype.leftFocus=function(){this.creator.isElementSelected(this.surveyElement)||this.isCollapsed||(this.isCollapsed=this.needToCollapse)},t.prototype.getChoiceCss=function(){return(new i.CssClassBuilder).append("svc-question__dropdown-choice").append("svc-question__dropdown-choice--collapsed",this.isCollapsed&&this.needToCollapse).toString()},t.prototype.getRenderedItems=function(){return this.isCollapsed?this.question.visibleChoices.slice(0,this.visibleCount):this.question.visibleChoices},t.prototype.getButtonText=function(){return this.isCollapsed?G.getString("ed.showMoreChoices"):G.getString("ed.showLessChoices")},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.surveyElement.unRegisterFunctionOnPropertyValueChanged("isSelectedInDesigner","dropdownCollapseChecker")},Z([Object(i.property)({defaultValue:!0})],t.prototype,"isCollapsed",void 0),Z([Object(i.property)({defaultValue:-1})],t.prototype,"visibleCount",void 0),t}(Hr);o(24);var Qr=function(e){function t(t,o,r,n){var i=e.call(this,t,o,r)||this;return i.questionRoot=n,i.isEmptyImageLink=!i.question.imageLink,i.surveyElement.registerFunctionOnPropertyValueChanged("imageLink",(function(){i.imageLinkValueChangedHandler()}),"imageLinkValueChanged"),i.initFilePresentationModel(),i}return Y(t,e),t.prototype.initFilePresentationModel=function(){var e=this;this.filePresentationModel=i.Serializer.createClass("file",{name:this.question.name});var t=new i.SurveyModel;this.filePresentationModel.setSurveyImpl(t),this.filePresentationModel.forceIsInputReadOnly=!this.creator.isCanModifyProperty(this.question,"imageLink"),this.filePresentationModel.filePlaceholder=this.placeholderText,this.filePresentationModel.chooseButtonCaption=this.chooseImageText,this.filePresentationModel.acceptedTypes="image/*",this.filePresentationModel.storeDataAsText=!1,this.filePresentationModel.cssClasses.chooseFileIconId="icon-choosefile",t.onOpenFileChooser.add((function(t,o){e.creator.chooseFiles(o.input,o.callback,o.context)})),t.onUploadFiles.add((function(t,o){o.files[0]&&e.creator.uploadFiles(o.files,e.question,(function(t,r){e.question.imageLink=r,o.callback(t,[{content:r,file:o.files[0]}])}),{element:e.question,elementType:e.question.getType(),propertyName:"imageLink"})}))},t.prototype.chooseFile=function(e){var t=e.questionRoot.getElementsByClassName("svc-choose-file-input")[0],o={element:e.question,elementType:e.question.getType(),propertyName:"imageLink"};e.creator.chooseFiles(t,(function(t){e.isUploading=!0,e.creator.uploadFiles(t,e.surveyElement,(function(t,o){e.surveyElement.imageLink=o,e.isUploading=!1}),o)}),o)},Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N(this.surveyElement.contentMode)},enumerable:!1,configurable:!0}),t.prototype.imageLinkValueChangedHandler=function(){this.isEmptyImageLink=!this.question.imageLink,this.filePresentationModel.value=null,this.filePresentationModel.visible=!this.question.imageLink},Object.defineProperty(t.prototype,"isEmptyElement",{get:function(){return this.isEmptyImageLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.surveyElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{get:function(){return this.creator.isMobileView?z("ed.imagePlaceHolderMobile"):z("ed.imagePlaceHolder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"chooseImageText",{get:function(){return z("ed.imageChooseImage")},enumerable:!1,configurable:!0}),t.prototype.css=function(){return(new i.CssClassBuilder).append(e.prototype.css.call(this)).append("svc-question__content--loading",this.isUploading).toString()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.questionRoot=void 0},Z([Object(i.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isEmptyImageLink",void 0),t}(Hr);o(25);var Fr=function(e){function t(t,o,r){var n=e.call(this)||this;return n.creator=t,n.surveyElement=o,n.templateData=r,n}return Y(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return k(this.surveyElement)},enumerable:!1,configurable:!0}),t.useRateValues=function(e){var t=e.contentQuestion?e.contentQuestion:e;return!!t.useRateValues&&t.useRateValues()},t.prototype.addItem=function(e){if(e.allowAdd&&e.enableAdd)if(t.useRateValues(e.element)){var o,r=e.element.rateValues.map((function(e){return e.value}));o=g(e.creator.getChoicesItemBaseTitle(),r);var n=new i.ItemValue(o);n.locOwner={getLocale:function(){return e.element.getLocale?e.element.getLocale():""},getMarkdownHtml:function(e){return e},getProcessedText:function(e){return e}},e.element.rateValues=e.element.rateValues.concat([n]);var a=e.element.rateValues;e.creator.onItemValueAddedCallback(e.element,"rateValues",a[a.length-1],a)}else e.element.rateMax+=e.element.rateStep},t.prototype.removeItem=function(e){if(e.allowRemove&&e.enableRemove){var o=i.Serializer.findProperty(e.element.getType(),"rateValues"),r=e.element.rateValues&&e.element.rateValues.length-1,n=e.element.rateValues&&e.element.rateValues[r]||null;if(e.creator.onCollectionItemDeletingCallback(e.element,o,e.element.rateValues,n)){var a=e.element;t.useRateValues(e.element)||r!==a.rateValues.length-1?(t.useRateValues(e.element)||(a.rateValues=a.rateValues),a.rateValues.splice(r,1)):a.rateMax-=a.rateStep}}},t.allowAddForElement=function(e,o){return(o<1||o>i.settings.ratingMaximumRateValueCount)&&!t.useRateValues(e)&&(o=i.settings.ratingMaximumRateValueCount),"smileys"==e.rateDisplayMode&&(o<1||o>10)&&(o=10),o<1||e.rateCount<o},Object.defineProperty(t.prototype,"allowAdd",{get:function(){return this.canAddOrRemove()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableAdd",{get:function(){return this.allowAdd&&t.allowAddForElement(this.element,this.creator.maximumRateValues)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addClassNames",{get:function(){return(new i.CssClassBuilder).append("svc-item-value-controls__button").append("svc-item-value-controls__button--disabled",!this.enableAdd).append("svc-item-value-controls__add").toString()},enumerable:!1,configurable:!0}),t.allowRemoveForElement=function(e){return e.rateCount>2},t.prototype.canAddOrRemove=function(){return this.creator.isCanModifyProperty(this.element,"rateValues")&&this.creator.isCanModifyProperty(this.element,"rateCount")&&(!this.element.autoGenerate||this.creator.isCanModifyProperty(this.element,"rateMax"))},Object.defineProperty(t.prototype,"allowRemove",{get:function(){return this.canAddOrRemove()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableRemove",{get:function(){return this.allowRemove&&t.allowRemoveForElement(this.element)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeClassNames",{get:function(){return(new i.CssClassBuilder).append("svc-item-value-controls__button").append("svc-item-value-controls__button--disabled",!this.enableRemove).append("svc-item-value-controls__remove").toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTopLabel",{get:function(){return("top"==this.element.rateDescriptionLocation||"topBottom"==this.element.rateDescriptionLocation)&&!!this.element.minRateDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"controlsClassNames",{get:function(){return(new i.CssClassBuilder).append("svc-rating-question-controls").append("svc-item-value-controls").append("svc-rating-question-controls--labels-top",this.hasTopLabel).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addTooltip",{get:function(){return z("pe.addItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeTooltip",{get:function(){return z("pe.removeItem")},enumerable:!1,configurable:!0}),t}(i.Base);o(26);var Ur={noneItem:"showNoneItem",otherItem:"showOtherItem",selectAllItem:"showSelectAllItem",refuseItem:"showRefuseItem",dontKnowItem:"showDontKnowItem"},Wr=function(e){function t(t,o,r){var n=e.call(this)||this;for(var a in n.creator=t,n.question=o,n.item=r,n.canTouchItems=!0,n.focusCameFromDown=!1,n.startDragItemValue=function(e,t){n.dragDropHelper.startDrag(e,n.item,n.question,t)},n.handleDragDropGhostPositionChanged=function(){n.ghostPosition=n.getGhostPosition(n.item),n.isDragDropGhost=n.item===n.dragDropHelper.draggedElement,n.item===n.dragDropHelper.prevDropTarget?(n.isDragDropMoveDown=n.item.isDragDropMoveDown,n.isDragDropMoveUp=n.item.isDragDropMoveUp):(n.isDragDropMoveDown=!1,n.isDragDropMoveUp=!1)},n.updateIsNew(o,r),Ur)n.registerOnPropertyChanged(a,Ur[a]);return n.isNew&&(o.visibleChoicesChangedCallback=function(){n.updateNewItemValue()},n.updateNewItemValue()),n.dragDropHelper.onGhostPositionChanged.add(n.handleDragDropGhostPositionChanged),n.dragOrClickHelper=new i.DragOrClickHelper(n.startDragItemValue),n.allowItemOperations={allowDelete:void 0,allowEdit:void 0,allowAdd:void 0},n.collectionProperty=i.Serializer.findProperty(o.getType(),n.collectionPropertyName),n.creator.onCollectionItemAllowingCallback(o.ownerObj||o,n.collectionProperty,o.visibleChoices,n.item,n.allowItemOperations),void 0===n.allowItemOperations.allowDelete&&(n.allowItemOperations.allowDelete=!0),void 0===n.allowItemOperations.allowAdd&&(n.allowItemOperations.allowAdd=!0),n.allowItemOperations.allowAdd||n.updateIsNewVisibility(),n.creator.isCanModifyProperty(o,"choices")||(n.canTouchItems=!1),n}return Y(t,e),Object.defineProperty(t.prototype,"canBeDragged",{get:function(){return!this.isNew&&this.question.choices.indexOf(this.item)>-1},enumerable:!1,configurable:!0}),t.prototype.isBanStartDrag=function(e){return!this.isDraggable||("true"===e.target.getAttribute("contenteditable")||!this.canBeDragged)},t.prototype.updateNewItemValue=function(){this.creator&&this.question&&this.question.newItem&&(this.question.newItem.value=this.creator.getNextItemValue(this.question),this.question.newItem.text=h(this.question.choices))},t.prototype.registerOnPropertyChanged=function(e,t){var o=this;if(this.question[e]===this.item){var r=this.question,n=this.item;r.registerFunctionOnPropertyValueChanged(t,(function(){o.updateIsNew(r,n)}))}},Object.defineProperty(t.prototype,"collectionPropertyName",{get:function(){return this.item.ownerPropertyName?this.item.ownerPropertyName:"choices"},enumerable:!1,configurable:!0}),t.prototype.onPointerDown=function(e){return!!this.isBanStartDrag(e)||(this.dragOrClickHelper.onPointerDown(e),!1)},Object.defineProperty(t.prototype,"dragDropHelper",{get:function(){return this.creator.dragDropChoices},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.dragDropHelper.onGhostPositionChanged.remove(this.handleDragDropGhostPositionChanged)},t.prototype.getGhostPosition=function(e){return this.dragDropHelper.dropTarget!==e?null:this.dragDropHelper.isBottom?"bottom":"top"},Object.defineProperty(t.prototype,"isDraggable",{get:function(){return this.isDraggableItem(this.item)},enumerable:!1,configurable:!0}),t.prototype.isDraggableItem=function(e){return!(this.creator.readOnly||!this.canTouchItems)&&-1!==this.question.choices.indexOf(e)},t.prototype.getSpecificProp=function(e){for(var t in Ur)if(e.question[t]===e.item)return Ur[t]},t.prototype.add=function(e){var t=this.getSpecificProp(e);t?e.question[t]=!0:(this.addNewItem(e.item,e.question,e.creator),this.updateIsNew(e.question,e.item))},t.prototype.addNewItem=function(e,t,o){e.value="newitem";var r=o.createNewItemValue(t);this.updateNewItemValue(),Io.get(r.locText).setAutoFocus()},t.prototype.remove=function(e){var t=this.getSpecificProp(e);if(t)e.question[t]=!1;else{var o=e.question.choices,r=o.indexOf(e.item);if(this.creator.onCollectionItemDeletingCallback(e.question,this.collectionProperty,o,e.item)){var n=this.findNextElementIndexToRemove(r);e.question.choices.splice(r,1),this.focusNextElementToRemove(n),this.updateIsNew(e.question,e.item)}}},t.prototype.onFocusOut=function(e){this.question._lastActiveItemValueIndex=this.question.choices.indexOf(this.item)},t.prototype.findNextElementIndexToRemove=function(e){var t=0;return this.question.choices.length>0&&((t=e<this.question._lastActiveItemValueIndex?e-1:e)<0&&(t=0),t>=this.question.choices.length-2&&(t=this.question.choices.length-2)),t},t.prototype.focusNextElementToRemove=function(e){var t=this;setTimeout((function(){var o;null===(o=document.getElementById(t.question.id).querySelectorAll(".svc-item-value-controls__remove")[e])||void 0===o||o.focus()}),100)},t.prototype.updateIsNew=function(e,t){this.isNew=!e.isItemInList(t)&&!this.isAutoGeneratedItem(t),this.updateIsNewVisibility()},t.prototype.updateIsNewVisibility=function(){var e;this.isNew&&this.item.setIsVisible(!(!1===(null===(e=this.allowItemOperations)||void 0===e?void 0:e.allowAdd)))},Object.defineProperty(t.prototype,"allowRemove",{get:function(){var e=this.creator.minimumChoicesCount;if(e>0&&e>=this.question.choices.length)return!1;var t=!this.question.isItemInList(this.item),o=this.isAutoGeneratedItem(this.item);return!this.creator.readOnly&&this.canTouchItems&&this.allowItemOperations.allowDelete&&!t&&!o},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{get:function(){return z(this.isNew?"pe.addItem":"pe.removeItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragTooltip",{get:function(){return z("pe.dragItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowAdd",{get:function(){var e=!this.question.isItemInList(this.item),t=this.isAutoGeneratedItem(this.item);return!this.creator.readOnly&&this.canTouchItems&&this.allowItemOperations.allowAdd&&e&&!t},enumerable:!1,configurable:!0}),t.prototype.select=function(e,t){e.question.inMatrixMode||(e.creator.selectElement(e.question,"choices",!1),t&&t.stopPropagation())},t.prototype.isAutoGeneratedItem=function(e){var t=e.value;if(!i.Helpers.isNumber(t))return!1;var o=this.question.choicesMin,r=this.question.choicesMax;return!(!i.Helpers.isNumber(o)||!i.Helpers.isNumber(r)||o===r&&0===o)&&(t>=o&&t<=r)},Z([Object(i.property)({defaultValue:!1})],t.prototype,"isNew",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isDragging",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isDragDropGhost",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isDragDropMoveDown",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isDragDropMoveUp",void 0),Z([Object(i.property)({defaultValue:null})],t.prototype,"ghostPosition",void 0),t}(i.Base);o(27);var Gr=function(e){function t(t,o,r,n,i){var a=e.call(this,t,o,r)||this;return a.question=o,a.item=r,a.templateData=n,a.itemsRoot=i,a.isChoosingNewFile=!1,a.onDragOver=function(e){a.isFileDragging=!0,e.dataTransfer.dropEffect="copy",e.preventDefault()},a.onDrop=function(e){a.isFileDragging=!1,e.preventDefault();var t=e.dataTransfer;if(t&&t.files&&!(t.files.length<1)){for(var o=[],r=0;r<t.files.length;r++)o.push(t.files[r]);a.uploadFiles(o)}},a.onDragLeave=function(e){a.isFileDragging=!1},a}return Y(t,e),t.prototype.getRootCss=function(){return(new i.CssClassBuilder).append("svc-image-item-value-wrapper").append("svc-image-item-value").append("svc-image-item-value--new",this.isNew||this.isUploading).append("svc-image-item-value-wrapper--ghost",this.isDragDropGhost).append("svc-image-item-value--file-dragging",this.isFileDragging).append("svc-image-item-value--single",this.getIsNewItemSingle()).toString()},t.prototype.getIsNewItemSingle=function(){return this.isNew&&0===this.question.choices.length},Object.defineProperty(t.prototype,"canRenderControls",{get:function(){return this.getIsNewItemSingle()||!this.question.renderedImageWidth||this.question.renderedImageWidth>150},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectFileTitle",{get:function(){return this.creator.getLocString("ed.selectFile")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeFileTitle",{get:function(){return this.creator.getLocString("ed.removeFile")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addFileTitle",{get:function(){return this.creator.getLocString("ed.selectFile")},enumerable:!1,configurable:!0}),t.prototype.chooseFile=function(e){var t=e.itemsRoot.getElementsByClassName("svc-choose-file-input")[0],o={element:e.question,item:e.item,elementType:e.question.getType(),propertyName:"imageLink"};e.creator.chooseFiles(t,(function(t){e.isUploading=!0,e.creator.uploadFiles(t,e.question,(function(t,o){"success"===t&&(e.item.imageLink=o),e.isUploading=!1}),o)}),o)},t.prototype.uploadFiles=function(e){var t=this;this.isUploading=!0;var o={element:this.question,item:void 0,elementType:this.question.getType(),propertyName:"imageLink"};this.creator.uploadFiles(e,this.question,(function(e,o){"success"===e&&t.creator.createNewItemValue(t.question,t.isChoosingNewFile,(function(e){e.imageLink=o})),t.isChoosingNewFile=!1,t.isUploading=!1}),o)},t.prototype.chooseNewFile=function(e){var t=this,o=e.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];e.creator.chooseFiles(o,(function(o){t.isChoosingNewFile=!0,e.uploadFiles(o)}),{element:e.question,item:e.item,elementType:e.question.getType(),propertyName:"imageLink"})},Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N(this.question.contentMode)},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isFileDragging",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(Wr);o(28);var zr=function(){function e(e,t,o,r){this.cellQuestion=t,this.column=o,this.creator=e;var n=t.toJSON();n.type=t.getType(),this.surveyValue=e.createSurvey({questions:[n]},"modal-question-editor",r,(function(e){e.css=i.defaultV2Css,e.setDesignMode(!0),e.isPopupEditorContent=!0,e.showQuestionNumbers="none",e.questionTitleLocation="hidden"})),this.question.setSurveyImpl(this.survey),this.question.inMatrixMode=!0,this.question.ownerObj=this.column}return Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"question",{get:function(){return this.survey.getAllQuestions()[0]},enumerable:!1,configurable:!0}),e.prototype.apply=function(){var e=this.cellQuestion.parentQuestion,t=e.getColumnByName(this.cellQuestion.name),o=t.toJSON(),r=o.cellType,n=this.survey.getAllQuestions()[0].toJSON();if(r&&(n.cellType=r),!i.Helpers.isTwoValueEquals(n,o)){for(var a in o)void 0!==n[a]||!0!==o[a]&&!1!==o[a]||(n[a]=!o[a]);t.fromJSON(n),e.onColumnCellTypeChanged(t),this.creator.setModified({type:"MATRIX_CELL_EDITOR",column:t})}},e}(),Jr=function(e){function t(t,o,r,n,i){var a=e.call(this)||this;return a.creator=t,a.templateData=o,a.question=r,a.row=n,a.column=i,a.onSelectionChanged=function(e,t){a.context&&a.context.getPropertyValue?a.isSelected=a.creator.isElementSelected(a.context):a.isSelected=!1},t.onSelectedElementChanged.add(a.onSelectionChanged),a}return Y(t,e),t.prototype.editQuestion=function(e,t){var o=new zr(e.creator,e.question,e.column,this);o.question.cellOwner=e;var r=i.surveyLocalization.currentLocale,n=G.currentLocale;i.surveyLocalization.currentLocale=n,i.settings.showDialog({componentName:"svc-question-editor-content",data:{survey:o.survey,creator:this.creator},onApply:function(){return o.apply(),!0},cssClass:"svc-matrix-cell__popup",title:e.question.name,displayMode:this.creator.isMobileView?"overlay":"popup"},e.creator.rootElement).locale=n,i.surveyLocalization.currentLocale=r,t.stopPropagation(),e.creator.selectElement(e.column)},Object.defineProperty(t.prototype,"context",{get:function(){return this.row||this.column||this.templateData},enumerable:!1,configurable:!0}),t.prototype.selectContext=function(e,t){if(e.row)return e.creator.selectElement(e.row.data,"rows",!1),void t.stopPropagation();"function"==typeof e.context.getType&&("itemvalue"===e.context.getType()?e.creator.selectElement(e.context.locOwner,e.context.ownerPropertyName,!1):e.creator.selectElement(e.context),t.stopPropagation())},Object.defineProperty(t.prototype,"isSupportCellEditor",{get:function(){return!(!this.question||!this.question.getType)&&te.isSupportCellEditor(this.question.getType())},enumerable:!1,configurable:!0}),t.prototype.hover=function(e,t){!this.row&&this.context&&this.context.getPropertyValue&&this.context.getType&&"itemvalue"!==this.context.getType()&&w(e,t)},t.prototype.dispose=function(){this.creator.onSelectedElementChanged.remove(this.onSelectionChanged),e.prototype.dispose.call(this)},Z([Object(i.property)()],t.prototype,"isSelected",void 0),t}(i.Base);o(29);var Zr=function(e){function t(t,o,r){var n=e.call(this)||this;return n.survey=t,n._data=o,n._lvl=r,n.toggle=function(){n.collapsed=!n.collapsed},n.markerWidth=16,n.question=t.getQuestionByName(n.name),n.items=Kr(t,o.data,r+1),n.lvl=r,n}return Y(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNode",{get:function(){return this._data.isNode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._data.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._data.title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._data.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return this._data.displayValue},enumerable:!1,configurable:!0}),t.prototype.getString=function(e){return this._data.getString(e)},Object.defineProperty(t.prototype,"markerMargin",{get:function(){return(1.5+this.lvl)*this.markerWidth+"px"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textMargin",{get:function(){return(2.75+this.lvl)*this.markerWidth+"px"},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:!0})],t.prototype,"collapsed",void 0),Z([Object(i.property)({defaultValue:0})],t.prototype,"lvl",void 0),Z([Object(i.property)()],t.prototype,"items",void 0),t}(i.Base);function Kr(e,t,o){return void 0===t&&(t=[]),t.filter((function(e){return!!e})).map((function(t){return new Zr(e,t,o)}))}var Yr=function(e){function t(t){var o=e.call(this)||this;o.survey=t,o.selectTableClick=function(){o.resultViewType="table"},o.selectJsonClick=function(){o.resultViewType="text"},o.resultText=JSON.stringify(t.data,null,4);var r=t.getPlainData({includeEmpty:!1,includeValues:!0});return o.resultData=Kr(t,r,0),o}return Y(t,e),t.prototype.getLocString=function(e){return G.getString(e)},Object.defineProperty(t.prototype,"surveyResultsText",{get:function(){return this.getLocString("ed.surveyResults")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyResultsTableText",{get:function(){return this.getLocString("ed.surveyResultsTable")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyResultsJsonText",{get:function(){return this.getLocString("ed.surveyResultsJson")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsTitle",{get:function(){return this.getLocString("ed.resultsTitle")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsName",{get:function(){return this.getLocString("ed.resultsName")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsValue",{get:function(){return this.getLocString("ed.resultsValue")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resultsDisplayValue",{get:function(){return this.getLocString("ed.resultsDisplayValue")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTableSelected",{get:function(){return"table"===this.resultViewType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isJsonSelected",{get:function(){return"text"===this.resultViewType},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:"table"})],t.prototype,"resultViewType",void 0),Z([Object(i.property)({defaultValue:""})],t.prototype,"resultText",void 0),Z([Object(i.propertyArray)()],t.prototype,"resultData",void 0),t}(i.Base);o(30);var Xr=function(e){function t(t,o){var r=e.call(this)||this;return r.creator=t,r.root=o,r}return Y(t,e),Object.defineProperty(t.prototype,"allowEdit",{get:function(){var e=this.creator.survey,t=i.Serializer.findProperty(e.getType(),"logo");return!(this.creator.readOnly||t.overridingProperty&&e[t.overridingProperty])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"containerCss",{get:function(){return(new i.CssClassBuilder).append("svc-logo-image-container").append("svc-logo-image-container--editable",this.allowEdit).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.creator.survey},enumerable:!1,configurable:!0}),t.prototype.uploadFile=function(e,t,o){e.isUploading=!0,e.creator.uploadFiles(o,void 0,(function(o,r){e.creator.survey.logo=r,t.value="",e.isUploading=!1}),{element:e.creator.survey,elementType:"survey",propertyName:"logo"})},t.prototype.chooseFile=function(e){if(this.allowEdit){var t=e.root.getElementsByClassName("svc-choose-file-input")[0];0===t.files.length?e.creator.chooseFiles(t,(function(o){e.uploadFile(e,t,o)}),{element:this.survey,elementType:this.survey.getType(),propertyName:"logo"}):e.uploadFile(e,t,[t.files[0]])}},t.prototype.remove=function(e){e.creator.survey.logo=""},Object.defineProperty(t.prototype,"chooseLogoPlaceholder",{get:function(){return this.creator.getLocString("ed.chooseLogoPlaceholder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return N("image")},enumerable:!1,configurable:!0}),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isUploading",void 0),t}(i.Base),$r=function(e){function t(t){var o=e.call(this,t)||this;return o.onEmbeddedSurveyValueChanged=function(){},o}return Y(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){return this.embeddedSurveyValue},set:function(e){this.embeddedSurveyValue=e,this.onEmbeddedSurveyValueChanged()},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"embeddedsurvey"},t}(i.QuestionNonValue);i.Serializer.addClass("embeddedsurvey",[],(function(){return new $r("")}),"nonvalue"),i.QuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return new $r(e)})),o(31);var en=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this,t)||this,n=o&&!o.showValueInLink&&G.getString("pe.set")+" "+o.title||null;return r.linkValueText=n||G.getString("pe.emptyValue"),r}return Y(t,e),t.prototype.onPropertyValueChanged=function(t,o,r){e.prototype.onPropertyValueChanged.call(this,t,o,r),"value"===t&&(this.updateLinkValueText(),this.allowClear&&(this.showClear=!i.Helpers.isValueEmpty(r)),this.updateIsClickable())},t.prototype.onReadOnlyChanged=function(){this.updateIsClickable(),e.prototype.onReadOnlyChanged.call(this)},t.prototype.updateIsClickable=function(){this.setPropertyValue("isClickable",!this.isReadOnly||!!this.isClickableCallback&&this.isClickableCallback())},Object.defineProperty(t.prototype,"ariaRole",{get:function(){return"button"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{get:function(){return this.showTooltip?this.linkValueText:void 0},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"linkvalue"},t.prototype.doLinkClick=function(){this.linkClickCallback&&this.linkClickCallback()},t.prototype.doClearClick=function(){this.clearClickCallback&&this.clearClickCallback()},t.prototype.updateLinkValueText=function(){var e;e=this.showValueInLink?this.isEmpty()?G.getString("pe.emptyValue"):this.getObjDisplayValue():G.getString(this.isEmpty()?"pe.set":"pe.change")+" "+this.title,this.linkValueText=e},t.prototype.stringifyValue=function(e){return"string"!=typeof e?JSON.stringify(e):e},t.prototype.getObjDisplayValue=function(){var e=this.obj;if(!e||!e.getDisplayValue)return this.stringifyValue(this.value);var t=e.getDisplayValue(!0,this.value);return"string"!=typeof t?JSON.stringify(t):t},Z([Object(i.property)({defaultValue:"svc-link-value-button svc-question-link__set-button"})],t.prototype,"linkSetButtonCssClasses",void 0),Z([Object(i.property)({defaultValue:"svc-question-link__clear-button"})],t.prototype,"linkClearButtonCssClasses",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),Z([Object(i.property)()],t.prototype,"linkValueText",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showClear",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"showValueInLink",void 0),Z([Object(i.property)({defaultValue:!1})],t.prototype,"showTooltip",void 0),Z([Object(i.property)({defaultValue:!0})],t.prototype,"isClickable",void 0),t}(i.Question);i.Serializer.addClass("linkvalue",["showValueInLink",{name:"showTooltip: boolean",default:!1,visible:!1}],(function(e){return new en("",e)}),"nonvalue"),i.QuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return new en(e)}));var tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._showUnitsInEditor=!0,t.onUpButtonMouseDown=function(){t.increase(),t.increaseTimer=setTimeout(t.onUpButtonMouseDown,200)},t.onDownButtonMouseDown=function(){t.decrease(),t.decreaseTimer=setTimeout(t.onDownButtonMouseDown,200)},t.onButtonMouseLeave=function(){t.onButtonMouseUp()},t.onButtonMouseUp=function(){clearTimeout(t.decreaseTimer),clearTimeout(t.increaseTimer)},t.onKeyDown=function(e){switch(e.key){case"ArrowUp":t.increase(),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":t.decrease(),e.stopPropagation(),e.preventDefault()}t.onTextKeyDownHandler(e)},t.onInputKeyDown=function(e){"ArrowUp"!=e.key&&"ArrowDown"!=e.key||t.updateValueOnEvent(e)},t.onFocus=function(e){"INPUT"==e.target.tagName&&queueMicrotask((function(){var o=e.target,r=o.selectionStart,n=o.selectionEnd,i=o.selectionDirection;t._showUnitsInEditor=!1,queueMicrotask((function(){Math.abs(n-r)>0?o.setSelectionRange(0,t.renderedValue.length,i):o.setSelectionRange(t.renderedValue.length,t.renderedValue.length)}))}))},t.onBlur=function(e){t._showUnitsInEditor=!0,"INPUT"==e.target.tagName&&t.updateValueOnEvent(e)},t}return Y(t,e),t.prototype.parseValue=function(e){return{value:parseFloat(e.toString()),unit:e.toString().replace(/[^A-Za-z]/g,"")}},t.prototype.changeValue=function(e){var t=this.parseValue(this.renderedValue),o=Number(this.renderedStep||1),r=t.value;e?r+=o:r-=o,this.value=r},Object.defineProperty(t.prototype,"showUnitsInEditor",{get:function(){return!!this.unit&&this._showUnitsInEditor},enumerable:!1,configurable:!0}),t.prototype.correctValue=function(e){if(null==e||null==e)return e;var t=Number(this.renderedMax),o=Number(this.renderedMin);return e="string"==typeof e?parseFloat(e):e,isNaN(e)?e=isNaN(o)?0:o:e>t?e=t:e<o&&(e=o),e=Math.round(1e3*e)/1e3},t.prototype.setNewValue=function(t){e.prototype.setNewValue.call(this,this.correctValue(t))},Object.defineProperty(t.prototype,"renderedValue",{get:function(){var e,t,o=(null!==(t=null!==(e=this.value)&&void 0!==e?e:this.renderedMin)&&void 0!==t?t:0).toString();return this.showUnitsInEditor&&(o+=this.unit),o},enumerable:!1,configurable:!0}),t.prototype.increase=function(){this.changeValue(!0)},t.prototype.decrease=function(){this.changeValue(!1)},t.prototype.onBeforeInput=function(e){var t=0==e.target.selectionStart?/[\d.-]/:/[\d.]/;e.data&&!t.test(e.data)&&e.preventDefault()},t.prototype.getType=function(){return"spinedit"},Object.defineProperty(t.prototype,"isInputTextUpdate",{get:function(){return!1},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"unit",void 0),Z([Object(i.property)()],t.prototype,"_showUnitsInEditor",void 0),t}(i.QuestionTextModel);i.Serializer.addClass("spinedit",["unit"],(function(){return new tn("")}),"text"),i.QuestionFactory.Instance.registerQuestion("spinedit",(function(e){return new tn(e)}));var on=function(e){function t(t){var o=e.call(this,t)||this;return o.allowEmptyValue=!1,o.createItemValues("choices"),o.registerFunctionOnPropertyValueChanged("choices",(function(){o.updateChoices()})),o}return Y(t,e),t.prototype.getCorrectedValue=function(e){if(null==e||null==e||this.allowEmptyValue&&!e)return e;if((e=M(null!=e?e:"").color).indexOf("#")<0&&(e="#"+e),4===(e=(e.match(/#([0-9a-fA-F]){1,6}/)||["#000000"])[0]).length){for(var t=e.slice(0,1),o=1;o<4;o++)t+=e[o]+e[o];e=t}if(e.length<7){var r=e.length;for(o=0;o<7-r;o++)e+="0"}return e},t.prototype.isNewValueEqualsToValue=function(t){return!(!e.prototype.isNewValueEqualsToValue.call(this,t)&&!this.isTwoValueEquals(t,this.value,!0,!0))},t.prototype.setNewValue=function(t){this.resetRenderedValue(),e.prototype.setNewValue.call(this,this.getCorrectedValue(t)),this.updateRenderedValue()},t.prototype.onBeforeInput=function(e){e.data&&!/[\d\w(),#]/.test(e.data)&&e.preventDefault()},t.prototype.onColorInputChange=function(e){this.value=e.target.value},t.prototype.getType=function(){return"color"},t.prototype.resetRenderedValue=function(){this._renderedValue=void 0},t.prototype.updateRenderedValue=function(){if(this.value){var e=M(this.value||"");this._renderedValue=e.color}else this.allowEmptyValue?this._renderedValue="":this._renderedValue="#000000"},Object.defineProperty(t.prototype,"renderedValue",{get:function(){return this._renderedValue||""===this._renderedValue||this.updateRenderedValue(),this._renderedValue.toUpperCase()},enumerable:!1,configurable:!0}),t.prototype.getSwatchCss=function(){return(new i.CssClassBuilder).append(this.cssClasses.swatch).append(this.cssClasses.swatchDefault,!this.renderedValue).append(this.cssClasses.swatchDisabled,this.isInputReadOnly).toString()},t.prototype.getSwatchStyle=function(){return{backgroundColor:this.renderedValue||"#FFFFFF"}},Object.defineProperty(t.prototype,"renderedColorValue",{get:function(){return this.renderedValue||"#FFFFFF"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInputTextUpdate",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.updateRenderedValue()},Object.defineProperty(t.prototype,"dropdownAction",{get:function(){return this._dropdownAction||(this._dropdownAction=this.createDropdownAction()),this._dropdownAction},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choices",{get:function(){return this.getPropertyValue("choices")},set:function(e){this.setPropertyValue("choices",e)},enumerable:!1,configurable:!0}),t.prototype.onTextKeyDownHandler=function(t){var o=this.dropdownAction.popupModel;"ArrowDown"===t.key&&this.dropdownAction.action(),o.isVisible||e.prototype.onTextKeyDownHandler.call(this,t)},Object.defineProperty(t.prototype,"showDropdownAction",{get:function(){return!this.isValueEmpty(this.choices)},enumerable:!1,configurable:!0}),t.prototype.createDropdownAction=function(){var e=this,t=Object(i.createDropdownActionModelAdvanced)({enabled:new i.ComputedUpdater((function(){return!e.isInputReadOnly}))},{onSelectionChanged:function(t){e.value=t.value},items:this.choices},{showPointer:!1,verticalPosition:"bottom",horizontalPosition:"center"});t.disableTabStop=!0;var o=t.popupModel,r=o.contentComponentData.model;return o.displayMode=i.IsTouch?"overlay":"popup",o.setWidthByTarget=!0,o.positionMode="fixed",r.isItemSelected=function(t){return t.value==e.value},t},t.prototype.calcCssClasses=function(t){var o=e.prototype.calcCssClasses.call(this,t),r=this.dropdownAction;r.cssClasses={item:o.colorDropdown},r.iconName=o.colorDropdownIcon;var n=r.popupModel.contentComponentData.model;return n.cssClasses={},n.cssClasses={itemBody:n.cssClasses.itemBody+" "+o.colorItem},o},t.prototype.updateChoices=function(){this.dropdownAction.popupModel.contentComponentData.model.setItems(this.choices)},Object.defineProperty(t.prototype,"itemComponent",{get:function(){return"color-item"},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"allowEmptyValue",void 0),Z([Object(i.property)()],t.prototype,"_renderedValue",void 0),t}(i.QuestionTextModel);i.Serializer.addClass("color",[{name:"allowEmptyValue:boolean",default:!1},"choices:itemvalue[]"],(function(){return new on("")}),"text"),i.QuestionFactory.Instance.registerQuestion("color",(function(e){return new on(e)}));var rn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._renderedValue="",t.placeholder="",t.onKeyDown=function(e){"INPUT"===e.target.tagName&&t.onTextKeyDownHandler(e)},t.onFileInputChange=function(e){if(!t.onChooseFilesCallback)return t.doChange(e),!0},t}return Y(t,e),t.prototype.onChangeQuestionValue=function(e){},t.prototype.setNewValue=function(t){"object"==typeof t&&(this.stateChanged(this.isEmpty()?"empty":"loaded"),this.isLoadingFromJson||this.loadPreview(t),this.loadedFilesValue=t,t=this.previewValue[0].content),this.updateRenderedValue(t),e.prototype.setNewValue.call(this,t)},t.prototype.loadPreview=function(t){"string"!=typeof t&&e.prototype.loadPreview.call(this,t)},Object.defineProperty(t.prototype,"allowMultiple",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),t.prototype.clear=function(e,t){var o=this;if(void 0===t&&(t=!0),this.survey){var r=function(){t&&(o.value=void 0),o.errors=[],e&&e()};this.loadedFilesValue?(this.containsMultiplyFiles=!1,this.survey.clearFiles(this.loadedFilesValue,this.name,this.previewValue,null,(function(e,t){"success"===e&&r()}))):r()}},t.prototype.updateRenderedValue=function(e){var t=e?e.match(/^data:((?:\w+\/(?:(?!;).)+)?)((?:;[\w\W]*?[^;])*),/):null;t?(this.placeholder=t[0]+"...",this._renderedValue=""):(this.placeholder="",this._renderedValue=e)},Object.defineProperty(t.prototype,"renderedValue",{get:function(){return this._renderedValue},enumerable:!1,configurable:!0}),t.prototype.updateValueFromInputEvent=function(e){var t=e.target.value;this.placeholder&&!t||i.Helpers.isTwoValueEquals(t,this.value)||(this.clear(void 0,!1),this.loadedFilesValue=void 0,this.value=e.target.value)},t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.updateRenderedValue(t)},t.prototype.onInputChange=function(e){e.target!==document.activeElement&&this.updateValueFromInputEvent(e)},t.prototype.onInputBlur=function(e){this.updateValueFromInputEvent(e)},t.prototype.getType=function(){return"fileedit"},t.prototype.getIsClearButtonDisabled=function(){return!this.value||this.isInputReadOnly},t.prototype.getChooseButtonCss=function(){return(new i.CssClassBuilder).append(this.cssClasses.chooseButton).append(this.cssClasses.chooseButtonDisabled,this.isInputReadOnly).toString()},t.prototype.chooseFiles=function(e){var t=this;if(this.isInputReadOnly||!this.onChooseFilesCallback)return!0;e.preventDefault(),e.stopPropagation();var o=this.rootElement.querySelectorAll("input[type='file']")[0];this.onChooseFilesCallback(o,(function(e){t.loadFiles(e)}))},Z([Object(i.property)()],t.prototype,"_renderedValue",void 0),Z([Object(i.property)()],t.prototype,"placeholder",void 0),t}(i.QuestionFileModel);i.Serializer.addClass("fileedit",[],(function(){return new rn("")}),"file"),i.QuestionFactory.Instance.registerQuestion("fileedit",(function(e){return new rn(e)}));var nn=function(e){function t(t){var o=e.call(this)||this;return o.question=t,o}return Y(t,e),t.prototype.resetValue=function(){this.resetValueCallback&&this.resetValueCallback()},Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.question.isInputReadOnly||!this.allowResetValue},enumerable:!1,configurable:!0}),Z([Object(i.property)()],t.prototype,"allowResetValue",void 0),t}(i.Base),an=function(e){function t(t){var o=e.call(this,t)||this;return o.resetValueAdorner=o.createResetValueAdorner(),o}return Y(t,e),t.prototype.createResetValueAdorner=function(){return new nn(this)},t.prototype.getType=function(){return"textwithreset"},t.prototype.getRootClass=function(){return(new i.CssClassBuilder).append(this.cssClasses.root).append(this.cssClasses.onError,this.errors.length>0).toString()},t.prototype.getControlClass=function(){return(new i.CssClassBuilder).append(this.cssClasses.control).toString()},Object.defineProperty(t.prototype,"wrappedQuestionTemplate",{get:function(){return"text"},enumerable:!1,configurable:!0}),t}(i.QuestionTextModel);i.Serializer.addClass("textwithreset",[],(function(){return new an("")}),"text"),i.QuestionFactory.Instance.registerQuestion("textwithreset",(function(e){return new an(e)}));var sn=function(e){function t(t){var o=e.call(this,t)||this;return o.resetValueAdorner=o.createResetValueAdorner(),o}return Y(t,e),t.prototype.createResetValueAdorner=function(){return new nn(this)},t.prototype.getType=function(){return"commentwithreset"},t.prototype.getCssType=function(){return"textwithreset"},t.prototype.getRootClass=function(){return(new i.CssClassBuilder).append(this.cssClasses.root).append(this.cssClasses.rootMultiline).append(this.cssClasses.onError,this.errors.length>0).toString()},t.prototype.getControlClass=function(){return(new i.CssClassBuilder).append(this.cssClasses.control).append(this.cssClasses.controlMultiline).toString()},Object.defineProperty(t.prototype,"wrappedQuestionTemplate",{get:function(){return"comment"},enumerable:!1,configurable:!0}),t}(i.QuestionCommentModel);i.Serializer.addClass("commentwithreset",[{name:"allowResize:boolean",default:!1}],(function(){return new sn("")}),"comment"),i.QuestionFactory.Instance.registerQuestion("commentwithreset",(function(e){return new sn(e)}));var ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"expression"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment",showOptionsCaption:!1}},t.prototype.clearPropertyValue=function(e,t,o,r){o.clearValue()},t}(it),cn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"condition"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"comment",showOptionsCaption:!1}},t.prototype.canClearPropertyValue=function(e,t,o,r){return!1!==r.allowEditExpressionsInTextEditor},t.prototype.onSetup=function(e,t,o,r){!1===r.allowEditExpressionsInTextEditor&&(t.onKeyDownPreprocess=function(e){!e.ctrlKey&&["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].indexOf(e.key)<0&&e.preventDefault()})},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new Wt(e.getSurvey(),e,r,t.name)},t}(ln);tt.register(new ln),tt.register(new cn);var pn=function(e){function t(t,o,r,n){void 0===o&&(o=null),void 0===r&&(r="item"),void 0===n&&(n=[]);var i=e.call(this,o)||this;return i.choices=t,i.className=r,i.names=n,i.commentValue=i.editSurvey.getQuestionByName("question"),i.setComment(),i.editSurvey.getQuestionByName("question").placeholder=G.getString("pe.fastEntryPlaceholder"),i.editSurvey.onValidateQuestion.add((function(e,t){var o=i.options.minimumChoicesCount;if(o>0){o>(r=i.getChoicesCount())&&(t.error=G.getString("pe.fastEntryChoicesMinCountError").format(o))}else{var r,n=i.options.maximumChoicesCount;if(n>0)n<(r=i.getChoicesCount())&&(t.error=G.getString("pe.fastEntryChoicesCountError").format(r,n));else if(i.isValueUnique){var a=i.getFirstUniqueValue();a&&(t.error=G.getString("pe.fastEntryNonUniqueError").format(a))}}})),i}return Y(t,e),t.prototype.calcBeforeApplyItemsArray=function(e,t,o){if(t&&0!=t.length){if(e.length>t.length&&e.splice(t.length,e.length-t.length),e.length<t.length){for(var r=[],n=e.length;n<t.length;n++)r.push(t[n]);e.splice.apply(e,[e.length,0].concat(r))}}else e.splice(0,e.length)},t.prototype.applyItemValueArray=function(e,t,o){void 0===o&&(o=[]),this.calcBeforeApplyItemsArray(e,t,o);for(var r=0;r<e.length;r++)o.forEach((function(o){e[r][o]=t[r][o]}))},t.prototype.getSurveyJSON=function(){return{elements:[{type:"comment",name:"question",titleLocation:"hidden",rows:12}]}},t.prototype.getSurveyCreationReason=function(){return"fast-entry"},t.prototype.apply=function(){return!this.comment.isEmpty()&&this.applyCore()},t.prototype.applyCore=function(){if(this.editSurvey.hasErrors(!0))return!1;var e=(this.comment.value||"").split("\n")||[],t=this.convertTextToItemValues(e);return t=this.options.onFastEntryCallback(t,e),this.applyItemValueArray(this.choices,t,this.names),!0},t.prototype.convertTextToItemValues=function(e){for(var t=[],o=0;o<e.length;o++)if(e[o]){var r=e[o].split(i.ItemValue.Separator),n=i.Serializer.createClass(this.className);this.names.forEach((function(e,t){n[e]=r[t]})),t.push(n)}return t},Object.defineProperty(t.prototype,"comment",{get:function(){return this.commentValue},enumerable:!1,configurable:!0}),t.prototype.getChoicesCount=function(){for(var e=this.comment.value.split("\n"),t=0,o=0;o<e.length;o++){e[o]&&t++}return t},Object.defineProperty(t.prototype,"isValueUnique",{get:function(){return!0===i.Serializer.findProperty("itemvalue","value").isUnique},enumerable:!1,configurable:!0}),t.prototype.getFirstUniqueValue=function(){for(var e=this.comment.value.split("\n"),t={},o=0;o<e.length;o++){var r=e[o];if(r){var n=r.split(i.ItemValue.Separator)[0];if(t[n])return n;t[n]=!0}}},t.prototype.setComment=function(){var e=this.convertItemValuesToText();this.comment.value=e},t.prototype.collectNames=function(e,t,o){var r="";return this.names.forEach((function(n){if("itemvalues"===t){if("value"==n)return;var a="text"==n?e.pureText:e[n]}else a=e[n];if(a){for(var s=0;s<o;s++)r+=i.ItemValue.Separator;r+=a,o=1}else o++})),r},t.prototype.convertItemValuesToText=function(){var e=this,t="";return this.choices.forEach((function(o){t&&(t+="\n"),t+=e.collectNames(o,"",0)})),t},t}(et),un=function(e){function t(t,o,r,n){void 0===o&&(o=null),void 0===r&&(r="itemvalue"),void 0===n&&(n=["value","text"]);var i=e.call(this,t,o,r,n)||this;return i.choices=t,i.className=r,i.names=n,i}return Y(t,e),t.prototype.apply=function(){return this.applyCore()},t.prototype.applyItemValueArray=function(e,t,o){void 0===o&&(o=[]),this.calcBeforeApplyItemsArray(e,t,o);for(var r=0;r<e.length;r++)e[r].value!=t[r].value&&(e[r].value=t[r].value),e[r].text=t[r].hasText?t[r].text:"",o.forEach((function(o){"value"!=o&&"text"!=o&&(e[r][o]=t[r][o])}))},t.prototype.convertItemValuesToText=function(){var e=this,t="";return this.choices.forEach((function(o){t&&(t+="\n"),t+=o.value,t+=e.collectNames(o,"itemvalues",1)})),t},t}(pn);i.Serializer.addProperty("itemvalue",{name:"icon",isSerializable:!1,readOnly:!0,visibleIndex:0,visibleIf:function(e){return e&&"rateValues"===e.ownerPropertyName&&e.locOwner instanceof i.QuestionRatingModel&&"smileys"==e.locOwner.rateType}});var dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.getNewColumnName=function(e,t,o){var r=[];if(Array.isArray(e))for(var n=0;n<e.length;n++)r.push(e[n][t]);return g(o,r)},t.prototype.onCreated=function(e,t,o,r,n){var i=this;t.onGetValueForNewRowCallBack=function(e){return i.createNewItem(e,o)},this.setupMatrixQuestion(e,t,o,n)},t.prototype.onSetup=function(e,t,o,r){var n=t;n.allowRowsDragAndDrop&&n.dragDropMatrixRows&&(n.dragDropMatrixRows.onDragStart.add((function(){r.startUndoRedoTransaction()})),n.dragDropMatrixRows.onDragEnd.add((function(){r.stopUndoRedoTransaction()})))},t.prototype.initializePlaceholder=function(e,t,o){var r="function"==typeof e.getType&&e.getType();"text"===t.getType()&&r&&("text"===o&&"itemvalue"===r&&(t.placeholder=new i.ComputedUpdater((function(){return e.value?e.value.toString():e.text}))),"title"!==o||"matrixdropdowncolumn"!==r&&"multipletextitem"!==r||(t.placeholder=new i.ComputedUpdater((function(){return e.name?e.name:e.title}))))},t.prototype.onMatrixCellCreated=function(e,t){var o=t.row.editingObj;if(o){var r=t.cellQuestion;r.obj=o,this.initializePlaceholder(o,r,t.columnName),r.property=i.Serializer.findProperty(o.getType(),t.columnName)}},t.prototype.onGetMatrixRowAction=function(e,t,o){var r=this,n=t.question,i=t.row,a=t.actions;this.getEditItemAsStandAlone()&&a.push({id:"svd-grid-edit-column",iconName:"icon-edit",title:G.getString("pe.edit"),visibleIndex:0,showTitle:!1,location:"end",action:function(){var e=t.row.editingObj;o(e)}});var s=a.filter((function(e){return"show-detail"===e.id}))[0];Ot(n,a,i),s&&(s.component="sv-action-bar-item",s.iconName=this.getShowDetailActionIconName(i),s.showTitle=!1,s.location="end",s.ariaExpanded=i.isDetailPanelShowing,s.action=function(){i.showHideDetailPanelClick(),s.iconName=i.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},s.visibleIndex=0,s.visible=this.hasPropertiesInDetail,i.onDetailPanelShowingChanged=function(){s.iconName=r.getShowDetailActionIconName(i),s.ariaExpanded=i.isDetailPanelShowing}),Vt(a)},t.prototype.getShowDetailActionIconName=function(e){return e.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},t.prototype.addItem=function(e,t,o){o.addRow()},t.prototype.onGetQuestionTitleActions=function(e,t,o){var r=this,n=t.question;t.titleActions.push({id:"add-item",iconName:"icon-add",title:n.addRowText,showTitle:!1,action:function(){return r.addItem(o,e,n)},enabled:new i.ComputedUpdater((function(){return n.canAddRow}))})},t.prototype.createNewItem=function(e,o){e.visibleRows.forEach((function(e){return e.hideDetailPanel()}));var r=this.getBaseValue(o),n=this.getKeyValue();r||(r="item");var a=null;r&&n&&(a=t.getNewColumnName(e.value,n,r));var s=e.obj,l=i.Serializer.createClass(this.getDefaultClassName(s,o),{});a&&(l[n]=a),this.getObjTypeName()&&(l[this.getObjTypeName()]=l.getType());var c=s[o.name];return i.Serializer.isDescendantOf(l.getType(),"itemvalue")&&(l.text=h(c)),c.push(l),c!=e.value&&(e.value=c),l},t.prototype.getDefaultClassName=function(e,t){return t.className},t.prototype.getBaseValue=function(e){return e.getBaseValue()},t.prototype.getKeyValue=function(){return""},t.prototype.getColumnNames=function(e,t,o,r){var n=this.getPropertiesNames(e,t,o,r);return n&&n.length>0?n:this.getDefaultListProperties(t)},t.prototype.getColumnClassName=function(e,t){return t.className},t.prototype.getPropertiesNames=function(e,t,o,r){for(var n=[],i=this.getDefinedListProperties(e,t,o,r),a=0;a<i.length;a++)n.push(i[a].name);return 0==n.length&&(n=this.getDefaulColumnNames()),n},t.prototype.getDefinedListProperties=function(e,t,o,r){if(!t.className)return[];var n=i.Serializer.createClass(t.className);if(!n)return[];var a=new Ye(n,o,this.getColumnClassName(e,t),"list",e,t,r);return 0==a.getTabs().length?[]:a.getTabs()[0].properties},t.prototype.getDefaultListProperties=function(e){var t=[];if(e&&e.className)for(var o=i.Serializer.getProperties(e.className),r=0;r<o.length;r++)this.isPropertyShownInList(o[r])&&t.push(o[r].name);return t.length>0?t:this.getDefaulColumnNames()},t.prototype.getDefaulColumnNames=function(){return[]},t.prototype.isPropertyShownInList=function(e){return e.visible&&"form"!==e.showMode},t.prototype.getObjTypeName=function(){return""},t.prototype.hasDetailPanel=function(){return!this.getEditItemAsStandAlone()},t.prototype.setupMatrixQuestion=function(e,t,o,r){var n=this;this.hasPropertiesInDetail=this.hasDetailPanel()&&this.calcHasPropertiesInDetail(t,o,r),t.onHasDetailPanelCallback=function(e){return!1!==e.allowEditRow&&n.hasPropertiesInDetail},t.onCreateDetailPanelRenderedRowCallback=function(e){e.cells=[e.cells[1]],e.cells[0].colSpans+=2};var i=t;if(t.onCreateDetailPanelCallback=function(e,t){new rt(e.editingObj,i.creatorOptions,i.obj,i.property,r).setupObjPanel(t,!0)},t.allowRowsDragAndDrop=this.getAllowRowDragDrop(o)&&!t.isReadOnly,i.creatorOptions&&this.setupUsingOptions(e,t,i.creatorOptions,o),o.uniquePropertyName){var a=t.getColumnByName(o.uniquePropertyName);a&&(a.isUnique=!0)}},t.prototype.getAllowRowDragDrop=function(e){return!1},t.prototype.calcHasPropertiesInDetail=function(e,t,o){if(!t.className)return!0;var r=i.Serializer.createClass(t.className);if(!r)return!0;var n=new i.PanelModel("");return new rt(r,e.creatorOptions,e.obj,t,o).setupObjPanel(n,!0),n.elements.length>0},t.prototype.getJSON=function(e,t,o,r){return this.getMatrixJSON(e,t,this.getColumnNames(e,t,o,r),o,r)},t.prototype.getMatrixJSON=function(e,t,o,r,n){var i=t.className;i||(i=t.baseClassName);var a=this.getColumnsJSON(e,t,o,r,n),s={type:"matrixdynamic",detailPanelMode:"underRow",cellType:"text",rowCount:0,keyName:this.getKeyName(t),columns:a,showHeader:a.length>1,hideColumnsIfEmpty:!0,addRowText:this.getAddRowText(t),keyDuplicationError:G.getString("pe.propertyIsNoUnique"),emptyRowsText:this.getEmptyRowsText(t)};this.getShowDetailPanelOnAdding()&&(s.detailPanelShowOnAdding=!0);var l=this.getMinimumRowCount(e,t,r),c=this.getMaximumRowCount(e,t,r);return l>0&&(s.minRowCount=l),c>0&&(s.maxRowCount=c),s},t.prototype.getEmptyRowsText=function(e){var t="pe.listIsEmpty",o=t+"@"+e.name;return G.hasString(o)&&(t=o),G.getString(t)},t.prototype.getMinimumRowCount=function(e,t,o){return-1},t.prototype.getMaximumRowCount=function(e,t,o){return-1},t.prototype.filterPropertyNames=function(e,t){return e},t.prototype.getClassNameByProp=function(e){return e.className?e.className:e.baseClassName},t.prototype.getKeyName=function(e){var t=this.getClassNameByProp(e);if(!t)return"";for(var o=i.Serializer.getProperties(t),r=0;r<o.length;r++)if(o[r].isUnique)return o[r].name;return""},t.prototype.getColumnsJSON=function(e,t,o,r,n){for(var i=new rt(e,r,void 0,void 0,n).createColumnsJSON(this.getClassNameByProp(t),this.filterPropertyNames(o,r)),a=0;a<i.length;a++)"comment"==i[a].cellType&&(i[a].cellType="text");return i},t.prototype.getEditItemAsStandAlone=function(){return!1},t.prototype.getShowDetailPanelOnAdding=function(){return!1},t.prototype.getAddRowText=function(e){var t="pe.addNew@"+e.name;return G.hasString(t)?G.getString(t):G.getString("pe.addNew")},t.prototype.setupUsingOptions=function(e,t,o,r){var n={allowAddRemoveItems:!0,allowRemoveAllItems:!0,showTextView:!0,allowBatchEdit:!0};o.onSetPropertyEditorOptionsCallback(r.name,e,n),n.allowAddRemoveItems||(t.allowAddRows=!1,t.allowRemoveRows=!1),t.allowRemoveAllItems=n.allowRemoveAllItems,t.showTextView=n.showTextView,t.allowBatchEdit=n.allowBatchEdit},t}(it),hn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return e.isArray&&i.Serializer.isDescendantOf(e.className,"itemvalue")&&"rateValues"!=e.name},t.prototype.excludeTextPropertyName=function(e,t){return(null==t?void 0:t.inplaceEditForValues)?e.filter((function(e){return"text"!==e})):e},t.prototype.filterPropertyNames=function(e,t){return this.excludeTextPropertyName(e,t).filter((function(e){return"icon"!=e}))},t.prototype.isPropertyEditorSetupEnabled=function(e,t,o,r){if(!1===o.showTextView)return!1;var n=o.getColumnByName("value"),i=o.value;return!!n&&n.isVisible&&!n.readOnly&&!this.hasMultipleLanguage(i)&&!this.hasVisibleIfOrEnableIf(i)},t.prototype.getAllowRowDragDrop=function(e){return!0},t.prototype.createPropertyEditorSetup=function(e,t,o,r){var n=o.columns.filter((function(e){return!e.readOnly})).map((function(e){return e.name}));return new un(e[t.name],r,t.className,n)},t.prototype.canClearPropertyValue=function(e,t,o,r){return!1!==o.allowRemoveAllItems},t.prototype.clearPropertyValue=function(e,t,o,r){var n=e[t.name];Array.isArray(n)&&n.splice(0,n.length)},t.prototype.getColumnClassName=function(e,t){return e.getType()+"@"+t.name},t.prototype.getDefaulColumnNames=function(){return["value","text"]},t.prototype.getKeyValue=function(){return"value"},t.prototype.getMatrixJSON=function(t,o,r,n,i){var a=e.prototype.getMatrixJSON.call(this,t,o,r,n,i);return"rateValues"===o.name&&"icon"==a.columns[0].name&&(a.showHeader=a.columns>3),a},t.prototype.getMinimumRowCount=function(t,o,r){return"choices"===o.name?r.minimumChoicesCount:e.prototype.getMaximumRowCount.call(this,t,o,r)},t.prototype.getMaximumRowCount=function(t,o,r){return"choices"===o.name?r.maximumChoicesCount:"rows"===o.name?r.maximumRowsCount:"columns"===o.name?r.maximumColumnsCount:"rateValues"===o.name?r.maximumRateValues:e.prototype.getMaximumRowCount.call(this,t,o,r)},t.prototype.hasMultipleLanguage=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].locText.hasNonDefaultText())return!0;return!1},t.prototype.hasVisibleIfOrEnableIf=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].visibleIf||e[t].enableIf)return!0;return!1},t.prototype.onMatrixCellCreated=function(t,o){function r(e,t){e.html='<div class="spg-smiley-icon"><svg><use xlink:href="#icon-'+t+'"></use></svg></div>'}e.prototype.onMatrixCellCreated.call(this,t,o),t instanceof i.QuestionRatingModel&&"icon"==o.columnName&&(r(o.cellQuestion,o.cellQuestion.value),o.cellQuestion.onPropertyChanged.add((function(e,t){"value"==t.name&&r(e,t.newValue)})))},t.prototype.onMatrixCellValueChanged=function(e,t){e instanceof i.QuestionRatingModel&&"icon"==t.columnName&&(t.cellQuestion.html=t.cellQuestion.value)},t}(dn),gn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return e.isArray&&i.Serializer.isDescendantOf(e.className,"itemvalue")&&"rateValues"==e.name},t.prototype.updateAllowAddRemove=function(e,t){e.allowRemoveRows=Fr.allowRemoveForElement(t),e.allowAddRows=Fr.allowAddForElement(t,e.maxRowCount)},t.prototype.onCreated=function(t,o,r,n,i){var a=this;e.prototype.onCreated.call(this,t,o,r,n,i);var s=o,l=k(t);this.updateAllowAddRemove(s,l),t.onPropertyChanged.add((function(e,t){"rateCount"!=t.name&&"rateDisplayMode"!=t.name||a.updateAllowAddRemove(s,l)}))},t.prototype.onGetQuestionTitleActions=function(t,o,r){var n=o.titleActions.filter((function(e){return"property-grid-clear"==e.id}))[0];n&&(n.visible=!1),e.prototype.onGetQuestionTitleActions.call(this,t,o,r)},t.prototype.filterPropertyNames=function(e,t){return this.excludeTextPropertyName(e,t)},t}(hn),fn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"matrixdropdowncolumns"==e.type},t.prototype.getEditItemAsStandAlone=function(){return!0},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"column"},t.prototype.getMaximumRowCount=function(e,t,o){return o.maximumColumnsCount},t.prototype.getAllowRowDragDrop=function(e){return!0},t}(dn),mn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"surveypages"==e.type},t.prototype.addItem=function(e,t,o){e.addPage(void 0,!1)},t.prototype.getColumnClassName=function(e,t){return"page@"+e.getType()},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.hasDetailPanel=function(){return!1},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"page"},t.prototype.getAllowRowDragDrop=function(e){return!0},t}(dn),yn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"calculatedvalues"==e.type},t.prototype.getColumnClassName=function(e,t){return"calculatedvalue@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"var"},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t.prototype.setupMatrixQuestion=function(t,o,r,n){e.prototype.setupMatrixQuestion.call(this,t,o,r,n),o.isUniqueCaseSensitive=!1},t}(dn),bn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"htmlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["html"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(dn),vn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"urlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["url"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(dn),xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"textitem[]"==e.type},t.prototype.getEditItemAsStandAlone=function(){return!0},t.prototype.getColumnClassName=function(e,t){return"multipletext@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"item"},t.prototype.getAllowRowDragDrop=function(){return!0},t.prototype.createPropertyEditorSetup=function(e,t,o,r){var n=[];return o.columns.forEach((function(e){n.push(e.name)})),new pn(e[t.name],r,t.className,n)},t.prototype.onMatrixCellCreated=function(t,o){e.prototype.onMatrixCellCreated.call(this,t,o);var r=o.cellQuestion;if(o.row.editingObj){var n=o.row.editingObj.editor;n&&r.property&&n.registerFunctionOnPropertyValueChanged(r.property.name,(function(){r.value=i.Serializer.getObjPropertyValue(n,r.property.name)}))}},t}(dn),wn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getColumnsJSON=function(t,o,r,n,i){var a=e.prototype.getColumnsJSON.call(this,t,o,r,n,i);return this.getObjTypeName()&&a.unshift({name:this.getObjTypeName(),cellType:"dropdown"}),a},t.prototype.onMatrixCellCreated=function(t,o){if(e.prototype.onMatrixCellCreated.call(this,t,o),o.row.editingObj){var r=o.cellQuestion;o.columnName===this.getObjTypeName()&&(r.showOptionsCaption=!1,r.choices=this.getChoices(t),r.value=o.row.editingObj.getType())}},t.prototype.onMatrixCellValueChanged=function(e,t){if(t.columnName===this.getObjTypeName()){var o=t.question.visibleRows.indexOf(t.row);if(!(o<0)){var r=t.row.isDetailPanelShowing,n=t.row.editingObj.toJSON();delete n.type;var a=i.Serializer.createClass(t.value);a.fromJSON(n),a[this.getObjTypeName()]=a.getType(),t.row.hideDetailPanel(!0),t.question.value.splice(o,1,a),t.row.value=a,r&&t.row.showDetailPanel()}}},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(dn),jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"validators"==e.type},t.prototype.getObjTypeName=function(){return"validatorType"},t.prototype.getDefaultClassName=function(e,t){var o="expression",r=e;if(r.getSupportedValidators){var n=r.getSupportedValidators();n.length>0&&n.indexOf(o)<0&&(o=n[0])}return o+"validator"},t.prototype.getChoices=function(e){for(var t=this.getSupportedValidators(e),o=[],r=0;r<t.length;r++){var n=t[r]+"validator";o.push({value:n,text:G.getValidatorName(n)})}return o},t.prototype.getSupportedValidators=function(e){return e?e.getSupportedValidators?e.getSupportedValidators():e.getOriginalObj?this.getSupportedValidators(e.getOriginalObj()):[]:[]},t}(wn),Cn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.getAvailableTriggers=function(){return i.Serializer.getChildrenClasses("surveytrigger",!0).filter((function(e){return"visibletrigger"!==e.name}))},t.prototype.fit=function(e){return"triggers"==e.type},t.prototype.getObjTypeName=function(){return"triggerType"},t.prototype.getDefaultClassName=function(e,t){var o=this.getAvailableTriggers().map((function(e){return e.name}));return o.length?-1!==o.indexOf("runexpressiontrigger")?"runexpressiontrigger":o[0]:t.name},t.prototype.getAllowRowDragDrop=function(e){return!0},t.prototype.getChoices=function(e){return this.getAvailableTriggers().map((function(e){return{value:e.name,text:G.getTriggerName(e.name)}}))},t}(wn);tt.register(new hn),tt.register(new gn),tt.register(new fn),tt.register(new mn),tt.register(new yn),tt.register(new bn),tt.register(new vn),tt.register(new xn),tt.register(new jn),tt.register(new Cn),tt.register({fit:function(e){return"icon"===e.name&&"itemvalue"===e.classInfo.name},getJSON:function(e){return{type:"html"}}});var Sn={name:"propertygrid_bindings",showInToolbox:!1,internal:!0,createElements:function(){}};i.ComponentCollection.Instance.getCustomQuestionByName(Sn.name)||i.ComponentCollection.Instance.add(Sn);var Tn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"bindings"==e.type},t.prototype.getJSON=function(){return{type:"propertygrid_bindings"}},t.prototype.onCreated=function(e,t,o,r){t.contentPanel.fromJSON({elements:this.getQuestions(e,r)}),t.valueFromDataCallback=function(t){if(!t&&e.bindings.getNames().length>0){for(var o={},r=0,n=e.bindings.getNames();r<n.length;r++){var i=n[r];o[i]=e.bindings.getValueNameByPropertyName(i)}return o}return t}},t.prototype.getQuestions=function(e,t){for(var o=[],r=0,n=e.bindings.getNames();r<n.length;r++){var i=n[r];o.push(this.getBindingJSON(i,e,t))}return o},t.prototype.getBindingJSON=function(e,t,o){var r=new i.JsonObjectProperty(null,"value");r.type="questionvalue";var n=tt.getJSON(t,r,o);return n.titleLocation="left",n.descriptionLocation="hidden",n.minWidth="0px",n.name=e,n.title=G.getPropertyName(e),n},t}(it);tt.register(new Tn);var Pn={name:"propertygrid_restfull",showInToolbox:!1,internal:!0,createElements:function(e){}};i.ComponentCollection.Instance.getCustomQuestionByName(Pn.name)||i.ComponentCollection.Instance.add(Pn);var En=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"restfull"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"propertygrid_restfull",titleLocation:"hidden"}},t.prototype.onCreated=function(e,t,o,r,n){var i=t.contentPanel,a=e[o.name];new rt(a,r,e,o,n).setupObjPanel(i,!0);var s=i.addNewQuestion("dropdown","test");s.title=G.getString("ed.choicesLoadedFromWebPreviewTitle"),s.choices=[],this.updateTestQuestion(s,a)},t.prototype.onValueChanged=function(e,t,o){if("choicesByUrl"===t.name){var r=o.contentPanel.getQuestionByName("test");this.updateTestQuestion(r,e[t.name])}},t.prototype.updateTestQuestion=function(e,t){t&&(e.visible=!!t.url,e.choicesByUrl.setData(t))},t}(jt);tt.register(new En);var In=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"font"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"font",descriptionLocation:"hidden"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return e},t.valueToDataCallback=function(e){return e}},t}(it);tt.register(new In);var On=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"backgroundcornerradius"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"backgroundcornerradius",descriptionLocation:"hidden"}},t.prototype.onCreated=function(e,t,o){t.valueFromDataCallback=function(e){return e},t.valueToDataCallback=function(e){return e}},t}(it);tt.register(new On);var Vn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"shadoweffects"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"shadoweffects",descriptionLocation:"hidden"}},t}(it);tt.register(new Vn);var Nn=function(e){function t(t,o){void 0===o&&(o=null);var r=e.call(this,o)||this;return r.matrix=t,r.editMatrixValue=r.editSurvey.getQuestionByName("question"),r.buildColumns(),r.buildRows(),r.editMatrix.value=r.matrix.cells.getJson(),r}return Y(t,e),t.prototype.getSurveyJSON=function(){return{elements:[{type:"matrixdropdown",name:"question",cellType:"comment"}]}},t.prototype.getSurveyCreationReason=function(){return"cells-editor"},Object.defineProperty(t.prototype,"editMatrix",{get:function(){return this.editMatrixValue},enumerable:!1,configurable:!0}),t.prototype.apply=function(){return this.matrix.cells.setJson(this.editMatrix.value),!0},t.prototype.buildColumns=function(){for(var e=this.matrix.columns,t=0;t<e.length;t++)this.editMatrix.addColumn(""+e[t].value,e[t].text)},t.prototype.buildRows=function(){this.editMatrix.rows.push(new i.ItemValue("default",G.getString("pe.cellsDefaultRow")));for(var e=this.matrix.rows,t=0;t<e.length;t++)this.editMatrix.rows.push(new i.ItemValue(e[t].value,e[t].text))},t}(et),kn=function(e){function t(t,o,r){void 0===r&&(r=null);var n=e.call(this,r,!1)||this;return n.editQuestion=t,n.propertyName=o,n.setupSurvey(),n.question.value=n.getQuestionValue(),n}return Y(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.editSurvey.getQuestionByName("question")},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){return{elements:[this.getQuestionJSON()]}},t.prototype.getQuestionJSON=function(){var e=this.editQuestion.toJSON();return e.name="question",e.title=e.title||this.editQuestion.name,e.type=this.editQuestion.getType(),"expression"==e.type&&(e.type="text"),e.cellType&&"matrixdropdowncolumn"==e.type&&(e.type=e.cellType,delete e.cellType),te.updateQuestionJson(e),e},t.prototype.getQuestionValue=function(){return this.editQuestion[this.propertyName]},t.prototype.getEditValue=function(){return this.question.value},t.prototype.getSurveyCreationReason=function(){return"default-value"},t.prototype.apply=function(){return this.editQuestion[this.propertyName]=this.getEditValue(),!0},t}(et),An=function(e){function t(t,o,r){void 0===r&&(r=null);var n=e.call(this,t,o,r)||this;return n.editQuestion=t,n.propertyName=o,n}return Y(t,e),t.prototype.getQuestionValue=function(){var t=e.prototype.getQuestionValue.call(this);return t?(Array.isArray(t)||(t=[t]),t):t},t.prototype.getEditValue=function(){var t=e.prototype.getEditValue.call(this);return t&&Array.isArray(t)?0==t.length?null:t[0]:t},t}(kn),_n=function(e){function t(t,o,r){void 0===r&&(r=null);var n=e.call(this,t,o,r)||this;return n.editQuestion=t,n.propertyName=o,n}return Y(t,e),t.prototype.getQuestionJSON=function(){var t=e.prototype.getQuestionJSON.call(this);return t.type="matrixdynamic",t.rowCount=1,t.minRowCount=1,t.maxRowCount=1,t.columnsLocation="vertical",t},t}(An),Ln=function(e){function t(t,o,r){void 0===r&&(r=null);var n=e.call(this,t,o,r)||this;return n.editQuestion=t,n.propertyName=o,n}return Y(t,e),t.prototype.getQuestionJSON=function(){var t=e.prototype.getQuestionJSON.call(this);return t.panelCount=1,t.minPanelCount=1,t.maxPanelCount=1,t},t}(An),Dn=function(e){function t(t,o,r,n){void 0===n&&(n=null);var i=e.call(this,t,r,n)||this;return i.editQuestion=t,i.editObj=o,i.propertyName=r,i.question.value=i.getQuestionValue(),i}return Y(t,e),t.prototype.getQuestionValue=function(){return this.editObj?this.editObj[this.propertyName]:null},t.prototype.apply=function(){return this.editObj[this.propertyName]=this.question.value,!0},t}(kn),Mn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onCreated=function(e,o,r,n){var i=o;i.isClickableCallback=function(){return!i.isReadOnly||!t.isValueEmpty(i.value)},i.linkClickCallback=function(){t.showModalPropertyEditor(t,r,o,n,(function(){return i.isSelected=!1})),i.isSelected=!0},i.clearClickCallback=function(){t.clearPropertyValue(o.obj,r,o,null)}},t}return Y(t,e),t.prototype.getJSON=function(e,t,o){return{type:"linkvalue",showValueInLink:!1,titleLocation:"hidden"}},t.prototype.clearPropertyValue=function(e,t,o,r){e[t.name]=void 0},t.prototype.isValueEmpty=function(e){return i.Helpers.isValueEmpty(e)},t.prototype.isSupportGrouping=function(){return!0},t}(it),Rn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"cells"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new Nn(e,r)},t.prototype.clearPropertyValue=function(e,t,o,r){e.cells.setJson(null)},t.prototype.isValueEmpty=function(e){return!e||i.Helpers.isValueEmpty(e.values)},t}(Mn),qn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"value"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new kn(e,t.name,r)},t}(Mn),Hn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"rowvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new _n(e,t.name,r)},t}(Mn),Bn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"panelvalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){return new Ln(e,t.name,r)},t}(Mn),Qn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"triggervalue"==e.type},t.prototype.createPropertyEditorSetup=function(e,t,o,r){var n=o.obj,i=this.getSetToNameQuestion(n);return new Dn(i,n,t.name,r)},t.prototype.getSetToNameQuestion=function(e){var t=e.getSurvey();return t||(t=e.owner),e.setToName&&t?t.getQuestionByValueName(e.setToName):null},t}(Mn),Fn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e,t){return"logic"===t&&"triggervalue"==e.type},t.prototype.getJSON=function(e,t,o){var r=this.getSetToNameQuestion(e);if(!r)return{type:"linkvalue"};var n=r.toJSON();return n.type=r.getType(),te.updateQuestionJson(n),n},t}(Qn);tt.register(new Rn),tt.register(new qn),tt.register(new Hn),tt.register(new Bn),tt.register(new Qn),tt.register(new Fn);var Un={name:"propertygrid_masksettings",showInToolbox:!1,internal:!0,createElements:function(e){}};i.ComponentCollection.Instance.getCustomQuestionByName(Un.name)||i.ComponentCollection.Instance.add(Un);var Wn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"masksettings"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"propertygrid_masksettings",titleLocation:"hidden"}},t.prototype.onCreated=function(e,t,o,r){var n=e[o.name];this._propertyGrid=new rt(n,r,e,o),this._prevMaskType="";var i=t.contentPanel;this._previewQuestion=i.addNewQuestion("html","preview"),this.updatePanel(e,t,o)},t.prototype.onValueChanged=function(e,t,o){"maskSettings"===t.name&&this.updatePanel(e,o,t)},t.prototype.updatePanel=function(e,t,o){var r=t.contentPanel,n=e[o.name];this._prevMaskType!==e.maskType&&(this._propertyGrid.obj=n,this._propertyGrid.setupObjPanel(r,!0),this._prevMaskType=e.maskType),"datetimemask"==n.getType()&&this.updateDateTimeMinMaxInputType(n,r),this.updatePreviewQuestion(n,r)},t.prototype.updateDateTimeMinMaxInputType=function(e,t){var o="datetime-local";e.hasDatePart||(o="time"),e.hasTimePart||(o="date"),t.getQuestionByName("min").inputType=o,t.getQuestionByName("max").inputType=o},t.prototype.updatePreviewQuestion=function(e,t){this._previewQuestion.visible="masksettings"===e.getType(),t.getElementByName(this._previewQuestion.name)||t.addElement(this._previewQuestion)},t}(it);tt.register(new Wn);var Gn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"masktype"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"dropdown",default:"none",allowClear:!1,searchEnabled:!1,choices:this.getChoices("none")}},t.prototype.getChoices=function(e){var t=(i.Serializer.getChildrenClasses("masksettings")||[]).map((function(e){var t=e.name;return-1!==e.name.indexOf("mask")&&(t=t.slice(0,t.indexOf("mask"))),{value:t,text:z("pe.maskTypes."+e.name)}})),o={value:e,text:z("pe.maskTypes.none")};return t.splice(0,0,o),t},t}(it);tt.register(new Gn);var zn={name:"propertygrid_header",showInToolbox:!1,internal:!0,createElements:function(e){}};i.ComponentCollection.Instance.getCustomQuestionByName(zn.name)||i.ComponentCollection.Instance.add(zn);var Jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Y(t,e),t.prototype.fit=function(e){return"header"==e.type},t.prototype.getJSON=function(e,t,o){return{type:"propertygrid_header",titleLocation:"hidden"}},t.prototype.onCreated=function(e,t,o,r,n){var i,a=t.contentPanel,s=e[o.name];new rt(s,r,e,o,ur).setupObjPanel(a,!0);for(var l=a.elements,c=0;c<l.length;c++)"settings"==l[c].name&&(i=l[c]);i.state=void 0,i.title="",i.elements.forEach((function(e){e.title="",e.state=void 0}))},t}(it);tt.register(new Jn);var Zn,Kn=o(32);i.SvgRegistry.registerIconsFromFolder(Kn),Zn="1.11.2",o(4),o(127),o(128),o(129),o(130),o(131),o(3),o(132),o(133),o(134),o(135),o(136),i.settings.supportCreatorV2=!0,Object(i.checkLibraryVersion)("1.11.2","survey-creator-core")}])}));
|