!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).MCPUIUX={},e.React,e.ReactDOM)}(this,(function(e,t,s){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var n=r(t),a=i(t),o=r(s),l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])},l(e,t)};var u=function(){return u=Object.assign||function(e){for(var t,s=1,i=arguments.length;s0&&r[r.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]0&&t({id:n,event:u||void 0,data:l.endsWith("\n")?l.slice(0,-1):l}),n=void 0,l="",void(u="");if(e.startsWith(":"))return void(r&&r(e.slice(e.startsWith(": ")?2:1)));const s=e.indexOf(":");if(-1===s)h(e,"",e);else{const t=e.slice(0,s),i=" "===e[s+1]?2:1;h(t,e.slice(s+i),e)}}function h(e,t,r){switch(e){case"event":u=t;break;case"data":l=`${l}${t}\n`;break;case"id":n=t.includes("\0")?void 0:t;break;case"retry":/^\d+$/.test(t)?i(parseInt(t,10)):s(new p(`Invalid \`retry\` value: "${t}"`,{type:"invalid-retry",value:t,line:r}));break;default:s(new p(`Unknown field "${e.length>20?`${e.slice(0,20)}…`:e}"`,{type:"unknown-field",field:e,value:t,line:r}))}}return{feed:function(e){const t=o?e.replace(/^\xEF\xBB\xBF/,""):e,[s,i]=function(e){const t=[];let s="",i=0;for(;i{throw TypeError(e)},H=(e,t,s)=>t.has(e)||z("Cannot "+s),Q=(e,t,s)=>(H(e,t,"read from private field"),s?s.call(e):t.get(e)),W=(e,t,s)=>t.has(e)?z("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),U=(e,t,s,i)=>(H(e,t,"write to private field"),t.set(e,s),s),G=(e,t,s)=>(H(e,t,"access private method"),s);class Z extends EventTarget{constructor(e,t){var s,i;super(),W(this,D),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,W(this,y),W(this,C),W(this,w),W(this,x),W(this,V),W(this,_),W(this,E),W(this,P,null),W(this,S),W(this,I),W(this,T,null),W(this,R,null),W(this,k,null),W(this,A,(async e=>{var t;Q(this,I).reset();const{body:s,redirected:i,status:r,headers:n}=e;if(204===r)return G(this,D,M).call(this,"Server sent HTTP 204, not reconnecting",204),void this.close();if(U(this,w,i?new URL(e.url):void 0),200!==r)return void G(this,D,M).call(this,`Non-200 status code (${r})`,r);if(!(n.get("content-type")||"").startsWith("text/event-stream"))return void G(this,D,M).call(this,'Invalid content type, expected "text/event-stream"',r);if(Q(this,y)===this.CLOSED)return;U(this,y,this.OPEN);const a=new Event("open");if(null==(t=Q(this,k))||t.call(this,a),this.dispatchEvent(a),"object"!=typeof s||!s||!("getReader"in s))return G(this,D,M).call(this,"Invalid response body, expected a web ReadableStream",r),void this.close();const o=new TextDecoder,l=s.getReader();let u=!0;do{const{done:e,value:t}=await l.read();t&&Q(this,I).feed(o.decode(t,{stream:!e})),e&&(u=!1,Q(this,I).reset(),G(this,D,F).call(this))}while(u)})),W(this,j,(e=>{U(this,S,void 0),"AbortError"!==e.name&&"aborted"!==e.type&&G(this,D,F).call(this,f(e))})),W(this,q,(e=>{"string"==typeof e.id&&U(this,P,e.id);const t=new MessageEvent(e.event||"message",{data:e.data,origin:Q(this,w)?Q(this,w).origin:Q(this,C).origin,lastEventId:e.id||""});Q(this,R)&&(!e.event||"message"===e.event)&&Q(this,R).call(this,t),this.dispatchEvent(t)})),W(this,N,(e=>{U(this,_,e)})),W(this,B,(()=>{U(this,E,void 0),Q(this,y)===this.CONNECTING&&G(this,D,L).call(this)}));try{if(e instanceof URL)U(this,C,e);else{if("string"!=typeof e)throw new Error("Invalid URL");U(this,C,new URL(e,function(){const e="document"in globalThis?globalThis.document:void 0;return e&&"object"==typeof e&&"baseURI"in e&&"string"==typeof e.baseURI?e.baseURI:void 0}()))}}catch{throw function(e){const t=globalThis.DOMException;return"function"==typeof t?new t(e,"SyntaxError"):new SyntaxError(e)}("An invalid or illegal string was specified")}U(this,I,g({onEvent:Q(this,q),onRetry:Q(this,N)})),U(this,y,this.CONNECTING),U(this,_,3e3),U(this,V,null!=(s=null==t?void 0:t.fetch)?s:globalThis.fetch),U(this,x,null!=(i=null==t?void 0:t.withCredentials)&&i),G(this,D,L).call(this)}get readyState(){return Q(this,y)}get url(){return Q(this,C).href}get withCredentials(){return Q(this,x)}get onerror(){return Q(this,T)}set onerror(e){U(this,T,e)}get onmessage(){return Q(this,R)}set onmessage(e){U(this,R,e)}get onopen(){return Q(this,k)}set onopen(e){U(this,k,e)}addEventListener(e,t,s){const i=t;super.addEventListener(e,i,s)}removeEventListener(e,t,s){const i=t;super.removeEventListener(e,i,s)}close(){Q(this,E)&&clearTimeout(Q(this,E)),Q(this,y)!==this.CLOSED&&(Q(this,S)&&Q(this,S).abort(),U(this,y,this.CLOSED),U(this,S,void 0))}}y=new WeakMap,C=new WeakMap,w=new WeakMap,x=new WeakMap,V=new WeakMap,_=new WeakMap,E=new WeakMap,P=new WeakMap,S=new WeakMap,I=new WeakMap,T=new WeakMap,R=new WeakMap,k=new WeakMap,D=new WeakSet,L=function(){U(this,y,this.CONNECTING),U(this,S,new AbortController),Q(this,V)(Q(this,C),G(this,D,O).call(this)).then(Q(this,A)).catch(Q(this,j))},A=new WeakMap,j=new WeakMap,O=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Q(this,P)?{"Last-Event-ID":Q(this,P)}:void 0},cache:"no-store",signal:null==(e=Q(this,S))?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},q=new WeakMap,N=new WeakMap,M=function(e,t){var s;Q(this,y)!==this.CLOSED&&U(this,y,this.CLOSED);const i=new v("error",{code:t,message:e});null==(s=Q(this,T))||s.call(this,i),this.dispatchEvent(i)},F=function(e,t){var s;if(Q(this,y)===this.CLOSED)return;U(this,y,this.CONNECTING);const i=new v("error",{code:t,message:e});null==(s=Q(this,T))||s.call(this,i),this.dispatchEvent(i),U(this,E,setTimeout(Q(this,B),Q(this,_)))},B=new WeakMap,Z.CONNECTING=0,Z.OPEN=1,Z.CLOSED=2;var J=function(e){function t(t,s){var i=e.call(this,t)||this;return i.code=s,i.name="MCPError",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function s(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}(t,e),t}(Error),K=function(e){return void 0===e&&(e=[]),e.map((function(e){return{type:"function",function:{name:e.name,description:e.description,parameters:e.inputSchema}}}))},X=function(){function e(e){var t=e.url,s=void 0===t?"http://localhost:8000":t,i=e.onToolsReady,r=e.onToolResult,n=e.onError,a=e.onResourcesReady,o=e.onResourceTemplatesReady,l=e.onPromptsReady,u=e.onReady,d=e.onNotification;this.sessionId=null,this.messageEndpoint=null,this.eventSource=null,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.reconnectTimeout=500,this.reconnectTimer=null,this.pendingCalls=new Map,this.callIdCounter=0,this.serverName=null,this.protocolVersion=null,this.capabilities=null,this.serverInfo=null,this.url=s,this.onToolsReady=i,this.onToolResult=r,this.onError=n,this.onResourcesReady=a,this.onResourceTemplatesReady=o,this.onPromptsReady=l,this.onReady=u,this.onNotification=d}return e.prototype.sendJsonRpcRequest=function(e,t,s){return void 0===s&&(s=null),d(this,void 0,void 0,(function(){var i,r;return h(this,(function(n){switch(n.label){case 0:if(!this.messageEndpoint)throw new Error(e+this.sessionId+this.messageEndpoint+"未获取到消息端点");return i=u({jsonrpc:"2.0",method:e,params:t},null!==s&&{id:s}),[4,fetch(this.messageEndpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})];case 1:if(!(r=n.sent()).ok)throw new Error("请求失败: ".concat(r.status));return[2,r]}}))}))},e.prototype.handleError=function(e,t){var s,i=e instanceof J?e:new J(e instanceof Error?e.message:t);throw null===(s=this.onError)||void 0===s||s.call(this,i),i},e.prototype.executeTool=function(e,t,s){return void 0===s&&(s=36e5),d(this,void 0,void 0,(function(){var i,r,n,a=this;return h(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),i="".concat(e,"_").concat(this.callIdCounter++),r=new Promise((function(t,r){a.pendingCalls.set(i,{resolve:t,reject:r}),setTimeout((function(){a.pendingCalls.has(i)&&(a.pendingCalls.delete(i),r(new Error("工具执行超时: ".concat(e))))}),s)})),[4,this.sendJsonRpcRequest("tools/call",{name:e,arguments:t},i)];case 1:return o.sent(),[2,r];case 2:return n=o.sent(),this.handleError(n,"执行工具失败: ".concat(e)),[3,3];case 3:return[2]}}))}))},e.prototype.connect=function(){return d(this,void 0,void 0,(function(){var e,t,s,i=this;return h(this,(function(r){return e="".concat(this.url),this.eventSource=new Z(e),t=!1,s=!1,this.eventSource.onopen=function(){i.reconnectAttempts=0},this.eventSource.onerror=function(e){var t,s,r;if(console.error("SSE 连接错误:",e),null===(t=i.eventSource)||void 0===t||t.close(),i.eventSource=null,null===(s=i.onError)||void 0===s||s.call(i,new Error("SSE 连接失败")),i.reconnectAttempts=t.length?{value:void 0,done:!0}:(e=i(t,s),this._i+=e.length,{value:e,done:!1})}))},function(e,t){var s=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:s)(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,s){var i=s(11);e.exports=function(e,t){if(!i(e))return e;var s,r;if(t&&"function"==typeof(s=e.toString)&&!i(r=s.call(e)))return r;if("function"==typeof(s=e.valueOf)&&!i(r=s.call(e)))return r;if(!t&&"function"==typeof(s=e.toString)&&!i(r=s.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){var s={}.toString;e.exports=function(e){return s.call(e).slice(8,-1)}},function(e,t,s){var i=s(26)("keys"),r=s(17);e.exports=function(e){return i[e]||(i[e]=r(e))}},function(e,t,s){var i=s(1),r=s(3),n=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:s(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,s){var i=s(7).f,r=s(5),n=s(2)("toStringTag");e.exports=function(e,t,s){e&&!r(e=s?e:e.prototype,n)&&i(e,n,{configurable:!0,value:t})}},function(e,t,s){s(62);for(var i=s(3),r=s(6),n=s(12),a=s(2)("toStringTag"),o="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;ldocument.F=Object<\/script>"),e.close(),l=e.F;i--;)delete l.prototype[n[i]];return l()};e.exports=Object.create||function(e,t){var s;return null!==e?(o.prototype=i(e),s=new o,o.prototype=null,s[a]=e):s=l(),void 0===t?s:r(s,t)}},function(e,t,s){var i=s(5),r=s(9),n=s(57)(!1),a=s(25)("IE_PROTO");e.exports=function(e,t){var s,o=r(e),l=0,u=[];for(s in o)s!=a&&i(o,s)&&u.push(s);for(;t.length>l;)i(o,s=t[l++])&&(~n(u,s)||u.push(s));return u}},function(e,t,s){var i=s(24);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,s){var i=s(39),r=s(27).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},function(e,t,s){var i=s(24),r=s(2)("toStringTag"),n="Arguments"==i(function(){return arguments}());e.exports=function(e){var t,s,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?s:n?i(t):"Object"==(a=i(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){var s;s=function(){return this}();try{s=s||new Function("return this")()}catch(e){"object"==typeof window&&(s=window)}e.exports=s},function(e,t){var s=/-?\d+(\.\d+)?%?/g;e.exports=function(e){return e.match(s)}},function(e,t,s){Object.defineProperty(t,"__esModule",{value:!0}),t.getBase16Theme=t.createStyling=t.invertTheme=void 0;var i=p(s(49)),r=p(s(76)),n=p(s(81)),a=p(s(89)),o=p(s(93)),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t.default=e,t}(s(94)),u=p(s(132)),d=p(s(133)),h=p(s(138)),c=s(139);function p(e){return e&&e.__esModule?e:{default:e}}var m=l.default,g=(0,a.default)(m),v=(0,h.default)(d.default,c.rgb2yuv,(function(e){var t,s=(0,n.default)(e,3);return[(t=s[0],t<.25?1:t<.5?.9-t:1.1-t),s[1],s[2]]}),c.yuv2rgb,u.default),f=function(e){return function(t){return{className:[t.className,e.className].filter(Boolean).join(" "),style:(0,r.default)({},t.style||{},e.style||{})}}},b=function(e,t){var s=(0,a.default)(t);for(var n in e)-1===s.indexOf(n)&&s.push(n);return s.reduce((function(s,n){return s[n]=function(e,t){if(void 0===e)return t;if(void 0===t)return e;var s=void 0===e?"undefined":(0,i.default)(e),n=void 0===t?"undefined":(0,i.default)(t);switch(s){case"string":switch(n){case"string":return[t,e].filter(Boolean).join(" ");case"object":return f({className:e,style:t});case"function":return function(s){for(var i=arguments.length,r=Array(i>1?i-1:0),n=1;n1?i-1:0),n=1;n1?i-1:0),n=1;n1?i-1:0),n=1;n1?i-1:0),n=1;n2?s-2:0),o=2;o3?t-3:0),i=3;i1&&void 0!==arguments[1]?arguments[1]:{},l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=n.defaultBase16,d=void 0===u?m:u,h=n.base16Themes,c=w(l,void 0===h?null:h);c&&(l=(0,r.default)({},c,l));var p=g.reduce((function(e,t){return e[t]=l[t]||d[t],e}),{}),v=(0,a.default)(l).reduce((function(e,t){return-1===g.indexOf(t)?(e[t]=l[t],e):e}),{}),f=e(p),C=b(v,f);return(0,o.default)(y,2).apply(void 0,[C].concat(s))}),3),t.getBase16Theme=function(e,t){if(e&&e.extend&&(e=e.extend),"string"==typeof e){var s=e.split(":"),i=(0,n.default)(s,2),r=i[0],a=i[1];e=(t||{})[r]||l[r],"inverted"===a&&(e=C(e))}return e&&e.hasOwnProperty("base00")?e:void 0})},function(e,t,s){var i,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,s){return Function.prototype.apply.call(e,t,s)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(s,i){function r(){void 0!==n&&e.removeListener("error",n),s([].slice.call(arguments))}var n;"error"!==t&&(n=function(s){e.removeListener(t,r),i(s)},e.once("error",n)),e.once(t,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function h(e,t,s,i){var r,n,a,o;if(u(s),void 0===(n=e._events)?(n=e._events=Object.create(null),e._eventsCount=0):(void 0!==n.newListener&&(e.emit("newListener",t,s.listener?s.listener:s),n=e._events),a=n[t]),void 0===a)a=n[t]=s,++e._eventsCount;else if("function"==typeof a?a=n[t]=i?[s,a]:[a,s]:i?a.unshift(s):a.push(s),(r=d(e))>0&&a.length>r&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,o=l,console&&console.warn&&console.warn(o)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,s){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:s},r=c.bind(i);return r.listener=s,i.wrapFn=r,r}function m(e,t,s){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?s?[r.listener||r]:[r]:s?function(e){for(var t=new Array(e.length),s=0;s0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=r[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var u=l.length,d=v(l,u);for(s=0;s=0;n--)if(s[n]===t||s[n].listener===t){a=s[n].listener,r=n;break}if(r<0)return this;0===r?s.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return m(this,e,!0)},o.prototype.rawListeners=function(e){return m(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t,s){e.exports.Dispatcher=s(140)},function(e,t,s){e.exports=s(142)},function(e,t,s){t.__esModule=!0;var i=a(s(50)),r=a(s(65)),n="function"==typeof r.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof r.default&&"symbol"===n(i.default)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":void 0===e?"undefined":n(e)}},function(e,t,s){e.exports={default:s(51),__esModule:!0}},function(e,t,s){s(20),s(29),e.exports=s(30).f("iterator")},function(e,t,s){var i=s(21),r=s(22);e.exports=function(e){return function(t,s){var n,a,o=String(r(t)),l=i(s),u=o.length;return l<0||l>=u?e?"":void 0:(n=o.charCodeAt(l))<55296||n>56319||l+1===u||(a=o.charCodeAt(l+1))<56320||a>57343?e?o.charAt(l):n:e?o.slice(l,l+2):a-56320+(n-55296<<10)+65536}}},function(e,t,s){var i=s(54);e.exports=function(e,t,s){if(i(e),void 0===t)return e;switch(s){case 1:return function(s){return e.call(t,s)};case 2:return function(s,i){return e.call(t,s,i)};case 3:return function(s,i,r){return e.call(t,s,i,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,s){var i=s(38),r=s(16),n=s(28),a={};s(6)(a,s(2)("iterator"),(function(){return this})),e.exports=function(e,t,s){e.prototype=i(a,{next:r(1,s)}),n(e,t+" Iterator")}},function(e,t,s){var i=s(7),r=s(10),n=s(13);e.exports=s(4)?Object.defineProperties:function(e,t){r(e);for(var s,a=n(t),o=a.length,l=0;o>l;)i.f(e,s=a[l++],t[s]);return e}},function(e,t,s){var i=s(9),r=s(58),n=s(59);e.exports=function(e){return function(t,s,a){var o,l=i(t),u=r(l.length),d=n(a,u);if(e&&s!=s){for(;u>d;)if((o=l[d++])!=o)return!0}else for(;u>d;d++)if((e||d in l)&&l[d]===s)return e||d||0;return!e&&-1}}},function(e,t,s){var i=s(21),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},function(e,t,s){var i=s(21),r=Math.max,n=Math.min;e.exports=function(e,t){return(e=i(e))<0?r(e+t,0):n(e,t)}},function(e,t,s){var i=s(3).document;e.exports=i&&i.documentElement},function(e,t,s){var i=s(5),r=s(18),n=s(25)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),i(e,n)?e[n]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,s){var i=s(63),r=s(64),n=s(12),a=s(9);e.exports=s(34)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,s=this._i++;return!e||s>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?s:"values"==t?e[s]:[s,e[s]])}),"values"),n.Arguments=n.Array,i("keys"),i("values"),i("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,s){e.exports={default:s(66),__esModule:!0}},function(e,t,s){s(67),s(73),s(74),s(75),e.exports=s(1).Symbol},function(e,t,s){var i=s(3),r=s(5),n=s(4),a=s(15),o=s(37),l=s(68).KEY,u=s(8),d=s(26),h=s(28),c=s(17),p=s(2),m=s(30),g=s(31),v=s(69),f=s(70),b=s(10),y=s(11),C=s(18),w=s(9),x=s(23),V=s(16),_=s(38),E=s(71),P=s(72),S=s(32),I=s(7),T=s(13),R=P.f,k=I.f,D=E.f,L=i.Symbol,A=i.JSON,j=A&&A.stringify,O=p("_hidden"),q=p("toPrimitive"),N={}.propertyIsEnumerable,M=d("symbol-registry"),F=d("symbols"),B=d("op-symbols"),z=Object.prototype,H="function"==typeof L&&!!S.f,Q=i.QObject,W=!Q||!Q.prototype||!Q.prototype.findChild,U=n&&u((function(){return 7!=_(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a}))?function(e,t,s){var i=R(z,t);i&&delete z[t],k(e,t,s),i&&e!==z&&k(z,t,i)}:k,G=function(e){var t=F[e]=_(L.prototype);return t._k=e,t},Z=H&&"symbol"==typeof L.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof L},J=function(e,t,s){return e===z&&J(B,t,s),b(e),t=x(t,!0),b(s),r(F,t)?(s.enumerable?(r(e,O)&&e[O][t]&&(e[O][t]=!1),s=_(s,{enumerable:V(0,!1)})):(r(e,O)||k(e,O,V(1,{})),e[O][t]=!0),U(e,t,s)):k(e,t,s)},K=function(e,t){b(e);for(var s,i=v(t=w(t)),r=0,n=i.length;n>r;)J(e,s=i[r++],t[s]);return e},X=function(e){var t=N.call(this,e=x(e,!0));return!(this===z&&r(F,e)&&!r(B,e))&&(!(t||!r(this,e)||!r(F,e)||r(this,O)&&this[O][e])||t)},Y=function(e,t){if(e=w(e),t=x(t,!0),e!==z||!r(F,t)||r(B,t)){var s=R(e,t);return!s||!r(F,t)||r(e,O)&&e[O][t]||(s.enumerable=!0),s}},$=function(e){for(var t,s=D(w(e)),i=[],n=0;s.length>n;)r(F,t=s[n++])||t==O||t==l||i.push(t);return i},ee=function(e){for(var t,s=e===z,i=D(s?B:w(e)),n=[],a=0;i.length>a;)!r(F,t=i[a++])||s&&!r(z,t)||n.push(F[t]);return n};H||(o((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=c(arguments.length>0?arguments[0]:void 0),t=function(s){this===z&&t.call(B,s),r(this,O)&&r(this[O],e)&&(this[O][e]=!1),U(this,e,V(1,s))};return n&&W&&U(z,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",(function(){return this._k})),P.f=Y,I.f=J,s(41).f=E.f=$,s(19).f=X,S.f=ee,n&&!s(14)&&o(z,"propertyIsEnumerable",X,!0),m.f=function(e){return G(p(e))}),a(a.G+a.W+a.F*!H,{Symbol:L});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),se=0;te.length>se;)p(te[se++]);for(var ie=T(p.store),re=0;ie.length>re;)g(ie[re++]);a(a.S+a.F*!H,"Symbol",{for:function(e){return r(M,e+="")?M[e]:M[e]=L(e)},keyFor:function(e){if(!Z(e))throw TypeError(e+" is not a symbol!");for(var t in M)if(M[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!H,"Object",{create:function(e,t){return void 0===t?_(e):K(_(e),t)},defineProperty:J,defineProperties:K,getOwnPropertyDescriptor:Y,getOwnPropertyNames:$,getOwnPropertySymbols:ee});var ne=u((function(){S.f(1)}));a(a.S+a.F*ne,"Object",{getOwnPropertySymbols:function(e){return S.f(C(e))}}),A&&a(a.S+a.F*(!H||u((function(){var e=L();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))}))),"JSON",{stringify:function(e){for(var t,s,i=[e],r=1;arguments.length>r;)i.push(arguments[r++]);if(s=t=i[1],(y(t)||void 0!==e)&&!Z(e))return f(t)||(t=function(e,t){if("function"==typeof s&&(t=s.call(this,e,t)),!Z(t))return t}),i[1]=t,j.apply(A,i)}}),L.prototype[q]||s(6)(L.prototype,q,L.prototype.valueOf),h(L,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(e,t,s){var i=s(17)("meta"),r=s(11),n=s(5),a=s(7).f,o=0,l=Object.isExtensible||function(){return!0},u=!s(8)((function(){return l(Object.preventExtensions({}))})),d=function(e){a(e,i,{value:{i:"O"+ ++o,w:{}}})},h=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!n(e,i)){if(!l(e))return"F";if(!t)return"E";d(e)}return e[i].i},getWeak:function(e,t){if(!n(e,i)){if(!l(e))return!0;if(!t)return!1;d(e)}return e[i].w},onFreeze:function(e){return u&&h.NEED&&l(e)&&!n(e,i)&&d(e),e}}},function(e,t,s){var i=s(13),r=s(32),n=s(19);e.exports=function(e){var t=i(e),s=r.f;if(s)for(var a,o=s(e),l=n.f,u=0;o.length>u;)l.call(e,a=o[u++])&&t.push(a);return t}},function(e,t,s){var i=s(24);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,s){var i=s(9),r=s(41).f,n={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==n.call(e)?function(e){try{return r(e)}catch(e){return a.slice()}}(e):r(i(e))}},function(e,t,s){var i=s(19),r=s(16),n=s(9),a=s(23),o=s(5),l=s(35),u=Object.getOwnPropertyDescriptor;t.f=s(4)?u:function(e,t){if(e=n(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(o(e,t))return r(!i.f.call(e,t),e[t])}},function(e,t){},function(e,t,s){s(31)("asyncIterator")},function(e,t,s){s(31)("observable")},function(e,t,s){t.__esModule=!0;var i,r=(i=s(77))&&i.__esModule?i:{default:i};t.default=r.default||function(e){for(var t=1;td;)for(var p,m=l(arguments[d++]),g=h?r(m).concat(h(m)):r(m),v=g.length,f=0;v>f;)p=g[f++],i&&!c.call(m,p)||(s[p]=m[p]);return s}:u},function(e,t,s){t.__esModule=!0;var i=n(s(82)),r=n(s(85));function n(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if(Array.isArray(e))return e;if((0,i.default)(Object(e)))return function(e,t){var s=[],i=!0,n=!1,a=void 0;try{for(var o,l=(0,r.default)(e);!(i=(o=l.next()).done)&&(s.push(o.value),!t||s.length!==t);i=!0);}catch(e){n=!0,a=e}finally{try{!i&&l.return&&l.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,s){e.exports={default:s(83),__esModule:!0}},function(e,t,s){s(29),s(20),e.exports=s(84)},function(e,t,s){var i=s(42),r=s(2)("iterator"),n=s(12);e.exports=s(1).isIterable=function(e){var t=Object(e);return void 0!==t[r]||"@@iterator"in t||n.hasOwnProperty(i(t))}},function(e,t,s){e.exports={default:s(86),__esModule:!0}},function(e,t,s){s(29),s(20),e.exports=s(87)},function(e,t,s){var i=s(10),r=s(88);e.exports=s(1).getIterator=function(e){var t=r(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return i(t.call(e))}},function(e,t,s){var i=s(42),r=s(2)("iterator"),n=s(12);e.exports=s(1).getIteratorMethod=function(e){if(null!=e)return e[r]||e["@@iterator"]||n[i(e)]}},function(e,t,s){e.exports={default:s(90),__esModule:!0}},function(e,t,s){s(91),e.exports=s(1).Object.keys},function(e,t,s){var i=s(18),r=s(13);s(92)("keys",(function(){return function(e){return r(i(e))}}))},function(e,t,s){var i=s(15),r=s(1),n=s(8);e.exports=function(e,t){var s=(r.Object||{})[e]||Object[e],a={};a[e]=t(s),i(i.S+i.F*n((function(){s(1)})),"Object",a)}},function(e,t,s){(function(t){var s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],i=/^\s+|\s+$/g,r=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,n=/\{\n\/\* \[wrapped with (.+)\] \*/,a=/,? & /,o=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^\[object .+?Constructor\]$/,d=/^0o[0-7]+$/i,h=/^(?:0|[1-9]\d*)$/,c=parseInt,p="object"==typeof t&&t&&t.Object===Object&&t,m="object"==typeof self&&self&&self.Object===Object&&self,g=p||m||Function("return this")();function v(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}function f(e,t){return!(!e||!e.length)&&function(e,t,s){if(t!=t)return function(e,t,s,i){for(var r=e.length,n=s+(i?1:-1);i?n--:++n-1}function b(e){return e!=e}function y(e,t){for(var s=e.length,i=0;s--;)e[s]===t&&i++;return i}function C(e,t){for(var s=-1,i=e.length,r=0,n=[];++s2?x:void 0);function O(e){return $(e)?D(e):{}}function q(e){return!(!$(e)||function(e){return!!S&&S in e}(e))&&(function(e){var t=$(e)?R.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?k:u).test(function(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function N(e,t,s,i){for(var r=-1,n=e.length,a=s.length,o=-1,l=t.length,u=L(n-a,0),d=Array(l+u),h=!i;++o1&&w.reverse(),d&&l1?"& ":"")+t[i],t=t.join(s>2?", ":" "),e.replace(r,"{\n/* [wrapped with "+t+"] */\n")}function Z(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e1&&i--,n=6*i<1?t+6*(s-t)*i:2*i<1?s:3*i<2?t+(s-t)*(2/3-i)*6:t,r[u]=255*n;return r}},function(e,t,s){(function(t){var s="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,r=s||i||Function("return this")();function n(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}function a(e,t){for(var s=-1,i=t.length,r=e.length;++s-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?u.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}(e)}(e)&&l.call(e,"callee")&&(!h.call(e,"callee")||"[object Arguments]"==u.call(e))}(e)||!!(c&&e&&e[c])}var g,v,f=Array.isArray,b=(g=function(e){for(var t=(e=function e(t,s,i,r,n){var o=-1,l=t.length;for(i||(i=m),n||(n=[]);++o0&&i(u)?s>1?e(u,s-1,i,r,n):a(n,u):r||(n[n.length]=u)}return n}(e,1)).length,s=t;s--;)if("function"!=typeof e[s])throw new TypeError("Expected a function");return function(){for(var s=0,i=t?e[s].apply(this,arguments):arguments[0];++s2?s-2:0),r=2;r=0||(r[s]=e[s]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function V(e){var t=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(e);return"number"===t&&(t=isNaN(e)?"nan":(0|e)!=e?"float":"integer"),t}b.__suppressDeprecationWarning=!0,y.__suppressDeprecationWarning=!0,C.__suppressDeprecationWarning=!0;var _={scheme:"rjv-default",author:"mac gainor",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},E={scheme:"rjv-grey",author:"mac gainor",base00:"rgba(1, 1, 1, 0)",base01:"rgba(1, 1, 1, 0.1)",base02:"rgba(0, 0, 0, 0.2)",base03:"rgba(1, 1, 1, 0.3)",base04:"rgba(0, 0, 0, 0.4)",base05:"rgba(1, 1, 1, 0.5)",base06:"rgba(1, 1, 1, 0.6)",base07:"rgba(1, 1, 1, 0.7)",base08:"rgba(1, 1, 1, 0.8)",base09:"rgba(1, 1, 1, 0.8)",base0A:"rgba(1, 1, 1, 0.8)",base0B:"rgba(1, 1, 1, 0.8)",base0C:"rgba(1, 1, 1, 0.8)",base0D:"rgba(1, 1, 1, 0.8)",base0E:"rgba(1, 1, 1, 0.8)",base0F:"rgba(1, 1, 1, 0.8)"},P={white:"#fff",black:"#000",transparent:"rgba(1, 1, 1, 0)",globalFontFamily:"monospace",globalCursor:"default",indentBlockWidth:"5px",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyBorderRadius:"3px",keyColonWeight:"bold",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",keyValPaddingHover:"3px 5px 3px 4px",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedFontWeight:"bold",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px"},S=s(45),I=function(e){var t=function(e){return{backgroundColor:e.base00,ellipsisColor:e.base09,braceColor:e.base07,expandedIcon:e.base0D,collapsedIcon:e.base0E,keyColor:e.base07,arrayKeyColor:e.base0C,objectSize:e.base04,copyToClipboard:e.base0F,copyToClipboardCheck:e.base0D,objectBorder:e.base02,dataTypes:{boolean:e.base0E,date:e.base0D,float:e.base0B,function:e.base0D,integer:e.base0F,string:e.base09,nan:e.base08,null:e.base0A,undefined:e.base05,regexp:e.base0A,background:e.base02},editVariable:{editIcon:e.base0E,cancelIcon:e.base09,removeIcon:e.base09,addIcon:e.base0E,checkIcon:e.base0E,background:e.base01,color:e.base0A,border:e.base07},addKeyModal:{background:e.base05,border:e.base04,color:e.base0A,labelColor:e.base01},validationFailure:{background:e.base09,iconColor:e.base01,fontColor:e.base01}}}(e);return{"app-container":{fontFamily:P.globalFontFamily,cursor:P.globalCursor,backgroundColor:t.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:t.ellipsisColor,fontSize:P.ellipsisFontSize,lineHeight:P.ellipsisLineHeight,cursor:P.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:P.braceCursor,fontWeight:P.braceFontWeight,color:t.braceColor},"expanded-icon":{color:t.expandedIcon},"collapsed-icon":{color:t.collapsedIcon},colon:{display:"inline-block",margin:P.keyMargin,color:t.keyColor,verticalAlign:"top"},objectKeyVal:function(e,s){return{style:n({paddingTop:P.keyValPaddingTop,paddingRight:P.keyValPaddingRight,paddingBottom:P.keyValPaddingBottom,borderLeft:P.keyValBorderLeft+" "+t.objectBorder,":hover":{paddingLeft:s.paddingLeft-1+"px",borderLeft:P.keyValBorderHover+" "+t.objectBorder}},s)}},"object-key-val-no-border":{padding:P.keyValPadding},"pushed-content":{marginLeft:P.pushedContentMarginLeft},variableValue:function(e,t){return{style:n({display:"inline-block",paddingRight:P.variableValuePaddingRight,position:"relative"},t)}},"object-name":{display:"inline-block",color:t.keyColor,letterSpacing:P.keyLetterSpacing,fontStyle:P.keyFontStyle,verticalAlign:P.keyVerticalAlign,opacity:P.keyOpacity,":hover":{opacity:P.keyOpacityHover}},"array-key":{display:"inline-block",color:t.arrayKeyColor,letterSpacing:P.keyLetterSpacing,fontStyle:P.keyFontStyle,verticalAlign:P.keyVerticalAlign,opacity:P.keyOpacity,":hover":{opacity:P.keyOpacityHover}},"object-size":{color:t.objectSize,borderRadius:P.objectSizeBorderRadius,fontStyle:P.objectSizeFontStyle,margin:P.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:P.dataTypeFontSize,marginRight:P.dataTypeMarginRight,opacity:P.datatypeOpacity},boolean:{display:"inline-block",color:t.dataTypes.boolean},date:{display:"inline-block",color:t.dataTypes.date},"date-value":{marginLeft:P.dateValueMarginLeft},float:{display:"inline-block",color:t.dataTypes.float},function:{display:"inline-block",color:t.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:t.dataTypes.integer},string:{display:"inline-block",color:t.dataTypes.string},nan:{display:"inline-block",color:t.dataTypes.nan,fontSize:P.nanFontSize,fontWeight:P.nanFontWeight,backgroundColor:t.dataTypes.background,padding:P.nanPadding,borderRadius:P.nanBorderRadius},null:{display:"inline-block",color:t.dataTypes.null,fontSize:P.nullFontSize,fontWeight:P.nullFontWeight,backgroundColor:t.dataTypes.background,padding:P.nullPadding,borderRadius:P.nullBorderRadius},undefined:{display:"inline-block",color:t.dataTypes.undefined,fontSize:P.undefinedFontSize,padding:P.undefinedPadding,borderRadius:P.undefinedBorderRadius,backgroundColor:t.dataTypes.background},regexp:{display:"inline-block",color:t.dataTypes.regexp},"copy-to-clipboard":{cursor:P.clipboardCursor},"copy-icon":{color:t.copyToClipboard,fontSize:P.iconFontSize,marginRight:P.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:t.copyToClipboardCheck,marginLeft:P.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:P.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:P.metaDataPadding},"icon-container":{display:"inline-block",width:P.iconContainerWidth},tooltip:{padding:P.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:t.editVariable.removeIcon,cursor:P.iconCursor,fontSize:P.iconFontSize,marginRight:P.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:t.editVariable.addIcon,cursor:P.iconCursor,fontSize:P.iconFontSize,marginRight:P.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:t.editVariable.editIcon,cursor:P.iconCursor,fontSize:P.iconFontSize,marginRight:P.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:P.iconCursor,color:t.editVariable.checkIcon,fontSize:P.iconFontSize,paddingRight:P.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:P.iconCursor,color:t.editVariable.cancelIcon,fontSize:P.iconFontSize,paddingRight:P.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:P.editInputMinWidth,borderRadius:P.editInputBorderRadius,backgroundColor:t.editVariable.background,color:t.editVariable.color,padding:P.editInputPadding,marginRight:P.editInputMarginRight,fontFamily:P.editInputFontFamily},"detected-row":{paddingTop:P.detectedRowPaddingTop},"key-modal-request":{position:P.addKeyCoverPosition,top:P.addKeyCoverPositionPx,left:P.addKeyCoverPositionPx,right:P.addKeyCoverPositionPx,bottom:P.addKeyCoverPositionPx,backgroundColor:P.addKeyCoverBackground},"key-modal":{width:P.addKeyModalWidth,backgroundColor:t.addKeyModal.background,marginLeft:P.addKeyModalMargin,marginRight:P.addKeyModalMargin,padding:P.addKeyModalPadding,borderRadius:P.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:t.addKeyModal.labelColor,marginLeft:"2px",marginBottom:"5px",fontSize:"11px"},"key-modal-input-container":{overflow:"hidden"},"key-modal-input":{width:"100%",padding:"3px 6px",fontFamily:"monospace",color:t.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:t.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:t.addKeyModal.labelColor,fontSize:P.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:t.editVariable.addIcon,fontSize:P.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:t.ellipsisColor,fontSize:P.ellipsisFontSize,lineHeight:P.ellipsisLineHeight,cursor:P.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:t.validationFailure.fontColor,backgroundColor:t.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:t.validationFailure.iconColor,fontSize:P.iconFontSize,transform:"rotate(45deg)"}}};function T(e,t,s){return e||console.error("theme has not been set"),function(e){var t=_;return!1!==e&&"none"!==e||(t=E),Object(S.createStyling)(I,{defaultBase16:t})(e)}(e)(t,s)}var R=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=(e.rjvId,e.type_name),s=e.displayDataTypes,i=e.theme;return s?f.a.createElement("span",Object.assign({className:"data-type-label"},T(i,"data-type-label")),t):null}}]),s}(f.a.PureComponent),k=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props;return f.a.createElement("div",T(e.theme,"boolean"),f.a.createElement(R,Object.assign({type_name:"bool"},e)),e.value?"true":"false")}}]),s}(f.a.PureComponent),D=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props;return f.a.createElement("div",T(e.theme,"date"),f.a.createElement(R,Object.assign({type_name:"date"},e)),f.a.createElement("span",Object.assign({className:"date-value"},T(e.theme,"date-value")),e.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}]),s}(f.a.PureComponent),L=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props;return f.a.createElement("div",T(e.theme,"float"),f.a.createElement(R,Object.assign({type_name:"float"},e)),this.props.value)}}]),s}(f.a.PureComponent);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,i=new Array(t);s=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,a=!0,o=!1;return{s:function(){s=e[Symbol.iterator]()},n:function(){var e=s.next();return a=e.done,e},e:function(e){o=!0,n=e},f:function(){try{a||null==s.return||s.return()}finally{if(o)throw n}}}}function q(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||j(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var N=s(46),M=new(s(47).Dispatcher),F=new(function(e){d(s,e);var t=g(s);function s(){var e;a(this,s);for(var i=arguments.length,r=new Array(i),o=0;ot&&(r.style.cursor="pointer",this.state.collapsed&&(i=f.a.createElement("span",null,i.substring(0,t),f.a.createElement("span",T(s,"ellipsis")," ...")))),f.a.createElement("div",T(s,"string"),f.a.createElement(R,Object.assign({type_name:"string"},e)),f.a.createElement("span",Object.assign({className:"string-value"},r,{onClick:this.toggleCollapsed}),'"',i,'"'))}}]),s}(f.a.PureComponent),Z=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){return f.a.createElement("div",T(this.props.theme,"undefined"),"undefined")}}]),s}(f.a.PureComponent);function J(){return(J=Object.assign||function(e){for(var t=1;t=0||(r[s]=e[s]);return r}(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),h=void 0!==d.value,c=Object(v.useRef)(null),p=$(c,t),m=Object(v.useRef)(0),g=Object(v.useRef)(),f=function(){var e=c.current,t=i&&g.current?g.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var s,i=(s=t,re.reduce((function(e,t){return e[t]=s[t],e}),{})),r=i.boxSizing;return""===r?null:(ne&&"border-box"===r&&(i.width=parseFloat(i.width)+parseFloat(i.borderRightWidth)+parseFloat(i.borderLeftWidth)+parseFloat(i.paddingRight)+parseFloat(i.paddingLeft)+"px"),{sizingStyle:i,paddingSize:parseFloat(i.paddingBottom)+parseFloat(i.paddingTop),borderSize:parseFloat(i.borderBottomWidth)+parseFloat(i.borderTopWidth)})}(e);if(t){g.current=t;var s=function(e,t,s,i){void 0===s&&(s=1),void 0===i&&(i=1/0),se||((se=document.createElement("textarea")).setAttribute("tab-index","-1"),se.setAttribute("aria-hidden","true"),te(se)),null===se.parentNode&&document.body.appendChild(se);var r=e.paddingSize,n=e.borderSize,a=e.sizingStyle,o=a.boxSizing;Object.keys(a).forEach((function(e){var t=e;se.style[t]=a[t]})),te(se),se.value=t;var l=function(e,t){var s=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?s+t.borderSize:s-t.paddingSize}(se,e);se.value="x";var u=se.scrollHeight-r,d=u*s;"border-box"===o&&(d=d+r+n),l=Math.max(d,l);var h=u*i;return"border-box"===o&&(h=h+r+n),[l=Math.min(h,l),u]}(t,e.value||e.placeholder||"x",n,r),a=s[0],o=s[1];m.current!==a&&(m.current=a,e.style.setProperty("height",a+"px","important"),u(a,{rowHeight:o}))}};return Object(v.useLayoutEffect)(f),s=X(f),Object(v.useLayoutEffect)((function(){var e=function(e){s.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),Object(v.createElement)("textarea",J({},d,{onChange:function(e){h||f(),o(e)},ref:p}))},oe=Object(v.forwardRef)(ae);function le(e){e=e.trim();try{if("["===(e=JSON.stringify(JSON.parse(e)))[0])return ue("array",JSON.parse(e));if("{"===e[0])return ue("object",JSON.parse(e));if(e.match(/\-?\d+\.\d+/)&&e.match(/\-?\d+\.\d+/)[0]===e)return ue("float",parseFloat(e));if(e.match(/\-?\d+e-\d+/)&&e.match(/\-?\d+e-\d+/)[0]===e)return ue("float",Number(e));if(e.match(/\-?\d+/)&&e.match(/\-?\d+/)[0]===e)return ue("integer",parseInt(e));if(e.match(/\-?\d+e\+\d+/)&&e.match(/\-?\d+e\+\d+/)[0]===e)return ue("integer",Number(e))}catch(e){}switch(e=e.toLowerCase()){case"undefined":return ue("undefined",void 0);case"nan":return ue("nan",NaN);case"null":return ue("null",null);case"true":return ue("boolean",!0);case"false":return ue("boolean",!1);default:if(e=Date.parse(e))return ue("date",new Date(e))}return ue(!1,null)}function ue(e,t){return{type:e,value:t}}var de=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",Object.assign({},xe(t),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),f.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}]),s}(f.a.PureComponent),he=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",Object.assign({},xe(t),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),f.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}]),s}(f.a.PureComponent),ce=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]),i=xe(t).style;return f.a.createElement("span",s,f.a.createElement("svg",{fill:i.color,width:i.height,height:i.width,style:i,viewBox:"0 0 1792 1792"},f.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),s}(f.a.PureComponent),pe=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]),i=xe(t).style;return f.a.createElement("span",s,f.a.createElement("svg",{fill:i.color,width:i.height,height:i.width,style:i,viewBox:"0 0 1792 1792"},f.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),s}(f.a.PureComponent),me=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",{style:n(n({},xe(t).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},f.a.createElement("path",{d:"M0 14l6-6-6-6z"})))}}]),s}(f.a.PureComponent),ge=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",{style:n(n({},xe(t).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},f.a.createElement("path",{d:"M0 5l6 6 6-6z"})))}}]),s}(f.a.PureComponent),ve=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",Object.assign({},xe(t),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),f.a.createElement("g",null,f.a.createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}]),s}(f.a.PureComponent),fe=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",Object.assign({},xe(t),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),f.a.createElement("g",null,f.a.createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),s}(f.a.PureComponent),be=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",Object.assign({},xe(t),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),f.a.createElement("g",null,f.a.createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),s}(f.a.PureComponent),ye=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",Object.assign({},xe(t),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),f.a.createElement("g",null,f.a.createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}]),s}(f.a.PureComponent),Ce=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",Object.assign({},xe(t),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),f.a.createElement("g",null,f.a.createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}]),s}(f.a.PureComponent),we=function(e){d(s,e);var t=g(s);function s(){return a(this,s),t.apply(this,arguments)}return l(s,[{key:"render",value:function(){var e=this.props,t=e.style,s=x(e,["style"]);return f.a.createElement("span",s,f.a.createElement("svg",Object.assign({},xe(t),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),f.a.createElement("g",null,f.a.createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),s}(f.a.PureComponent);function xe(e){return e||(e={}),{style:n(n({verticalAlign:"middle"},e),{},{color:e.color?e.color:"#000000",height:"1em",width:"1em"})}}var Ve=function(e){d(s,e);var t=g(s);function s(e){var i;return a(this,s),(i=t.call(this,e)).copiedTimer=null,i.handleCopy=function(){var e=document.createElement("textarea"),t=i.props,s=t.clickCallback,r=t.src,n=t.namespace;e.innerHTML=JSON.stringify(i.clipboardValue(r),null," "),document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),i.copiedTimer=setTimeout((function(){i.setState({copied:!1})}),5500),i.setState({copied:!0},(function(){"function"==typeof s&&s({src:r,namespace:n,name:n[n.length-1]})}))},i.getClippyIcon=function(){var e=i.props.theme;return i.state.copied?f.a.createElement("span",null,f.a.createElement(ve,Object.assign({className:"copy-icon"},T(e,"copy-icon"))),f.a.createElement("span",T(e,"copy-icon-copied"),"✔")):f.a.createElement(ve,Object.assign({className:"copy-icon"},T(e,"copy-icon")))},i.clipboardValue=function(e){switch(V(e)){case"function":case"regexp":return e.toString();default:return e}},i.state={copied:!1},i}return l(s,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var e=this.props,t=(e.src,e.theme),s=e.hidden,i=e.rowHovered,r=T(t,"copy-to-clipboard").style,a="inline";return s&&(a="none"),f.a.createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:i?"inline-block":"none"}},f.a.createElement("span",{style:n(n({},r),{},{display:a}),onClick:this.handleCopy},this.getClippyIcon()))}}]),s}(f.a.PureComponent),_e=function(e){d(s,e);var t=g(s);function s(e){var i;return a(this,s),(i=t.call(this,e)).getEditIcon=function(){var e=i.props,t=e.variable,s=e.theme;return f.a.createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:i.state.hovered?"inline-block":"none"}},f.a.createElement(Ce,Object.assign({className:"click-to-edit-icon"},T(s,"editVarIcon"),{onClick:function(){i.prepopInput(t)}})))},i.prepopInput=function(e){if(!1!==i.props.onEdit){var t=function(e){var t;switch(V(e)){case"undefined":t="undefined";break;case"nan":t="NaN";break;case"string":t=e;break;case"date":case"function":case"regexp":t=e.toString();break;default:try{t=JSON.stringify(e,null," ")}catch(e){t=""}}return t}(e.value),s=le(t);i.setState({editMode:!0,editValue:t,parsedInput:{type:s.type,value:s.value}})}},i.getRemoveIcon=function(){var e=i.props,t=e.variable,s=e.namespace,r=e.theme,n=e.rjvId;return f.a.createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:i.state.hovered?"inline-block":"none"}},f.a.createElement(fe,Object.assign({className:"click-to-remove-icon"},T(r,"removeVarIcon"),{onClick:function(){M.dispatch({name:"VARIABLE_REMOVED",rjvId:n,data:{name:t.name,namespace:s,existing_value:t.value,variable_removed:!0}})}})))},i.getValue=function(e,t){var s=!t&&e.type,r=p(i).props;switch(s){case!1:return i.getEditInput();case"string":return f.a.createElement(G,Object.assign({value:e.value},r));case"integer":return f.a.createElement(W,Object.assign({value:e.value},r));case"float":return f.a.createElement(L,Object.assign({value:e.value},r));case"boolean":return f.a.createElement(k,Object.assign({value:e.value},r));case"function":return f.a.createElement(z,Object.assign({value:e.value},r));case"null":return f.a.createElement(Q,r);case"nan":return f.a.createElement(H,r);case"undefined":return f.a.createElement(Z,r);case"date":return f.a.createElement(D,Object.assign({value:e.value},r));case"regexp":return f.a.createElement(U,Object.assign({value:e.value},r));default:return f.a.createElement("div",{className:"object-value"},JSON.stringify(e.value))}},i.getEditInput=function(){var e=i.props.theme,t=i.state.editValue;return f.a.createElement("div",null,f.a.createElement(oe,Object.assign({type:"text",inputRef:function(e){return e&&e.focus()},value:t,className:"variable-editor",onChange:function(e){var t=e.target.value,s=le(t);i.setState({editValue:t,parsedInput:{type:s.type,value:s.value}})},onKeyDown:function(e){switch(e.key){case"Escape":i.setState({editMode:!1,editValue:""});break;case"Enter":(e.ctrlKey||e.metaKey)&&i.submitEdit(!0)}e.stopPropagation()},placeholder:"update this value",minRows:2},T(e,"edit-input"))),f.a.createElement("div",T(e,"edit-icon-container"),f.a.createElement(fe,Object.assign({className:"edit-cancel"},T(e,"cancel-icon"),{onClick:function(){i.setState({editMode:!1,editValue:""})}})),f.a.createElement(we,Object.assign({className:"edit-check string-value"},T(e,"check-icon"),{onClick:function(){i.submitEdit()}})),f.a.createElement("div",null,i.showDetected())))},i.submitEdit=function(e){var t=i.props,s=t.variable,r=t.namespace,n=t.rjvId,a=i.state,o=a.editValue,l=a.parsedInput,u=o;e&&l.type&&(u=l.value),i.setState({editMode:!1}),M.dispatch({name:"VARIABLE_UPDATED",rjvId:n,data:{name:s.name,namespace:r,existing_value:s.value,new_value:u,variable_removed:!1}})},i.showDetected=function(){var e=i.props,t=e.theme,s=(e.variable,e.namespace,e.rjvId,i.state.parsedInput),r=(s.type,s.value,i.getDetectedInput());if(r)return f.a.createElement("div",null,f.a.createElement("div",T(t,"detected-row"),r,f.a.createElement(we,{className:"edit-check detected",style:n({verticalAlign:"top",paddingLeft:"3px"},T(t,"check-icon").style),onClick:function(){i.submitEdit(!0)}})))},i.getDetectedInput=function(){var e=i.state.parsedInput,t=e.type,s=e.value,r=p(i).props,a=r.theme;if(!1!==t)switch(t.toLowerCase()){case"object":return f.a.createElement("span",null,f.a.createElement("span",{style:n(n({},T(a,"brace").style),{},{cursor:"default"})},"{"),f.a.createElement("span",{style:n(n({},T(a,"ellipsis").style),{},{cursor:"default"})},"..."),f.a.createElement("span",{style:n(n({},T(a,"brace").style),{},{cursor:"default"})},"}"));case"array":return f.a.createElement("span",null,f.a.createElement("span",{style:n(n({},T(a,"brace").style),{},{cursor:"default"})},"["),f.a.createElement("span",{style:n(n({},T(a,"ellipsis").style),{},{cursor:"default"})},"..."),f.a.createElement("span",{style:n(n({},T(a,"brace").style),{},{cursor:"default"})},"]"));case"string":return f.a.createElement(G,Object.assign({value:s},r));case"integer":return f.a.createElement(W,Object.assign({value:s},r));case"float":return f.a.createElement(L,Object.assign({value:s},r));case"boolean":return f.a.createElement(k,Object.assign({value:s},r));case"function":return f.a.createElement(z,Object.assign({value:s},r));case"null":return f.a.createElement(Q,r);case"nan":return f.a.createElement(H,r);case"undefined":return f.a.createElement(Z,r);case"date":return f.a.createElement(D,Object.assign({value:new Date(s)},r))}},i.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},i}return l(s,[{key:"render",value:function(){var e=this,t=this.props,s=t.variable,i=t.singleIndent,r=t.type,a=t.theme,o=t.namespace,l=t.indentWidth,u=t.enableClipboard,d=t.onEdit,h=t.onDelete,c=t.onSelect,p=t.displayArrayKey,m=t.quotesOnKeys,g=this.state.editMode;return f.a.createElement("div",Object.assign({},T(a,"objectKeyVal",{paddingLeft:l*i}),{onMouseEnter:function(){return e.setState(n(n({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(n(n({},e.state),{},{hovered:!1}))},className:"variable-row",key:s.name}),"array"==r?p?f.a.createElement("span",Object.assign({},T(a,"array-key"),{key:s.name+"_"+o}),s.name,f.a.createElement("div",T(a,"colon"),":")):null:f.a.createElement("span",null,f.a.createElement("span",Object.assign({},T(a,"object-name"),{className:"object-key",key:s.name+"_"+o}),!!m&&f.a.createElement("span",{style:{verticalAlign:"top"}},'"'),f.a.createElement("span",{style:{display:"inline-block"}},s.name),!!m&&f.a.createElement("span",{style:{verticalAlign:"top"}},'"')),f.a.createElement("span",T(a,"colon"),":")),f.a.createElement("div",Object.assign({className:"variable-value",onClick:!1===c&&!1===d?null:function(t){var i=q(o);(t.ctrlKey||t.metaKey)&&!1!==d?e.prepopInput(s):!1!==c&&(i.shift(),c(n(n({},s),{},{namespace:i})))}},T(a,"variableValue",{cursor:!1===c?"default":"pointer"})),this.getValue(s,g)),u?f.a.createElement(Ve,{rowHovered:this.state.hovered,hidden:g,src:s.value,clickCallback:u,theme:a,namespace:[].concat(q(o),[s.name])}):null,!1!==d&&0==g?this.getEditIcon():null,!1!==h&&0==g?this.getRemoveIcon():null)}}]),s}(f.a.PureComponent),Ee=function(e){d(s,e);var t=g(s);function s(){var e;a(this,s);for(var i=arguments.length,r=new Array(i),o=0;o0?a:null,namespace:r.splice(0,r.length-1),existing_value:o,variable_removed:!1,key_name:null};"object"===V(o)?M.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:l,data:e}):M.dispatch({name:"VARIABLE_ADDED",rjvId:l,data:n(n({},e),{},{new_value:[].concat(q(o),[null])})})}})))},e.getRemoveObject=function(t){var s=e.props,i=s.theme,r=(s.hover,s.namespace),n=s.name,a=s.src,o=s.rjvId;if(1!==r.length)return f.a.createElement("span",{className:"click-to-remove",style:{display:t?"inline-block":"none"}},f.a.createElement(fe,Object.assign({className:"click-to-remove-icon"},T(i,"removeVarIcon"),{onClick:function(){M.dispatch({name:"VARIABLE_REMOVED",rjvId:o,data:{name:n,namespace:r.splice(0,r.length-1),existing_value:a,variable_removed:!0}})}})))},e.render=function(){var t=e.props,s=t.theme,i=t.onDelete,r=t.onAdd,n=t.enableClipboard,a=t.src,o=t.namespace,l=t.rowHovered;return f.a.createElement("div",Object.assign({},T(s,"object-meta-data"),{className:"object-meta-data",onClick:function(e){e.stopPropagation()}}),e.getObjectSize(),n?f.a.createElement(Ve,{rowHovered:l,clickCallback:n,src:a,theme:s,namespace:o}):null,!1!==r?e.getAddAttribute(l):null,!1!==i?e.getRemoveObject(l):null)},e}return s}(f.a.PureComponent);function Pe(e){var t=e.parent_type,s=e.namespace,i=e.quotesOnKeys,r=e.theme,n=e.jsvRoot,a=e.name,o=e.displayArrayKey,l=e.name?e.name:"";return!n||!1!==a&&null!==a?"array"==t?o?f.a.createElement("span",Object.assign({},T(r,"array-key"),{key:s}),f.a.createElement("span",{className:"array-key"},l),f.a.createElement("span",T(r,"colon"),":")):f.a.createElement("span",null):f.a.createElement("span",Object.assign({},T(r,"object-name"),{key:s}),f.a.createElement("span",{className:"object-key"},i&&f.a.createElement("span",{style:{verticalAlign:"top"}},'"'),f.a.createElement("span",null,l),i&&f.a.createElement("span",{style:{verticalAlign:"top"}},'"')),f.a.createElement("span",T(r,"colon"),":")):f.a.createElement("span",null)}function Se(e){var t=e.theme;switch(e.iconStyle){case"triangle":return f.a.createElement(ge,Object.assign({},T(t,"expanded-icon"),{className:"expanded-icon"}));case"square":return f.a.createElement(ce,Object.assign({},T(t,"expanded-icon"),{className:"expanded-icon"}));default:return f.a.createElement(de,Object.assign({},T(t,"expanded-icon"),{className:"expanded-icon"}))}}function Ie(e){var t=e.theme;switch(e.iconStyle){case"triangle":return f.a.createElement(me,Object.assign({},T(t,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return f.a.createElement(pe,Object.assign({},T(t,"collapsed-icon"),{className:"collapsed-icon"}));default:return f.a.createElement(he,Object.assign({},T(t,"collapsed-icon"),{className:"collapsed-icon"}))}}var Te=function(e){d(s,e);var t=g(s);function s(e){var i;return a(this,s),(i=t.call(this,e)).toggleCollapsed=function(e){var t=[];for(var s in i.state.expanded)t.push(i.state.expanded[s]);t[e]=!t[e],i.setState({expanded:t})},i.state={expanded:[]},i}return l(s,[{key:"getExpandedIcon",value:function(e){var t=this.props,s=t.theme,i=t.iconStyle;return this.state.expanded[e]?f.a.createElement(Se,{theme:s,iconStyle:i}):f.a.createElement(Ie,{theme:s,iconStyle:i})}},{key:"render",value:function(){var e=this,t=this.props,s=t.src,i=t.groupArraysAfterLength,r=(t.depth,t.name),n=t.theme,a=t.jsvRoot,o=t.namespace,l=(t.parent_type,x(t,["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"])),u=0,d=5*this.props.indentWidth;a||(u=5*this.props.indentWidth);var h=i,c=Math.ceil(s.length/h);return f.a.createElement("div",Object.assign({className:"object-key-val"},T(n,a?"jsv-root":"objectKeyVal",{paddingLeft:u})),f.a.createElement(Pe,this.props),f.a.createElement("span",null,f.a.createElement(Ee,Object.assign({size:s.length},this.props))),q(Array(c)).map((function(t,i){return f.a.createElement("div",Object.assign({key:i,className:"object-key-val array-group"},T(n,"objectKeyVal",{marginLeft:6,paddingLeft:d})),f.a.createElement("span",T(n,"brace-row"),f.a.createElement("div",Object.assign({className:"icon-container"},T(n,"icon-container"),{onClick:function(t){e.toggleCollapsed(i)}}),e.getExpandedIcon(i)),e.state.expanded[i]?f.a.createElement(De,Object.assign({key:r+i,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:h,index_offset:i*h,src:s.slice(i*h,i*h+h),namespace:o,type:"array",parent_type:"array_group",theme:n},l)):f.a.createElement("span",Object.assign({},T(n,"brace"),{onClick:function(t){e.toggleCollapsed(i)},className:"array-group-brace"}),"[",f.a.createElement("div",Object.assign({},T(n,"array-group-meta-data"),{className:"array-group-meta-data"}),f.a.createElement("span",Object.assign({className:"object-size"},T(n,"object-size")),i*h," - ",i*h+h>s.length?s.length:i*h+h)),"]")))})))}}]),s}(f.a.PureComponent),Re=function(e){d(s,e);var t=g(s);function s(e){var i;a(this,s),(i=t.call(this,e)).toggleCollapsed=function(){i.setState({expanded:!i.state.expanded},(function(){B.set(i.props.rjvId,i.props.namespace,"expanded",i.state.expanded)}))},i.getObjectContent=function(e,t,s){return f.a.createElement("div",{className:"pushed-content object-container"},f.a.createElement("div",Object.assign({className:"object-content"},T(i.props.theme,"pushed-content")),i.renderObjectContents(t,s)))},i.getEllipsis=function(){return 0===i.state.size?null:f.a.createElement("div",Object.assign({},T(i.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:i.toggleCollapsed}),"...")},i.getObjectMetaData=function(e){var t=i.props,s=(t.rjvId,t.theme,i.state),r=s.size,n=s.hovered;return f.a.createElement(Ee,Object.assign({rowHovered:n,size:r},i.props))},i.renderObjectContents=function(e,t){var s,r=i.props,n=r.depth,a=r.parent_type,o=r.index_offset,l=r.groupArraysAfterLength,u=r.namespace,d=i.state.object_type,h=[],c=Object.keys(e||{});return i.props.sortKeys&&"array"!==d&&(c=c.sort()),c.forEach((function(r){if(s=new ke(r,e[r]),"array_group"===a&&o&&(s.name=parseInt(s.name)+o),e.hasOwnProperty(r))if("object"===s.type)h.push(f.a.createElement(De,Object.assign({key:s.name,depth:n+1,name:s.name,src:s.value,namespace:u.concat(s.name),parent_type:d},t)));else if("array"===s.type){var c=De;l&&s.value.length>l&&(c=Te),h.push(f.a.createElement(c,Object.assign({key:s.name,depth:n+1,name:s.name,src:s.value,namespace:u.concat(s.name),type:"array",parent_type:d},t)))}else h.push(f.a.createElement(_e,Object.assign({key:s.name+"_"+u,variable:s,singleIndent:5,namespace:u,type:i.props.type},t)))})),h};var r=s.getState(e);return i.state=n(n({},r),{},{prevProps:{}}),i}return l(s,[{key:"getBraceStart",value:function(e,t){var s=this,i=this.props,r=i.src,n=i.theme,a=i.iconStyle;if("array_group"===i.parent_type)return f.a.createElement("span",null,f.a.createElement("span",T(n,"brace"),"array"===e?"[":"{"),t?this.getObjectMetaData(r):null);var o=t?Se:Ie;return f.a.createElement("span",null,f.a.createElement("span",Object.assign({onClick:function(e){s.toggleCollapsed()}},T(n,"brace-row")),f.a.createElement("div",Object.assign({className:"icon-container"},T(n,"icon-container")),f.a.createElement(o,{theme:n,iconStyle:a})),f.a.createElement(Pe,this.props),f.a.createElement("span",T(n,"brace"),"array"===e?"[":"{")),t?this.getObjectMetaData(r):null)}},{key:"render",value:function(){var e=this,t=this.props,s=t.depth,i=t.src,r=(t.namespace,t.name,t.type,t.parent_type),a=t.theme,o=t.jsvRoot,l=t.iconStyle,u=x(t,["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle"]),d=this.state,h=d.object_type,c=d.expanded,p={};return o||"array_group"===r?"array_group"===r&&(p.borderLeft=0,p.display="inline"):p.paddingLeft=5*this.props.indentWidth,f.a.createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return e.setState(n(n({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(n(n({},e.state),{},{hovered:!1}))}},T(a,o?"jsv-root":"objectKeyVal",p)),this.getBraceStart(h,c),c?this.getObjectContent(s,i,n({theme:a,iconStyle:l},u)):this.getEllipsis(),f.a.createElement("span",{className:"brace-row"},f.a.createElement("span",{style:n(n({},T(a,"brace").style),{},{paddingLeft:c?"3px":"0px"})},"array"===h?"]":"}"),c?null:this.getObjectMetaData(i)))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var i=t.prevProps;return e.src!==i.src||e.collapsed!==i.collapsed||e.name!==i.name||e.namespace!==i.namespace||e.rjvId!==i.rjvId?n(n({},s.getState(e)),{},{prevProps:e}):null}}]),s}(f.a.PureComponent);Re.getState=function(e){var t=Object.keys(e.src).length,s=(!1===e.collapsed||!0!==e.collapsed&&e.collapsed>e.depth)&&(!e.shouldCollapse||!1===e.shouldCollapse({name:e.name,src:e.src,type:V(e.src),namespace:e.namespace}))&&0!==t;return{expanded:B.get(e.rjvId,e.namespace,"expanded",s),object_type:"array"===e.type?"array":"object",parent_type:"array"===e.type?"array":"object",size:t,hovered:!1}};var ke=function e(t,s){a(this,e),this.name=t,this.value=s,this.type=V(s)};w(Re);var De=Re,Le=function(e){d(s,e);var t=g(s);function s(){var e;a(this,s);for(var i=arguments.length,r=new Array(i),n=0;nt.groupArraysAfterLength&&(i=Te),f.a.createElement("div",{className:"pretty-json-container object-container"},f.a.createElement("div",{className:"object-content"},f.a.createElement(i,Object.assign({namespace:s,depth:0,jsvRoot:!0},t))))},e}return s}(f.a.PureComponent),Ae=function(e){d(s,e);var t=g(s);function s(e){var i;return a(this,s),(i=t.call(this,e)).closeModal=function(){M.dispatch({rjvId:i.props.rjvId,name:"RESET"})},i.submit=function(){i.props.submit(i.state.input)},i.state={input:e.input?e.input:""},i}return l(s,[{key:"render",value:function(){var e=this,t=this.props,s=t.theme,i=t.rjvId,r=t.isValid,n=this.state.input,a=r(n);return f.a.createElement("div",Object.assign({className:"key-modal-request"},T(s,"key-modal-request"),{onClick:this.closeModal}),f.a.createElement("div",Object.assign({},T(s,"key-modal"),{onClick:function(e){e.stopPropagation()}}),f.a.createElement("div",T(s,"key-modal-label"),"Key Name:"),f.a.createElement("div",{style:{position:"relative"}},f.a.createElement("input",Object.assign({},T(s,"key-modal-input"),{className:"key-modal-input",ref:function(e){return e&&e.focus()},spellCheck:!1,value:n,placeholder:"...",onChange:function(t){e.setState({input:t.target.value})},onKeyPress:function(t){a&&"Enter"===t.key?e.submit():"Escape"===t.key&&e.closeModal()}})),a?f.a.createElement(we,Object.assign({},T(s,"key-modal-submit"),{className:"key-modal-submit",onClick:function(t){return e.submit()}})):null),f.a.createElement("span",T(s,"key-modal-cancel"),f.a.createElement(ye,Object.assign({},T(s,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){M.dispatch({rjvId:i,name:"RESET"})}})))))}}]),s}(f.a.PureComponent),je=function(e){d(s,e);var t=g(s);function s(){var e;a(this,s);for(var i=arguments.length,r=new Array(i),o=0;o0||!/\d{4}-\d{2}-\d{2}/.test(s)||isNaN(new Date(s).getTime()))||(t+="T00:00:00");const i=new Date(t);return Ps.onDateCreated(i,e,t)}class ue{static isValueEmpty(e){if(Array.isArray(e)&&0===e.length)return!0;if(e&&ue.isValueObject(e)&&e.constructor===Object){for(var t in e)if(!ue.isValueEmpty(e[t]))return!1;return!0}return!e&&0!==e&&!1!==e}static isValueUndefined(e){return null==e||"number"==typeof e&&isNaN(e)}static isArrayContainsEqual(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var s=0;s-1){let s=this.getNumberFromStr(e,i),r=this.getNumberFromStr(t,i);if(!Number.isNaN(s)&&!Number.isNaN(r)&&s!==r)return s>r?1:-1}return e>t?1:-1}static isTwoValueEquals(e,t,s=!1,i,r){if(e===t)return!0;if(Array.isArray(e)&&0===e.length&&void 0===t)return!0;if(Array.isArray(t)&&0===t.length&&void 0===e)return!0;if(null==e&&""===t)return!0;if(null==t&&""===e)return!0;if(void 0===r&&(r=Ps.comparator.trimStrings),void 0===i&&(i=Ps.comparator.caseSensitive),"string"==typeof e&&"string"==typeof t){const s=Ps.comparator.normalizeTextCallback;return e=s(e,"compare"),t=s(t,"compare"),r&&(e=e.trim(),t=t.trim()),i||(e=e.toLowerCase(),t=t.toLowerCase()),e===t}if(e instanceof Date&&t instanceof Date)return e.getTime()==t.getTime();if(ue.isConvertibleToNumber(e)&&ue.isConvertibleToNumber(t)&&parseInt(e)===parseInt(t)&&parseFloat(e)===parseFloat(t))return!0;if(!ue.isValueEmpty(e)&&ue.isValueEmpty(t)||ue.isValueEmpty(e)&&!ue.isValueEmpty(t))return!1;if((!0===e||!1===e)&&"string"==typeof t)return e.toString()===t.toLocaleLowerCase();if((!0===t||!1===t)&&"string"==typeof e)return t.toString()===e.toLocaleLowerCase();if(!ue.isValueObject(e)&&!ue.isValueObject(t))return e==t;if(!ue.isValueObject(e)||!ue.isValueObject(t))return!1;if(e.equals&&t.equals)return e.equals(t);if(Array.isArray(e)&&Array.isArray(t))return ue.isArraysEqual(e,t,s,i,r);for(var n in e)if(e.hasOwnProperty(n)){if(!t.hasOwnProperty(n))return!1;if(!this.isTwoValueEquals(e[n],t[n],s,i,r))return!1}for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}static randomizeArray(e){for(var t=e.length-1;t>0;t--){var s=Math.floor(Math.random()*(t+1)),i=e[t];e[t]=e[s],e[s]=i}return e}static getUnbindValue(e){if(Array.isArray(e)){const t=[];for(let s=0;s32?NaN:parseInt(e);if(e.length>15&&ue.isDigitsOnly(e))return NaN;if(ue.isStringHasOperator(e))return NaN}e=this.prepareStringToNumber(e);const t=parseFloat(e);return isNaN(t)||!isFinite(e)?NaN:t}static isStringHasOperator(e){if(e.lastIndexOf("-")>0)return!1;if(e.lastIndexOf("+")>0)return!1;const t="*^/%";for(let s=0;s<4;s++)if(e.indexOf(t[s])>-1)return!0;return!1}static prepareStringToNumber(e){if("string"!=typeof e||!e)return e;let t=e.indexOf(",");return t>-1&&e.indexOf(",",t+1)<0?e.replace(",","."):e}static getMaxLength(e,t){return e<0&&(e=t),e>0?e:null}static getRemainingCharacterCounterText(e,t){if(!t||t<=0||!Ps.showMaxLengthIndicator)return"";return[e?e.length:"0",t].join("/")}static getNumberByIndex(e,t,s){if(e<0)return"";var i=1,r="",n=".",a=!0,o="A",l="";const u=e=>{if(!e)return!1;for(var t=0;t=0&&c();)d--;var p="";for(d=0&&!c()&&(d--,h););o=l.substring(d+1),r=l.substring(0,d+1),parseInt(o)?i=parseInt(o):1==o.length&&(a=!1),(p||r)&&(n=p)}if(s>-1&&u(r)&&(r=this.getNumberByIndex(s,r)),a){let t=(e+i).toString();for(;t.length="0"&&e<="9"}static isDigitsOnly(e){if(!e)return!1;for(let t=0;t1&&t[1].length||0}return 0}static correctAfterPlusMinis(e,t,s){const i=ue.countDecimals(e),r=ue.countDecimals(t);if(i>0||r>0){const e=Math.max(i,r);s=parseFloat(s.toFixed(e))}return s}static sumAnyValues(e,t){if(!ue.isNumber(e)||!ue.isNumber(t)){if(Array.isArray(e)&&Array.isArray(t))return[].concat(e).concat(t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)?e:t,r=i===e?t:e;if("string"==typeof r){const t=i.join(", ");return i===e?t+r:r+t}if("number"==typeof r){let e=0;for(var s=0;s0&&(s=parseFloat(s.toFixed(i))),s}static convertArrayValueToObject(e,t,s=void 0){const i=new Array;if(!e||!Array.isArray(e))return i;for(var r=0;re<10?"0"+e.toString():e.toString();return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())}static convertDateTimeToString(e){const t=e=>e<10?"0"+e.toString():e.toString();return this.convertDateToString(e)+" "+t(e.getHours())+":"+t(e.getMinutes())}static convertValToQuestionVal(e,t){return e instanceof Date?"datetime-local"===t?ue.convertDateTimeToString(e):ue.convertDateToString(e):this.getUnbindValue(e)}static compareVerions(e,t){if(!e&&!t)return 0;const s=e.split("."),i=t.split("."),r=s.length,n=i.length;for(let e=0;e{const t=this.locales[e];t&&s.push(t)},r=e=>{if(!e)return;i(e);const t=e.indexOf("-");t<1||(e=e.substring(0,t),i(e))};r(t),r(this.currentLocale),r(this.defaultLocale),"en"!==this.defaultLocale&&i("en");for(let t=0;t0){s={};for(var i=0;ithis.getLocaleName(e).toLowerCase();return t.sort(((e,t)=>{var s=n(e),i=n(t);return s===i?0:s{if(t&&"object"==typeof t&&t.type===ct.ComputedUpdaterType){pt.startCollectDependencies((()=>e[s]=t.updater()),e,s);const i=t.updater(),r=pt.finishCollectDependencies();return t.setDependencies(r),e.dependencies[s]&&e.dependencies[s].dispose(),e.dependencies[s]=t,i}return t};e&&e.localizable?(Object.defineProperty(t,s,{get:function(){return function(e,t,s){ce(e,t,s);let i=e.getLocalizableStringText(s);if(i)return i;if("object"==typeof t.localizable&&t.localizable.defaultStr){const s=e.getLocale?e.getLocale():"";return he(t.localizable.defaultStr,s)}return""}(this,e,s)},set:function(t){ce(this,e,s);const r=i(this,t);this.setLocalizableStringText(s,r),e&&e.onSet&&e.onSet(r,this)}}),Object.defineProperty(t,"object"==typeof e.localizable&&e.localizable.name?e.localizable.name:"loc"+s.charAt(0).toUpperCase()+s.slice(1),{get:function(){return ce(this,e,s),this.getLocalizableString(s)}})):Object.defineProperty(t,s,{get:function(){let t=null;return e&&("function"==typeof e.getDefaultValue&&(t=e.getDefaultValue(this)),void 0!==e.defaultValue&&(t=e.defaultValue)),this.getPropertyValue(s,t)},set:function(t){const r=i(this,t),n=this.getPropertyValue(s);r!==n&&(this.setPropertyValue(s,r),e&&e.onSet&&e.onSet(r,this,n))}})}}function me(e,t,s){e.ensureArray(s,((s,i)=>{const r=t?t.onPush:null;r&&r(s,i,e)}),((s,i)=>{const r=t?t.onRemove:null;r&&r(s,i,e)}))}function ge(e){return function(t,s){Object.defineProperty(t,s,{get:function(){return me(this,e,s),this.getPropertyValue(s)},set:function(t){me(this,e,s);const i=this.getPropertyValue(s);t!==i&&(i?i.splice(0,i.length,...t||[]):this.setPropertyValue(s,t),e&&e.onSet&&e.onSet(t,this))}})}}de.locales.en={pagePrevText:"Previous",pageNextText:"Next",completeText:"Complete",previewText:"Preview",editText:"Edit",startSurveyText:"Start",otherItemText:"Other (describe)",noneItemText:"None",refuseItemText:"Refuse to answer",dontKnowItemText:"Don't know",selectAllItemText:"Select All",deselectAllItemText:"Deselect all",progressText:"Page {0} of {1}",indexText:"{0} of {1}",panelDynamicProgressText:"{0} of {1}",panelDynamicTabTextFormat:"Panel {panelIndex}",questionsProgressText:"Answered {0}/{1} questions",emptySurvey:"The survey doesn't contain any visible elements.",completingSurvey:"Thank you for completing the survey",completingSurveyBefore:"You have already completed this survey.",loadingSurvey:"Loading Survey...",placeholder:"Select...",ratingOptionsCaption:"Select...",value:"value",requiredError:"Response required.",requiredErrorInPanel:"Response required: answer at least one question.",requiredInAllRowsError:"Response required: answer questions in all rows.",eachRowUniqueError:"Each row must have a unique value.",numericError:"The value should be numeric.",minError:"The value should not be less than {0}",maxError:"The value should not be greater than {0}",textNoDigitsAllow:"Numbers are not allowed.",textMinLength:"Please enter at least {0} character(s).",textMaxLength:"Please enter no more than {0} character(s).",textMinMaxLength:"Please enter at least {0} and no more than {1} characters.",minRowCountError:"Please fill in at least {0} row(s).",minSelectError:"Please select at least {0} option(s).",maxSelectError:"Please select no more than {0} option(s).",numericMinMax:"The '{0}' should be at least {1} and at most {2}",numericMin:"The '{0}' should be at least {1}",numericMax:"The '{0}' should be at most {1}",invalidEmail:"Please enter a valid e-mail address.",invalidExpression:"The expression: {0} should return 'true'.",urlRequestError:"The request returned error '{0}'. {1}",urlGetChoicesError:"The request returned empty data or the 'path' property is incorrect",exceedMaxSize:"The file size should not exceed {0}.",noUploadFilesHandler:"Files cannot be uploaded. Please add a handler for the 'onUploadFiles' event.",otherRequiredError:"Response required: enter another value.",uploadingFile:"Your file is uploading. Please wait several seconds and try again.",loadingFile:"Loading...",chooseFile:"Choose file(s)...",noFileChosen:"No file selected",filePlaceholder:"Drag and drop a file here or click the button below to select a file to upload.",confirmDelete:"Are you sure you want to delete this record?",keyDuplicationError:"This value should be unique.",addColumn:"Add Column",addRow:"Add Row",removeRow:"Remove",noRowsText:"There are no rows.",addPanel:"Add new",removePanel:"Remove",showDetails:"Show Details",hideDetails:"Hide Details",choices_Item:"item",choices_Choice:"Choice option",matrix_column:"Column",matrix_row:"Row",multipletext_itemname:"text",savingData:"The results are being saved on the server...",savingDataError:"An error occurred and we could not save the results.",savingDataSuccess:"The results were saved successfully!",savingExceedSize:"Your response exceeds 64KB. Please reduce the size of your file(s) and try again or contact the survey owner.",saveAgainButton:"Try again",timerMin:"min",timerSec:"sec",timerSpentAll:"You have spent {0} on this page and {1} in total.",timerSpentPage:"You have spent {0} on this page.",timerSpentSurvey:"You have spent {0} in total.",timerLimitAll:"You have spent {0} of {1} on this page and {2} of {3} in total.",timerLimitPage:"You have spent {0} of {1} on this page.",timerLimitSurvey:"You have spent {0} of {1} in total.",clearCaption:"Clear",signaturePlaceHolder:"Sign here",signaturePlaceHolderReadOnly:"No signature",chooseFileCaption:"Select File",takePhotoCaption:"Take Photo",photoPlaceholder:"Click the button below to take a photo using the camera.",fileOrPhotoPlaceholder:"Drag and drop or select a file to upload or take a photo using the camera.",replaceFileCaption:"Replace file",removeFileCaption:"Remove this file",booleanCheckedLabel:"Yes",booleanUncheckedLabel:"No",confirmRemoveFile:"Are you sure that you want to remove this file: {0}?",confirmRemoveAllFiles:"Are you sure that you want to remove all files?",questionTitlePatternText:"Question Title",modalCancelButtonText:"Cancel",modalApplyButtonText:"Apply",filterStringPlaceholder:"Type to search...",emptyMessage:"No data to display",loadingPage:"Loading...",loadingData:"Loading...",noEntriesText:"No entries yet.\nClick the button below to add a new entry.",noEntriesReadonlyText:"No entries",tabTitlePlaceholder:"New Panel",more:"More",tagboxDoneButtonCaption:"OK",selectToRankEmptyRankedAreaText:"All choices are selected for ranking",selectToRankEmptyUnrankedAreaText:"Drag choices here to rank them",ok:"OK",cancel:"Cancel"},de.localeNames.en="english";class ve{constructor(e,t,s=!1){this.name=t,this.isRequiredValue=!1,this.isUniqueValue=!1,this.isSerializable=!0,this.isLightSerializable=!0,this.isCustom=!1,this.isDynamicChoices=!1,this.isBindable=!1,this.category="",this.categoryIndex=-1,this.visibleIndex=-1,this.maxLength=-1,this.isArray=!1,this.classInfoValue=e,this.isRequiredValue=s,this.idValue=ve.Index++}get id(){return this.idValue}get classInfo(){return this.classInfoValue}get type(){return this.typeValue?this.typeValue:"string"}set type(e){"itemvalues"===e&&(e="itemvalue[]"),"textitems"===e&&(e="textitem[]"),this.typeValue=e,this.typeValue.indexOf("[]")===this.typeValue.length-2&&(this.isArray=!0,this.className=this.typeValue.substring(0,this.typeValue.length-2))}get locationInTable(){return this.locationInTableValue||"column"}set locationInTable(e){this.locationInTableValue=e}get showMode(){const e=this.locationInTableValue;return"detail"===e?"form":"column"===e?"list":""}set showMode(e){this.locationInTable="form"===e?"detail":"list"===e?"column":void 0}get isRequired(){return this.isRequiredValue}set isRequired(e){e!==this.isRequired&&(this.isRequiredValue=e,this.classInfo&&this.classInfo.resetAllProperties())}get isUnique(){return this.isUniqueValue}set isUnique(e){this.isUniqueValue=e}get uniquePropertyName(){return this.uniquePropertyValue}set uniquePropertyName(e){this.uniquePropertyValue=e}isPropertySerializable(e){return this.isSerializableFunc?this.isSerializableFunc(e):this.isSerializable}getDefaultValue(e){let t=this.defaultValueFunc?this.defaultValueFunc(e):this.defaultValueValue;return ve.getItemValuesDefaultValue&&Ie.isDescendantOf(this.className,"itemvalue")&&(t=ve.getItemValuesDefaultValue(this.defaultValueValue||[],this.className)),t}get defaultValue(){return this.getDefaultValue(void 0)}set defaultValue(e){this.defaultValueValue=e}isDefaultValue(e){return this.isDefaultValueByObj(void 0,e)}isDefaultValueByObj(e,t){if(this.isLocalizable)return null==t;const s=this.getDefaultValue(e);return void 0!==s?"object"!=typeof s?s===t:ue.isTwoValueEquals(t,s,!1,!0,!1):!1===t&&("boolean"==this.type||"switch"==this.type)&&!this.defaultValueFunc||""===t||ue.isValueEmpty(t)}getSerializableValue(e,t){if(this.onSerializeValue)return this.onSerializeValue(e);const s=this.getValue(e);return null==s||!t&&this.isDefaultValueByObj(e,s)?void 0:s}getValue(e){return this.onGetValue?(e=this.getOriginalObj(e),this.onGetValue(e)):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].getJson():e[this.name]}getPropertyValue(e){return this.isLocalizable?e[this.serializationProperty]?e[this.serializationProperty].text:null:this.getValue(e)}get hasToUseSetValue(){return this.onSetValue||this.serializationProperty}settingValue(e,t){return!this.onSettingValue||e.isLoadingFromJson?t:this.onSettingValue(e,t)}setValue(e,t,s){this.onSetValue?(e=this.getOriginalObj(e),this.onSetValue(e,t,s)):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].setJson(t,!0):(t&&"string"==typeof t&&("number"==this.type&&(t=parseInt(t)),"boolean"!=this.type&&"switch"!=this.type||(t="true"===t.toLowerCase())),e[this.name]=t)}validateValue(e){const t=this.choices;return!Array.isArray(t)||0===t.length||t.indexOf(e)>-1}getObjType(e){return this.classNamePart?e.replace(this.classNamePart,""):e}get choices(){return this.getChoices(null)}get hasChoices(){return!!this.choicesValue||!!this.choicesfunc}getChoices(e,t=null){return null!=this.choicesValue?this.choicesValue:null!=this.choicesfunc?this.choicesfunc(e,t):null}setChoices(e,t=null){this.choicesValue=e,this.choicesfunc=t}getBaseValue(){return this.baseValue?"function"==typeof this.baseValue?this.baseValue():this.baseValue:""}setBaseValue(e){this.baseValue=e}get readOnly(){return null!=this.readOnlyValue&&this.readOnlyValue}set readOnly(e){this.readOnlyValue=e}isEnable(e){return!this.readOnly&&(!e||!this.enableIf||this.enableIf(this.getOriginalObj(e)))}isVisible(e,t=null){let s=!this.layout||!e||this.layout===e;return!(!this.visible||!s)&&(!this.visibleIf||!t||this.visibleIf(this.getOriginalObj(t)))}getOriginalObj(e){if(e&&e.getOriginalObj){const t=e.getOriginalObj();if(t&&Ie.findProperty(t.getType(),this.name))return t}return e}get visible(){return null==this.visibleValue||this.visibleValue}set visible(e){this.visibleValue=e}isAvailableInVersion(e){return!(!this.alternativeName&&!this.oldName)||this.isAvailableInVersionCore(e)}getSerializedName(e){return this.alternativeName?this.isAvailableInVersionCore(e)?this.name:this.alternativeName||this.oldName:this.name}getSerializedProperty(e,t){return!this.oldName||this.isAvailableInVersionCore(t)?this:e&&e.getType?Ie.findProperty(e.getType(),this.oldName):null}isAvailableInVersionCore(e){return!e||!this.version||ue.compareVerions(this.version,e)<=0}get isLocalizable(){return null!=this.isLocalizableValue&&this.isLocalizableValue}set isLocalizable(e){this.isLocalizableValue=e}get dataList(){return Array.isArray(this.dataListValue)?this.dataListValue:[]}set dataList(e){this.dataListValue=e}mergeWith(e){for(var t=ve.mergableValues,s=0;st.onGetValue?t.onGetValue(e):e.getPropertyValue(t.name,void 0),set:function(s){t.onSetValue?t.onSetValue(e,s,null):e.setPropertyValue(t.name,s)}};Object.defineProperty(e,t.name,i)}}"condition"!==t.type&&"expression"!==t.type||t.onExecuteExpression&&e.addExpressionProperty(t.name,t.onExecuteExpression)}}static checkIsPropertyExists(e,t){return e.hasOwnProperty(t)||e[t]}}fe.properties={},fe.parentClasses={};class be{constructor(e,t,s=null,i=null){this.name=e,this.creator=s,this.parentName=i,e=e.toLowerCase(),this.isCustomValue=!s&&"survey"!==e,this.parentName&&(this.parentName=this.parentName.toLowerCase(),fe.addClass(e,this.parentName),s&&this.makeParentRegularClass()),this.properties=new Array;for(var r=0;re[t.name]=t));const t=this.parentName?Ie.findClass(this.parentName):null;if(t){t.getAllProperties().forEach((t=>{const s=e[t.name];s?(s.mergeWith(t),this.addPropCore(s)):this.addPropCore(t)}))}this.properties.forEach((e=>{this.hashProperties[e.name]||this.addPropCore(e)}))}addPropCore(e){this.allProperties.push(e),this.hashProperties[e.name]=e,e.alternativeName&&(this.hashProperties[e.alternativeName]=e)}isOverridedProp(e){return!!this.parentName&&!!Ie.findProperty(this.parentName,e)}hasRegularChildClass(){if(this.isCustom){this.isCustomValue=!1;for(var e=0;e-1&&(i=s.substring(r+1),s=s.substring(0,r));var n=this.getIsPropertyNameRequired(s)||!!e.isRequired;s=this.getPropertyName(s);var a=new ve(this,s,n);if(i&&(a.type=i),"object"==typeof e){if(e.type&&(a.type=e.type),void 0!==e.default&&(a.defaultValue=e.default),void 0!==e.defaultFunc&&(a.defaultValueFunc=e.defaultFunc),ue.isValueEmpty(e.isSerializable)||(a.isSerializable=e.isSerializable),ue.isValueEmpty(e.isSerializableFunc)||(a.isSerializableFunc=e.isSerializableFunc),ue.isValueEmpty(e.isLightSerializable)||(a.isLightSerializable=e.isLightSerializable),ue.isValueEmpty(e.maxLength)||(a.maxLength=e.maxLength),void 0!==e.displayName&&(a.displayName=e.displayName),ue.isValueEmpty(e.category)||(a.category=e.category),ue.isValueEmpty(e.categoryIndex)||(a.categoryIndex=e.categoryIndex),ue.isValueEmpty(e.nextToProperty)||(a.nextToProperty=e.nextToProperty),ue.isValueEmpty(e.overridingProperty)||(a.overridingProperty=e.overridingProperty),ue.isValueEmpty(e.visibleIndex)||(a.visibleIndex=e.visibleIndex),ue.isValueEmpty(e.showMode)||(a.showMode=e.showMode),ue.isValueEmpty(e.locationInTable)||(a.locationInTable=e.locationInTable),ue.isValueEmpty(e.maxValue)||(a.maxValue=e.maxValue),ue.isValueEmpty(e.minValue)||(a.minValue=e.minValue),ue.isValueEmpty(e.dataList)||(a.dataList=e.dataList),ue.isValueEmpty(e.isDynamicChoices)||(a.isDynamicChoices=e.isDynamicChoices),ue.isValueEmpty(e.isBindable)||(a.isBindable=e.isBindable),ue.isValueEmpty(e.isUnique)||(a.isUnique=e.isUnique),ue.isValueEmpty(e.uniqueProperty)||(a.uniquePropertyName=e.uniqueProperty),ue.isValueEmpty(e.isArray)||(a.isArray=e.isArray),!0!==e.visible&&!1!==e.visible||(a.visible=e.visible),e.visibleIf&&(a.visibleIf=e.visibleIf),e.enableIf&&(a.enableIf=e.enableIf),e.onExecuteExpression&&(a.onExecuteExpression=e.onExecuteExpression),e.onPropertyEditorUpdate&&(a.onPropertyEditorUpdate=e.onPropertyEditorUpdate),!0===e.readOnly&&(a.readOnly=!0),!0===e.availableInMatrixColumn&&(a.availableInMatrixColumn=!0),e.choices){var o="function"==typeof e.choices?e.choices:null,l="function"!=typeof e.choices?e.choices:null;a.setChoices(l,o)}e.baseValue&&a.setBaseValue(e.baseValue),e.onSerializeValue&&(a.onSerializeValue=e.onSerializeValue),e.onGetValue&&(a.onGetValue=e.onGetValue),e.onSetValue&&(a.onSetValue=e.onSetValue),e.onSettingValue&&(a.onSettingValue=e.onSettingValue),e.isLocalizable&&(e.serializationProperty="loc"+a.name),e.serializationProperty&&(a.serializationProperty=e.serializationProperty,a.serializationProperty&&0==a.serializationProperty.indexOf("loc")&&(a.isLocalizable=!0)),e.isLocalizable&&(a.isLocalizable=e.isLocalizable),e.className&&(a.className=e.className),e.baseClassName&&(a.baseClassName=e.baseClassName,a.isArray=!0),!0===a.isArray&&(a.isArray=!0),e.classNamePart&&(a.classNamePart=e.classNamePart),e.alternativeName&&(a.alternativeName=e.alternativeName),e.oldName&&(a.oldName=e.oldName),e.layout&&(a.layout=e.layout),e.version&&(a.version=e.version),e.dependsOn&&this.addDependsOnProperties(a,e.dependsOn)}return this.properties.push(a),t&&!this.isOverridedProp(a.name)&&(a.isCustom=!0,fe.addProperty(this.name,a)),a}}addDependsOnProperties(e,t){const s=Array.isArray(t)?t:[t];e.dependsOn=s;for(var i=0;i0&&e[0]==be.requiredSymbol}getPropertyName(e){return this.getIsPropertyNameRequired(e)?e=e.slice(1):e}}be.requiredSymbol="!",be.typeSymbol=":";class ye{constructor(e,t){this.type=e,this.message=t,this.description="",this.at=-1,this.end=-1}getFullDescription(){return this.message+(this.description?"\n"+this.description:"")}}class Ce extends ye{constructor(e,t){super("unknownproperty","Unknown property in class '"+t+"': '"+e+"'."),this.propertyName=e,this.className=t}}class we extends ye{constructor(e,t,s){super(t,s),this.baseClassName=e,this.type=t,this.message=s}}class xe extends we{constructor(e,t){super(t,"missingtypeproperty","The property type is missing in the object. Please take a look at property: '"+e+"'."),this.propertyName=e,this.baseClassName=t}}class Ve extends we{constructor(e,t){super(t,"incorrecttypeproperty","The property type is incorrect in the object. Please take a look at property: '"+e+"'."),this.propertyName=e,this.baseClassName=t}}class _e extends ye{constructor(e,t){super("requiredproperty","The property '"+e+"' is required in class '"+t+"'."),this.propertyName=e,this.className=t}}class Ee extends ye{constructor(e,t){super("arrayproperty","The property '"+e+"' should be an array in '"+t+"'."),this.propertyName=e,this.className=t}}class Pe extends ye{constructor(e,t){super("incorrectvalue","The property value: '"+t+"' is incorrect for property '"+e.name+"'."),this.property=e,this.value=t}}class Se{constructor(){this.errors=new Array,this.lightSerializing=!1}static get metaData(){return Se.metaDataValue}toJsonObject(e,t){return this.toJsonObjectCore(e,null,t)}toObject(e,t,s){this.toObjectCore(e,t,s);var i=this.getRequiredError(t,e);i&&this.addNewError(i,e,t)}toObjectCore(e,t,s){if(!e)return;var i=null,r=void 0,n=!0;if(t.getType&&(r=t.getType(),i=Ie.getProperties(r),n=!!r&&!Ie.isDescendantOf(r,"itemvalue")),!i)return;t.startLoadingFromJson&&t.startLoadingFromJson(e),i=this.addDynamicProperties(t,e,i),this.options=s;const a={};a[Se.typePropertyName]=!0;const o={};for(var l in e)this.setPropertyValueToObj(e,t,l,i,a,o,r,n,s);this.options=void 0,t.endLoadingFromJson&&t.endLoadingFromJson()}setPropertyValueToObj(e,t,s,i,r,n,a,o,l){if(r[s])return;if(s===Se.positionPropertyName)return void(t[s]=e[s]);const u=this.findProperty(i,s);if(!u&&o&&this.addNewError(new Ce(s.toString(),a),e,t),u){const o=u.dependsOn;Array.isArray(o)&&(n[s]=!0,o.forEach((s=>{n[s]||this.setPropertyValueToObj(e,t,s,i,r,n,a,!1,l)}))),this.valueToObj(e[s],t,u,e,l),r[s]=!0}}toJsonObjectCore(e,t,s){if(!e||!e.getType)return e;if(!e.isSurvey&&"function"==typeof e.getData)return e.getData();var i={};null==t||t.className||(i[Se.typePropertyName]=t.getObjType(e.getType()));const r=!0===s;return s&&!0!==s||(s={}),r&&(s.storeDefaults=r),this.propertiesToJson(e,Ie.getProperties(e.getType()),i,s),this.propertiesToJson(e,this.getDynamicProperties(e),i,s),i}getDynamicProperties(e){return Ie.getDynamicPropertiesByObj(e)}addDynamicProperties(e,t,s){if(!e.getDynamicPropertyName&&!e.getDynamicProperties)return s;if(e.getDynamicPropertyName){const i=e.getDynamicPropertyName();if(!i)return s;i&&t[i]&&(e[i]=t[i])}const i=this.getDynamicProperties(e);return 0===i.length?s:[].concat(s).concat(i)}propertiesToJson(e,t,s,i){for(var r=0;r0?a:null}else n=this.toJsonObjectCore(n,s,i);if(null==n)return;const l=s.getSerializedName(i.version);var u="function"==typeof e.getPropertyValue&&null!==e.getPropertyValue(l,null);(i.storeDefaults&&u||!s.isDefaultValueByObj(e,n))&&(Ie.onSerializingProperty&&Ie.onSerializingProperty(e,s,n,t)||(t[l]=this.removePosOnValueToJson(s,n)))}valueToObj(e,t,s,i,r){if(null!=e)if(this.removePos(s,e),null!=s&&s.hasToUseSetValue)s.setValue(t,e,this);else{if(s.isArray&&!Array.isArray(e)&&e){e=[e];const r=i&&s.alternativeName&&i[s.alternativeName]?s.alternativeName:s.name;this.addNewError(new Ee(r,t.getType()),i||e,t)}if(this.isValueArray(e))this.valueToArray(e,t,s.name,s,r);else{var n=this.createNewObj(e,s);n.newObj&&(this.toObjectCore(e,n.newObj,r),e=n.newObj),n.error||(null!=s?(s.setValue(t,e,this),r&&r.validatePropertyValues&&(s.validateValue(e)||this.addNewError(new Pe(s,e),i,t))):t[s.name]=e)}}}removePosOnValueToJson(e,t){return e.isCustom&&t?(this.removePosFromObj(t),t):t}removePos(e,t){!e||!e.type||e.type.indexOf("value")<0||this.removePosFromObj(t)}removePosFromObj(e){if(e&&"function"!=typeof e.getType){if(Array.isArray(e))for(var t=0;t0&&t[s].splice(0,t[s].length);var n=t[s]?t[s]:[];this.addValuesIntoArray(e,n,i,r),t[s]||(t[s]=n)}}addValuesIntoArray(e,t,s,i){for(var r=0;r-1&&this.childrenClasses[t.parentName].splice(s,1)}}overrideClassCreatore(e,t){this.overrideClassCreator(e,t)}overrideClassCreator(e,t){e=e.toLowerCase();var s=this.findClass(e);s&&(s.creator=t)}getProperties(e){var t=this.findClass(e);return t?t.getAllProperties():[]}getPropertiesByObj(e){const t=e&&e.getType?e.getType():void 0;if(!t)return[];const s=this.getProperties(t),i=this.getDynamicPropertiesByObj(e);for(let e=i.length-1;e>=0;e--)this.findProperty(t,i[e].name)&&i.splice(e,1);return 0===i.length?s:[].concat(s).concat(i)}addDynamicPropertiesIntoObj(e,t,s){s.forEach((s=>{this.addDynamicPropertyIntoObj(e,t,s.name,!1),s.serializationProperty&&this.addDynamicPropertyIntoObj(e,t,s.serializationProperty,!0),s.alternativeName&&this.addDynamicPropertyIntoObj(e,t,s.alternativeName,!1)}))}addDynamicPropertyIntoObj(e,t,s,i){var r={configurable:!0,get:function(){return t[s]}};i||(r.set=function(e){t[s]=e}),Object.defineProperty(e,s,r)}getDynamicPropertiesByObj(e,t=null){if(!e||!e.getType)return[];if(e.getDynamicProperties)return e.getDynamicProperties();if(!e.getDynamicType&&!t)return[];const s=t||e.getDynamicType();return this.getDynamicPropertiesByTypes(e.getType(),s)}getDynamicPropertiesByTypes(e,t,s){if(!t)return[];const i=t+"-"+e;if(this.dynamicPropsCache[i])return this.dynamicPropsCache[i];var r=this.getProperties(t);if(!r||0==r.length)return[];const n={},a=this.getProperties(e);for(var o=0;o{t&&(e[t]={type:"string"})})))}return{$id:"locstring",type:"object",properties:e}}generateSchemaProperties(e,t,s,i){if(!e)return;const r=t.properties,n=[];"question"===e.name&&(r.type={type:"string"},n.push("type"));for(let t=0;t0&&(t.required=n)}generateSchemaProperty(e,t,s){if(e.isLocalizable)return{oneOf:[{type:"string"},{$ref:this.getChemeRefName("locstring",s)}]};const i=e.schemaType(),r=e.schemaRef();var n={};if(i&&(n.type=i),e.hasChoices){const t=e.getChoices(null);Array.isArray(t)&&t.length>0&&(n.enum=this.getChoicesValues(t))}if(r&&("array"===i?"string"===e.className?n.items={type:e.className}:n.items={$ref:this.getChemeRefName(e.className,s)}:n.$ref=this.getChemeRefName(r,s),this.generateChemaClass(e.className,t,!1)),e.baseClassName){var a=this.getChildrenClasses(e.baseClassName,!0);"question"==e.baseClassName&&a.push(this.findClass("panel")),n.items={anyOf:[]};for(var o=0;o{"object"==typeof e&&void 0!==e.value?t.push(e.value):t.push(e)})),t}};var Ie=Se.metaData;const Te="@survey";class Re{constructor(){this.values=null,this.properties=null,this.asyncValues={}}getFirstName(e,t=null){if(!e)return e;var s="";if(t&&(s=this.getFirstPropertyName(e,t)))return s;for(var i=0;i1&&"length"==e.path[e.path.length-1]&&(e.hasValue=!0,e.value=0));var t=this.getValueCore(e.name,this.values);e.value=t.value,e.hasValue=t.hasValue,e.path=t.hasValue?t.path:null,e.sctrictCompare=t.sctrictCompare}isAnyKeyChanged(e,t){for(var s=0;s=t.length)return null;t=t[i],s++}return t}getValueCore(e,t){const s=this.getQuestionDirectly(e);if(s)return{hasValue:!0,value:s.value,path:[e],sctrictCompare:s.requireStrictCompare};const i=this.getValueFromValues(e,t);if(e&&!i.hasValue){const t=this.getValueFromSurvey(e);void 0!==t&&(i.hasValue=!0,i.value=t,i.path=[Te,e])}return i}getQuestionDirectly(e){if(this.properties&&this.properties.survey)return this.properties.survey.getQuestionByValueName(e)}getValueFromSurvey(e){if(this.properties&&this.properties.survey)return this.properties.survey.getBuiltInVariableValue(e.toLocaleLowerCase())}getValueFromValues(e,t){var s={hasValue:!1,value:null,path:null},i=t;if(!i&&0!==i&&!1!==i)return s;e&&e.lastIndexOf(".length")>-1&&e.lastIndexOf(".length")===e.length-7&&(s.value=0,s.hasValue=!0);var r=this.getNonNestedObject(i,e,!1);return r?(s.path=r.path,s.value=r.text?this.getObjectValue(r.value,r.text):r.value,s.hasValue=!ue.isValueEmpty(s.value),s):s}getNonNestedObject(e,t,s){const i=new Array;let r=0,n=this.getNonNestedObjectCore(e,t,s,i);for(;!n&&r=e.length?null:{value:e[s],text:t,index:s}}getFirstPropertyName(e,t,s=!1,i=void 0){if(!e)return e;if(t||(t={}),t.hasOwnProperty(e))return e;var r=e.toLowerCase(),n=r[0],a=n.toUpperCase();for(var o in t)if(!(Array.isArray(i)&&i.indexOf(o)>-1)){var l=o[0];if(l===a||l===n){var u=o.toLowerCase();if(u==r)return o;if(r.length<=u.length)continue;var d=r[u.length];if("."!=d&&"["!=d)continue;if(u==r.substring(0,u.length))return o}}if(s&&"["!==e[0]){var h=e.indexOf(".");return h>-1&&(t[e=e.substring(0,h)]={}),e}return""}getObjectValue(e,t){return t?e[t]:null}getIntValue(e){return"0"==e||(0|e)>0&&e%1==0?Number(e):-1}}class ke{static disposedObjectChangedProperty(e,t){ke.warn('An attempt to set a property "'+e+'" of a disposed object "'+t+'"')}static inCorrectQuestionValue(e,t){const s=JSON.stringify(t,null,3);ke.warn("An attempt to assign an incorrect value"+s+' to the following question: "'+e+'"')}static warn(e){console.warn(e)}static error(e){console.error(e)}}class De{constructor(){this.functionHash={},this.isAsyncHash={}}register(e,t,s=!1){this.functionHash[e]=t,s&&(this.isAsyncHash[e]=!0)}unregister(e){delete this.functionHash[e],delete this.isAsyncHash[e]}hasFunction(e){return!!this.functionHash[e]}isAsyncFunction(e){return!!this.isAsyncHash[e]}clear(){this.functionHash={}}getAll(){var e=[];for(var t in this.functionHash)e.push(t);return e.sort()}run(e,t,s=null,i){var r=this.functionHash[e];if(!r)return ke.warn("Unknown function name: "+e),null;let n={func:r};if(s)for(var a in s)n[a]=s[a];return n.func(t,i)}}function Le(e,t){if(null!=e)if(Array.isArray(e))for(var s=0;ss[r]&&(i=s[r]):i3)return null;const s=e[0];if(!s)return null;if(!Array.isArray(s)&&!Array.isArray(Object.keys(s)))return null;const i=e[1];if("string"!=typeof i&&!(i instanceof String))return null;let r=e.length>2?e[2]:void 0;if("string"==typeof r||r instanceof String||(r=void 0),!r){const e=Array.isArray(t)&&t.length>2?t[2]:void 0;e&&e.toString()&&(r=e.toString())}return{data:s,name:i,expression:r}}(e,t);if(!r)return;let n=r.expression?new lt(r.expression):void 0;n&&n.isAsync&&(n=void 0);var a=void 0;if(Array.isArray(r.data))for(var o=0;o1&&!ue.isValueEmpty(t[1])?e.getDisplayValue(!0,t[1]):e.displayValue}De.Instance=new De,De.Instance.register,De.Instance.register("sum",Ae),De.Instance.register("min",(function(e){return je(e,!0)})),De.Instance.register("max",(function(e){return je(e,!1)})),De.Instance.register("count",(function(e){var t=[];return Le(e,t),t.length})),De.Instance.register("avg",(function(e){var t=[];Le(e,t);const s=Ae(e);return t.length>0?s/t.length:0})),De.Instance.register("sumInArray",Ne),De.Instance.register("minInArray",(function(e,t){return qe(e,t,(function(e,t){return null==e?t:null==t||null==t||et?e:t}))})),De.Instance.register("countInArray",Me),De.Instance.register("avgInArray",(function(e,t){var s=Me(e,t);return 0==s?0:Ne(e,t)/s})),De.Instance.register("iif",(function(e){return e||3===e.length?e[0]?e[1]:e[2]:""})),De.Instance.register("getDate",(function(e){return!e&&e.length<1?null:e[0]?le("function-getDate",e[0]):null})),De.Instance.register("age",(function(e){return!Array.isArray(e)||e.length<1||!e[0]?null:Fe(e[0],void 0,(e.length>1?e[1]:"")||"years")})),De.Instance.register("dateDiff",(function(e){if(!Array.isArray(e)||e.length<2||!e[0]||!e[1])return null;const t=(e.length>2?e[2]:"")||"days",s="hours"===t||"minutes"===t,i=s?"days":t;let r=Fe(e[0],e[1],i);if(s){const s=le("function-dateDiffMonths",e[0]),i=le("function-dateDiffMonths",e[1]);i.getHours()>s.getHours()&&(r-=1);let n=24*r+i.getHours()-s.getHours();return"hours"===t?n:(i.getMinutes()1)){for(let e=0;e{t.isReady&&(t.onReadyChanged.remove(s),this.returnResult(Ue(t,e)))};t.onReadyChanged.add(s)}}),!0),De.Instance.register("propertyValue",(function(e){if(2!==e.length||!e[0]||!e[1])return;const t=We(this,e[0]);return t?t[e[1]]:void 0})),De.Instance.register("substring",(function(e){if(e.length<2)return"";const t=e[0];if(!t||"string"!=typeof t)return"";const s=e[1];if(!ue.isNumber(s))return"";const i=e.length>2?e[2]:void 0;return ue.isNumber(i)?t.substring(s,i):t.substring(s)}));class Ge{constructor(){this._id=Ge.counter++}get id(){return this._id}toString(e=void 0){return""}hasFunction(){return!1}hasAsyncFunction(){return!1}addToAsyncList(e){}isEqual(e){return!!e&&e.getType()===this.getType()&&this.isContentEqual(e)}areOperatorsEquals(e,t){return!e&&!t||!!e&&e.isEqual(t)}}Ge.counter=1;class Ze extends Ge{constructor(e,t=null,s=null,i=!1){super(),this.operatorName=e,this.left=t,this.right=s,this.isArithmeticValue=i,this.consumer=i?et.binaryFunctions.arithmeticOp(e):et.binaryFunctions[e],null==this.consumer&&et.throwInvalidOperatorError(e)}get requireStrictCompare(){return this.getIsOperandRequireStrict(this.left)||this.getIsOperandRequireStrict(this.right)}getIsOperandRequireStrict(e){return!!e&&e.requireStrictCompare}getType(){return"binary"}get isArithmetic(){return this.isArithmeticValue}get isConjunction(){return"or"==this.operatorName||"and"==this.operatorName}get conjunction(){return this.isConjunction?this.operatorName:""}get operator(){return this.operatorName}get leftOperand(){return this.left}get rightOperand(){return this.right}isContentEqual(e){const t=e;return t.operator===this.operator&&this.areOperatorsEquals(this.left,t.left)&&this.areOperatorsEquals(this.right,t.right)}evaluateParam(e,t){return null==e?null:e.evaluate(t)}evaluate(e){return this.consumer.call(this,this.evaluateParam(this.left,e),this.evaluateParam(this.right,e),this.requireStrictCompare)}toString(e=void 0){if(e){var t=e(this);if(t)return t}return"("+et.safeToString(this.left,e)+" "+et.operatorToString(this.operatorName)+" "+et.safeToString(this.right,e)+")"}setVariables(e){null!=this.left&&this.left.setVariables(e),null!=this.right&&this.right.setVariables(e)}hasFunction(){return!!this.left&&this.left.hasFunction()||!!this.right&&this.right.hasFunction()}hasAsyncFunction(){return!!this.left&&this.left.hasAsyncFunction()||!!this.right&&this.right.hasAsyncFunction()}addToAsyncList(e){this.left&&this.left.addToAsyncList(e),this.right&&this.right.addToAsyncList(e)}}class Je extends Ge{constructor(e,t){super(),this.expressionValue=e,this.operatorName=t,this.consumer=et.unaryFunctions[t],null==this.consumer&&et.throwInvalidOperatorError(t)}get operator(){return this.operatorName}get expression(){return this.expressionValue}getType(){return"unary"}toString(e=void 0){if(e){var t=e(this);if(t)return t}return et.operatorToString(this.operatorName)+" "+this.expression.toString(e)}isContentEqual(e){const t=e;return t.operator==this.operator&&this.areOperatorsEquals(this.expression,t.expression)}hasFunction(){return this.expression.hasFunction()}hasAsyncFunction(){return this.expression.hasAsyncFunction()}addToAsyncList(e){this.expression.addToAsyncList(e)}evaluate(e){let t=this.expression.evaluate(e);return this.consumer.call(this,t)}setVariables(e){this.expression.setVariables(e)}}class Ke extends Ge{constructor(e){super(),this.values=e}getType(){return"array"}toString(e=void 0){if(e){var t=e(this);if(t)return t}return"["+this.values.map((function(t){return t.toString(e)})).join(", ")+"]"}evaluate(e){return this.values.map((function(t){return t.evaluate(e)}))}setVariables(e){this.values.forEach((t=>{t.setVariables(e)}))}hasFunction(){return this.values.some((e=>e.hasFunction()))}hasAsyncFunction(){return this.values.some((e=>e.hasAsyncFunction()))}addToAsyncList(e){this.values.forEach((t=>t.addToAsyncList(e)))}isContentEqual(e){const t=e;if(t.values.length!==this.values.length)return!1;for(var s=0;s1&&this.isQuote(e[0])&&this.isQuote(e[e.length-1]))return e.substring(1,e.length-1);if(ue.isNumber(e)){if("0"===e[0]&&0!=e.indexOf("0x")){const t=e.length,s=t>1&&("."===e[1]||","===e[1]);if(!s&&t>1||s&&t<2)return e}return ue.getNumber(e)}return e}isContentEqual(e){return e.value==this.value}isQuote(e){return"'"==e||'"'==e}}class Ye extends Xe{static get DisableConversionChar(){return Ps.expressionDisableConversionChar}static set DisableConversionChar(e){Ps.expressionDisableConversionChar=e}constructor(e){super(e),this.variableName=e,this.valueInfo={},this.useValueAsItIs=!1,this.variableName&&this.variableName.length>1&&this.variableName[0]===Ye.DisableConversionChar&&(this.variableName=this.variableName.substring(1),this.useValueAsItIs=!0)}get requireStrictCompare(){return!0===this.valueInfo.sctrictCompare}getType(){return"variable"}toString(e=void 0){if(e){var t=e(this);if(t)return t}return"{"+(this.useValueAsItIs?Ye.DisableConversionChar:"")+this.variableName+"}"}get variable(){return this.variableName}evaluate(e){return this.valueInfo.name=this.variableName,e.getValueInfo(this.valueInfo),this.valueInfo.hasValue?this.getCorrectValue(this.valueInfo.value):null}setVariables(e){e.push(this.variableName)}getCorrectValue(e){return this.useValueAsItIs?e:super.getCorrectValue(e)}isContentEqual(e){return e.variable==this.variable}}class $e extends Ge{constructor(e,t){super(),this.originalValue=e,this.parameters=t,Array.isArray(t)&&0===t.length&&(this.parameters=new Ke([]))}getType(){return"function"}evaluate(e){const t=this.getAsynValue(e);return t?t.value:this.evaluateCore(e)}evaluateCore(e){let t=e.properties;if(this.isAsyncFunction){t=ue.createCopy(e.properties);const s=this.id,i=e.asyncValues,r=e.onCompleteAsyncFunc,n=this;t.returnResult=e=>{i[s]={value:e},r(n)}}return De.Instance.run(this.originalValue,this.parameters.evaluate(e),t,this.parameters.values)}toString(e=void 0){if(e){var t=e(this);if(t)return t}return this.originalValue+"("+this.parameters.toString(e)+")"}setVariables(e){this.parameters.setVariables(e)}isReady(e){return!!this.getAsynValue(e)}getAsynValue(e){return e.asyncValues[this.id]}hasFunction(){return!0}hasAsyncFunction(){return this.isAsyncFunction()||this.parameters.hasAsyncFunction()}isAsyncFunction(){return De.Instance.isAsyncFunction(this.originalValue)}addToAsyncList(e){let t;if(this.isAsyncFunction()&&(t={operand:this}),this.parameters.hasAsyncFunction()){const e=new Array;this.parameters.addToAsyncList(e),e.forEach((e=>e.parent=t)),t||(t={}),t.children=e}t&&e.push(t)}isContentEqual(e){const t=e;return t.originalValue==this.originalValue&&this.areOperatorsEquals(t.parameters,this.parameters)}}class et{static throwInvalidOperatorError(e){throw new Error("Invalid operator: '"+e+"'")}static safeToString(e,t){return null==e?"":e.toString(t)}static toOperandString(e){return!e||ue.isNumber(e)||et.isBooleanValue(e)||(e="'"+e+"'"),e}static isBooleanValue(e){return!!e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())}static countDecimals(e){if(ue.isNumber(e)&&Math.floor(e)!==e){const t=e.toString().split(".");return t.length>1&&t[1].length||0}return 0}static plusMinus(e,t,s){const i=et.countDecimals(e),r=et.countDecimals(t);if(i>0||r>0){const e=Math.max(i,r);s=parseFloat(s.toFixed(e))}return s}static isTwoValueEquals(e,t,s=!0){return"undefined"===e&&(e=void 0),"undefined"===t&&(t=void 0),ue.isTwoValueEquals(e,t,s)}static operatorToString(e){let t=et.signs[e];return null==t?e:t}static convertValForDateCompare(e,t){if(t instanceof Date&&"string"==typeof e){let t=le("expression-operand",e);return t.setHours(0,0,0),t}return e}}et.unaryFunctions={empty:function(e){return ue.isValueEmpty(e)},notempty:function(e){return!et.unaryFunctions.empty(e)},negate:function(e){return!e}},et.binaryFunctions={arithmeticOp(e){const t=(e,t)=>ue.isValueEmpty(e)?"number"==typeof t?0:"string"==typeof e?e:"string"==typeof t?"":Array.isArray(t)?[]:0:e;return function(s,i){s=t(s,i),i=t(i,s);let r=et.binaryFunctions[e];return null==r?null:r.call(this,s,i)}},and:function(e,t){return e&&t},or:function(e,t){return e||t},plus:function(e,t){return ue.sumAnyValues(e,t)},minus:function(e,t){return ue.correctAfterPlusMinis(e,t,e-t)},mul:function(e,t){return ue.correctAfterMultiple(e,t,e*t)},div:function(e,t){return t?e/t:null},mod:function(e,t){return t?e%t:null},power:function(e,t){return Math.pow(e,t)},greater:function(e,t){return null!=e&&null!=t&&(e=et.convertValForDateCompare(e,t))>(t=et.convertValForDateCompare(t,e))},less:function(e,t){return null!=e&&null!=t&&(e=et.convertValForDateCompare(e,t))<(t=et.convertValForDateCompare(t,e))},greaterorequal:function(e,t){return!!et.binaryFunctions.equal(e,t)||et.binaryFunctions.greater(e,t)},lessorequal:function(e,t){return!!et.binaryFunctions.equal(e,t)||et.binaryFunctions.less(e,t)},equal:function(e,t,s){return e=et.convertValForDateCompare(e,t),t=et.convertValForDateCompare(t,e),et.isTwoValueEquals(e,t,!0!==s)},notequal:function(e,t,s){return!et.binaryFunctions.equal(e,t,s)},contains:function(e,t){return et.binaryFunctions.containsCore(e,t,!0)},notcontains:function(e,t){return!e&&!ue.isValueEmpty(t)||et.binaryFunctions.containsCore(e,t,!1)},anyof:function(e,t){if(ue.isValueEmpty(e)&&ue.isValueEmpty(t))return!0;if(ue.isValueEmpty(e)||!Array.isArray(e)&&0===e.length)return!1;if(ue.isValueEmpty(t))return!0;if(!Array.isArray(e))return et.binaryFunctions.contains(t,e);if(!Array.isArray(t))return et.binaryFunctions.contains(e,t);for(var s=0;s-1;return s?i:!i}for(var r=Array.isArray(t)?t:[t],n=0;n",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",and:"and",or:"or",power:"^",mod:"%",negate:"!"};class tt extends Error{static buildMessage(e,t){function s(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(e=>"\\x0"+s(e))).replace(/[\x10-\x1F\x7F-\x9F]/g,(e=>"\\x"+s(e)))}function r(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(e=>"\\x0"+s(e))).replace(/[\x10-\x1F\x7F-\x9F]/g,(e=>"\\x"+s(e)))}function n(e){switch(e.type){case"literal":return'"'+i(e.text)+'"';case"class":const t=e.parts.map((e=>Array.isArray(e)?r(e[0])+"-"+r(e[1]):r(e)));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){const t=e.map(n);let s,i;if(t.sort(),t.length>0){for(s=1,i=1;s=",V=Ts(">=",!1),_="greaterorequal",E=Ts("greaterorequal",!0),P=function(){return"greaterorequal"},S="==",I=Ts("==",!1),T="equal",R=Ts("equal",!0),k=function(){return"equal"},D="=",L=Ts("=",!1),A="!=",j=Ts("!=",!1),O="notequal",q=Ts("notequal",!0),N=function(){return"notequal"},M="<",F=Ts("<",!1),B="less",z=Ts("less",!0),H=function(){return"less"},Q=">",W=Ts(">",!1),U="greater",G=Ts("greater",!0),Z=function(){return"greater"},J="+",K=Ts("+",!1),X=function(){return"plus"},Y="-",$=Ts("-",!1),ee=function(){return"minus"},te="*",se=Ts("*",!1),ie=function(){return"mul"},re="/",ne=Ts("/",!1),ae=function(){return"div"},oe="%",le=Ts("%",!1),ue=function(){return"mod"},de="^",he=Ts("^",!1),ce="power",pe=Ts("power",!0),me=function(){return"power"},ge="*=",ve=Ts("*=",!1),fe="contains",be=Ts("contains",!0),ye="contain",Ce=Ts("contain",!0),we=function(){return"contains"},xe="notcontains",Ve=Ts("notcontains",!0),_e="notcontain",Ee=Ts("notcontain",!0),Pe=function(){return"notcontains"},Se="anyof",Ie=Ts("anyof",!0),Te=function(){return"anyof"},Re="allof",ke=Ts("allof",!0),De=function(){return"allof"},Le="(",Ae=Ts("(",!1),je=")",Oe=Ts(")",!1),qe=function(e){return e},Ne=function(e,t){return new $e(e,t)},Me="!",Fe=Ts("!",!1),Be="negate",ze=Ts("negate",!0),He=function(e){return new Je(e,"negate")},Qe=function(e,t){return new Je(e,t)},We="empty",Ue=Ts("empty",!0),Ge=function(){return"empty"},et="notempty",st=Ts("notempty",!0),it=function(){return"notempty"},rt="undefined",nt=Ts("undefined",!1),at="null",ot=Ts("null",!1),lt=function(){return null},ut=function(e){return new Xe(e)},dt="{",ht=Ts("{",!1),ct="}",pt=Ts("}",!1),mt=function(e){return new Ye(e)},gt=function(e){return e},vt="''",ft=Ts("''",!1),bt=function(){return""},yt='""',Ct=Ts('""',!1),wt="'",xt=Ts("'",!1),Vt=function(e){return"'"+e+"'"},_t='"',Et=Ts('"',!1),Pt="[",St=Ts("[",!1),It="]",Tt=Ts("]",!1),Rt=function(e){return e},kt=",",Dt=Ts(",",!1),Lt=function(e,t){if(null==e)return new Ke([]);var s=[e];if(Array.isArray(t))for(var i=function(e){return[].concat.apply([],e)}(t),r=3;rVs&&(Vs=Cs,_s=[]),_s.push(e))}function As(){let e,t,i,r,a,o,l,u,d;const h=34*Cs+0,c=Ps[h];if(c)return Cs=c.nextPos,c.result;if(e=Cs,t=ii(),t!==s)if(i=Os(),i!==s){for(r=[],a=Cs,o=ii(),o!==s?(l=js(),l!==s?(u=ii(),u!==s?(d=Os(),d!==s?(o=[o,l,u,d],a=o):(Cs=a,a=s)):(Cs=a,a=s)):(Cs=a,a=s)):(Cs=a,a=s);a!==s;)r.push(a),a=Cs,o=ii(),o!==s?(l=js(),l!==s?(u=ii(),u!==s?(d=Os(),d!==s?(o=[o,l,u,d],a=o):(Cs=a,a=s)):(Cs=a,a=s)):(Cs=a,a=s)):(Cs=a,a=s);r!==s?(a=ii(),a!==s?(ws=e,t=n(i,r),e=t):(Cs=e,e=s)):(Cs=e,e=s)}else Cs=e,e=s;else Cs=e,e=s;return Ps[h]={nextPos:Cs,result:e},e}function js(){let t,i;const r=34*Cs+1,n=Ps[r];return n?(Cs=n.nextPos,n.result):(t=Cs,e.substr(Cs,2)===a?(i=a,Cs+=2):(i=s,0===Es&&Ls(o)),i===s&&(e.substr(Cs,2).toLowerCase()===l?(i=e.substr(Cs,2),Cs+=2):(i=s,0===Es&&Ls(u))),i!==s&&(ws=t,i=d()),t=i,Ps[r]={nextPos:Cs,result:t},t)}function Os(){let e,t,i,r,a,o,l,u;const d=34*Cs+2,h=Ps[d];if(h)return Cs=h.nextPos,h.result;if(e=Cs,t=Ns(),t!==s){for(i=[],r=Cs,a=ii(),a!==s?(o=qs(),o!==s?(l=ii(),l!==s?(u=Ns(),u!==s?(a=[a,o,l,u],r=a):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);r!==s;)i.push(r),r=Cs,a=ii(),a!==s?(o=qs(),o!==s?(l=ii(),l!==s?(u=Ns(),u!==s?(a=[a,o,l,u],r=a):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);i!==s?(ws=e,t=n(t,i),e=t):(Cs=e,e=s)}else Cs=e,e=s;return Ps[d]={nextPos:Cs,result:e},e}function qs(){let t,i;const r=34*Cs+3,n=Ps[r];return n?(Cs=n.nextPos,n.result):(t=Cs,e.substr(Cs,2)===h?(i=h,Cs+=2):(i=s,0===Es&&Ls(c)),i===s&&(e.substr(Cs,3).toLowerCase()===p?(i=e.substr(Cs,3),Cs+=3):(i=s,0===Es&&Ls(m))),i!==s&&(ws=t,i=g()),t=i,Ps[r]={nextPos:Cs,result:t},t)}function Ns(){let e,t,i,r,n,a,o,l;const u=34*Cs+4,d=Ps[u];if(d)return Cs=d.nextPos,d.result;if(e=Cs,t=Fs(),t!==s){for(i=[],r=Cs,n=ii(),n!==s?(a=Ms(),a!==s?(o=ii(),o!==s?(l=Fs(),l!==s?(n=[n,a,o,l],r=n):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);r!==s;)i.push(r),r=Cs,n=ii(),n!==s?(a=Ms(),a!==s?(o=ii(),o!==s?(l=Fs(),l!==s?(n=[n,a,o,l],r=n):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);i!==s?(ws=e,t=v(t,i),e=t):(Cs=e,e=s)}else Cs=e,e=s;return Ps[u]={nextPos:Cs,result:e},e}function Ms(){let t,i;const r=34*Cs+5,n=Ps[r];return n?(Cs=n.nextPos,n.result):(t=Cs,e.substr(Cs,2)===f?(i=f,Cs+=2):(i=s,0===Es&&Ls(b)),i===s&&(e.substr(Cs,11).toLowerCase()===y?(i=e.substr(Cs,11),Cs+=11):(i=s,0===Es&&Ls(C))),i!==s&&(ws=t,i=w()),t=i,t===s&&(t=Cs,e.substr(Cs,2)===x?(i=x,Cs+=2):(i=s,0===Es&&Ls(V)),i===s&&(e.substr(Cs,14).toLowerCase()===_?(i=e.substr(Cs,14),Cs+=14):(i=s,0===Es&&Ls(E))),i!==s&&(ws=t,i=P()),t=i,t===s&&(t=Cs,e.substr(Cs,2)===S?(i=S,Cs+=2):(i=s,0===Es&&Ls(I)),i===s&&(e.substr(Cs,5).toLowerCase()===T?(i=e.substr(Cs,5),Cs+=5):(i=s,0===Es&&Ls(R))),i!==s&&(ws=t,i=k()),t=i,t===s&&(t=Cs,61===e.charCodeAt(Cs)?(i=D,Cs++):(i=s,0===Es&&Ls(L)),i===s&&(e.substr(Cs,5).toLowerCase()===T?(i=e.substr(Cs,5),Cs+=5):(i=s,0===Es&&Ls(R))),i!==s&&(ws=t,i=k()),t=i,t===s&&(t=Cs,e.substr(Cs,2)===A?(i=A,Cs+=2):(i=s,0===Es&&Ls(j)),i===s&&(e.substr(Cs,8).toLowerCase()===O?(i=e.substr(Cs,8),Cs+=8):(i=s,0===Es&&Ls(q))),i!==s&&(ws=t,i=N()),t=i,t===s&&(t=Cs,60===e.charCodeAt(Cs)?(i=M,Cs++):(i=s,0===Es&&Ls(F)),i===s&&(e.substr(Cs,4).toLowerCase()===B?(i=e.substr(Cs,4),Cs+=4):(i=s,0===Es&&Ls(z))),i!==s&&(ws=t,i=H()),t=i,t===s&&(t=Cs,62===e.charCodeAt(Cs)?(i=Q,Cs++):(i=s,0===Es&&Ls(W)),i===s&&(e.substr(Cs,7).toLowerCase()===U?(i=e.substr(Cs,7),Cs+=7):(i=s,0===Es&&Ls(G))),i!==s&&(ws=t,i=Z()),t=i)))))),Ps[r]={nextPos:Cs,result:t},t)}function Fs(){let e,t,i,r,a,o,l,u;const d=34*Cs+6,h=Ps[d];if(h)return Cs=h.nextPos,h.result;if(e=Cs,t=zs(),t!==s){for(i=[],r=Cs,a=ii(),a!==s?(o=Bs(),o!==s?(l=ii(),l!==s?(u=zs(),u!==s?(a=[a,o,l,u],r=a):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);r!==s;)i.push(r),r=Cs,a=ii(),a!==s?(o=Bs(),o!==s?(l=ii(),l!==s?(u=zs(),u!==s?(a=[a,o,l,u],r=a):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);i!==s?(ws=e,t=n(t,i),e=t):(Cs=e,e=s)}else Cs=e,e=s;return Ps[d]={nextPos:Cs,result:e},e}function Bs(){let t,i;const r=34*Cs+7,n=Ps[r];return n?(Cs=n.nextPos,n.result):(t=Cs,43===e.charCodeAt(Cs)?(i=J,Cs++):(i=s,0===Es&&Ls(K)),i!==s&&(ws=t,i=X()),t=i,t===s&&(t=Cs,45===e.charCodeAt(Cs)?(i=Y,Cs++):(i=s,0===Es&&Ls($)),i!==s&&(ws=t,i=ee()),t=i),Ps[r]={nextPos:Cs,result:t},t)}function zs(){let e,t,i,r,a,o,l,u;const d=34*Cs+8,h=Ps[d];if(h)return Cs=h.nextPos,h.result;if(e=Cs,t=Qs(),t!==s){for(i=[],r=Cs,a=ii(),a!==s?(o=Hs(),o!==s?(l=ii(),l!==s?(u=Qs(),u!==s?(a=[a,o,l,u],r=a):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);r!==s;)i.push(r),r=Cs,a=ii(),a!==s?(o=Hs(),o!==s?(l=ii(),l!==s?(u=Qs(),u!==s?(a=[a,o,l,u],r=a):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);i!==s?(ws=e,t=n(t,i),e=t):(Cs=e,e=s)}else Cs=e,e=s;return Ps[d]={nextPos:Cs,result:e},e}function Hs(){let t,i;const r=34*Cs+9,n=Ps[r];return n?(Cs=n.nextPos,n.result):(t=Cs,42===e.charCodeAt(Cs)?(i=te,Cs++):(i=s,0===Es&&Ls(se)),i!==s&&(ws=t,i=ie()),t=i,t===s&&(t=Cs,47===e.charCodeAt(Cs)?(i=re,Cs++):(i=s,0===Es&&Ls(ne)),i!==s&&(ws=t,i=ae()),t=i,t===s&&(t=Cs,37===e.charCodeAt(Cs)?(i=oe,Cs++):(i=s,0===Es&&Ls(le)),i!==s&&(ws=t,i=ue()),t=i)),Ps[r]={nextPos:Cs,result:t},t)}function Qs(){let e,t,i,r,a,o,l,u;const d=34*Cs+10,h=Ps[d];if(h)return Cs=h.nextPos,h.result;if(e=Cs,t=Us(),t!==s){for(i=[],r=Cs,a=ii(),a!==s?(o=Ws(),o!==s?(l=ii(),l!==s?(u=Us(),u!==s?(a=[a,o,l,u],r=a):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);r!==s;)i.push(r),r=Cs,a=ii(),a!==s?(o=Ws(),o!==s?(l=ii(),l!==s?(u=Us(),u!==s?(a=[a,o,l,u],r=a):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);i!==s?(ws=e,t=n(t,i),e=t):(Cs=e,e=s)}else Cs=e,e=s;return Ps[d]={nextPos:Cs,result:e},e}function Ws(){let t,i;const r=34*Cs+11,n=Ps[r];return n?(Cs=n.nextPos,n.result):(t=Cs,94===e.charCodeAt(Cs)?(i=de,Cs++):(i=s,0===Es&&Ls(he)),i===s&&(e.substr(Cs,5).toLowerCase()===ce?(i=e.substr(Cs,5),Cs+=5):(i=s,0===Es&&Ls(pe))),i!==s&&(ws=t,i=me()),t=i,Ps[r]={nextPos:Cs,result:t},t)}function Us(){let e,t,i,r,n,a,o,l;const u=34*Cs+12,d=Ps[u];if(d)return Cs=d.nextPos,d.result;if(e=Cs,t=Zs(),t!==s){for(i=[],r=Cs,n=ii(),n!==s?(a=Gs(),a!==s?(o=ii(),o!==s?(l=Zs(),l===s&&(l=null),l!==s?(n=[n,a,o,l],r=n):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);r!==s;)i.push(r),r=Cs,n=ii(),n!==s?(a=Gs(),a!==s?(o=ii(),o!==s?(l=Zs(),l===s&&(l=null),l!==s?(n=[n,a,o,l],r=n):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s)):(Cs=r,r=s);i!==s?(ws=e,t=v(t,i),e=t):(Cs=e,e=s)}else Cs=e,e=s;return Ps[u]={nextPos:Cs,result:e},e}function Gs(){let t,i;const r=34*Cs+13,n=Ps[r];return n?(Cs=n.nextPos,n.result):(t=Cs,e.substr(Cs,2)===ge?(i=ge,Cs+=2):(i=s,0===Es&&Ls(ve)),i===s&&(e.substr(Cs,8).toLowerCase()===fe?(i=e.substr(Cs,8),Cs+=8):(i=s,0===Es&&Ls(be)),i===s&&(e.substr(Cs,7).toLowerCase()===ye?(i=e.substr(Cs,7),Cs+=7):(i=s,0===Es&&Ls(Ce)))),i!==s&&(ws=t,i=we()),t=i,t===s&&(t=Cs,e.substr(Cs,11).toLowerCase()===xe?(i=e.substr(Cs,11),Cs+=11):(i=s,0===Es&&Ls(Ve)),i===s&&(e.substr(Cs,10).toLowerCase()===_e?(i=e.substr(Cs,10),Cs+=10):(i=s,0===Es&&Ls(Ee))),i!==s&&(ws=t,i=Pe()),t=i,t===s&&(t=Cs,e.substr(Cs,5).toLowerCase()===Se?(i=e.substr(Cs,5),Cs+=5):(i=s,0===Es&&Ls(Ie)),i!==s&&(ws=t,i=Te()),t=i,t===s&&(t=Cs,e.substr(Cs,5).toLowerCase()===Re?(i=e.substr(Cs,5),Cs+=5):(i=s,0===Es&&Ls(ke)),i!==s&&(ws=t,i=De()),t=i))),Ps[r]={nextPos:Cs,result:t},t)}function Zs(){let t,i,r,n,a,o;const l=34*Cs+14,u=Ps[l];return u?(Cs=u.nextPos,u.result):(t=Cs,40===e.charCodeAt(Cs)?(i=Le,Cs++):(i=s,0===Es&&Ls(Ae)),i!==s?(r=ii(),r!==s?(n=As(),n!==s?(a=ii(),a!==s?(41===e.charCodeAt(Cs)?(o=je,Cs++):(o=s,0===Es&&Ls(Oe)),o===s&&(o=null),o!==s?(ws=t,i=qe(n),t=i):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s),t===s&&(t=function(){let t,i,r,n,a;const o=34*Cs+15,l=Ps[o];if(l)return Cs=l.nextPos,l.result;t=Cs,i=ei(),i!==s?(40===e.charCodeAt(Cs)?(r=Le,Cs++):(r=s,0===Es&&Ls(Ae)),r!==s?(n=Ks(),n!==s?(41===e.charCodeAt(Cs)?(a=je,Cs++):(a=s,0===Es&&Ls(Oe)),a===s&&(a=null),a!==s?(ws=t,i=Ne(i,n),t=i):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s);return Ps[o]={nextPos:Cs,result:t},t}(),t===s&&(t=function(){let t,i,r,n;const a=34*Cs+16,o=Ps[a];if(o)return Cs=o.nextPos,o.result;t=Cs,33===e.charCodeAt(Cs)?(i=Me,Cs++):(i=s,0===Es&&Ls(Fe));i===s&&(e.substr(Cs,6).toLowerCase()===Be?(i=e.substr(Cs,6),Cs+=6):(i=s,0===Es&&Ls(ze)));i!==s?(r=ii(),r!==s?(n=As(),n!==s?(ws=t,i=He(n),t=i):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s);t===s&&(t=Cs,i=Js(),i!==s?(r=ii(),r!==s?(n=function(){let t,i;const r=34*Cs+17,n=Ps[r];if(n)return Cs=n.nextPos,n.result;t=Cs,e.substr(Cs,5).toLowerCase()===We?(i=e.substr(Cs,5),Cs+=5):(i=s,0===Es&&Ls(Ue));i!==s&&(ws=t,i=Ge());t=i,t===s&&(t=Cs,e.substr(Cs,8).toLowerCase()===et?(i=e.substr(Cs,8),Cs+=8):(i=s,0===Es&&Ls(st)),i!==s&&(ws=t,i=it()),t=i);return Ps[r]={nextPos:Cs,result:t},t}(),n!==s?(ws=t,i=Qe(i,n),t=i):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s));return Ps[a]={nextPos:Cs,result:t},t}(),t===s&&(t=Js(),t===s&&(t=function(){let t,i,r,n;const a=34*Cs+20,o=Ps[a];if(o)return Cs=o.nextPos,o.result;t=Cs,91===e.charCodeAt(Cs)?(i=Pt,Cs++):(i=s,0===Es&&Ls(St));i!==s?(r=Ks(),r!==s?(93===e.charCodeAt(Cs)?(n=It,Cs++):(n=s,0===Es&&Ls(Tt)),n!==s?(ws=t,i=Rt(r),t=i):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s);return Ps[a]={nextPos:Cs,result:t},t}())))),Ps[l]={nextPos:Cs,result:t},t)}function Js(){let t,i,r,n,a;const o=34*Cs+18,l=Ps[o];return l?(Cs=l.nextPos,l.result):(t=Cs,i=ii(),i!==s?(e.substr(Cs,9)===rt?(r=rt,Cs+=9):(r=s,0===Es&&Ls(nt)),r===s&&(e.substr(Cs,4)===at?(r=at,Cs+=4):(r=s,0===Es&&Ls(ot))),r!==s?(ws=t,i=lt(),t=i):(Cs=t,t=s)):(Cs=t,t=s),t===s&&(t=Cs,i=ii(),i!==s?(r=function(){let t,i,r,n;const a=34*Cs+19,o=Ps[a];if(o)return Cs=o.nextPos,o.result;t=Cs,i=function(){let t,i;const r=34*Cs+22,n=Ps[r];if(n)return Cs=n.nextPos,n.result;t=Cs,e.substr(Cs,4).toLowerCase()===At?(i=e.substr(Cs,4),Cs+=4):(i=s,0===Es&&Ls(jt));i!==s&&(ws=t,i=Ot());t=i,t===s&&(t=Cs,e.substr(Cs,5).toLowerCase()===qt?(i=e.substr(Cs,5),Cs+=5):(i=s,0===Es&&Ls(Nt)),i!==s&&(ws=t,i=Mt()),t=i);return Ps[r]={nextPos:Cs,result:t},t}(),i!==s&&(ws=t,i=gt(i));t=i,t===s&&(t=Cs,i=function(){let t,i,r;const n=34*Cs+23,a=Ps[n];if(a)return Cs=a.nextPos,a.result;t=Cs,e.substr(Cs,2)===Ft?(i=Ft,Cs+=2):(i=s,0===Es&&Ls(Bt));i!==s?(r=ti(),r!==s?(ws=t,i=zt(),t=i):(Cs=t,t=s)):(Cs=t,t=s);t===s&&(t=Cs,Ht.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(Qt)),i===s&&(i=null),i!==s?(r=function(){let t,i,r,n;const a=34*Cs+24,o=Ps[a];if(o)return Cs=o.nextPos,o.result;t=Cs,i=ti(),i!==s?(46===e.charCodeAt(Cs)?(r=Ut,Cs++):(r=s,0===Es&&Ls(Gt)),r!==s?(n=ti(),n!==s?(ws=t,i=Zt(),t=i):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s);t===s&&(t=Cs,i=function(){let t,i;const r=34*Cs+31,n=Ps[r];if(n)return Cs=n.nextPos,n.result;t=[],ps.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(ms));if(i!==s)for(;i!==s;)t.push(i),ps.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(ms));else t=s;return Ps[r]={nextPos:Cs,result:t},t}(),i!==s?(r=ti(),r===s&&(r=null),r!==s?(ws=t,i=Jt(),t=i):(Cs=t,t=s)):(Cs=t,t=s),t===s&&(t=Cs,48===e.charCodeAt(Cs)?(i=Kt,Cs++):(i=s,0===Es&&Ls(Xt)),i!==s&&(ws=t,i=Yt()),t=i));return Ps[a]={nextPos:Cs,result:t},t}(),r!==s?(ws=t,i=Wt(i,r),t=i):(Cs=t,t=s)):(Cs=t,t=s));return Ps[n]={nextPos:Cs,result:t},t}(),i!==s&&(ws=t,i=gt(i)),t=i,t===s&&(t=Cs,i=ei(),i!==s&&(ws=t,i=gt(i)),t=i,t===s&&(t=Cs,e.substr(Cs,2)===vt?(i=vt,Cs+=2):(i=s,0===Es&&Ls(ft)),i!==s&&(ws=t,i=bt()),t=i,t===s&&(t=Cs,e.substr(Cs,2)===yt?(i=yt,Cs+=2):(i=s,0===Es&&Ls(Ct)),i!==s&&(ws=t,i=bt()),t=i,t===s&&(t=Cs,39===e.charCodeAt(Cs)?(i=wt,Cs++):(i=s,0===Es&&Ls(xt)),i!==s?(r=Xs(),r!==s?(39===e.charCodeAt(Cs)?(n=wt,Cs++):(n=s,0===Es&&Ls(xt)),n!==s?(ws=t,i=Vt(r),t=i):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s),t===s&&(t=Cs,34===e.charCodeAt(Cs)?(i=_t,Cs++):(i=s,0===Es&&Ls(Et)),i!==s?(r=Xs(),r!==s?(34===e.charCodeAt(Cs)?(n=_t,Cs++):(n=s,0===Es&&Ls(Et)),n!==s?(ws=t,i=Vt(r),t=i):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s)))))));return Ps[a]={nextPos:Cs,result:t},t}(),r!==s?(ws=t,i=ut(r),t=i):(Cs=t,t=s)):(Cs=t,t=s),t===s&&(t=Cs,i=ii(),i!==s?(123===e.charCodeAt(Cs)?(r=dt,Cs++):(r=s,0===Es&&Ls(ht)),r!==s?(n=function(){let e,t,i;const r=34*Cs+25,n=Ps[r];if(n)return Cs=n.nextPos,n.result;if(e=Cs,t=[],i=$s(),i!==s)for(;i!==s;)t.push(i),i=$s();else t=s;t!==s&&(ws=e,t=$t(t));return e=t,Ps[r]={nextPos:Cs,result:e},e}(),n!==s?(125===e.charCodeAt(Cs)?(a=ct,Cs++):(a=s,0===Es&&Ls(pt)),a!==s?(ws=t,i=mt(n),t=i):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s)):(Cs=t,t=s))),Ps[o]={nextPos:Cs,result:t},t)}function Ks(){let t,i,r,n,a,o,l,u;const d=34*Cs+21,h=Ps[d];if(h)return Cs=h.nextPos,h.result;if(t=Cs,i=As(),i===s&&(i=null),i!==s){for(r=[],n=Cs,a=ii(),a!==s?(44===e.charCodeAt(Cs)?(o=kt,Cs++):(o=s,0===Es&&Ls(Dt)),o!==s?(l=ii(),l!==s?(u=As(),u!==s?(a=[a,o,l,u],n=a):(Cs=n,n=s)):(Cs=n,n=s)):(Cs=n,n=s)):(Cs=n,n=s);n!==s;)r.push(n),n=Cs,a=ii(),a!==s?(44===e.charCodeAt(Cs)?(o=kt,Cs++):(o=s,0===Es&&Ls(Dt)),o!==s?(l=ii(),l!==s?(u=As(),u!==s?(a=[a,o,l,u],n=a):(Cs=n,n=s)):(Cs=n,n=s)):(Cs=n,n=s)):(Cs=n,n=s);r!==s?(ws=t,i=Lt(i,r),t=i):(Cs=t,t=s)}else Cs=t,t=s;return Ps[d]={nextPos:Cs,result:t},t}function Xs(){let e,t,i;const r=34*Cs+26,n=Ps[r];if(n)return Cs=n.nextPos,n.result;if(e=Cs,t=[],i=Ys(),i!==s)for(;i!==s;)t.push(i),i=Ys();else t=s;return t!==s&&(ws=e,t=$t(t)),e=t,Ps[r]={nextPos:Cs,result:e},e}function Ys(){let t,i;const r=34*Cs+27,n=Ps[r];return n?(Cs=n.nextPos,n.result):(t=Cs,e.substr(Cs,2)===es?(i=es,Cs+=2):(i=s,0===Es&&Ls(ts)),i!==s&&(ws=t,i=ss()),t=i,t===s&&(t=Cs,e.substr(Cs,2)===is?(i=is,Cs+=2):(i=s,0===Es&&Ls(rs)),i!==s&&(ws=t,i=ns()),t=i,t===s&&(t=Cs,as.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(os)),i!==s&&(ws=t,i=ls()),t=i)),Ps[r]={nextPos:Cs,result:t},t)}function $s(){let t,i;const r=34*Cs+28,n=Ps[r];return n?(Cs=n.nextPos,n.result):(t=Cs,us.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(ds)),i!==s&&(ws=t,i=ls()),t=i,Ps[r]={nextPos:Cs,result:t},t)}function ei(){let e,t,i,r,n,a,o;const l=34*Cs+29,u=Ps[l];if(u)return Cs=u.nextPos,u.result;if(e=Cs,t=si(),t!==s){if(i=[],r=Cs,n=ti(),n!==s){for(a=[],o=si();o!==s;)a.push(o),o=si();a!==s?(n=[n,a],r=n):(Cs=r,r=s)}else Cs=r,r=s;for(;r!==s;)if(i.push(r),r=Cs,n=ti(),n!==s){for(a=[],o=si();o!==s;)a.push(o),o=si();a!==s?(n=[n,a],r=n):(Cs=r,r=s)}else Cs=r,r=s;i!==s?(ws=e,t=ls(),e=t):(Cs=e,e=s)}else Cs=e,e=s;return Ps[l]={nextPos:Cs,result:e},e}function ti(){let t,i;const r=34*Cs+30,n=Ps[r];if(n)return Cs=n.nextPos,n.result;if(t=[],hs.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(cs)),i!==s)for(;i!==s;)t.push(i),hs.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(cs));else t=s;return Ps[r]={nextPos:Cs,result:t},t}function si(){let t,i;const r=34*Cs+32,n=Ps[r];if(n)return Cs=n.nextPos,n.result;if(t=[],gs.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(vs)),i!==s)for(;i!==s;)t.push(i),gs.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(vs));else t=s;return Ps[r]={nextPos:Cs,result:t},t}function ii(){let t,i;const r=34*Cs+33,n=Ps[r];if(n)return Cs=n.nextPos,n.result;for(Es++,t=[],bs.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(ys));i!==s;)t.push(i),bs.test(e.charAt(Cs))?(i=e.charAt(Cs),Cs++):(i=s,0===Es&&Ls(ys));return Es--,t===s&&(i=s,0===Es&&Ls(fs)),Ps[r]={nextPos:Cs,result:t},t}function ri(e,t,s=!1){return t.reduce((function(e,t){return new Ze(t[1],e,t[3],s)}),e)}if(Ss=r(),Ss!==s&&Cs===e.length)return Ss;throw Ss!==s&&Cs/g,">=").replace(/=/g,"!=").replace(/equals/g,"equal ").replace(/notequals/g,"notequal ")}createCondition(e){return this.parseExpression(e)}parseExpression(e){try{var t=rt.parserCache[e];return void 0===t&&((t=st(this.patchExpression(e))).hasAsyncFunction()||(rt.parserCache[e]=t)),t}catch(e){e instanceof tt&&(this.conditionError=new it(e.location.start.offset,e.message))}}get error(){return this.conditionError}}rt.parserCache={};class nt{constructor(e,t,s,i,r){this.operand=e,this.id=t,this.onComplete=s,this.processValue=new Re,this.processValue.values=i,this.processValue.properties=r}run(e){if(!e)return this.runValues();this.processValue.values=ue.createCopy(this.processValue.values),this.processValue.onCompleteAsyncFunc=e=>{const t=this.getAsyncItemByOperand(e,this.asyncFuncList);t&&this.doAsyncFunctionReady(t)},this.asyncFuncList=new Array,this.operand.addToAsyncList(this.asyncFuncList);for(var t=0;tthis.runAsyncItem(e))):this.runAsyncItemCore(e)}runAsyncItemCore(e){e.operand?e.operand.evaluate(this.processValue):this.doAsyncFunctionReady(e)}doAsyncFunctionReady(e){if(e.parent&&this.isAsyncChildrenReady(e))this.runAsyncItemCore(e.parent);else{for(var t=0;tnew at(e);class ot{constructor(e){this.expression=e}get expression(){return this.expressionExecutor?this.expressionExecutor.expression:""}set expression(e){this.expressionExecutor&&e===this.expression||(this.expressionExecutor=at.createExpressionExecutor(e),this.expressionExecutor.onComplete=(e,t)=>{this.doOnComplete(e,t)},this.variables=void 0,this.containsFunc=void 0)}getVariables(){return void 0===this.variables&&(this.variables=this.expressionExecutor.getVariables()),this.variables}hasFunction(){return void 0===this.containsFunc&&(this.containsFunc=this.expressionExecutor.hasFunction()),this.containsFunc}get isAsync(){return this.expressionExecutor.isAsync}canRun(){return this.expressionExecutor.canRun()}runCore(e,t=null){const s=ot.IdRunnerCounter++;return this.onBeforeAsyncRun&&this.isAsync&&this.onBeforeAsyncRun(s),this.expressionExecutor.run(e,t,s)}doOnComplete(e,t){this.onAfterAsyncRun&&this.isAsync&&this.onAfterAsyncRun(t)}}ot.IdRunnerCounter=1;class lt extends ot{run(e,t=null){return 1==this.runCore(e,t)}doOnComplete(e,t){this.onRunComplete&&this.onRunComplete(1==e),super.doOnComplete(e,t)}}class ut extends ot{run(e,t=null){return this.runCore(e,t)}doOnComplete(e,t){this.onRunComplete&&this.onRunComplete(e),super.doOnComplete(e,t)}}class dt{constructor(e){this.obj=e,this.properties=null,this.values=null}getType(){return"bindings"}get isSurveyObj(){return!0}getNames(){var e=[];this.fillProperties();for(var t=0;t{void 0!==this.values[t]&&(e[t]=this.values[t])})),e}setJson(e,t){const s=this.getJson();this.values=null,e&&this.getNames().forEach((t=>{void 0!==e[t]&&(this.values||(this.values={}),this.values[t]=e[t])})),t||ue.isTwoValueEquals(s,this.values)||this.onChangedJSON(s)}fillProperties(){if(null===this.properties){this.properties=[];for(var e=Ie.getPropertiesByObj(this.obj),t=0;ts.obj===e&&s.prop===t))||(this.dependencies.push({obj:e,prop:t,id:this.id}),e.registerPropertyChangedHandlers([t],this.currentDependency,this.id))}dispose(){this.dependencies.forEach((e=>{e.obj.unregisterPropertyChangedHandlers([e.prop],e.id)}))}}ht.DependenciesCount=0;class ct{constructor(e){this._updater=e,this.dependencies=void 0,this.type=ct.ComputedUpdaterType}get updater(){return this._updater}setDependencies(e){this.clearDependencies(),this.dependencies=e}getDependencies(){return this.dependencies}clearDependencies(){this.dependencies&&(this.dependencies.dispose(),this.dependencies=void 0)}dispose(){this.clearDependencies(),this._updater=void 0}}ct.ComputedUpdaterType="__dependency_computed";class pt{static finishCollectDependencies(){const e=pt.currentDependencis;return pt.currentDependencis=void 0,e}static startCollectDependencies(e,t,s){if(void 0!==pt.currentDependencis)throw new Error("Attempt to collect nested dependencies. Nested dependencies are not supported.");pt.currentDependencis=new ht(e,t,s)}static collectDependency(e,t){void 0!==pt.currentDependencis&&pt.currentDependencis.addDependency(e,t)}static get commentSuffix(){return Ps.commentSuffix}static set commentSuffix(e){Ps.commentSuffix=e}static get commentPrefix(){return pt.commentSuffix}static set commentPrefix(e){pt.commentSuffix=e}isValueEmpty(e,t=!0){return t&&(e=this.trimValue(e)),ue.isValueEmpty(e)}equals(e){return!!e&&(!this.isDisposed&&!e.isDisposed&&(this.getType()==e.getType()&&this.equalsCore(e)))}equalsCore(e){return this.name===e.name&&ue.isTwoValueEquals(this.toJSON(),e.toJSON(),!1,!0,!1)}trimValue(e){return e&&("string"==typeof e||e instanceof String)?e.trim():e}static createPropertiesHash(){return{}}constructor(){this.dependencies={},this.propertyHash=pt.createPropertiesHash(),this.eventList=[],this.isLoadingFromJsonValue=!1,this.loadingOwner=null,this.onPropertyChanged=this.addEvent(),this.onItemValuePropertyChanged=this.addEvent(),this.isCreating=!0,this.animationAllowedLock=0,this.supportOnElementRerenderedEvent=!0,this.onElementRerenderedEventEnabled=!1,this._onElementRerendered=new vt,fe.createProperties(this),this.onBaseCreating(),this.isCreating=!1}dispose(){for(var e=0;ethis.dependencies[e].dispose())),Object.keys(this.propertyHash).forEach((e=>{const t=this.getPropertyValueCore(this.propertyHash,e);t&&t.type==ct.ComputedUpdaterType&&t.dispose()}))}get isDisposed(){return!0===this.isDisposedValue}get isSurveyObj(){return!0}addEvent(){const e=new vt;return this.eventList.push(e),e}onBaseCreating(){}getType(){return"base"}isDescendantOf(e){return Ie.isDescendantOf(this.getType(),e)}getSurvey(e=!1){return null}get isDesignMode(){const e=this.getSurvey();return!!e&&e.isDesignMode}get inSurvey(){return!!this.getSurvey(!0)}get bindings(){return this.bindingsValue||(this.bindingsValue=new dt(this)),this.bindingsValue}isBindingEmpty(){return!this.bindingsValue||this.bindingsValue.isEmpty()}checkBindings(e,t){}updateBindings(e,t){if(this.bindingsValue){var s=this.bindings.getValueNameByPropertyName(e);s&&this.updateBindingValue(s,t)}}updateBindingValue(e,t){}getTemplate(){return this.getType()}get isLoadingFromJson(){return this.isLoadingFromJsonValue||this.getIsLoadingFromJson()}getIsLoadingFromJson(){return!(!this.loadingOwner||!this.loadingOwner.isLoadingFromJson)||this.isLoadingFromJsonValue}startLoadingFromJson(e){this.isLoadingFromJsonValue=!0,this.jsonObj=e}endLoadingFromJson(){this.isLoadingFromJsonValue=!1}toJSON(e){return(new Se).toJsonObject(this,e)}fromJSON(e,t){(new Se).toObject(e,this,t),this.onSurveyLoad()}onSurveyLoad(){}clone(){var e=Ie.createClass(this.getType());return e.fromJSON(this.toJSON()),e}getPropertyByName(e){const t=this.getType();return this.classMetaData&&this.classMetaData.name===t||(this.classMetaData=Ie.findClass(t)),this.classMetaData?this.classMetaData.findProperty(e):null}isPropertyVisible(e){const t=this.getPropertyByName(e);return!!t&&t.isVisible("",this)}static createProgressInfo(){return{questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0}}getProgressInfo(){return pt.createProgressInfo()}localeChanged(){}locStrsChanged(){if(this.arraysInfo)for(let t in this.arraysInfo){let s=this.arraysInfo[t];if(s&&s.isItemValues){var e=this.getPropertyValue(t);e&&pt.itemValueLocStrChanged&&pt.itemValueLocStrChanged(e)}}if(this.localizableStrings)for(let e in this.localizableStrings){let t=this.getLocalizableString(e);t&&t.strChanged()}}getPropertyValue(e,t,s){const i=this.getPropertyValueWithoutDefault(e);if(this.isValueUndefined(i)){const i=this.localizableStrings?this.localizableStrings[e]:void 0;if(i)return i.text;if(!this.isValueUndefined(t))return t;if(s){const t=s();if(void 0!==t){if(Array.isArray(t)){const s=this.createNewArray(e);return s.splice(0,0,...t),s}return this.setPropertyValueDirectly(e,t),t}}const r=this.getDefaultPropertyValue(e);if(void 0!==r)return r}return i}isValueUndefined(e){return ue.isValueUndefined(e)}getDefaultPropertyValue(e){const t=this.getPropertyByName(e);if(!t||t.isCustom&&this.isCreating)return;if(t.defaultValueFunc)return t.defaultValueFunc(this);const s=t.getDefaultValue(this);if(!this.isValueUndefined(s)&&!Array.isArray(s))return s;const i=this.localizableStrings?this.localizableStrings[e]:void 0;return i&&i.localizationName?this.getLocalizationString(i.localizationName):"boolean"!=t.type&&"switch"!=t.type&&(t.isCustom&&t.onGetValue?t.onGetValue(this):void 0)}hasDefaultPropertyValue(e){return void 0!==this.getDefaultPropertyValue(e)}resetPropertyValue(e){const t=this.localizableStrings?this.localizableStrings[e]:void 0;t?(this.setLocalizableStringText(e,void 0),t.clear()):this.setPropertyValue(e,void 0)}getPropertyValueWithoutDefault(e){return this.getPropertyValueCore(this.propertyHash,e)}getPropertyValueCore(e,t){return this.isLoadingFromJson||pt.collectDependency(this,t),this.getPropertyValueCoreHandler?this.getPropertyValueCoreHandler(e,t):e[t]}geValueFromHash(){return this.propertyHash.value}setPropertyValueCore(e,t,s){this.setPropertyValueCoreHandler?this.isDisposedValue?ke.disposedObjectChangedProperty(t,this.getType()):this.setPropertyValueCoreHandler(e,t,s):e[t]=s}get isEditingSurveyElement(){var e=this.getSurvey();return!!e&&e.isEditingSurveyElement}iteratePropertiesHash(e){var t=[];for(var s in this.propertyHash)"value"===s&&this.isEditingSurveyElement&&Array.isArray(this.value)||t.push(s);t.forEach((t=>e(this.propertyHash,t)))}setPropertyValue(e,t){if(!this.isDisposedValue){if(!this.isLoadingFromJson){const s=this.getPropertyByName(e);s&&(t=s.settingValue(this,t))}var s=this.getPropertyValue(e);s&&Array.isArray(s)&&this.arraysInfo&&(!t||Array.isArray(t))?this.isTwoValueEquals(s,t)||this.setArrayPropertyDirectly(e,t):t!==s&&(this.setPropertyValueDirectly(e,t),this.isTwoValueEquals(s,t)||this.propertyValueChanged(e,s,t))}}setArrayPropertyDirectly(e,t,s=!0){var i=this.arraysInfo[e];this.setArray(e,this.getPropertyValue(e),t,!!i&&i.isItemValues,i?s&&i.onPush:null)}setPropertyValueDirectly(e,t){this.setPropertyValueCore(this.propertyHash,e,t)}clearPropertyValue(e){this.setPropertyValueCore(this.propertyHash,e,null),delete this.propertyHash[e]}onPropertyValueChangedCallback(e,t,s,i,r){}itemValuePropertyChanged(e,t,s,i){this.onItemValuePropertyChanged.fire(this,{obj:e,name:t,oldValue:s,newValue:i,propertyName:e.ownerPropertyName})}onPropertyValueChanged(e,t,s){}propertyValueChanged(e,t,s,i,r){if(!this.isLoadingFromJson&&(this.updateBindings(e,s),this.onPropertyValueChanged(e,t,s),this.onPropertyChanged.fire(this,{name:e,oldValue:t,newValue:s,arrayChanges:i,target:r}),this.doPropertyValueChangedCallback(e,t,s,i,this),this.checkConditionPropertyChanged(e),this.onPropChangeFunctions))for(var n=0;n{n&&n.onPropertyValueChangedCallback&&n.onPropertyValueChangedCallback(e,t,s,r,i)};if(this.isInternal)n(this);else{r||(r=this);var a=this.getSurvey();a||(a=this),n(a),a!==this&&n(this)}}addExpressionProperty(e,t,s){this.expressionInfo||(this.expressionInfo={}),this.expressionInfo[e]={onExecute:t,canRun:s}}getDataFilteredValues(){return{}}getDataFilteredProperties(){return{}}runConditionCore(e,t){if(this.expressionInfo)for(var s in this.expressionInfo)this.runConditionItemCore(s,e,t)}canRunConditions(){return!this.isDesignMode}checkConditionPropertyChanged(e){this.expressionInfo&&this.expressionInfo[e]&&this.canRunConditions()&&this.runConditionItemCore(e,this.getDataFilteredValues(),this.getDataFilteredProperties())}runConditionItemCore(e,t,s){const i=this.expressionInfo[e],r=this.getPropertyValue(e);r&&(i.canRun&&!i.canRun(this)||(i.runner||(i.runner=this.createExpressionRunner(r),i.runner.onRunComplete=e=>{i.onExecute(this,e)}),i.runner.expression=r,i.runner.run(t,s)))}doBeforeAsynRun(e){this.asynExpressionHash||(this.asynExpressionHash={});const t=!this.isAsyncExpressionRunning;this.asynExpressionHash[e]=!0,t&&this.onAsyncRunningChanged()}doAfterAsynRun(e){this.asynExpressionHash&&(delete this.asynExpressionHash[e],this.isAsyncExpressionRunning||this.onAsyncRunningChanged())}onAsyncRunningChanged(){}get isAsyncExpressionRunning(){return!!this.asynExpressionHash&&Object.keys(this.asynExpressionHash).length>0}createExpressionRunner(e){const t=new ut(e);return t.onBeforeAsyncRun=e=>{this.doBeforeAsynRun(e)},t.onAfterAsyncRun=e=>{this.doAfterAsynRun(e)},t}registerPropertyChangedHandlers(e,t,s=null){for(var i=0;i{this.propertyValueChanged(e,t,s)},this.localizableStrings||(this.localizableStrings={}),this.localizableStrings[e]=n;const a=this.getPropertyByName(e);return n.disableLocalization=a&&!1===a.isLocalizable,n}removeLocalizableString(e){this.localizableStrings&&delete this.localizableStrings[e]}getLocalizableString(e){return this.localizableStrings?this.localizableStrings[e]:null}getLocalizableStringText(e,t=""){pt.collectDependency(this,e);var s=this.getLocalizableString(e);if(!s)return"";var i=s.text;return i||t}setLocalizableStringText(e,t){let s=this.getLocalizableString(e);s&&s.text!=t&&(s.text=t)}addUsedLocales(e){if(this.localizableStrings)for(let t in this.localizableStrings){let s=this.getLocalizableString(t);s&&this.AddLocStringToUsedLocales(s,e)}if(this.arraysInfo)for(let t in this.arraysInfo){const s=this.getPropertyByName(t);if(!s||!s.isPropertySerializable(this))continue;let i=this.getPropertyValue(t);if(i&&i.length)for(let t=0;t=0&&!this.isLoadingFromJson&&!this.isDisposed&&(!!this.onElementRerendered||!this.supportOnElementRerenderedEvent)}blockAnimations(){this.animationAllowedLock--}releaseAnimations(){this.animationAllowedLock++}enableOnElementRerenderedEvent(){this.onElementRerenderedEventEnabled=!0}disableOnElementRerenderedEvent(){var e;null===(e=this.onElementRerendered)||void 0===e||e.fire(this,{isCancel:!0}),this.onElementRerenderedEventEnabled=!1}get onElementRerendered(){return this.supportOnElementRerenderedEvent&&this.onElementRerenderedEventEnabled?this._onElementRerendered:void 0}afterRerender(){var e;null===(e=this.onElementRerendered)||void 0===e||e.fire(this,{isCancel:!1})}}pt.currentDependencis=void 0;class mt{constructor(e,t,s,i){this.index=e,this.deleteCount=t,this.itemsToAdd=s,this.deletedItems=i}}class gt{get isEmpty(){return 0===this.length}get length(){return this.callbacks?this.callbacks.length:0}fireByCreatingOptions(e,t){if(this.callbacks)for(var s=0;s-1}fireCallbackChanged(){this.onCallbacksChanged&&this.onCallbacksChanged()}}class vt extends gt{} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function ft(e,t,s,i){var r,n=arguments.length,a=n<3?t:i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a}function bt(e){let t,s=!1,i=!1;return{run:(...r)=>{i=!1,t=r,s||(s=!0,queueMicrotask((()=>{i||e.apply(this,t),i=!1,s=!1})))},cancel:()=>{i=!0}}}class yt{constructor(e,t){if(this.container=e,this.model=t,this.resizeObserver=void 0,this.isInitialized=!1,this.getComputedStyle=e=>oe.getComputedStyle(e),this.debouncedProcess=bt((()=>{this.process()})),this.isDisposed=!1,this.model.updateCallback=e=>{e&&(this.isInitialized=!1),this.debouncedProcess.run()},"undefined"!=typeof ResizeObserver){let e=!0;this.resizeObserver=new ResizeObserver((t=>{e?e=!1:ae.requestAnimationFrame((()=>{this.process()}))})),this.resizeObserver.observe(this.container.parentElement),this.shouldProcessResponsiveness()?this.process():e=!1}}getDimensions(e){return{scroll:e.scrollWidth,offset:e.offsetWidth}}getAvailableSpace(){const e=this.getComputedStyle(this.container);let t=this.container.offsetWidth;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)),t}getGap(){const e=this.getComputedStyle(this.container);if("flex"==e.display){const t=parseFloat(e.rowGap);return isNaN(t)?0:t}return 0}calcItemSize(e){return e.offsetWidth||e.getBoundingClientRect().width}updateItemsDimensions(e){if(!this.container)return;const t=this.isInitialized?this.model.renderedActions.filter((e=>e.needUpdateMaxDimension||e.needUpdateMinDimension)):this.model.renderedActions;let s=t.length;0==s&&e();t.forEach((t=>{const i=!this.isInitialized||t.needUpdateMaxDimension,r=!this.isInitialized||t.needUpdateMinDimension?i?void 0:"small":"large";t.updateDimensions((e=>this.calcItemSize(e)),(()=>{t.needUpdateMaxDimension=!1,t.needUpdateMinDimension=!1,--s<=0&&e()}),r)}))}get isContainerVisible(){return!!this.container&&bs(this.container)}shouldProcessResponsiveness(){return this.isContainerVisible&&!this.model.isResponsivenessDisabled&&!this.isDisposed}process(){this.shouldProcessResponsiveness()&&this.updateItemsDimensions((()=>{this.shouldProcessResponsiveness()&&this.model.fit({availableSpace:this.getAvailableSpace(),gap:this.getGap()}),this.isInitialized=!0}))}dispose(){this.isDisposed=!0,this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=void 0,this.container=void 0}}class Ct{constructor(){this.classes=[]}isEmpty(){return""===this.toString()}append(e,t=!0){return e&&t&&("string"==typeof e&&(e=e.trim()),this.classes.push(e)),this}toString(){return this.classes.join(" ")}}let wt={root:"sv-action-bar",defaultSizeMode:"sv-action-bar--default-size-mode",smallSizeMode:"sv-action-bar--small-size-mode",item:"sv-action-bar-item",itemWithTitle:"",itemAsIcon:"sv-action-bar-item--icon",itemActive:"sv-action-bar-item--active",itemPressed:"sv-action-bar-item--pressed",itemIcon:"sv-action-bar-item__icon",itemTitle:"sv-action-bar-item__title",itemTitleWithIcon:"sv-action-bar-item__title--with-icon"};class xt extends pt{constructor(){super(...arguments),this.sizeMode="default"}getMarkdownHtml(e,t,s){return this.locOwner?this.locOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.locOwner?this.locOwner.getRenderer(e):null}getRendererContext(e){return this.locOwner?this.locOwner.getRendererContext(e):e}getProcessedText(e){return this.locOwner?this.locOwner.getProcessedText(e):e}getLocale(){return this.locOwner?this.locOwner.getLocale():""}getRenderedActions(){return this.actions}locStrsChanged(){super.locStrsChanged(),this.actions.forEach((e=>{e.locTitle&&e.locTitle.strChanged(),e.locStrsChanged()}))}raiseUpdate(e){this.isEmpty=!this.actions.some((e=>e.visible)),this.updateCallback&&this.updateCallback(e)}onSet(){this.actions.forEach((e=>{this.setActionCssClasses(e)})),this.raiseUpdate(!0)}onPush(e){this.setActionCssClasses(e),e.owner=this,this.raiseUpdate(!0)}onRemove(e){e.owner=null,this.raiseUpdate(!0)}setActionCssClasses(e){e.cssClasses=this.cssClasses}get hasActions(){return(this.actions||[]).length>0}get renderedActions(){return this.getRenderedActions()}get visibleActions(){return this.actions.filter((e=>!1!==e.visible))}getRootCss(){const e="small"===this.sizeMode?this.cssClasses.smallSizeMode:this.cssClasses.defaultSizeMode;return(new Ct).append(this.cssClasses.root+(e?" "+e:"")+(this.containerCss?" "+this.containerCss:"")).append(this.cssClasses.root+"--empty",this.isEmpty).toString()}getDefaultCssClasses(){return wt}getAllActions(){return this.actions}set cssClasses(e){this.cssClassesValue={},this.copyCssClasses(this.cssClassesValue,this.getDefaultCssClasses()),ys(e,this.cssClasses),this.getAllActions().forEach((e=>{this.setActionCssClasses(e)}))}get cssClasses(){return this.cssClassesValue||(this.cssClassesValue=this.getDefaultCssClasses()),this.cssClassesValue}createAction(e){return e instanceof qt?e:new Nt(e)}addAction(e,t=!0){const s=this.createAction(e);if(t&&!this.isActionVisible(s))return s;const i=[].concat(this.actions,s);return this.sortItems(i),this.actions=i,s}setItems(e,t=!0){const s=[];e.forEach((e=>{t&&!this.isActionVisible(e)||s.push(this.createAction(e))})),t&&this.sortItems(s),this.actions=s}sortItems(e){this.hasSetVisibleIndex(e)&&e.sort(this.compareByVisibleIndex)}hasSetVisibleIndex(e){for(let t=0;t=0)return!0}return!1}compareByVisibleIndex(e,t){return e.visibleIndex-t.visibleIndex}isActionVisible(e){return e.visibleIndex>=0||void 0===e.visibleIndex}popupAfterShowCallback(e){}mouseOverHandler(e){e.isHovered=!0;let t=!1,s=!1;if(this.actions.forEach((i=>{i===e&&e.popupModel&&(t=!0),i.popupModel&&i.popupModel.isVisible&&(s=!0)})),t){const t=s?Math.max(this.subItemsShowDelay,this.subItemsHideDelay):this.subItemsShowDelay;e.showPopupDelayed(t),this.popupAfterShowCallback(e)}}initResponsivityManager(e,t){}resetResponsivityManager(){}getActionById(e){for(var t=0;te.dispose())),this.actions.length=0}}ft([ge({onSet:(e,t)=>{t.onSet()},onPush:(e,t,s)=>{s.onPush(e)},onRemove:(e,t,s)=>{s.onRemove(e)}})],xt.prototype,"actions",void 0),ft([pe({})],xt.prototype,"containerCss",void 0),ft([pe({defaultValue:!1})],xt.prototype,"isEmpty",void 0),ft([pe({defaultValue:300})],xt.prototype,"subItemsShowDelay",void 0),ft([pe({defaultValue:300})],xt.prototype,"subItemsHideDelay",void 0);class Vt{static focusElement(e){e&&e.focus()}static visibility(e){var t=oe.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&(!e.parentElement||this.visibility(e.parentElement))}static getNextElementPreorder(e){const t=e.nextElementSibling?e.nextElementSibling:e.parentElement.firstElementChild;return this.visibility(t)?t:this.getNextElementPreorder(t)}static getNextElementPostorder(e){const t=e.previousElementSibling?e.previousElementSibling:e.parentElement.lastElementChild;return this.visibility(t)?t:this.getNextElementPostorder(t)}static hasHorizontalScroller(e){return!!e&&e.scrollWidth>e.offsetWidth}static hasVerticalScroller(e){return!!e&&e.scrollHeight>e.offsetHeight}}let _t={root:"sv-list__container",item:"sv-list__item",searchClearButtonIcon:"sv-list__filter-clear-button",loadingIndicator:"sv-list__loading-indicator",itemSelected:"sv-list__item--selected",itemGroup:"sv-list__item--group",itemGroupSelected:"sv-list__item--group-selected",itemWithIcon:"sv-list__item--with-icon",itemDisabled:"sv-list__item--disabled",itemFocused:"sv-list__item--focused",itemHovered:"sv-list__item--hovered",itemTextWrap:"sv-list__item-text--wrap",itemIcon:"sv-list__item-icon",itemMarkerIcon:"sv-list-item__marker-icon",itemSeparator:"sv-list__item-separator",itemBody:"sv-list__item-body",itemsContainer:"sv-list",itemsContainerFiltering:"sv-list--filtering",filter:"sv-list__filter",filterIcon:"sv-list__filter-icon",filterInput:"sv-list__input",emptyContainer:"sv-list__empty-container",emptyText:"sv-list__empty-text"};class Et extends xt{hasText(e,t){if(!t)return!0;const s=e.title||"";if(this.onTextSearchCallback)return this.onTextSearchCallback(e,t);let i=s.toLocaleLowerCase();return i=Ps.comparator.normalizeTextCallback(i,"filter"),i.indexOf(t.toLocaleLowerCase())>-1}isItemVisible(e){return e.visible&&(!this.shouldProcessFilter||this.hasText(e,this.filterString))}getRenderedActions(){let e=super.getRenderedActions();if(this.filterString){let t=[];return e.forEach((e=>{t.push(e),e.items&&e.items.forEach((s=>{const i=new Nt(s);i.iconName||(i.iconName=e.iconName),t.push(i)}))})),t}return e}get visibleItems(){return this.visibleActions.filter((e=>this.isItemVisible(e)))}get shouldProcessFilter(){return!this.onFilterStringChangedCallback}onFilterStringChanged(e){this.onFilterStringChangedCallback&&this.onFilterStringChangedCallback(e),this.updateIsEmpty()}updateIsEmpty(){this.isEmpty=0===this.renderedActions.filter((e=>this.isItemVisible(e))).length}scrollToItem(e,t=0){setTimeout((()=>{if(!this.listContainerHtmlElement)return;const s=this.listContainerHtmlElement.querySelector(vs(e));s&&setTimeout((()=>{s.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}),t)}),t)}constructor(e,t,s,i,r){if(super(),this.onSelectionChanged=t,this.allowSelection=s,this.elementId=r,this.onItemClick=e=>{if(this.isItemDisabled(e))return;this.isExpanded=!1,this.allowSelection&&(this.selectedItem=e),this.onSelectionChanged&&this.onSelectionChanged(e);const t=e.action;t&&t(e)},this.onItemHover=e=>{this.mouseOverHandler(e)},this.isItemDisabled=e=>void 0!==e.enabled&&!e.enabled,this.isItemSelected=e=>this.areSameItems(this.selectedItem,e),this.isItemFocused=e=>this.areSameItems(this.focusedItem,e),this.getListClass=()=>(new Ct).append(this.cssClasses.itemsContainer).append(this.cssClasses.itemsContainerFiltering,!!this.filterString&&this.visibleActions.length!==this.visibleItems.length).toString(),this.getItemClass=e=>{const t=this.isItemSelected(e);return(new Ct).append(this.cssClasses.item).append(this.cssClasses.itemWithIcon,!!e.iconName).append(this.cssClasses.itemDisabled,this.isItemDisabled(e)).append(this.cssClasses.itemFocused,this.isItemFocused(e)).append(this.cssClasses.itemSelected,!e.hasSubItems&&t).append(this.cssClasses.itemGroup,e.hasSubItems).append(this.cssClasses.itemGroupSelected,e.hasSubItems&&t).append(this.cssClasses.itemHovered,e.isHovered).append(this.cssClasses.itemTextWrap,this.textWrapEnabled).append(e.css).toString()},this.getItemStyle=e=>({"--sjs-list-item-level":(e.level||0)+1}),-1!==Object.keys(e).indexOf("items")){const t=e;Object.keys(t).forEach((e=>{switch(e){case"items":this.setItems(t.items);break;case"onFilterStringChangedCallback":this.setOnFilterStringChangedCallback(t.onFilterStringChangedCallback);break;case"onTextSearchCallback":this.setOnTextSearchCallback(t.onTextSearchCallback);break;default:this[e]=t[e]}})),this.updateActionsIds()}else this.setItems(e),this.selectedItem=i}setOnFilterStringChangedCallback(e){this.onFilterStringChangedCallback=e}setOnTextSearchCallback(e){this.onTextSearchCallback=e}setItems(e,t=!0){super.setItems(e,t),this.updateActionsIds(),!this.isAllDataLoaded&&this.actions.length&&this.actions.push(this.loadingIndicator)}updateActionsIds(){this.elementId&&this.renderedActions.forEach((e=>{e.elementId=this.elementId+e.id}))}setSearchEnabled(e){this.searchEnabled=e,this.showSearchClearButton=e}onSet(){this.showFilter=this.searchEnabled&&(this.forceShowFilter||(this.actions||[]).length>Et.MINELEMENTCOUNT),super.onSet()}getDefaultCssClasses(){return _t}popupAfterShowCallback(e){this.addScrollEventListener((()=>{e.hidePopup()}))}onItemLeave(e){e.hidePopupDelayed(this.subItemsHideDelay)}areSameItems(e,t){return this.areSameItemsCallback?this.areSameItemsCallback(e,t):!!e&&!!t&&e.id==t.id}get filterStringPlaceholder(){return this.getLocalizationString("filterStringPlaceholder")}get emptyMessage(){return this.isAllDataLoaded?this.getLocalizationString("emptyMessage"):this.getLocalizationString("loadingData")}get scrollableContainer(){return this.listContainerHtmlElement.querySelector(vs(this.cssClasses.itemsContainer))}get loadingIndicator(){return this.loadingIndicatorValue||(this.loadingIndicatorValue=new Nt({id:"loadingIndicator",title:this.getLocalizationString("loadingPage"),action:()=>{},css:this.cssClasses.loadingIndicator})),this.loadingIndicatorValue}goToItems(e){if("ArrowDown"===e.key||40===e.keyCode){const t=e.target.parentElement.parentElement.querySelector("ul"),s=function(e){let t;for(let s=0;se.visible&&this.isItemSelected(e)))[0],this.focusedItem||this.focusFirstVisibleItem()}focusNextVisibleItem(){if(this.focusedItem){const e=this.visibleItems,t=e.indexOf(this.focusedItem),s=e[t+1];s?this.focusedItem=s:this.focusFirstVisibleItem()}else this.initFocusedItem()}focusPrevVisibleItem(){if(this.focusedItem){const e=this.visibleItems,t=e.indexOf(this.focusedItem),s=e[t-1];s?this.focusedItem=s:this.focusLastVisibleItem()}else this.initFocusedItem()}selectFocusedItem(){this.focusedItem&&this.onItemClick(this.focusedItem)}initListContainerHtmlElement(e){this.listContainerHtmlElement=e}onLastItemRended(e){this.isAllDataLoaded||e===this.actions[this.actions.length-1]&&this.listContainerHtmlElement&&(this.hasVerticalScroller=Vt.hasVerticalScroller(this.scrollableContainer))}scrollToFocusedItem(){this.scrollToItem(this.cssClasses.itemFocused)}scrollToSelectedItem(){this.selectedItem&&this.selectedItem.items&&this.selectedItem.items.length>0?this.scrollToItem(this.cssClasses.itemGroupSelected,110):this.scrollToItem(this.cssClasses.itemSelected,110)}addScrollEventListener(e){e&&(this.removeScrollEventListener(),this.scrollHandler=e),this.scrollHandler&&this.scrollableContainer.addEventListener("scroll",this.scrollHandler)}removeScrollEventListener(){this.scrollHandler&&this.scrollableContainer.removeEventListener("scroll",this.scrollHandler)}dispose(){super.dispose(),this.loadingIndicatorValue&&this.loadingIndicatorValue.dispose(),this.listContainerHtmlElement=void 0}}Et.INDENT=16,Et.MINELEMENTCOUNT=10,ft([pe({defaultValue:!0,onSet:(e,t)=>{t.onSet()}})],Et.prototype,"searchEnabled",void 0),ft([pe({defaultValue:!1})],Et.prototype,"showFilter",void 0),ft([pe({defaultValue:!1})],Et.prototype,"forceShowFilter",void 0),ft([pe({defaultValue:!1})],Et.prototype,"isExpanded",void 0),ft([pe({})],Et.prototype,"selectedItem",void 0),ft([pe()],Et.prototype,"focusedItem",void 0),ft([pe({onSet:(e,t)=>{t.onFilterStringChanged(t.filterString)}})],Et.prototype,"filterString",void 0),ft([pe({defaultValue:!1})],Et.prototype,"hasVerticalScroller",void 0),ft([pe({defaultValue:!0})],Et.prototype,"isAllDataLoaded",void 0),ft([pe({defaultValue:!1})],Et.prototype,"showSearchClearButton",void 0),ft([pe({defaultValue:!0})],Et.prototype,"renderElements",void 0),ft([pe({defaultValue:!1})],Et.prototype,"textWrapEnabled",void 0),ft([pe({defaultValue:"sv-list-item-content"})],Et.prototype,"itemComponent",void 0);let Pt=!1,St=null;var It;"undefined"!=typeof navigator&&navigator&&ae.isAvailable()&&(St=navigator.userAgent||navigator.vendor||ae.hasOwn("opera")),(It=St)&&("MacIntel"===navigator.platform&&navigator.maxTouchPoints>0||"iPad"===navigator.platform||/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(It)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(It.substring(0,4)))&&(Pt=!0);const Tt=Pt||!1;var Rt={get isTouch(){return!this.hasMouse&&this.hasTouchEvent},get hasTouchEvent(){return ae.isAvailable()&&(ae.hasOwn("ontouchstart")||navigator.maxTouchPoints>0)},hasMouse:!0};const kt=ae.matchMedia;Rt.hasMouse=function(e){if(!e)return!1;if(Tt)return!1;const t=e("(pointer:fine)"),s=e("(any-hover:hover)");return!!t&&t.matches||!!s&&s.matches}(kt);let Dt=Rt.isTouch;function Lt(e,t,s=600){const i=e||ae.getInnerWidth(),r=t||ae.getInnerHeight();return Math.min(i,r)>=s}class At extends pt{refreshInnerModel(){const e=this.contentComponentData.model;e&&e.refresh&&e.refresh()}constructor(e,t,s){if(super(),this.focusFirstInputSelector="",this.onCancel=()=>{},this.onApply=()=>!0,this.onHide=()=>{},this.onShow=()=>{},this.onDispose=()=>{},this.onVisibilityChanged=this.addEvent(),this.onFooterActionsCreated=this.addEvent(),this.onRecalculatePosition=this.addEvent(),this.contentComponentName=e,this.contentComponentData=t,s)for(var i in s)this[i]=s[i]}get isVisible(){return this.getPropertyValue("isVisible",!1)}set isVisible(e){this.isVisible!==e&&(this.setPropertyValue("isVisible",e),this.onVisibilityChanged.fire(this,{model:this,isVisible:e}))}toggleVisibility(){this.isVisible=!this.isVisible}show(){this.isVisible||(this.isVisible=!0)}hide(){this.isVisible&&(this.isVisible=!1)}recalculatePosition(e){this.onRecalculatePosition.fire(this,{isResetHeight:e})}updateFooterActions(e){const t={actions:e};return this.onFooterActionsCreated.fire(this,t),t.actions}getDisplayMode(){if(this.isModal)return"popup"===this.displayMode?"modal-popup":"modal-overlay";if("popup"===this.displayMode)return"menu-popup";{let e;switch(this.overlayDisplayMode){case"plain":e="menu-popup";break;case"dropdown-overlay":e="menu-overlay";break;case"tablet-dropdown-overlay":e="menu-popup-overlay";break;case"auto":e=Dt?Lt()?"menu-popup-overlay":"menu-overlay":"menu-popup"}return e}}updateDisplayMode(e){if(this.displayMode!==e){const t="dropdown"===e;this.setWidthByTarget=t,this.isFocusedContent=!t}switch(e){case"dropdown":this.displayMode="popup";break;case"popup":this.displayMode="overlay",this.overlayDisplayMode="tablet-dropdown-overlay";break;case"overlay":this.displayMode="overlay",this.overlayDisplayMode="dropdown-overlay"}}onHiding(){this.refreshInnerModel(),this.onHide()}dispose(){super.dispose(),this.onDispose()}}function jt(e,t){const s=new Et(e);s.onSelectionChanged=t=>{e.onSelectionChanged&&e.onSelectionChanged(t),r.hide()};const i=t||{};i.onDispose=()=>{s.dispose()};const r=new At("sv-list",{model:s},i);return r.isFocusedContent=s.showFilter,r.onShow=()=>{i.onShow&&i.onShow(),s.scrollToSelectedItem()},r}function Ot(e){return null==e?void 0:e.previousElementSibling}ft([pe()],At.prototype,"contentComponentName",void 0),ft([pe()],At.prototype,"contentComponentData",void 0),ft([pe({defaultValue:"bottom"})],At.prototype,"verticalPosition",void 0),ft([pe({defaultValue:"left"})],At.prototype,"horizontalPosition",void 0),ft([pe({defaultValue:!0})],At.prototype,"showPointer",void 0),ft([pe({defaultValue:!1})],At.prototype,"isModal",void 0),ft([pe({defaultValue:!0})],At.prototype,"canShrink",void 0),ft([pe({defaultValue:!0})],At.prototype,"isFocusedContent",void 0),ft([pe({defaultValue:!0})],At.prototype,"isFocusedContainer",void 0),ft([pe({defaultValue:""})],At.prototype,"cssClass",void 0),ft([pe({defaultValue:""})],At.prototype,"title",void 0),ft([pe({defaultValue:"auto"})],At.prototype,"overlayDisplayMode",void 0),ft([pe({defaultValue:"popup"})],At.prototype,"displayMode",void 0),ft([pe({defaultValue:"flex"})],At.prototype,"positionMode",void 0);class qt extends pt{constructor(){super(...arguments),this.rendredIdValue=qt.getNextRendredId()}static getNextRendredId(){return qt.renderedId++}get renderedId(){return this.rendredIdValue}get owner(){return this.ownerValue}set owner(e){e!==this.owner&&(this.ownerValue=e,this.locStrsChanged())}get visible(){return this.getVisible()}set visible(e){this.setVisible(e)}get enabled(){return this.getEnabled()}set enabled(e){this.setEnabled(e)}get component(){return this.getComponent()}set component(e){this.setComponent(e)}get locTitle(){return this.getLocTitle()}set locTitle(e){this.setLocTitle(e)}get title(){return this.getTitle()}set title(e){this.setTitle(e)}set cssClasses(e){this.cssClassesValue=e}get cssClasses(){return this.cssClassesValue||wt}get isVisible(){return this.visible&&"popup"!==this.mode&&"removed"!==this.mode}get disabled(){return void 0!==this.enabled&&!this.enabled}get canShrink(){return!this.disableShrink&&!!this.iconName}get hasTitle(){return("small"!=this.mode&&(this.showTitle||void 0===this.showTitle)||!this.iconName)&&!!this.title}get hasSubItems(){return!!this.items&&this.items.length>0}getActionBarItemTitleCss(){return(new Ct).append(this.cssClasses.itemTitle).append(this.cssClasses.itemTitleWithIcon,!!this.iconName).toString()}getActionBarItemCss(){const e=this.hasTitle;return(new Ct).append(this.cssClasses.item).append(this.cssClasses.itemWithTitle,e).append(this.cssClasses.itemAsIcon,!e).append(this.cssClasses.itemActive,!!this.active).append(this.cssClasses.itemPressed,!!this.pressed).append(this.innerCss).toString()}getActionRootCss(){return(new Ct).append("sv-action").append(this.css).append("sv-action--space",this.needSpace).append("sv-action--hidden",!this.isVisible).toString()}getTooltip(){return this.tooltip||this.title}getIsTrusted(e){return e.originalEvent?e.originalEvent.isTrusted:e.isTrusted}showPopup(){this.popupModel&&this.popupModel.show()}hidePopup(){this.popupModel&&this.popupModel.hide()}clearPopupTimeouts(){this.showPopupTimeout&&clearTimeout(this.showPopupTimeout),this.hidePopupTimeout&&clearTimeout(this.hidePopupTimeout)}showPopupDelayed(e){this.clearPopupTimeouts(),this.showPopupTimeout=setTimeout((()=>{this.clearPopupTimeouts(),this.showPopup()}),e)}hidePopupDelayed(e){var t;(null===(t=this.popupModel)||void 0===t?void 0:t.isVisible)?(this.clearPopupTimeouts(),this.hidePopupTimeout=setTimeout((()=>{this.clearPopupTimeouts(),this.hidePopup(),this.isHovered=!1}),e)):(this.clearPopupTimeouts(),this.isHovered=!1)}}qt.renderedId=1,ft([pe()],qt.prototype,"tooltip",void 0),ft([pe()],qt.prototype,"showTitle",void 0),ft([pe()],qt.prototype,"innerCss",void 0),ft([pe()],qt.prototype,"active",void 0),ft([pe()],qt.prototype,"pressed",void 0),ft([pe()],qt.prototype,"popupModel",void 0),ft([pe()],qt.prototype,"needSeparator",void 0),ft([pe()],qt.prototype,"template",void 0),ft([pe({defaultValue:"large"})],qt.prototype,"mode",void 0),ft([pe()],qt.prototype,"visibleIndex",void 0),ft([pe()],qt.prototype,"disableTabStop",void 0),ft([pe()],qt.prototype,"disableShrink",void 0),ft([pe()],qt.prototype,"disableHide",void 0),ft([pe({defaultValue:!1})],qt.prototype,"needSpace",void 0),ft([pe()],qt.prototype,"ariaChecked",void 0),ft([pe()],qt.prototype,"ariaExpanded",void 0),ft([pe({defaultValue:"button"})],qt.prototype,"ariaRole",void 0),ft([pe()],qt.prototype,"iconName",void 0),ft([pe({defaultValue:24})],qt.prototype,"iconSize",void 0),ft([pe()],qt.prototype,"markerIconName",void 0),ft([pe()],qt.prototype,"css",void 0),ft([pe({defaultValue:!1})],qt.prototype,"isPressed",void 0),ft([pe({defaultValue:!1})],qt.prototype,"isHovered",void 0);class Nt extends qt{raiseUpdate(e=!1){this.updateCallback&&this.updateCallback(e)}constructor(e){super(),this.locTitleChanged=()=>{const e=this.locTitle.renderedHtml;this.setPropertyValue("_title",e||void 0)},this.needUpdateMaxDimension=!1,this.needUpdateMinDimension=!1;const t=e instanceof Nt?e.innerItem:e;if(this.innerItem=t,this.locTitle=t?t.locTitle:null,t)for(var s in t)"locTitle"===s||"title"===s&&this.locTitle&&this.title||(this[s]=t[s]);this.locTitleName&&this.locTitleChanged(),this.registerFunctionOnPropertyValueChanged("_title",(()=>{this.needUpdateMaxDimension=!0,this.raiseUpdate()})),this.locStrChangedInPopupModel()}createLocTitle(){return this.createLocalizableString("title",this,!0)}setSubItems(e){if(this.markerIconName="icon-next_16x16",this.component=this.getGroupComponentName(),this.items=[...e.items],this.popupModel){this.popupModel.contentComponentData.model.setItems(this.items)}else this.createPopupForSubitems(e)}createPopupForSubitems(e){const t=Object.assign({},e);t.searchEnabled=!1;const s=jt(t,{horizontalPosition:"right",showPointer:!1,canShrink:!1});s.cssClass="sv-popup-inner",this.popupModel=s}getLocTitle(){return this.locTitleValue}setLocTitle(e){e||this.locTitleValue||(e=this.createLocTitle()),this.locTitleValue&&this.locTitleValue.onStringChanged.remove(this.locTitleChanged),this.locTitleValue=e,this.locTitleValue.onStringChanged.add(this.locTitleChanged),this.locTitleChanged()}getTitle(){return this._title}setTitle(e){this._title=e}get locTitleName(){return this.locTitle.localizationName}set locTitleName(e){this.locTitle.localizationName=e}locStrsChanged(){super.locStrsChanged(),this.locTooltipChanged(),this.locStrChangedInPopupModel()}doAction(e){const t=e.originalEvent?e.originalEvent:e;return this.action(this,t.isTrusted),t.preventDefault(),t.stopPropagation(),!0}doMouseDown(e){this.isMouseDown=!0}doFocus(e){if(this.onFocus){const t=e.originalEvent?e.originalEvent:e;this.onFocus(this.isMouseDown,t)}this.isMouseDown=!1}locStrChangedInPopupModel(){if(!this.popupModel||!this.popupModel.contentComponentData||!this.popupModel.contentComponentData.model)return;const e=this.popupModel.contentComponentData.model;if(Array.isArray(e.actions)){e.actions.forEach((e=>{e.locStrsChanged&&e.locStrsChanged()}))}}locTooltipChanged(){this.locTooltipName&&(this.tooltip=he(this.locTooltipName,this.locTitle.locale))}getLocale(){return this.owner?this.owner.getLocale():""}getMarkdownHtml(e,t,s){return this.owner?this.owner.getMarkdownHtml(e,t,s):void 0}getProcessedText(e){return this.owner?this.owner.getProcessedText(e):e}getRenderer(e){return this.owner?this.owner.getRenderer(e):null}getRendererContext(e){return this.owner?this.owner.getRendererContext(e):e}setVisible(e){this.visible!==e&&(this._visible=e)}getVisible(){return this._visible}setEnabled(e){this._enabled=e}getEnabled(){return this.enabledIf?this.enabledIf():this._enabled}setComponent(e){this._component=e}getComponent(){return this._component}getGroupComponentName(){return"sv-list-item-group"}dispose(){this.updateCallback=void 0,this.locTitleValue&&this.locTitleValue.onStringChanged.remove(this.locTitleChanged),this.locTitleChanged=void 0,this.action=void 0,super.dispose(),this.popupModel&&this.popupModel.dispose()}updateDimension(e,t,s){const i="small"==e?"minDimension":"maxDimension";if(t){const e=t;e.classList.contains("sv-action--hidden")?(e.classList.remove("sv-action--hidden"),this[i]=s(t),e.classList.add("sv-action--hidden")):this[i]=s(t)}}afterRender(){this.afterRenderCallback&&this.afterRenderCallback()}updateMode(e,t){this.updateModeCallback?this.updateModeCallback(e,t):this.afterRenderCallback=()=>{this.updateModeCallback(e,t),this.afterRenderCallback=void 0}}updateDimensions(e,t,s){const i=!s||"large"==s&&"small"!==this.mode?this.mode:s;this.updateMode(i,((i,r)=>{this.updateDimension(i,r,e),s?t():this.updateMode("small"!==i?"small":"large",((s,i)=>{this.updateDimension(s,i,e),t()}))}))}}ft([pe()],Nt.prototype,"id",void 0),ft([pe({defaultValue:!0,onSet:(e,t)=>{t.raiseUpdate()}})],Nt.prototype,"_visible",void 0),ft([pe({onSet:(e,t)=>{t.locTooltipChanged()}})],Nt.prototype,"locTooltipName",void 0),ft([pe()],Nt.prototype,"_enabled",void 0),ft([pe()],Nt.prototype,"action",void 0),ft([pe()],Nt.prototype,"onFocus",void 0),ft([pe()],Nt.prototype,"_component",void 0),ft([pe()],Nt.prototype,"items",void 0),ft([pe({onSet:(e,t)=>{t.locTitleValue.text!==e&&(t.locTitleValue.text=e)}})],Nt.prototype,"_title",void 0);class Mt{constructor(e){this.item=e,this.funcKey="sv-dropdown-action",this.setupPopupCallbacks()}setupPopupCallbacks(){const e=this.popupModel=this.item.popupModel;e&&e.registerPropertyChangedHandlers(["isVisible"],(()=>{e.isVisible?this.item.pressed=!0:this.item.pressed=!1}),this.funcKey)}removePopupCallbacks(){this.popupModel&&this.popupModel.unregisterPropertyChangedHandlers(["isVisible"],this.funcKey)}dispose(){this.removePopupCallbacks()}}class Ft extends xt{hideItemsGreaterN(e){const t=this.getActionsToHide();e=Math.max(e,this.minVisibleItemsCount-(this.visibleActions.length-t.length));const s=[];t.forEach((t=>{e<=0&&(t.mode="popup",s.push(t.innerItem)),e--})),this.hiddenItemsListModel.setItems(s)}getActionsToHide(){return this.visibleActions.filter((e=>!e.disableHide))}updateItemMode(e,t){const s=this.visibleActions;for(let i=s.length-1;i>=0;i--)t>e&&!s[i].disableShrink?(t-=s[i].maxDimension-s[i].minDimension,s[i].mode="small"):s[i].mode="large"}constructor(){super(),this.minVisibleItemsCount=0,this.isResponsivenessDisabled=!1,this.dotsItem=function(e,t,s){var i;const r=t.onSelectionChanged;t.onSelectionChanged=(e,...t)=>{o.hasTitle&&(o.title=e.title),r&&r(e,t)};const n=jt(t,s);n.getTargetCallback=Ot;const a=Object.assign({},e,{component:"sv-action-bar-item-dropdown",popupModel:n,action:(t,s)=>{e.action&&e.action(),n.isFocusedContent=n.isFocusedContent||!s,n.show()}}),o=new Nt(a);return o.data=null===(i=n.contentComponentData)||void 0===i?void 0:i.model,o}({id:"dotsItem-id"+Ft.ContainerID++,css:"sv-dots",innerCss:"sv-dots__item",iconName:"icon-more",visible:!1,tooltip:he("more")},{items:[],allowSelection:!1})}get hiddenItemsListModel(){return this.dotsItem.data}onSet(){this.actions.forEach((e=>e.updateCallback=e=>this.raiseUpdate(e))),super.onSet()}onPush(e){e.updateCallback=e=>this.raiseUpdate(e),super.onPush(e)}getRenderedActions(){return 1===this.actions.length&&this.actions[0].iconName?this.actions:this.actions.concat([this.dotsItem])}getAllActions(){return this.actions.concat(this.dotsItem)}raiseUpdate(e){this.isResponsivenessDisabled||super.raiseUpdate(e)}getActionMinDimension(e){return e.disableShrink?e.maxDimension:e.minDimension}getVisibleItemsCount(e){let{availableSpace:t,gap:s}=e;t-=this.dotsItem.minDimension+s;let i=0;this.visibleActions[0].disableHide?t+=s:i-=s,this.visibleActions.filter((e=>e.disableHide)).forEach((e=>t-=this.getActionMinDimension(e)+s));const r=this.getActionsToHide();if(1===r.length&&r[0].iconName)return 1;for(let e=0;et)return e}fit(e){var t;if(e.availableSpace<=0)return;e.gap=null!==(t=e.gap)&&void 0!==t?t:0;const{availableSpace:s,gap:i}=e;this.dotsItem.visible=!1;const r=this.visibleActions;let n=-1*e.gap,a=-1*e.gap;r.forEach((e=>{n+=this.getActionMinDimension(e)+i,a+=e.maxDimension+i})),s>=a?this.setActionsMode("large"):s{"small"==e&&t.disableShrink?t.mode="large":t.mode=e}))}dispose(){super.dispose(),this.dotsItem.data.dispose(),this.dotsItem.dispose(),this.resetResponsivityManager()}}Ft.ContainerID=1;class Bt{constructor(){this.cancelQueue=[]}getMsFromRule(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}reflow(e){return e.offsetHeight}getAnimationsCount(e){let t="";return getComputedStyle&&(t=getComputedStyle(e).animationName),t&&"none"!=t?t.split(", ").length:0}getAnimationDuration(e){const t=getComputedStyle(e),s=t.animationDelay.split(", "),i=t.animationDuration.split(", ");let r=0;for(let e=0;e=0&&this.cancelQueue.splice(this.cancelQueue.indexOf(e),1)}onAnimationEnd(e,t,s){let i,r=this.getAnimationsCount(e);const n=(s=!0)=>{t(s),clearTimeout(i),this.removeCancelCallback(n),e.removeEventListener("animationend",a)},a=e=>{e.target==e.currentTarget&&--r<=0&&n(!1)};r>0?(e.addEventListener("animationend",a),this.addCancelCallback(n),i=setTimeout((()=>{n(!1)}),this.getAnimationDuration(e)+10)):t(!0)}afterAnimationRun(e,t){e&&t&&t.onAfterRunAnimation&&t.onAfterRunAnimation(e)}beforeAnimationRun(e,t){e&&t&&t.onBeforeRunAnimation&&t.onBeforeRunAnimation(e)}getCssClasses(e){return e.cssClass.replace(/\s+$/,"").split(/\s+/)}runAnimation(e,t,s){e&&(null==t?void 0:t.cssClass)?(this.reflow(e),this.getCssClasses(t).forEach((t=>{e.classList.add(t)})),this.onAnimationEnd(e,s,t)):s(!0)}clearHtmlElement(e,t){e&&t.cssClass&&this.getCssClasses(t).forEach((t=>{e.classList.remove(t)})),this.afterAnimationRun(e,t)}onNextRender(e,t=!1){if(!t&&ae.isAvailable()){let t;const s=()=>{e(!0),cancelAnimationFrame(t)};t=ae.requestAnimationFrame((()=>{t=ae.requestAnimationFrame((()=>{e(!1),this.removeCancelCallback(s)}))})),this.addCancelCallback(s)}else e(!0)}cancel(){[].concat(this.cancelQueue).forEach((e=>e())),this.cancelQueue=[]}}class zt extends Bt{onEnter(e){const t=e.getAnimatedElement(),s=e.getEnterOptions?e.getEnterOptions():{};this.beforeAnimationRun(t,s),this.runAnimation(t,s,(()=>{this.clearHtmlElement(t,s)}))}onLeave(e,t){const s=e.getAnimatedElement(),i=e.getLeaveOptions?e.getLeaveOptions():{};this.beforeAnimationRun(s,i),this.runAnimation(s,i,(e=>{t(),this.onNextRender((()=>{this.clearHtmlElement(s,i)}),e)}))}}class Ht extends Bt{runGroupAnimation(e,t,s,i,r){const n={isAddingRunning:t.length>0,isDeletingRunning:s.length>0,isReorderingRunning:i.length>0},a=t.map((t=>e.getAnimatedElement(t))),o=t.map((t=>e.getEnterOptions?e.getEnterOptions(t,n):{})),l=s.map((t=>e.getAnimatedElement(t))),u=s.map((t=>e.getLeaveOptions?e.getLeaveOptions(t,n):{})),d=i.map((t=>e.getAnimatedElement(t.item))),h=i.map((t=>e.getReorderOptions?e.getReorderOptions(t.item,t.movedForward,n):{}));t.forEach(((e,t)=>{this.beforeAnimationRun(a[t],o[t])})),s.forEach(((e,t)=>{this.beforeAnimationRun(l[t],u[t])})),i.forEach(((e,t)=>{this.beforeAnimationRun(d[t],h[t])}));let c=t.length+s.length+d.length;const p=e=>{--c<=0&&(r&&r(),this.onNextRender((()=>{t.forEach(((e,t)=>{this.clearHtmlElement(a[t],o[t])})),s.forEach(((e,t)=>{this.clearHtmlElement(l[t],u[t])})),i.forEach(((e,t)=>{this.clearHtmlElement(d[t],h[t])}))}),e))};t.forEach(((e,t)=>{this.runAnimation(a[t],o[t],p)})),s.forEach(((e,t)=>{this.runAnimation(l[t],u[t],p)})),i.forEach(((e,t)=>{this.runAnimation(d[t],h[t],p)}))}}class Qt{constructor(e,t,s){this.animationOptions=e,this.update=t,this.getCurrentValue=s,this._debouncedSync=bt((e=>{this.cancelAnimations();try{this._sync(e)}catch(t){this.update(e)}}))}onNextRender(e,t){const s=this.animationOptions.getRerenderEvent();if(s){const i=()=>{s.remove(r),this.cancelCallback=void 0},r=(s,r)=>{r.isCancel?t&&t():e(),i()};this.cancelCallback=()=>{t&&t(),i()},s.add(r)}else{if(!ae.isAvailable())throw new Error("Can't get next render");{const s=ae.requestAnimationFrame((()=>{e(),this.cancelCallback=void 0}));this.cancelCallback=()=>{t&&t(),cancelAnimationFrame(s),this.cancelCallback=void 0}}}}sync(e){this.animationOptions.isAnimationEnabled()?this._debouncedSync.run(e):(this.cancel(),this.update(e))}cancel(){this._debouncedSync.cancel(),this.cancelAnimations()}cancelAnimations(){this.cancelCallback&&this.cancelCallback(),this.animation.cancel()}}class Wt extends Qt{constructor(){super(...arguments),this.animation=new zt}_sync(e){e!==this.getCurrentValue()?e?(this.onNextRender((()=>{this.animation.onEnter(this.animationOptions)})),this.update(e)):this.animation.onLeave(this.animationOptions,(()=>{this.update(e)})):this.update(e)}}class Ut extends Qt{constructor(){super(...arguments),this.animation=new Ht}_sync(e){var t,s;e=[].concat(e);const i=[].concat(this.getCurrentValue()),r=null===(t=this.animationOptions.allowSyncRemovalAddition)||void 0===t||t;let n=function(e,t,s){const i=new Map,r=new Map,n=new Map,a=new Map;e.forEach((e=>{const t=s(e);if(i.has(t))throw new Error("keys must be unique");i.set(s(e),e)})),t.forEach((e=>{const t=s(e);if(r.has(t))throw new Error("keys must be unique");r.set(t,e)}));const o=[],l=[];r.forEach(((e,t)=>{i.has(t)?n.set(t,n.size):o.push(e)})),i.forEach(((e,t)=>{r.has(t)?a.set(t,a.size):l.push(e)}));const u=[];n.forEach(((e,t)=>{const s=a.get(t),i=r.get(t);s!==e&&u.push({item:i,movedForward:s{n.has(s(e))?(d[t]=r.get(c[h]),h++):d[t]=e}));const p=new Map;let m=[];d.forEach((e=>{const t=s(e);r.has(t)?m.length>0&&(p.set(t,m),m=[]):m.push(e)}));const g=new Array;return r.forEach(((e,t)=>{p.has(t)&&p.get(t).forEach((e=>{g.push(e)})),g.push(e)})),m.forEach((e=>{g.push(e)})),{reorderedItems:u,deletedItems:l,addedItems:o,mergedItems:g}}(i,e,null!==(s=this.animationOptions.getKey)&&void 0!==s?s:e=>e);!r&&(n.reorderedItems.length>0||n.addedItems.length>0)&&(n.deletedItems=[],n.mergedItems=e),this.animationOptions.onCompareArrays&&this.animationOptions.onCompareArrays(n);let{addedItems:a,reorderedItems:o,deletedItems:l,mergedItems:u}=n;const d=()=>{this.animation.runGroupAnimation(this.animationOptions,a,l,o,(()=>{l.length>0&&this.update(e)}))};[a,l,o].some((e=>e.length>0))?l.length<=0||o.length>0||a.length>0?(this.onNextRender(d,(()=>{this.update(e)})),this.update(u)):d():this.update(e)}}class Gt extends Qt{constructor(e,t,s,i){super(e,t,s),this.mergeValues=i,this.animation=new Ht}_sync(e){const t=[].concat(this.getCurrentValue());if(t[0]!==e[0]){const s=this.mergeValues?this.mergeValues(e,t):[].concat(t,e);this.onNextRender((()=>{this.animation.runGroupAnimation(this.animationOptions,e,t,[],(()=>{this.update(e)}))}),(()=>this.update(e))),this.update(s,!0)}else this.update(e)}}class Zt extends pt{constructor(){super(),this.createLocTitleProperty()}createLocTitleProperty(){return this.createLocalizableString("title",this,!0)}get isPage(){return!1}get isPanel(){return!1}get isQuestion(){return!1}get isSurvey(){return!1}get title(){return this.getLocalizableStringText("title",this.getDefaultTitleValue())}set title(e){this.setTitleValue(e)}get locTitle(){return this.getLocalizableString("title")}getDefaultTitleValue(){}setTitleValue(e){this.setLocalizableStringText("title",e)}get hasDescription(){return this.getPropertyValue("hasDescription",void 0,(()=>this.calcDescriptionVisibility()))}set hasDescription(e){this.setPropertyValue("hasDescription",e)}calcDescriptionVisibility(){const e=this.description;let t=!1;if(this.isDesignMode){const e=Ie.findProperty(this.getType(),"description");t=!!(null==e?void 0:e.placeholder)}return!!e||t&&this.isDesignMode}resetDescriptionVisibility(){this.resetPropertyValue("hasDescription")}get locDescription(){return this.getLocalizableString("description")}get titleTagName(){let e=this.getDefaultTitleTagName();const t=this.getSurvey();return t?t.getElementTitleTagName(this,e):e}getDefaultTitleTagName(){return Ps.titleTags[this.getType()]}get hasTitle(){return this.title.length>0}get hasTitleActions(){return!1}get hasTitleEvents(){return this.hasTitleActions}getTitleToolbar(){return null}getTitleOwner(){}get isTitleOwner(){return!!this.getTitleOwner()}get isTitleRenderedAsString(){return this.getIsTitleRenderedAsString()}toggleState(){}get cssClasses(){return{}}get cssTitle(){return""}get ariaTitleId(){}get ariaDescriptionId(){}get titleTabIndex(){}get titleAriaExpanded(){}get titleAriaRole(){}get ariaLabel(){return this.locTitle.renderedHtml}get titleAriaLabel(){return this.ariaLabel}getIsTitleRenderedAsString(){return!this.isTitleOwner}}ft([pe({localizable:!0,onSet:(e,t)=>{t.resetDescriptionVisibility()}})],Zt.prototype,"description",void 0);class Jt extends Zt{static getProgressInfoByElements(e,t){const s=pt.createProgressInfo();for(let t=0;t0&&(0==s.requiredQuestionCount&&(s.requiredQuestionCount=1),s.answeredQuestionCount>0&&(s.requiredAnsweredQuestionCount=1)),s}static IsNeedScrollIntoView(e,t,s){const i=s?-1:e.getBoundingClientRect().top;let r=i<0,n=-1;if(!r&&t&&(n=e.getBoundingClientRect().left,r=n<0),!r&&ae.isAvailable()){const e=ae.getInnerHeight();if(r=e>0&&e0&&e{const n=e.getBoundingClientRect().top;if(n===t){if(i++>2)return void s()}else t=n,i=0;requestAnimationFrame(r)};ae.requestAnimationFrame(r)}}static ScrollElementToTop(e,t,s,i){const{root:r}=Ps.environment;if(!e||void 0===r)return!1;const n=r.getElementById(e);return Jt.ScrollElementToViewCore(n,!1,t,s,i)}static ScrollElementToViewCore(e,t,s,i,r){if(!e||!e.scrollIntoView)return r&&r(),!1;const n=Jt.IsNeedScrollIntoView(e,t,s);return n?Jt.ScrollIntoView(e,i,r):r&&r(),n}static GetFirstNonTextElement(e,t=!1){if(!e||!e.length||0==e.length)return null;if(t){let t=e[0];"#text"===t.nodeName&&(t.data=""),t=e[e.length-1],"#text"===t.nodeName&&(t.data="")}for(let t=0;t{Jt.focusElementCore(e,s)}),t?100:10),i}static focusElementCore(e,t){const{root:s}=Ps.environment;if(!s&&!t)return!1;const i=t?t.querySelector(`#${CSS.escape(e)}`):s.getElementById(e);return!(!i||i.disabled||"none"===i.style.display||null===i.offsetParent)&&(Jt.ScrollElementToViewCore(i,!0,!1),i.focus(),!0)}get effectiveColSpan(){const e=this.getPropertyValueWithoutDefault("effectiveColSpan");return void 0!==e?e:(this.setRootStyle(),this.getPropertyValue("effectiveColSpan"))}get colSpan(){return this.getPropertyValue("colSpan",1)}set colSpan(e){this.setPropertyValue("colSpan",e)}constructor(e){super(),this.selectedElementInDesignValue=this,this.disableDesignActions=Jt.CreateDisabledDesignElements,this.parentQuestionValue=null,this.isContentElement=!1,this.isEditableTemplateElement=!1,this.isInteractiveDesignElement=!0,this.isSingleInRow=!0,this._renderedIsExpanded=!0,this._isAnimatingCollapseExpand=!1,this.animationCollapsed=new Wt(this.getExpandCollapseAnimationOptions(),(e=>{this._renderedIsExpanded=e,this.animationAllowed&&(e?this.isAnimatingCollapseExpand=!0:this.updateElementCss(!1))}),(()=>this.renderedIsExpanded)),this.onAfterRenderElement=this.addEvent(),this.setPropertyValueDirectly("name",this.getValidName(e)),this.createNewArray("errors"),this.createNewArray("titleActions"),this.registerPropertyChangedHandlers(["isReadOnly"],(()=>{this.onReadOnlyChanged()})),this.registerPropertyChangedHandlers(["errors"],(()=>{this.updateVisibleErrors()})),this.registerPropertyChangedHandlers(["isSingleInRow"],(()=>{this.updateElementCss(!1)})),this.registerPropertyChangedHandlers(["minWidth","maxWidth","renderWidth","allowRootStyle","parent"],(()=>{this.updateRootStyle()})),this.registerPropertyChangedHandlers(["effectiveColSpan"],(e=>{this.colSpan=e}))}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"state"===e&&(this.updateElementCss(!1),this.notifyStateChanged(t),this.stateChangedCallback&&this.stateChangedCallback())}getSkeletonComponentNameCore(){return this.survey?this.survey.getSkeletonComponentName(this):"sv-skeleton"}get parentQuestion(){return this.parentQuestionValue}setParentQuestion(e){this.parentQuestionValue=e,this.onParentQuestionChanged()}onParentQuestionChanged(){}updateElementVisibility(){this.setPropertyValue("isVisible",this.isVisible)}get skeletonComponentName(){return this.getSkeletonComponentNameCore()}get state(){return this.getPropertyValue("state")}set state(e){this.setPropertyValue("state",e),this.renderedIsExpanded=!this.isCollapsed}notifyStateChanged(e){this.survey&&this.survey.elementContentVisibilityChanged(this)}get isCollapsed(){return"collapsed"===this.state&&!this.isDesignMode}get isExpanded(){return"expanded"===this.state}collapse(){this.isDesignMode||(this.state="collapsed")}expand(){this.state="expanded"}toggleState(){return this.isCollapsed?(this.expand(),!0):!this.isExpanded||(this.collapse(),!1)}get hasStateButton(){return this.isExpanded||this.isCollapsed}get shortcutText(){return this.title||this.name}getTitleToolbar(){return this.titleToolbarValue||(this.titleToolbarValue=this.createActionContainer(!0),this.titleToolbarValue.locOwner=this,this.titleToolbarValue.containerCss=(this.isPanel?this.cssClasses.panel.titleBar:this.cssClasses.titleBar)||"sv-action-title-bar",this.titleToolbarValue.setItems(this.getTitleActions())),this.titleToolbarValue}createActionContainer(e){const t=e?new Ft:new xt;return this.survey&&this.survey.getCss().actionBar&&(t.cssClasses=this.survey.getCss().actionBar),t}get titleActions(){return this.getPropertyValue("titleActions")}getTitleActions(){return this.isTitleActionRequested||(this.updateTitleActions(),this.isTitleActionRequested=!0),this.titleActions}getDefaultTitleActions(){return[]}updateTitleActions(){let e=this.getDefaultTitleActions();this.survey&&(e=this.survey.getUpdatedElementTitleActions(this,e)),this.setPropertyValue("titleActions",e)}locStrsChanged(){super.locStrsChanged(),this.titleToolbarValue&&this.titleToolbarValue.locStrsChanged()}get hasTitleActions(){return this.getTitleActions().length>0}get hasTitleEvents(){return void 0!==this.state&&"default"!==this.state}get titleTabIndex(){return this.isPage||"default"===this.state?void 0:0}get titleAriaExpanded(){if(!this.isPage&&"default"!==this.state)return"expanded"===this.state?"true":"false"}get titleAriaRole(){if(!this.isPage&&"default"!==this.state)return"button"}setSurveyImpl(e,t){this.surveyImplValue=e,this.surveyImplValue?(this.surveyDataValue=this.surveyImplValue.getSurveyData(),this.setSurveyCore(this.surveyImplValue.getSurvey()),this.textProcessorValue=this.surveyImplValue.getTextProcessor(),this.onSetData()):(this.setSurveyCore(null),this.surveyDataValue=null),this.survey&&(this.resetDescriptionVisibility(),this.clearCssClasses()),this.blockAnimations(),this.renderedIsExpanded=!this.isCollapsed,this.releaseAnimations()}canRunConditions(){return super.canRunConditions()&&!!this.data}getDataFilteredValues(){return this.data?this.data.getFilteredValues():{}}getDataFilteredProperties(){var e=this.data?this.data.getFilteredProperties():{};return e.question=this,e}get surveyImpl(){return this.surveyImplValue}__setData(e){this.surveyDataValue=e}get data(){return this.surveyDataValue}get survey(){return this.getSurvey()}getSurvey(e=!1){return this.surveyValue||this.surveyImplValue&&this.setSurveyCore(this.surveyImplValue.getSurvey()),this.surveyValue}setSurveyCore(e){this.surveyValue=e,this.surveyChangedCallback&&this.surveyChangedCallback()}get skeletonHeight(){let e;return this.survey&&this.survey.skeletonHeight&&(e=this.survey.skeletonHeight+"px"),e}get isInternal(){return this.isContentElement}get areInvisibleElementsShowing(){return!!this.survey&&this.survey.areInvisibleElementsShowing&&!this.isContentElement}get isVisible(){return!0}get isReadOnly(){return this.readOnly}get readOnly(){return this.getPropertyValue("readOnly")}set readOnly(e){this.readOnly!=e&&(this.setPropertyValue("readOnly",e),this.isLoadingFromJson||this.setPropertyValue("isReadOnly",this.isReadOnly))}onReadOnlyChanged(){this.readOnlyChangedCallback&&this.readOnlyChangedCallback()}get css(){return this.survey?this.survey.getCss():{}}get cssClassesValue(){let e=this.getPropertyValueWithoutDefault("cssClassesValue");return e||this.isCssValueCalculating||(this.isCssValueCalculating=!0,e=this.createCssClassesValue(),this.isCssValueCalculating=!1),e}createCssClassesValue(){const e=this.calcCssClasses(this.css);return this.setPropertyValue("cssClassesValue",e),this.onCalcCssClasses(e),this.updateElementCssCore(this.cssClassesValue),e}onCalcCssClasses(e){}get cssClasses(){return this.cssClassesValue,this.survey?(this.cssClassesValue||this.createCssClassesValue(),this.cssClassesValue):this.calcCssClasses(this.css)}get cssTitleNumber(){const e=this.cssClasses;return e.number?e.number:e.panel?e.panel.number:void 0}get cssRequiredMark(){const e=this.cssClasses;return e.requiredMark||e.panel&&e.panel.requiredMark}getCssTitleExpandableSvg(){return"default"===this.state?null:this.cssClasses.titleExpandableSvg}calcCssClasses(e){}updateElementCssCore(e){}get cssError(){return""}updateElementCss(e){this.clearCssClasses()}clearCssClasses(){this.resetPropertyValue("cssClassesValue")}getIsLoadingFromJson(){return!!super.getIsLoadingFromJson()||!!this.surveyValue&&this.surveyValue.isLoadingFromJson}get name(){return this.getPropertyValue("name","")}set name(e){var t=this.name;this.setPropertyValue("name",this.getValidName(e)),!this.isLoadingFromJson&&t&&this.onNameChanged(t)}getValidName(e){return e}onNameChanged(e){}updateBindingValue(e,t){this.data&&!this.isTwoValueEquals(t,this.data.getValue(e))&&this.data.setValue(e,t,!1)}get errors(){return this.getPropertyValue("errors")}set errors(e){this.setPropertyValue("errors",e)}updateVisibleErrors(){for(var e=0,t=0;t0}get containsErrors(){return this.getPropertyValue("containsErrors",!1)}updateContainsErrors(){this.setPropertyValue("containsErrors",this.getContainsErrors())}getContainsErrors(){return this.errors.length>0}get selectedElementInDesign(){return this.selectedElementInDesignValue}set selectedElementInDesign(e){this.selectedElementInDesignValue=e}updateCustomWidgets(){}onSurveyLoad(){}get wasRendered(){return!!this.wasRenderedValue}onFirstRendering(){this.wasRendered||(this.wasRenderedValue=!0,this.onFirstRenderingCore())}onFirstRenderingCore(){}endLoadingFromJson(){super.endLoadingFromJson(),this.survey||this.onSurveyLoad()}setVisibleIndex(e){return 0}delete(e){}getLocale(){return this.survey?this.survey.getLocale():this.locOwner?this.locOwner.getLocale():""}getMarkdownHtml(e,t,s){return this.survey?this.survey.getSurveyMarkdownHtml(this,e,t,s):this.locOwner?this.locOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.survey&&"function"==typeof this.survey.getRendererForString?this.survey.getRendererForString(this,e):this.locOwner&&"function"==typeof this.locOwner.getRenderer?this.locOwner.getRenderer(e):null}getRendererContext(e){return this.survey&&"function"==typeof this.survey.getRendererContextForString?this.survey.getRendererContextForString(this,e):this.locOwner&&"function"==typeof this.locOwner.getRendererContext?this.locOwner.getRendererContext(e):e}getProcessedText(e){return this.isLoadingFromJson?e:this.textProcessor?this.textProcessor.processText(e,this.getUseDisplayValuesInDynamicTexts()):this.locOwner?this.locOwner.getProcessedText(e):e}getUseDisplayValuesInDynamicTexts(){return!0}removeSelfFromList(e){if(!e||!Array.isArray(e))return;const t=e.indexOf(this);t>-1&&e.splice(t,1)}get textProcessor(){return this.textProcessorValue}getProcessedHtml(e){return e&&this.textProcessor?this.textProcessor.processText(e,!0):e}onSetData(){}get parent(){return this.getPropertyValue("parent",null)}set parent(e){this.setPropertyValue("parent",e)}getPage(e){for(;e&&e.parent;)e=e.parent;return e&&e.isPage?e:null}moveToBase(e,t,s=null){if(!t)return!1;e.removeElement(this);let i=-1;return ue.isNumber(s)&&(i=parseInt(s)),-1==i&&s&&s.getType&&(i=t.indexOf(s)),t.addElement(this,i),!0}setPage(e,t){const s=this.getPage(e);if(this.prevSurvey=this.survey,"string"==typeof t){this.getSurvey().pages.forEach((e=>{t===e.name&&(t=e)}))}s!==t&&(e&&e.removeElement(this),t&&t.addElement(this,-1),this.prevSurvey=void 0)}getSearchableLocKeys(e){e.push("title"),e.push("description")}get isDefaultV2Theme(){return this.survey&&-1!==this.survey.getCss().root.indexOf("sd-root-modern")}get hasParent(){return this.parent&&!this.parent.isPage||void 0===this.parent}shouldAddRunnerStyles(){return!this.isDesignMode&&this.isDefaultV2Theme}get isCompact(){return this.survey&&this.survey.isCompact}canHaveFrameStyles(){var e;return(null===(e=this.survey)||void 0===e?void 0:e.currentSingleElement)===this||void 0!==this.parent&&(!this.hasParent||this.parent&&this.parent.showPanelAsPage)}getHasFrameV2(){return this.shouldAddRunnerStyles()&&this.canHaveFrameStyles()}getIsNested(){return this.shouldAddRunnerStyles()&&!this.canHaveFrameStyles()}getCssRoot(e){const t=!!this.isCollapsed||!!this.isExpanded;return(new Ct).append(e.withFrame,this.getHasFrameV2()&&!this.isCompact).append(e.compact,this.isCompact&&this.getHasFrameV2()).append(e.collapsed,!!this.isCollapsed).append(e.expandableAnimating,t&&this.isAnimatingCollapseExpand).append(e.expanded,!!this.isExpanded&&this.renderedIsExpanded).append(e.expandable,t).append(e.nested,this.getIsNested()).toString()}get width(){return this.getPropertyValue("width","")}set width(e){this.setPropertyValue("width",e)}get minWidth(){return this.getPropertyValue("minWidth")}set minWidth(e){this.setPropertyValue("minWidth",e)}get maxWidth(){return this.getPropertyValue("maxWidth")}set maxWidth(e){this.setPropertyValue("maxWidth",e)}get renderWidth(){return this.getPropertyValue("renderWidth","")}set renderWidth(e){this.setPropertyValue("renderWidth",e)}get indent(){return this.getPropertyValue("indent")}set indent(e){this.setPropertyValue("indent",e)}get rightIndent(){return this.getPropertyValue("rightIndent",0)}set rightIndent(e){this.setPropertyValue("rightIndent",e)}getRootStyle(){const e={};return this.paddingLeft&&(e["--sv-element-add-padding-left"]=this.paddingLeft),this.paddingRight&&(e["--sv-element-add-padding-right"]=this.paddingRight),e}get paddingLeft(){return this.getPropertyValue("paddingLeft",void 0,(()=>this.calcPaddingLeft()))}calcPaddingLeft(){return""}get paddingRight(){return this.getPropertyValue("paddingRight",void 0,(()=>this.calcPaddingRight()))}set paddingRight(e){this.setPropertyValue("paddingRight",e)}calcPaddingRight(){return""}resetIndents(){this.resetPropertyValue("paddingLeft"),this.resetPropertyValue("paddingRight")}get rootStyle(){return this.getPropertyValue("rootStyle",void 0,(()=>this.calcRootStyle()))}set rootStyle(e){this.setPropertyValue("rootStyle",e)}updateRootStyle(){this.getPropertyValueWithoutDefault("rootStyle")?this.setRootStyle():this.resetPropertyValue("effectiveColSpan")}setRootStyle(){this.rootStyle=this.calcRootStyle()}calcRootStyle(){const e={};let t;if(this.parent){t=this.parent.getColumsForElement(this).reduce(((e,t)=>t.effectiveWidth+e),0),t&&100!==t&&(e.flexGrow=1,e.flexShrink=0,e.flexBasis=t+"%",e.minWidth=void 0,e.maxWidth=this.maxWidth)}if(0==Object.keys(e).length){let t=""+this.minWidth;if(t&&"auto"!=t){if(-1!=t.indexOf("px")&&this.survey){t=t.replace("px","");let e=parseFloat(t);isNaN(e)||(t=e*this.survey.widthScale/100,t+="px")}t="min(100%, "+t+")"}this.allowRootStyle&&this.renderWidth&&(e.flexGrow=1,e.flexShrink=1,e.flexBasis=this.renderWidth,e.minWidth=t,e.maxWidth=this.maxWidth)}return e}isContainsSelection(e){let t;const s=oe.getDocument();if(oe.isAvailable()&&s&&s.selection)t=s.selection.createRange().parentElement();else{var i=ae.getSelection();if(i&&i.rangeCount>0){const e=i.getRangeAt(0);e.startOffset!==e.endOffset&&(t=e.startContainer.parentNode)}}return t==e}get clickTitleFunction(){if(this.needClickTitleFunction())return e=>{if(!e||!this.isContainsSelection(e.target))return this.processTitleClick()}}needClickTitleFunction(){return"default"!==this.state}processTitleClick(){"default"!==this.state&&this.toggleState()}get hasAdditionalTitleToolbar(){return!1}get additionalTitleToolbar(){return this.getAdditionalTitleToolbar()}getAdditionalTitleToolbar(){return null}getCssTitle(e){if(!e)return"";const t="default"!==this.state;return(new Ct).append(e.title).append(e.titleNumInline,(this.no||"").length>4||t).append(e.titleExpandable,t).append(e.titleExpanded,this.isExpanded).append(e.titleCollapsed,this.isCollapsed).append(e.titleDisabled,this.isDisabledStyle).append(e.titleReadOnly,this.isReadOnly).append(e.titleOnError,this.containsErrors).toString()}get isDisabledStyle(){return this.getIsDisableAndReadOnlyStyles(!1)[1]}get isReadOnlyStyle(){return this.getIsDisableAndReadOnlyStyles(!1)[0]}getIsDisableAndReadOnlyStyles(e){const t=this.isPreviewStyle,s=e||this.isReadOnly;return[s&&!t,!this.isDefaultV2Theme&&(s||t)]}get isPreviewStyle(){return!!this.survey&&"preview"===this.survey.state}localeChanged(){super.localeChanged(),this.resetDescriptionVisibility(),this.errors.length>0&&this.errors.forEach((e=>{e.updateText()}))}setWrapperElement(e){this.wrapperElement=e}getWrapperElement(){return this.wrapperElement}set isAnimatingCollapseExpand(e){e!==this._isAnimatingCollapseExpand&&(this._isAnimatingCollapseExpand=e,this.updateElementCss(!1))}get isAnimatingCollapseExpand(){return this._isAnimatingCollapseExpand||this._renderedIsExpanded!=this.isExpanded}onElementExpanded(e){}getExpandCollapseAnimationOptions(){const e=e=>{this.isAnimatingCollapseExpand=!0,xs(e)},t=e=>{this.isAnimatingCollapseExpand=!1,Vs(e)};return{getRerenderEvent:()=>this.onElementRerendered,getEnterOptions:()=>({cssClass:(this.isPanel?this.cssClasses.panel:this.cssClasses).contentEnter,onBeforeRunAnimation:e,onAfterRunAnimation:e=>{t(e),this.onElementExpanded(!0)}}),getLeaveOptions:()=>({cssClass:(this.isPanel?this.cssClasses.panel:this.cssClasses).contentLeave,onBeforeRunAnimation:e,onAfterRunAnimation:t}),getAnimatedElement:()=>{var e;const t=this.isPanel?this.cssClasses.panel:this.cssClasses;if(t.content){const s=vs(t.content);if(s)return null===(e=this.getWrapperElement())||void 0===e?void 0:e.querySelector(`:scope ${s}`)}},isAnimationEnabled:()=>this.isExpandCollapseAnimationEnabled}}get isExpandCollapseAnimationEnabled(){return this.animationAllowed&&!this.isDesignMode}set renderedIsExpanded(e){const t=this._renderedIsExpanded;this.animationCollapsed.sync(e),this.isExpandCollapseAnimationEnabled||t||!this.renderedIsExpanded||this.onElementExpanded(!1)}get renderedIsExpanded(){return!!this._renderedIsExpanded}getIsAnimationAllowed(){return super.getIsAnimationAllowed()&&!!this.survey&&!this.survey.isEndLoadingFromJson}afterRenderCore(e){this.onAfterRenderElement.fire(this,{htmlElement:e})}dispose(){super.dispose(),this.titleToolbarValue&&this.titleToolbarValue.dispose()}}Jt.CreateDisabledDesignElements=!1,ft([pe({defaultValue:!1})],Jt.prototype,"hasVisibleErrors",void 0),ft([pe({defaultValue:!0})],Jt.prototype,"isSingleInRow",void 0),ft([pe({defaultValue:!0})],Jt.prototype,"allowRootStyle",void 0),ft([pe()],Jt.prototype,"_renderedIsExpanded",void 0);class Kt{constructor(e,t,s=100){this._elements=e,this._renderedHandler=t,this._elementsToRenderCount=0,this._elementsToRenderTimer=void 0,this._elementRenderedHandler=(e,t)=>{var s;null===(s=e.onAfterRenderElement)||void 0===s||s.remove(this._elementRenderedHandler),this._elementsToRenderCount--,this._elementsToRenderCount<=0&&this.visibleElementsRendered()},this._elements.forEach((e=>{e.onAfterRenderElement&&(e.onAfterRenderElement.add(this._elementRenderedHandler),this._elementsToRenderCount++)})),this._elementsToRenderCount>0?this._elementsToRenderTimer=setTimeout((()=>{this._elementsToRenderCount>0&&this.visibleElementsRendered()}),s):this.visibleElementsRendered()}stopWaitingForElementsRendering(){this._elementsToRenderTimer&&(clearTimeout(this._elementsToRenderTimer),this._elementsToRenderTimer=void 0),this._elements.forEach((e=>{var t;null===(t=e.onAfterRenderElement)||void 0===t||t.remove(this._elementRenderedHandler)})),this._elementsToRenderCount=0}visibleElementsRendered(){const e=this._renderedHandler;this.dispose(),"function"==typeof e&&e()}dispose(){this.stopWaitingForElementsRendering(),this._elements=void 0,this._renderedHandler=void 0}}class Xt{static get defaultLocale(){return Ps.localization.defaultLocaleName}static set defaultLocale(e){Ps.localization.defaultLocaleName=e}get localizationName(){return this._localizationName}set localizationName(e){this._localizationName!=e&&(this._localizationName=e,this.strChanged())}get allowLineBreaks(){var e;return void 0===this._allowLineBreaks&&(this._allowLineBreaks=!1,this.name&&this.owner instanceof Zt&&(this._allowLineBreaks="text"==(null===(e=Ie.findProperty(this.owner.getType(),this.name))||void 0===e?void 0:e.type))),this._allowLineBreaks}constructor(e,t=!1,s,i){this.owner=e,this.useMarkdown=t,this.name=s,this.values={},this.htmlValues={},this.onStringChanged=new vt,this._localizationName=i,this.onCreating()}getIsMultiple(){return!1}get locale(){if(this.owner&&this.owner.getLocale){const e=this.owner.getLocale();if(e||!this.sharedData)return e}return this.sharedData?this.sharedData.locale:""}get isDefautlLocale(){const e=this.locale;return!e||e===Ps.defaultLocaleName}strChanged(){this.isTextRequested&&(this.searchableText=void 0,(void 0!==this.renderedText||!this.isEmpty||this.onGetTextCallback||this.localizationName)&&(this.calculatedTextValue=this.calcText(),this.renderedText!==this.calculatedTextValue&&(this.renderedText=void 0,this.calculatedTextValue=void 0),this.htmlValues={},this.onChanged(),this.onStringChanged.fire(this,{})))}get text(){return this.pureText}set text(e){this.setLocaleText(this.locale,e)}get calculatedText(){return this.renderedText=void 0!==this.calculatedTextValue?this.calculatedTextValue:this.calcText(),this.calculatedTextValue=void 0,this.renderedText}getPlaceholder(){let e="";if(!this.isDefautlLocale){const t=this.getRootDialect(this.locale);e=this.getLocaleText(t||Ps.defaultLocaleName)}return!e&&this.onGetTextCallback&&(e=this.onGetTextCallback("","")),e}calcText(){const e=this.pureText;let t=e;return t&&this.owner&&this.owner.getProcessedText&&t.indexOf("{")>-1&&(t=this.owner.getProcessedText(t)),this.onGetTextCallback&&(t=this.onGetTextCallback(t,e)),t}get pureText(){this.isTextRequested=!0;var e=this.locale;e||(e=this.defaultLoc);var t=this.getValue(e);if(this.isValueEmpty(t)&&e===this.defaultLoc&&(t=this.getValue(de.defaultLocale)),this.isValueEmpty(t)){const s=this.getRootDialect(e);s&&(t=this.getValue(s))}return this.isValueEmpty(t)&&e!==this.defaultLoc&&(t=this.getValue(this.defaultLoc)),this.isValueEmpty(t)&&this.getLocalizationName()&&(t=this.getLocalizationStr(),this.onGetLocalizationTextCallback&&(t=this.onGetLocalizationTextCallback(t))),t||(t=this.defaultValue||""),t}getRootDialect(e){if(!e)return e;const t=e.indexOf("-");return t>-1?e.substring(0,t):""}getLocalizationName(){return this.sharedData?this.sharedData.localizationName:this.localizationName}getLocalizationStr(){const e=this.getLocalizationName();return e?he(e,this.locale):""}get hasHtml(){return this.hasHtmlValue()}get html(){return this.hasHtml?this.getHtmlValue():""}get isEmpty(){return 0==this.getValuesKeys().length}get textOrHtml(){return this.hasHtml?this.getHtmlValue():this.calculatedText}get renderedHtml(){return this.textOrHtml}getLocaleText(e){const t=this.getLocaleTextCore(e);return t||""}getLocaleTextCore(e){return e||(e=this.defaultLoc),this.getValue(e)}isLocaleTextEqualsWithDefault(e,t){let s=this.getLocaleTextCore(e);return s===t||this.isValueEmpty(s)&&this.isValueEmpty(t)}clear(){this.setJson(void 0)}clearLocale(e){this.setLocaleText(e,void 0)}setLocaleText(e,t){if(e=this.getValueLoc(e),this.lastChangedLoc=e,e&&void 0===t){const t=this.getValue(e);void 0!==t&&(this.deleteValue(e),this.fireStrChanged(e,t))}else if(this.storeDefaultText||!this.isLocaleTextEqualsWithDefault(e,t)){if(Ps.localization.storeDuplicatedTranslations||this.isValueEmpty(t)||!e||e==this.defaultLoc||this.getValue(e)||t!=this.getLocaleText(this.defaultLoc)){var s=this.curLocale;e||(e=this.defaultLoc);var i=this.onStrChanged&&e===s?this.pureText:void 0;delete this.htmlValues[e],this.isValueEmpty(t)?this.deleteValue(e):"string"==typeof t&&(this.canRemoveLocValue(e,t)?this.setLocaleText(e,null):(this.setValue(e,t),e==this.defaultLoc&&this.deleteValuesEqualsToDefault(t))),this.fireStrChanged(e,i)}}else{if(!this.isValueEmpty(t)||e&&e!==this.defaultLoc)return;let s=de.defaultLocale,i=this.getValue(s);s&&!this.isValueEmpty(i)&&(this.setValue(s,t),this.fireStrChanged(s,i))}}isValueEmpty(e){return null==e||!this.localizationName&&""===e}get curLocale(){return this.locale?this.locale:this.defaultLoc}canRemoveLocValue(e,t){if(Ps.localization.storeDuplicatedTranslations)return!1;if(e===this.defaultLoc)return!1;const s=this.getRootDialect(e);if(s){const e=this.getLocaleText(s);return e?e==t:this.canRemoveLocValue(s,t)}return t==this.getLocaleText(this.defaultLoc)}fireStrChanged(e,t){if(this.strChanged(),!this.onStrChanged)return;const s=this.pureText;e===this.curLocale&&t===s||this.onStrChanged(t,s)}hasNonDefaultText(){var e=this.getValuesKeys();return 0!=e.length&&(e.length>1||e[0]!=this.defaultLoc)}getLocales(){var e=this.getValuesKeys();return 0==e.length?[]:e}getJson(){if(this.sharedData)return this.sharedData.getJson();const e=this.getValuesKeys();if(0==e.length){if(this.serializeCallBackText){const e=this.calcText();if(e)return e}return null}if(1==e.length&&e[0]==Ps.localization.defaultLocaleName&&!Ps.serialization.localizableStringSerializeAsObject)return this.values[e[0]];const t={};for(let e in this.values)t[e]=this.values[e];return t}setJson(e,t){if(this.sharedData)this.sharedData.setJson(e,t);else if(this.lastChangedLoc=void 0,this.values={},this.htmlValues={},null!=e)if(t)"string"==typeof e?this.values[Ps.defaultLocaleName]=e:(this.values=e,delete this.values.pos);else{if("string"==typeof e)this.setLocaleText(null,e);else for(var s in e)this.setLocaleText(s,e[s]);this.strChanged()}}get renderAs(){return this.owner&&"function"==typeof this.owner.getRenderer&&this.owner.getRenderer(this.name)||Xt.defaultRenderer}get renderAsData(){return this.owner&&"function"==typeof this.owner.getRendererContext&&this.owner.getRendererContext(this)||this}equals(e){return this.sharedData?this.sharedData.equals(e):!(!e||!e.values)&&ue.isTwoValueEquals(this.values,e.values,!1,!0,!1)}setFindText(e){if(this.searchText!=e){if(this.searchText=e,!this.searchableText){let e=this.textOrHtml;this.searchableText=e?e.toLowerCase():""}var t=this.searchableText,s=t&&e?t.indexOf(e):void 0;return s<0&&(s=void 0),null==s&&this.searchIndex==s||(this.searchIndex=s,this.onSearchChanged&&this.onSearchChanged()),null!=this.searchIndex}}onChanged(){}onCreating(){}hasHtmlValue(){if(!this.owner||!this.useMarkdown)return!1;let e=this.locale;if(e||(e=this.defaultLoc),void 0!==this.htmlValues[e])return!!this.htmlValues[e];let t=this.calculatedText;if(!t)return this.setHtmlValue(e,""),!1;if(this.getLocalizationName()&&t===this.getLocalizationStr())return this.setHtmlValue(e,""),!1;const s=this.owner.getMarkdownHtml(t,this.name);return this.setHtmlValue(e,s),!!s}setHtmlValue(e,t){this.htmlValues[e]=t}getHtmlValue(){var e=this.locale;return e||(e=this.defaultLoc),this.htmlValues[e]}deleteValuesEqualsToDefault(e){if(!Ps.localization.storeDuplicatedTranslations)for(var t=this.getValuesKeys(),s=0;s0}get isEmpty(){return 0==this.getValuesKeys().length}getLocale(e){return e||((e=this.locale)||Ps.localization.defaultLocaleName)}getLocales(){var e=this.getValuesKeys();return 0==e.length?[]:e}getJson(){var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=Ps.localization.defaultLocaleName||Ps.serialization.localizableStringSerializeAsObject?ue.createCopy(this.values):this.values[e[0]]}setJson(e){if(this.values={},e)if(Array.isArray(e))this.setValue(null,e);else for(var t in e)this.setValue(t,e[t])}getValuesKeys(){return Object.keys(this.values)}}function $t(e){const t=t=>{t?e.funcOnYes():e.funcOnNo&&e.funcOnNo()};var s;Ps&&Ps.confirmActionAsync&&Ps.confirmActionAsync(e.message,t,e)||t((s=e.message,Ps&&Ps.confirmActionFunc?Ps.confirmActionFunc(s):confirm(s)))}function es(){if(void 0===es.isIEOrEdge){const e=navigator.userAgent,t=e.indexOf("MSIE "),s=e.indexOf("Trident/"),i=e.indexOf("Edge/");es.isIEOrEdge=i>0||s>0||t>0}return es.isIEOrEdge}const ts=e=>!!e&&!(!("host"in e)||!e.host);function ss(e){const{root:t}=Ps.environment;return e?e.scrollHeight>e.clientHeight&&("scroll"===getComputedStyle(e).overflowY||"auto"===getComputedStyle(e).overflowY)||e.scrollWidth>e.clientWidth&&("scroll"===getComputedStyle(e).overflowX||"auto"===getComputedStyle(e).overflowX)?e:ss(e.parentElement):ts(t)?t.host:t.documentElement}function is(e){const t=Ps.environment;if(!t)return;const{root:s}=t,i=s.getElementById(e);if(!i)return;const r=ss(i);r&&setTimeout((()=>r.dispatchEvent(new CustomEvent("scroll"))),10)}function rs(e){const t=ae.getLocation();e&&t&&(t.href=function(e){return e&&e.toLocaleLowerCase().indexOf("javascript:")>-1?encodeURIComponent(e):e}(e))}function ns(e){return e?["url(",e,")"].join(""):""}const as={changecamera:"flip-24x24",clear:"clear-24x24",cancel:"cancel-24x24",closecamera:"close-24x24",defaultfile:"file-72x72",choosefile:"folder-24x24",file:"toolbox-file-24x24",left:"chevronleft-16x16",modernbooleancheckchecked:"plus-32x32",modernbooleancheckunchecked:"minus-32x32",more:"more-24x24",navmenu_24x24:"navmenu-24x24",removefile:"error-24x24",takepicture:"camera-32x32",takepicture_24x24:"camera-24x24",v2check:"check-16x16",checked:"check-16x16",v2check_24x24:"check-24x24","back-to-panel_16x16":"restoredown-16x16",clear_16x16:"clear-16x16",close_16x16:"close-16x16",collapsedetail:"collapsedetails-16x16",expanddetail:"expanddetails-16x16","full-screen_16x16":"maximize-16x16",loading:"loading-48x48",minimize_16x16:"minimize-16x16",next_16x16:"chevronright-16x16",previous_16x16:"chevronleft-16x16","no-image":"noimage-48x48","ranking-dash":"rankingundefined-16x16","drag-n-drop":"drag-24x24","ranking-arrows":"reorder-24x24",restore_16x16:"fullsize-16x16",reset:"restore-24x24",search:"search-24x24",average:"smiley-rate5-24x24",excellent:"smiley-rate9-24x24",good:"smiley-rate7-24x24",normal:"smiley-rate6-24x24","not-good":"smiley-rate4-24x24",perfect:"smiley-rate10-24x24",poor:"smiley-rate3-24x24",terrible:"smiley-rate1-24x24","very-good":"smiley-rate8-24x24","very-poor":"smiley-rate2-24x24",add_16x16:"add-16x16",add_24x24:"add-24x24",alert_24x24:"warning-24x24",apply:"apply-24x24","arrow-down":"arrowdown-24x24","arrow-left":"arrowleft-24x24","arrow-left_16x16":"arrowleft-16x16",arrowleft:"arrowleft-16x16","arrow-right":"arrowright-24x24","arrow-right_16x16":"arrowright-16x16",arrowright:"arrowright-16x16","arrow-up":"arrowup-24x24",boolean:"toolbox-boolean-24x24","change-question-type_16x16":"speechbubble-16x16",checkbox:"toolbox-checkbox-24x24","collapse-detail_16x16":"minusbox-16x16","collapse-panel":"collapse-pg-24x24",collapse_16x16:"collapse-16x16","color-picker":"dropper-16x16",comment:"toolbox-longtext-24x24",config:"wrench-24x24",copy:"copy-24x24",default:"toolbox-customquestion-24x24",delete_16x16:"delete-16x16",delete_24x24:"delete-24x24",delete:"delete-24x24","description-hide":"hidehint-16x16",description:"hint-16x16","device-desktop":"desktop-24x24","device-phone":"phone-24x24","device-rotate":"rotate-24x24","device-tablet":"tablet-24x24",download:"download-24x24","drag-area-indicator":"drag-24x24","drag-area-indicator_24x16":"draghorizontal-24x16",v2dragelement_16x16:"draghorizontal-24x16","drop-down-arrow":"chevrondown-24x24","drop-down-arrow_16x16":"chevrondown-16x16",chevron_16x16:"chevrondown-16x16",dropdown:"toolbox-dropdown-24x24",duplicate_16x16:"copy-16x16",edit:"edit-24x24",edit_16x16:"edit-16x16","editing-finish":"finishedit-24x24",error:"error-16x16","expand-detail_16x16":"plusbox-16x16","expand-panel":"expand-pg-24x24",expand_16x16:"expand-16x16",expression:"toolbox-expression-24x24","fast-entry":"textedit-24x24",fix:"fix-24x24",html:"toolbox-html-24x24",image:"toolbox-image-24x24",imagepicker:"toolbox-imagepicker-24x24",import:"import-24x24","invisible-items":"invisible-24x24",language:"language-24x24",load:"import-24x24","logic-collapse":"collapse-24x24","logic-expand":"expand-24x24",logo:"image-48x48",matrix:"toolbox-matrix-24x24",matrixdropdown:"toolbox-multimatrix-24x24",matrixdynamic:"toolbox-dynamicmatrix-24x24",multipletext:"toolbox-multipletext-24x24",panel:"toolbox-panel-24x24",paneldynamic:"toolbox-dynamicpanel-24x24",preview:"preview-24x24",radiogroup:"toolbox-radiogroup-24x24",ranking:"toolbox-ranking-24x24",rating:"toolbox-rating-24x24",redo:"redo-24x24",remove_16x16:"remove-16x16",required:"required-16x16",save:"save-24x24","select-page":"selectpage-24x24",settings:"settings-24x24",settings_16x16:"settings-16x16",signaturepad:"toolbox-signature-24x24","switch-active_16x16":"switchon-16x16","switch-inactive_16x16":"switchoff-16x16",tagbox:"toolbox-tagbox-24x24",text:"toolbox-singleline-24x24",theme:"theme-24x24",toolbox:"toolbox-24x24",undo:"undo-24x24",visible:"visible-24x24",wizard:"wand-24x24",searchclear:"clear-16x16","chevron-16x16":"chevrondown-16x16",chevron:"chevrondown-24x24",progressbuttonv2:"arrowleft-16x16",right:"chevronright-16x16","add-lg":"add-24x24",add:"add-24x24"};function os(e){const t=function(e){let t=Ps.customIcons[e];return t?ls(t):(e=ls(e),t=Ps.customIcons[e],t||null)}(e);return t||ls(e)}function ls(e){const t="icon-",s=e.replace(t,"");return t+(as[s]||s)}function us(e){if("string"==typeof e){if(!isNaN(Number(e)))return Number(e);if(e.includes("px"))return parseFloat(e)}if("number"==typeof e)return e}function ds(e){if(void 0===us(e))return e}const hs="sv-focused--by-key";function cs(e){const t=e.target;t&&t.classList&&t.classList.remove(hs)}function ps(e,t){if(e.target&&"true"===e.target.contentEditable)return;const s=e.target;if(!s)return;const i=e.which||e.keyCode;if(9!==i){if(t){if(!t.__keyDownReceived)return;t.__keyDownReceived=!1}13===i||32===i?s.click&&s.click():t&&!t.processEsc||27!==i||s.blur&&s.blur()}else s.classList&&!s.classList.contains(hs)&&s.classList.add(hs)}function ms(e,t){if(!e)return;t||(t=e=>oe.getComputedStyle(e));const s=t(e);e.style.height="auto",e.scrollHeight&&(e.style.height=e.scrollHeight+parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth)+"px")}function gs(e){e.preventDefault(),e.stopPropagation()}function vs(e){if(!e)return e;return e.replace(/\s*?([\w-]+)\s*?/g,".$1")}function fs(e){return getComputedStyle?Number.parseFloat(getComputedStyle(e).width):e.offsetWidth}function bs(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ys(e,t){if(t&&e&&"object"==typeof t)for(var s in e){var i=e[s];!Array.isArray(i)&&i&&"object"==typeof i?(t[s]&&"object"==typeof t[s]||(t[s]={}),ys(i,t[s])):t[s]=i}}function Cs(e,t){const s={};ys(t.list,s),ys(e.list,s),e.list=s}function ws(e,t,s="--animation-"){var i;e.__sv_created_properties=null!==(i=e.__sv_created_properties)&&void 0!==i?i:[],Object.keys(t).forEach((i=>{const r=`${s}${i.split(/\.?(?=[A-Z])/).join("-").toLowerCase()}`;e.style.setProperty(r,t[i]),e.__sv_created_properties.push(r)}))}function xs(e){ws(e,function(e){if(oe.isAvailable()){const{paddingTop:t,paddingBottom:s,borderTopWidth:i,borderBottomWidth:r,marginTop:n,marginBottom:a,boxSizing:o}=oe.getComputedStyle(e);let l=e.offsetHeight+"px";if("content-box"==o){let n=e.offsetHeight;[r,i,s,t].forEach((e=>{n-=parseFloat(e)})),l=n+"px"}return{paddingTop:t,paddingBottom:s,borderTopWidth:i,borderBottomWidth:r,marginTop:n,marginBottom:a,heightFrom:"0px",heightTo:l}}}(e))}function Vs(e){Array.isArray(e.__sv_created_properties)&&(e.__sv_created_properties.forEach((t=>{e.style.removeProperty(t)})),delete e.__sv_created_properties)}const _s="undefined"!=typeof globalThis?globalThis.document:(void 0).document,Es=_s?{root:_s,_rootElement:oe.getBody(),get rootElement(){var e;return null!==(e=this._rootElement)&&void 0!==e?e:oe.getBody()},set rootElement(e){this._rootElement=e},_popupMountContainer:oe.getBody(),get popupMountContainer(){var e;return null!==(e=this._popupMountContainer)&&void 0!==e?e:oe.getBody()},set popupMountContainer(e){this._popupMountContainer=e},svgMountContainer:_s.head,stylesSheetsMountContainer:_s.head}:void 0;var Ps={version:"",designMode:{showEmptyDescriptions:!0,showEmptyTitles:!0},get allowShowEmptyDescriptionInDesignMode(){return this.designMode.showEmptyDescriptions},set allowShowEmptyDescriptionInDesignMode(e){this.designMode.showEmptyDescriptions=e},get allowShowEmptyTitleInDesignMode(){return this.designMode.showEmptyTitles},set allowShowEmptyTitleInDesignMode(e){this.designMode.showEmptyTitles=e},localization:{useLocalTimeZone:!0,storeDuplicatedTranslations:!1,defaultLocaleName:"default"},get useLocalTimeZone(){return this.localization.useLocalTimeZone},set useLocalTimeZone(e){this.localization.useLocalTimeZone=e},get storeDuplicatedTranslations(){return this.localization.storeDuplicatedTranslations},set storeDuplicatedTranslations(e){this.localization.storeDuplicatedTranslations=e},get defaultLocaleName(){return this.localization.defaultLocaleName},set defaultLocaleName(e){this.localization.defaultLocaleName=e},web:{onBeforeRequestChoices:(e,t)=>{},encodeUrlParams:!0,cacheLoadedChoices:!0,disableQuestionWhileLoadingChoices:!1},get webserviceEncodeParameters(){return this.web.encodeUrlParams},set webserviceEncodeParameters(e){this.web.encodeUrlParams=e},get useCachingForChoicesRestful(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestful(e){this.web.cacheLoadedChoices=e},get useCachingForChoicesRestfull(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestfull(e){this.web.cacheLoadedChoices=e},get disableOnGettingChoicesFromWeb(){return this.web.disableQuestionWhileLoadingChoices},set disableOnGettingChoicesFromWeb(e){this.web.disableQuestionWhileLoadingChoices=e},triggers:{changeNavigationButtonsOnComplete:!0,executeCompleteOnValueChanged:!1,executeSkipOnValueChanged:!0},get executeCompleteTriggerOnValueChanged(){return this.triggers.executeCompleteOnValueChanged},set executeCompleteTriggerOnValueChanged(e){this.triggers.executeCompleteOnValueChanged=e},get changeNavigationButtonsOnCompleteTrigger(){return this.triggers.changeNavigationButtonsOnComplete},set changeNavigationButtonsOnCompleteTrigger(e){this.triggers.changeNavigationButtonsOnComplete=e},get executeSkipTriggerOnValueChanged(){return this.triggers.executeSkipOnValueChanged},set executeSkipTriggerOnValueChanged(e){this.triggers.executeSkipOnValueChanged=e},serialization:{itemValueSerializeAsObject:!1,itemValueSerializeDisplayText:!1,localizableStringSerializeAsObject:!1,matrixDropdownColumnSerializeTitle:!1},get itemValueAlwaysSerializeAsObject(){return this.serialization.itemValueSerializeAsObject},set itemValueAlwaysSerializeAsObject(e){this.serialization.itemValueSerializeAsObject=e},get itemValueAlwaysSerializeText(){return this.serialization.itemValueSerializeDisplayText},set itemValueAlwaysSerializeText(e){this.serialization.itemValueSerializeDisplayText=e},get serializeLocalizableStringAsObject(){return this.serialization.localizableStringSerializeAsObject},set serializeLocalizableStringAsObject(e){this.serialization.localizableStringSerializeAsObject=e},lazyRender:{enabled:!1,firstBatchSize:3},get lazyRowsRendering(){return this.lazyRender.enabled},set lazyRowsRendering(e){this.lazyRender.enabled=e},get lazyRowsRenderingStartRow(){return this.lazyRender.firstBatchSize},set lazyRowsRenderingStartRow(e){this.lazyRender.firstBatchSize=e},matrix:{defaultCellType:"dropdown",defaultRowName:"default",totalsSuffix:"-total",maxRowCount:1e3,maxRowCountInCondition:1,renderRemoveAsIcon:!0,columnWidthsByType:{file:{minWidth:"240px"},comment:{minWidth:"200px"}},rateSize:"small"},get matrixDefaultRowName(){return this.matrix.defaultRowName},set matrixDefaultRowName(e){this.matrix.defaultRowName=e},get matrixDefaultCellType(){return this.matrix.defaultCellType},set matrixDefaultCellType(e){this.matrix.defaultCellType=e},get matrixTotalValuePostFix(){return this.matrix.totalsSuffix},set matrixTotalValuePostFix(e){this.matrix.totalsSuffix=e},get matrixMaximumRowCount(){return this.matrix.maxRowCount},set matrixMaximumRowCount(e){this.matrix.maxRowCount=e},get matrixMaxRowCountInCondition(){return this.matrix.maxRowCountInCondition},set matrixMaxRowCountInCondition(e){this.matrix.maxRowCountInCondition=e},get matrixRenderRemoveAsIcon(){return this.matrix.renderRemoveAsIcon},set matrixRenderRemoveAsIcon(e){this.matrix.renderRemoveAsIcon=e},panel:{maxPanelCount:100,maxPanelCountInCondition:1},get panelDynamicMaxPanelCountInCondition(){return this.panel.maxPanelCountInCondition},set panelDynamicMaxPanelCountInCondition(e){this.panel.maxPanelCountInCondition=e},get panelMaximumPanelCount(){return this.panel.maxPanelCount},set panelMaximumPanelCount(e){this.panel.maxPanelCount=e},readOnly:{enableValidation:!1,commentRenderMode:"textarea",textRenderMode:"input"},get readOnlyCommentRenderMode(){return this.readOnly.commentRenderMode},set readOnlyCommentRenderMode(e){this.readOnly.commentRenderMode=e},get readOnlyTextRenderMode(){return this.readOnly.textRenderMode},set readOnlyTextRenderMode(e){this.readOnly.textRenderMode=e},numbering:{includeQuestionsWithHiddenNumber:!1,includeQuestionsWithHiddenTitle:!1},get setQuestionVisibleIndexForHiddenTitle(){return this.numbering.includeQuestionsWithHiddenTitle},set setQuestionVisibleIndexForHiddenTitle(e){this.numbering.includeQuestionsWithHiddenTitle=e},get setQuestionVisibleIndexForHiddenNumber(){return this.numbering.includeQuestionsWithHiddenNumber},set setQuestionVisibleIndexForHiddenNumber(e){this.numbering.includeQuestionsWithHiddenNumber=e},enterKeyAction:"default",comparator:{trimStrings:!0,caseSensitive:!1,normalizeTextCallback:(e,t)=>e},expressionDisableConversionChar:"#",get commentPrefix(){return Ps.commentSuffix},set commentPrefix(e){Ps.commentSuffix=e},commentSuffix:"-Comment",itemValueSeparator:"|",ratingMaximumRateValueCount:20,tagboxCloseOnSelect:!1,dropdownSearchDelay:500,confirmActionFunc:function(e){return confirm(e)},confirmActionAsync:function(e,t,s){return function(e,t,s={}){const i=new Xt(void 0,!1);i.defaultValue=e||s.message;const r=Ps.showDialog({componentName:"sv-string-viewer",data:{locStr:i,locString:i,model:i},onApply:()=>(t(!0),!0),onCancel:()=>(t(!1),!1),displayMode:"popup",isFocusedContent:!1,cssClass:s.cssClass||"sv-popup--confirm"},s.rootElement),n=r.footerToolbar,a=n.getActionById("apply");return n.getActionById("cancel").title=he("cancel",s.locale),a.title=s.applyTitle||he("ok",s.locale),a.innerCss="sd-btn--danger",function(e){e.width="min-content"}(r),!0}(e,t,s)},minWidth:"300px",maxWidth:"100%",maxConditionRunCountOnValueChanged:10,notifications:{lifetime:2e3},autoAdvanceDelay:300,itemFlowDirection:"column",get showItemsInOrder(){return Ps.itemFlowDirection},set showItemsInOrder(e){Ps.itemFlowDirection=e},noneItemValue:"none",refuseItemValue:"refused",dontKnowItemValue:"dontknow",specialChoicesOrder:{selectAllItem:[-1],noneItem:[1],refuseItem:[2],dontKnowItem:[3],otherItem:[4]},choicesSeparator:", ",supportedValidators:{question:["expression"],comment:["text","regex"],text:["numeric","text","regex","email"],checkbox:["answercount"],imagepicker:["answercount"]},minDate:"",maxDate:"",showDialog:void 0,showDefaultItemsInCreator:!0,customIcons:{},rankingDragHandleArea:"entireItem",environment:Es,showMaxLengthIndicator:!0,animationEnabled:!0,titleTags:{survey:"h3",page:"h4",panel:"h4",question:"h5"},questions:{inputTypes:["color","date","datetime-local","email","month","number","password","range","tel","text","time","url","week"],dataList:["","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","organization-title","username","new-password","current-password","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","url","photo","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-local-prefix","tel-local-suffix","tel-extension","email","impp"]},legacyProgressBarView:!1,maskSettings:{patternPlaceholderChar:"_",patternEscapeChar:"\\",patternDefinitions:{9:/[0-9]/,a:/[a-zA-Z]/,"#":/[a-zA-Z0-9]/}},storeUtcDates:!1,onDateCreated:(e,t,s)=>e,parseNumber:(e,t)=>t};class Ss{constructor(e=null,t=null){this.text=e,this.errorOwner=t,this.visible=!0,this.onUpdateErrorTextCallback=void 0}equals(e){return!(!e||!e.getErrorType)&&(this.getErrorType()===e.getErrorType()&&(this.text===e.text&&this.visible===e.visible))}get locText(){return this.locTextValue||(this.locTextValue=new Xt(this.errorOwner,!0),this.locTextValue.storeDefaultText=!0,this.locTextValue.text=this.getText()),this.locTextValue}getText(){var e=this.text;return e||(e=this.getDefaultText()),this.errorOwner&&(e=this.errorOwner.getErrorCustomText(e,this)),e}getErrorType(){return"base"}getDefaultText(){return""}getLocale(){return this.errorOwner?this.errorOwner.getLocale():""}getLocalizationString(e){return he(e,this.getLocale())}updateText(){this.onUpdateErrorTextCallback&&this.onUpdateErrorTextCallback(this),this.locText.text=this.getText()}}class Is extends Ss{constructor(e=null,t=null){super(e,t),this.text=e}getErrorType(){return"required"}getDefaultText(){return this.getLocalizationString("requiredError")}}class Ts extends Ss{constructor(e=null,t=null){super(e,t),this.text=e}getErrorType(){return"requireoneanswer"}getDefaultText(){return this.getLocalizationString("requiredErrorInPanel")}}class Rs extends Ss{constructor(e=null,t=null){super(e,t),this.text=e}getErrorType(){return"requirenumeric"}getDefaultText(){return this.getLocalizationString("numericError")}}class ks extends Ss{constructor(e,t=null){super(null,t),this.maxSize=e,this.locText.text=this.getText()}getErrorType(){return"exceedsize"}getDefaultText(){return this.getLocalizationString("exceedMaxSize").format(this.getTextSize())}getTextSize(){if(0===this.maxSize)return"0 Byte";var e=Math.floor(Math.log(this.maxSize)/Math.log(1024));return(this.maxSize/Math.pow(1024,e)).toFixed([0,0,2,3,3][e])+" "+["Bytes","KB","MB","GB","TB"][e]}}class Ds extends Ss{constructor(e,t,s=null){super(null,s),this.status=e,this.response=t}getErrorType(){return"webrequest"}getDefaultText(){const e=this.getLocalizationString("urlRequestError");return e?e.format(this.status,this.response):""}}class Ls extends Ss{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"webrequestempty"}getDefaultText(){return this.getLocalizationString("urlGetChoicesError")}}class As extends Ss{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"otherempty"}getDefaultText(){return this.getLocalizationString("otherRequiredError")}}class js extends Ss{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"uploadingfile"}getDefaultText(){return this.getLocalizationString("uploadingFile")}}class Os extends Ss{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"requiredinallrowserror"}getDefaultText(){return this.getLocalizationString("requiredInAllRowsError")}}class qs extends Ss{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"eachrowuniqueeerror"}getDefaultText(){return this.getLocalizationString("eachRowUniqueError")}}class Ns extends Ss{constructor(e,t=null){super(null,t),this.minRowCount=e}getErrorType(){return"minrowcounterror"}getDefaultText(){return this.getLocalizationString("minRowCountError").format(this.minRowCount)}}class Ms extends Ss{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"keyduplicationerror"}getDefaultText(){return this.getLocalizationString("keyDuplicationError")}}class Fs extends Ss{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"custom"}}class Bs{constructor(e,t=null){this.value=e,this.error=t}}class zs extends pt{constructor(){super(),this.createLocalizableString("text",this,!0)}get isValidator(){return!0}getSurvey(e=!1){return this.errorOwner&&this.errorOwner.getSurvey?this.errorOwner.getSurvey():null}get text(){return this.getLocalizableStringText("text")}set text(e){this.setLocalizableStringText("text",e)}get isValidateAllValues(){return!1}get locText(){return this.getLocalizableString("text")}getErrorText(e){return this.text?this.text:this.getDefaultErrorText(e)}getDefaultErrorText(e){return""}validate(e,t=null,s=null,i=null){return null}get isRunning(){return!1}get isAsync(){return!1}getLocale(){return this.errorOwner?this.errorOwner.getLocale():""}getMarkdownHtml(e,t,s){return this.errorOwner?this.errorOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.errorOwner?this.errorOwner.getRenderer(e):null}getRendererContext(e){return this.errorOwner?this.errorOwner.getRendererContext(e):e}getProcessedText(e){return this.errorOwner?this.errorOwner.getProcessedText(e):e}createCustomError(e){const t=new Fs(this.getErrorText(e),this.errorOwner);return t.onUpdateErrorTextCallback=t=>t.text=this.getErrorText(e),t}toString(){var e=this.getType().replace("validator","");return this.text&&(e+=", "+this.text),e}}class Hs{run(e){var t=[],s=null,i=null;this.prepareAsyncValidators();for(var r=[],n=e.getValidators(),a=0;a{if(e&&e.error&&r.push(e.error),this.onAsyncCompleted){for(var t=0;tr.value||null!==this.maxValue&&this.maxValue0&&e.length0&&e.length>this.maxLength?new Bs(null,this.createCustomError(t)):null}getDefaultErrorText(e){return"textNoDigitsAllow"===e?this.getLocalizationString(e):this.minLength>0&&this.maxLength>0?this.getLocalizationFormatString("textMinMaxLength",this.minLength,this.maxLength):this.minLength>0?this.getLocalizationFormatString("textMinLength",this.minLength):this.getLocalizationFormatString("textMaxLength",this.maxLength)}get minLength(){return this.getPropertyValue("minLength")}set minLength(e){this.setPropertyValue("minLength",e)}get maxLength(){return this.getPropertyValue("maxLength")}set maxLength(e){this.setPropertyValue("maxLength",e)}get allowDigits(){return this.getPropertyValue("allowDigits")}set allowDigits(e){this.setPropertyValue("allowDigits",e)}}class Us extends zs{constructor(e=null,t=null){super(),this.minCount=e,this.maxCount=t}getType(){return"answercountvalidator"}validate(e,t=null,s=null,i=null){if(null==e||e.constructor!=Array)return null;var r=e.length;return 0==r?null:this.minCount&&rthis.maxCount?new Bs(null,this.createCustomError(this.getLocalizationFormatString("maxSelectError",this.maxCount))):null}getDefaultErrorText(e){return e}get minCount(){return this.getPropertyValue("minCount")}set minCount(e){this.setPropertyValue("minCount",e)}get maxCount(){return this.getPropertyValue("maxCount")}set maxCount(e){this.setPropertyValue("maxCount",e)}}class Gs extends zs{constructor(e=null){super(),this.regex=e}getType(){return"regexvalidator"}validate(e,t=null,s=null,i=null){if(!this.regex||this.isValueEmpty(e))return null;var r=this.createRegExp();if(Array.isArray(e))for(var n=0;n()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()=[\]\.,;:\s@\"]+\.)+[^<>()=[\]\.,;:\s@\"]{2,})$/i}getType(){return"emailvalidator"}validate(e,t=null,s=null,i=null){return e?this.re.test(e)?null:new Bs(e,this.createCustomError(t)):null}getDefaultErrorText(e){return this.getLocalizationString("invalidEmail")}}class Js extends zs{constructor(e=null){super(),this.conditionRunner=null,this.isRunningValue=!1,this.expression=e}getType(){return"expressionvalidator"}get isValidateAllValues(){return!0}get isAsync(){return!!this.ensureConditionRunner(!1)&&this.conditionRunner.isAsync}get isRunning(){return this.isRunningValue}validate(e,t=null,s=null,i=null){if(!this.expression)return null;this.conditionRunner&&(this.conditionRunner.onRunComplete=null),this.ensureConditionRunner(!0),this.conditionRunner.onRunComplete=s=>{this.isRunningValue=!1,this.onAsyncCompleted&&this.onAsyncCompleted(this.generateError(s,e,t))},this.isRunningValue=!0;var r=this.conditionRunner.run(s,i);return this.conditionRunner.isAsync?null:(this.isRunningValue=!1,this.generateError(r,e,t))}generateError(e,t,s){return e?null:new Bs(t,this.createCustomError(s))}getDefaultErrorText(e){return this.getLocalizationFormatString("invalidExpression",this.expression)}ensureConditionRunner(e){return!!this.expression&&(e||!this.conditionRunner?this.conditionRunner=new lt(this.expression):this.conditionRunner.expression=this.expression,!0)}get expression(){return this.getPropertyValue("expression")}set expression(e){this.setPropertyValue("expression",e)}}Ie.addClass("surveyvalidator",[{name:"text",serializationProperty:"locText"}]),Ie.addClass("numericvalidator",["minValue:number","maxValue:number"],(function(){return new Qs}),"surveyvalidator"),Ie.addClass("textvalidator",[{name:"minLength:number",default:0},{name:"maxLength:number",default:0},{name:"allowDigits:boolean",default:!0}],(function(){return new Ws}),"surveyvalidator"),Ie.addClass("answercountvalidator",["minCount:number","maxCount:number"],(function(){return new Us}),"surveyvalidator"),Ie.addClass("regexvalidator",["regex",{name:"caseInsensitive:boolean",alternativeName:"insensitive"}],(function(){return new Gs}),"surveyvalidator"),Ie.addClass("emailvalidator",[],(function(){return new Zs}),"surveyvalidator"),Ie.addClass("expressionvalidator",["expression:condition"],(function(){return new Js}),"surveyvalidator");class Ks{constructor(e,t){this.name=e,this.widgetJson=t,this.htmlTemplate=t.htmlTemplate?t.htmlTemplate:""}afterRender(e,t){this.widgetJson.afterRender&&(e.localeChangedCallback=()=>{this.widgetJson.willUnmount&&this.widgetJson.willUnmount(e,t),this.widgetJson.afterRender(e,t)},this.widgetJson.afterRender(e,t))}willUnmount(e,t){this.widgetJson.willUnmount&&this.widgetJson.willUnmount(e,t)}getDisplayValue(e,t=void 0){return this.widgetJson.getDisplayValue?this.widgetJson.getDisplayValue(e,t):null}validate(e){if(this.widgetJson.validate)return this.widgetJson.validate(e)}isFit(e){return!(!this.isLibraryLoaded()||!this.widgetJson.isFit)&&this.widgetJson.isFit(e)}get canShowInToolbox(){return!1!==this.widgetJson.showInToolbox&&("customtype"==Xs.Instance.getActivatedBy(this.name)&&(!this.widgetJson.widgetIsLoaded||this.widgetJson.widgetIsLoaded()))}get showInToolbox(){return!1!==this.widgetJson.showInToolbox}set showInToolbox(e){this.widgetJson.showInToolbox=e}init(){this.widgetJson.init&&this.widgetJson.init()}activatedByChanged(e){this.isLibraryLoaded()&&this.widgetJson.activatedByChanged&&this.widgetJson.activatedByChanged(e)}isLibraryLoaded(){return!this.widgetJson.widgetIsLoaded||1==this.widgetJson.widgetIsLoaded()}get isDefaultRender(){return this.widgetJson.isDefaultRender}get pdfQuestionType(){return this.widgetJson.pdfQuestionType}get pdfRender(){return this.widgetJson.pdfRender}}class Xs{constructor(){this.widgetsValues=[],this.widgetsActivatedBy={},this.onCustomWidgetAdded=new gt}get widgets(){return this.widgetsValues}add(e,t="property"){this.addCustomWidget(e,t)}addCustomWidget(e,t="property"){var s=e.name;s||(s="widget_"+this.widgets.length+1);var i=new Ks(s,e);return this.widgetsValues.push(i),i.init(),this.widgetsActivatedBy[s]=t,i.activatedByChanged(t),this.onCustomWidgetAdded.fire(i,null),i}getActivatedBy(e){var t=this.widgetsActivatedBy[e];return t||"property"}setActivatedBy(e,t){if(e&&t){var s=this.getCustomWidgetByName(e);s&&(this.widgetsActivatedBy[e]=t,s.activatedByChanged(t))}}clear(){this.widgetsValues=[]}getCustomWidgetByName(e){for(var t=0;tms(this.element)),1)}constructor(e){this.options=e,this.onPropertyChangedCallback=()=>{this.element&&(this.element.value=this.getTextValue(),this.updateElement())},this.question.registerFunctionOnPropertyValueChanged(this.options.propertyName,this.onPropertyChangedCallback,"__textarea")}setElement(e){e&&(this.element=e,this.updateElement())}resetElement(){this.element=void 0}getTextValue(){return this.options.getTextValue&&this.options.getTextValue()||""}onTextAreaChange(e){this.options.onTextAreaChange&&this.options.onTextAreaChange(e)}onTextAreaInput(e){this.options.onTextAreaInput&&this.options.onTextAreaInput(e),this.element&&this.autoGrow&&ms(this.element)}onTextAreaKeyDown(e){this.options.onTextAreaKeyDown&&this.options.onTextAreaKeyDown(e)}onTextAreaBlur(e){this.onTextAreaChange(e),this.options.onTextAreaBlur&&this.options.onTextAreaBlur(e)}onTextAreaFocus(e){this.options.onTextAreaFocus&&this.options.onTextAreaFocus(e)}get question(){return this.options.question}get id(){return this.options.id()}get placeholder(){return this.options.placeholder()}get className(){return this.options.className()}get maxLength(){if(this.options.maxLength)return this.options.maxLength()}get autoGrow(){if(this.options.autoGrow)return this.options.autoGrow()}get rows(){if(this.options.rows)return this.options.rows()}get cols(){if(this.options.cols)return this.options.cols()}get isDisabledAttr(){return this.options.isDisabledAttr()}get isReadOnlyAttr(){if(this.options.isReadOnlyAttr)return this.options.isReadOnlyAttr()}get ariaRequired(){if(this.options.ariaRequired)return this.options.ariaRequired()}get ariaLabel(){if(this.options.ariaLabel)return this.options.ariaLabel()}get ariaInvalid(){if(this.options.ariaInvalid)return this.options.ariaInvalid()}get ariaLabelledBy(){if(this.options.ariaLabelledBy)return this.options.ariaLabelledBy()}get ariaDescribedBy(){if(this.options.ariaDescribedBy)return this.options.ariaDescribedBy()}get ariaErrormessage(){if(this.options.ariaErrormessage)return this.options.ariaErrormessage()}dispose(){this.question&&this.question.unRegisterFunctionOnPropertyValueChanged(this.options.propertyName,"__textarea"),this.resetElement()}}class ei{constructor(e,t,s){this.name=e,this.canRun=t,this.doComplete=s,this.getSecondRunner=()=>{}}}class ti extends Jt{static getQuestionId(){return"sq_"+ti.questionCounter++}isReadOnlyRenderDiv(){return this.isReadOnly&&"div"===Ps.readOnly.commentRenderMode}allowMobileInDesignMode(){return!1}updateIsMobileFromSurvey(){this.setIsMobile(this.survey._isMobile)}setIsMobile(e){const t=e&&(this.allowMobileInDesignMode()||!this.isDesignMode);this.isMobile=t}getIsMobile(){return this._isMobile}get isMobile(){return this.getIsMobile()}set isMobile(e){this._isMobile=e}themeChanged(e){}get _isMobile(){return this.getPropertyValue("_isMobile",!1)}set _isMobile(e){this.setPropertyValue("_isMobile",e)}get forceIsInputReadOnly(){return this.getPropertyValue("forceIsInputReadOnly")}set forceIsInputReadOnly(e){this.setPropertyValue("forceIsInputReadOnly",e)}get ariaExpanded(){return this.getPropertyValue("ariaExpanded")}set ariaExpanded(e){this.setPropertyValue("ariaExpanded",e)}constructor(e){super(e),this.customWidgetData={isNeedRender:!0},this.hasCssErrorCallback=()=>!1,this.isReadyValue=!0,this.dependedQuestions=[],this.onReadyChanged=this.addEvent(),this.triggersInfo=[],this.isRunningValidatorsValue=!1,this.isValueChangedInSurvey=!1,this.allowNotifyValueChanged=!0,this.setPropertyValueDirectly("id",ti.getQuestionId()),this.onCreating(),this.createNewArray("validators",(e=>{e.errorOwner=this})),this.addExpressionProperty("visibleIf",((e,t)=>{this.visible=!0===t})),this.addExpressionProperty("enableIf",((e,t)=>{this.readOnly=!1===t})),this.addExpressionProperty("requiredIf",((e,t)=>{this.isRequired=!0===t})),this.createLocalizableString("commentText",this,!0,"otherItemText"),this.createLocalizableString("requiredErrorText",this),this.createLocalizableString("commentPlaceholder",this),this.createLocalizableString("defaultDisplayValue",this),this.addTriggerInfo("resetValueIf",(()=>!this.isEmpty()),(()=>{this.startSetValueOnExpression(),this.clearValue(),this.updateValueWithDefaults(),this.finishSetValueOnExpression()}));this.addTriggerInfo("setValueIf",(()=>!0),(()=>this.runSetValueExpression())).getSecondRunner=()=>this.getSetValueExpressionRunner(),this.registerPropertyChangedHandlers(["width"],(()=>{this.updateQuestionCss(),this.parent&&this.parent.elementWidthChanged(this)})),this.registerPropertyChangedHandlers(["isRequired"],(()=>{!this.isRequired&&this.errors.length>0&&this.validate(),this.locTitle.strChanged(),this.clearCssClasses()})),this.registerPropertyChangedHandlers(["indent","rightIndent"],(()=>{this.resetIndents()})),this.registerPropertyChangedHandlers(["showCommentArea","showOtherItem"],(()=>{this.initCommentFromSurvey()})),this.registerPropertyChangedHandlers(["commentPlaceholder"],(()=>{this.resetRenderedCommentPlaceholder()})),this.registerFunctionOnPropertiesValueChanged(["no","readOnly","hasVisibleErrors","containsErrors"],(()=>{this.updateQuestionCss()})),this.registerPropertyChangedHandlers(["_isMobile"],(()=>{this.onMobileChanged()})),this.registerPropertyChangedHandlers(["colSpan"],(()=>{var e;null===(e=this.parent)||void 0===e||e.updateColumns()}))}getDefaultTitle(){return this.name}createLocTitleProperty(){const e=super.createLocTitleProperty();return e.storeDefaultText=!0,e.onGetTextCallback=(e,t)=>(e||t||(e=this.getDefaultTitle()),this.survey?this.survey.getUpdatedQuestionTitle(this,e):e),this.locProcessedTitle=new Xt(this,!0),this.locProcessedTitle.sharedData=e,e}get commentTextAreaModel(){return this.commentTextAreaModelValue||(this.commentTextAreaModelValue=new $s(this.getCommentTextAreaOptions())),this.commentTextAreaModelValue}getCommentTextAreaOptions(){return{question:this,id:()=>this.commentId,propertyName:"comment",className:()=>this.cssClasses.comment,placeholder:()=>this.renderedCommentPlaceholder,isDisabledAttr:()=>this.isInputReadOnly||!1,rows:()=>this.commentAreaRows,autoGrow:()=>this.autoGrowComment,maxLength:()=>this.getOthersMaxLength(),ariaRequired:()=>this.a11y_input_ariaRequired,ariaLabel:()=>this.a11y_input_ariaLabel,getTextValue:()=>this.comment,onTextAreaChange:e=>{this.onCommentChange(e)},onTextAreaInput:e=>{this.onCommentInput(e)}}}getSurvey(e=!1){return e?this.parent?this.parent.getSurvey(e):null:this.onGetSurvey?this.onGetSurvey():super.getSurvey()}getValueName(){return this.valueName?this.valueName.toString():this.name}get valueName(){return this.getPropertyValue("valueName","")}set valueName(e){var t=this.getValueName();this.setPropertyValue("valueName",e),this.onValueNameChanged(t)}onValueNameChanged(e){this.survey&&(this.survey.questionRenamed(this,this.name,e||this.name),this.initDataFromSurvey())}onNameChanged(e){this.locTitle.strChanged(),this.survey&&this.survey.questionRenamed(this,e,this.valueName?this.valueName:e)}get isReady(){return this.isReadyValue}onAsyncRunningChanged(){this.updateIsReady()}updateIsReady(){let e=this.getIsQuestionReady();if(e){const t=this.getIsReadyDependsOn();for(let s=0;se.updateIsReady())),this.onReadyChanged.fire(this,{question:this,isReady:e,oldIsReady:t}))}getIsReadyDependsOn(){return this.getIsReadyDependendCore(!0)}getIsReadyDependends(){return this.getIsReadyDependendCore(!1)}getIsReadyDependendCore(e){if(!this.survey)return[];const t=this.survey.questionsByValueName(this.getValueName()),s=new Array;return t.forEach((e=>{e!==this&&s.push(e)})),e||(this.parentQuestion&&s.push(this.parentQuestion),this.dependedQuestions.length>0&&this.dependedQuestions.forEach((e=>s.push(e)))),s}choicesLoaded(){}get page(){return this.parentQuestion?this.parentQuestion.page:this.getPage(this.parent)}set page(e){this.setPage(this.parent,e)}getPanel(){return null}delete(e=!0){this.removeFromParent(),e?this.dispose():this.resetDependedQuestions()}removeFromParent(){this.parent&&this.removeSelfFromList(this.parent.elements)}addDependedQuestion(e){!e||this.dependedQuestions.indexOf(e)>-1||this.dependedQuestions.push(e)}removeDependedQuestion(e){if(e){var t=this.dependedQuestions.indexOf(e);t>-1&&this.dependedQuestions.splice(t,1)}}updateDependedQuestions(){for(var e=0;e0&&(this.errors=[])}notifyStateChanged(e){super.notifyStateChanged(e),this.isCollapsed&&this.onHidingContent()}updateElementVisibility(){this.updateIsVisibleProp()}updateIsVisibleProp(){const e=this.getPropertyValue("isVisible"),t=this.isVisible;e!==t&&(this.setPropertyValue("isVisible",t),t||this.onHidingContent()),t!==this.visible&&this.areInvisibleElementsShowing&&this.updateQuestionCss(!0)}get useDisplayValuesInDynamicTexts(){return this.getPropertyValue("useDisplayValuesInDynamicTexts")}set useDisplayValuesInDynamicTexts(e){this.setPropertyValue("useDisplayValuesInDynamicTexts",e)}getUseDisplayValuesInDynamicTexts(){return this.useDisplayValuesInDynamicTexts}get visibleIf(){return this.getPropertyValue("visibleIf","")}set visibleIf(e){this.setPropertyValue("visibleIf",e)}get isVisible(){return!(this.survey&&this.survey.areEmptyElementsHidden&&this.isEmpty())&&(!!this.areInvisibleElementsShowing||this.isVisibleCore())}get isVisibleInSurvey(){return this.isVisible&&this.isParentVisible}isVisibleCore(){return this.visible}get visibleIndex(){return this.getPropertyValue("visibleIndex",-1)}onHidingContent(){}get showNumber(){return this.getPropertyValue("showNumber")}set showNumber(e){this.setPropertyValue("showNumber",e),this.notifySurveyVisibilityChanged()}get hideNumber(){return!this.showNumber}set hideNumber(e){this.showNumber=!e}get isAllowTitleLeft(){return!0}getType(){return"question"}get isQuestion(){return!0}moveTo(e,t=null){return this.moveToBase(this.parent,e,t)}getProgressInfo(){return this.hasInput?{questionCount:1,answeredQuestionCount:this.isEmpty()?0:1,requiredQuestionCount:this.isRequired?1:0,requiredAnsweredQuestionCount:!this.isEmpty()&&this.isRequired?1:0}:super.getProgressInfo()}ensureSetValueExpressionRunner(){this.setValueExpressionRunner?this.setValueExpressionRunner.expression=this.setValueExpression:(this.setValueExpressionRunner=new ut(this.setValueExpression),this.setValueExpressionRunner.onRunComplete=e=>{this.runExpressionSetValue(e)})}runSetValueExpression(){this.setValueExpression?(this.ensureSetValueExpressionRunner(),this.setValueExpressionRunner.run(this.getDataFilteredValues(),this.getDataFilteredProperties())):this.clearValue()}getSetValueExpressionRunner(){return this.ensureSetValueExpressionRunner(),this.setValueExpressionRunner}addTriggerInfo(e,t,s){const i=new ei(e,t,s);return this.triggersInfo.push(i),i}runTriggerInfo(e,t){const s=this[e.name];(s||e.getSecondRunner())&&!e.isRunning&&e.canRun()&&(e.runner?e.runner.expression=s:(e.runner=new ut(s),e.runner.onRunComplete=t=>{!0===t&&e.doComplete(),e.isRunning=!1}),this.canExecuteTriggerByKeys(t,e.runner,e.getSecondRunner())&&(e.isRunning=!0,!s&&e.getSecondRunner()?(e.doComplete(),e.isRunning=!1):e.runner.run(this.getDataFilteredValues(),this.getDataFilteredProperties())))}canExecuteTriggerByKeys(e,t,s){!t&&s&&(t=s,s=void 0);const i=this.canExecuteTriggerByKeysCore(e,t);if("var"===i)return!0;if(!s)return"func"===i;return""!==this.canExecuteTriggerByKeysCore(e,s)}canExecuteTriggerByKeysCore(e,t){const s=t.getVariables();return s&&0!==s.length||!t.hasFunction()?(new Re).isAnyKeyChanged(e,s)?"var":"":"func"}runTriggers(e,t,s){this.isSettingQuestionValue||this.parentQuestion&&this.parentQuestion.getValueName()===e||(s||((s={})[e]=t),this.triggersInfo.forEach((e=>{this.runTriggerInfo(e,s)})))}runConditions(){this.data&&!this.isLoadingFromJson&&(this.isDesignMode||this.runCondition(this.getDataFilteredValues(),this.getDataFilteredProperties()),this.locStrsChanged())}setSurveyImpl(e,t){super.setSurveyImpl(e),this.survey&&(this.survey.questionCreated(this),!0!==t&&this.runConditions(),this.visible||this.updateIsVisibleProp(),this.updateIsMobileFromSurvey())}get parent(){return this.getPropertyValue("parent",null)}set parent(e){this.parent!==e&&(this.removeFromParent(),this.setPropertyValue("parent",e),e&&this.updateQuestionCss(),this.onParentChanged())}onParentChanged(){}get hasTitle(){return"hidden"!==this.getTitleLocation()}get titleLocation(){return this.getPropertyValue("titleLocation")}set titleLocation(e){var t="hidden"==this.titleLocation||"hidden"==e;this.setPropertyValue("titleLocation",e.toLowerCase()),this.updateQuestionCss(),t&&this.notifySurveyVisibilityChanged()}getTitleOwner(){return this}getIsTitleRenderedAsString(){return"hidden"===this.titleLocation}notifySurveyOnChildrenVisibilityChanged(){return!1}notifySurveyVisibilityChanged(){if(!this.survey||this.isLoadingFromJson)return;this.survey.questionVisibilityChanged(this,this.isVisible,!this.parentQuestion||this.parentQuestion.notifySurveyOnChildrenVisibilityChanged());const e=this.isClearValueOnHidden;this.visible||this.clearValueOnHidding(e),e&&this.isVisibleInSurvey&&this.updateValueWithDefaults()}clearValueOnHidding(e){e&&this.clearValueIfInvisible()}get titleWidth(){if(this.parent&&"left"===this.getTitleLocation()){const e=this.parent.getColumsForElement(this),t=e.length;if(0!==t&&e[0].questionTitleWidth)return e[0].questionTitleWidth;const s=this.getPercentQuestionTitleWidth();if(!s&&this.parent){let e=this.parent.getQuestionTitleWidth();return e&&!isNaN(e)&&(e+="px"),e}return s/(t||1)+"%"}}getPercentQuestionTitleWidth(){const e=!!this.parent&&this.parent.getQuestionTitleWidth();if(e&&"%"===e[e.length-1])return parseInt(e)}getTitleLocation(){if(this.isFlowLayout)return"hidden";var e=this.getTitleLocationCore();return"left"!==e||this.isAllowTitleLeft||(e="top"),e}getTitleLocationCore(){return"default"!==this.titleLocation?this.titleLocation:this.parent?this.parent.getQuestionTitleLocation():this.survey?this.survey.questionTitleLocation:"top"}get hasTitleOnLeft(){return this.hasTitle&&"left"===this.getTitleLocation()}get hasTitleOnTop(){return this.hasTitle&&"top"===this.getTitleLocation()}get hasTitleOnBottom(){return this.hasTitle&&"bottom"===this.getTitleLocation()}get hasTitleOnLeftTop(){if(!this.hasTitle)return!1;const e=this.getTitleLocation();return"left"===e||"top"===e}get errorLocation(){return this.getPropertyValue("errorLocation")}set errorLocation(e){this.setPropertyValue("errorLocation",e)}getErrorLocation(){return"default"!==this.errorLocation?this.errorLocation:this.parentQuestion?this.parentQuestion.getChildErrorLocation(this):this.parent?this.parent.getQuestionErrorLocation():this.survey?this.survey.questionErrorLocation:"top"}getChildErrorLocation(e){return this.getErrorLocation()}get hasInput(){return!0}get hasSingleInput(){return this.hasInput}get inputId(){return this.id+"i"}getDefaultTitleValue(){return this.name}getDefaultTitleTagName(){return Ps.titleTags.question}get descriptionLocation(){return this.getPropertyValue("descriptionLocation")}set descriptionLocation(e){this.setPropertyValue("descriptionLocation",e),this.updateQuestionCss()}get hasDescriptionUnderTitle(){return"underTitle"==this.getDescriptionLocation()&&this.hasDescription}get hasDescriptionUnderInput(){return"underInput"==this.getDescriptionLocation()&&this.hasDescription}getDescriptionLocation(){return"default"!==this.descriptionLocation?this.descriptionLocation:this.survey?this.survey.questionDescriptionLocation:"underTitle"}needClickTitleFunction(){return super.needClickTitleFunction()||this.hasInput}processTitleClick(){if(super.processTitleClick(),!this.isCollapsed)return setTimeout((()=>{this.focus()}),1),!0}get requiredErrorText(){return this.getLocalizableStringText("requiredErrorText")}set requiredErrorText(e){this.setLocalizableStringText("requiredErrorText",e)}get locRequiredErrorText(){return this.getLocalizableString("requiredErrorText")}get commentText(){return this.getLocalizableStringText("commentText")}set commentText(e){this.setLocalizableStringText("commentText",e)}get locCommentText(){return this.getLocalizableString("commentText")}get commentPlaceholder(){return this.getLocalizableStringText("commentPlaceholder")}set commentPlaceholder(e){this.setLocalizableStringText("commentPlaceholder",e)}get locCommentPlaceholder(){return this.getLocalizableString("commentPlaceholder")}get commentPlaceHolder(){return this.commentPlaceholder}set commentPlaceHolder(e){this.commentPlaceholder=e}get renderedCommentPlaceholder(){var e;return null!==(e=this.getPropertyValue("renderedCommentPlaceholder"))&&void 0!==e?e:this.isReadOnly?void 0:this.commentPlaceHolder}resetRenderedCommentPlaceholder(){this.resetPropertyValue("renderedCommentPlaceholder")}get defaultDisplayValue(){return this.getLocalizableStringText("defaultDisplayValue")}set defaultDisplayValue(e){this.setLocalizableStringText("defaultDisplayValue",e)}get locDefaultDisplayValue(){return this.getLocalizableString("defaultDisplayValue")}getAllErrors(){return this.errors.slice()}getErrorByType(e){for(let t=0;t{const{root:t}=Ps.environment;let s=t.getElementById(e);s&&this.commentElements.push(s)})),this.updateCommentElements()),this.checkForResponsiveness(e))}afterRenderCore(e){super.afterRenderCore(e)}getCommentElementsId(){return[this.commentId]}beforeDestroyQuestionElement(e){this.commentElements=void 0}get processedTitle(){var e=this.locProcessedTitle.textOrHtml;return e||this.name}get fullTitle(){return this.locTitle.renderedHtml}get titlePattern(){return this.survey?this.survey.questionTitlePattern:"numTitleRequire"}get isRequireTextOnStart(){return this.isRequired&&"requireNumTitle"==this.titlePattern}get isRequireTextBeforeTitle(){return this.isRequired&&"numRequireTitle"==this.titlePattern&&""!==this.requiredMark}get isRequireTextAfterTitle(){return this.isRequired&&"numTitleRequire"==this.titlePattern&&""!==this.requiredMark}get startWithNewLine(){return this.getPropertyValue("startWithNewLine")}set startWithNewLine(e){this.startWithNewLine!=e&&this.setPropertyValue("startWithNewLine",e)}calcCssClasses(e){const t={error:{}};return this.copyCssClasses(t,e.question),this.copyCssClasses(t.error,e.error),this.updateCssClasses(t,e),t}onCalcCssClasses(e){super.onCalcCssClasses(e),this.survey&&this.survey.updateQuestionCssClasses(this,e),this.onUpdateCssClassesCallback&&this.onUpdateCssClassesCallback(e)}get cssRoot(){return this.ensureElementCss(),this.getPropertyValue("cssRoot","")}setCssRoot(e){this.setPropertyValue("cssRoot",e)}getCssRoot(e){const t=this.hasCssError();return(new Ct).append(super.getCssRoot(e)).append(this.isFlowLayout&&!this.isDesignMode?e.flowRoot:e.mainRoot).append(e.titleLeftRoot,!this.isFlowLayout&&this.hasTitleOnLeft).append(e.titleTopRoot,!this.isFlowLayout&&this.hasTitleOnTop).append(e.titleBottomRoot,!this.isFlowLayout&&this.hasTitleOnBottom).append(e.descriptionUnderInputRoot,!this.isFlowLayout&&this.hasDescriptionUnderInput).append(e.hasError,t).append(e.hasErrorTop,t&&"top"==this.getErrorLocation()).append(e.hasErrorBottom,t&&"bottom"==this.getErrorLocation()).append(e.small,!this.width).append(e.answered,this.isAnswered).append(e.noPointerEventsMode,this.isReadOnlyAttr).toString()}get cssHeader(){return this.ensureElementCss(),this.getPropertyValue("cssHeader","")}setCssHeader(e){this.setPropertyValue("cssHeader",e)}getCssHeader(e){return(new Ct).append(e.header).append(e.headerTop,this.hasTitleOnTop).append(e.headerLeft,this.hasTitleOnLeft).append(e.headerBottom,this.hasTitleOnBottom).toString()}supportContainerQueries(){return!1}get cssContent(){return this.ensureElementCss(),this.getPropertyValue("cssContent","")}setCssContent(e){this.setPropertyValue("cssContent",e)}getCssContent(e){return(new Ct).append(e.content).append(e.contentSupportContainerQueries,this.supportContainerQueries()).append(e.contentLeft,this.hasTitleOnLeft).toString()}get cssTitle(){return this.ensureElementCss(),this.getPropertyValue("cssTitle","")}setCssTitle(e){this.setPropertyValue("cssTitle",e)}getCssTitle(e){return(new Ct).append(super.getCssTitle(e)).append(e.titleOnAnswer,!this.containsErrors&&this.isAnswered).append(e.titleEmpty,!this.title.trim()).toString()}get cssDescription(){return this.ensureElementCss(),this.getPropertyValue("cssDescription","")}setCssDescription(e){this.setPropertyValue("cssDescription",e)}getCssDescription(e){return(new Ct).append(e.description).append(e.descriptionUnderInput,"underInput"==this.getDescriptionLocation()).toString()}showErrorOnCore(e){return!this.showErrorsAboveQuestion&&!this.showErrorsBelowQuestion&&this.getErrorLocation()===e}get showErrorOnTop(){return this.showErrorOnCore("top")}get showErrorOnBottom(){return this.showErrorOnCore("bottom")}get showErrorsOutsideQuestion(){return this.isDefaultV2Theme}get showErrorsAboveQuestion(){return this.showErrorsOutsideQuestion&&"top"===this.getErrorLocation()}get showErrorsBelowQuestion(){return this.showErrorsOutsideQuestion&&"bottom"===this.getErrorLocation()}get cssError(){return this.ensureElementCss(),this.getPropertyValue("cssError","")}setCssError(e){this.setPropertyValue("cssError",e)}getCssError(e){return(new Ct).append(e.error.root).append(e.errorsContainer,this.showErrorsBelowQuestion||this.showErrorsAboveQuestion).append(e.errorsContainerTop,this.showErrorsAboveQuestion).append(e.errorsContainerBottom,this.showErrorsBelowQuestion).append(e.error.locationTop,this.showErrorOnTop).append(e.error.locationBottom,this.showErrorOnBottom).toString()}hasCssError(){return this.errors.length>0||this.hasCssErrorCallback()}getRootCss(){return(new Ct).append(this.cssRoot).append(this.cssClasses.mobile,this.isMobile).append(this.cssClasses.readOnly,this.isReadOnlyStyle).append(this.cssClasses.disabled,this.isDisabledStyle).append(this.cssClasses.preview,this.isPreviewStyle).append(this.cssClasses.invisible,!this.isDesignMode&&this.areInvisibleElementsShowing&&!this.visible).toString()}getQuestionRootCss(){return(new Ct).append(this.cssClasses.root).append(this.cssClasses.rootMobile,this.isMobile).toString()}updateElementCss(e){this.wasRendered?(super.updateElementCss(e),e&&this.updateQuestionCss(!0)):this.clearCssClasses(),this.resetIndents()}updateQuestionCss(e){!this.isLoadingFromJson&&this.survey&&(this.wasRendered?this.updateElementCssCore(this.cssClasses):this.isRequireUpdateElements=!0)}ensureElementCss(){this.cssClassesValue||this.updateQuestionCss(!0)}updateElementCssCore(e){this.setCssRoot(this.getCssRoot(e)),this.setCssHeader(this.getCssHeader(e)),this.setCssContent(this.getCssContent(e)),this.setCssTitle(this.getCssTitle(e)),this.setCssDescription(this.getCssDescription(e)),this.setCssError(this.getCssError(e))}updateCssClasses(e,t){if(!t.question)return;const s=t[this.getCssType()],i=(new Ct).append(e.title).append(t.question.titleRequired,this.isRequired);e.title=i.toString();const r=(new Ct).append(e.root).append(s,this.isRequired&&!!t.question.required);if(null==s)e.root=r.toString();else if("string"==typeof s||s instanceof String)e.root=r.append(s.toString()).toString();else{e.root=r.toString();for(const t in s)e[t]=s[t]}}getCssType(){return this.getType()}get renderCssRoot(){return this.cssClasses.root||void 0}calcPaddingLeft(){return this.getIndentSize(this.indent)}calcPaddingRight(){return this.getIndentSize(this.rightIndent)}getIndentSize(e){return e<1||!this.getSurvey()||!this.cssClasses||!this.cssClasses.indent?"":e*this.cssClasses.indent+"px"}focus(e=!1,t){if(this.isDesignMode||!this.isVisible||!this.survey)return;let s=this.page;if(!!s&&this.survey.activePage!==s)this.survey.focusQuestionByInstance(this,e);else if(this.survey){this.expandAllParents();const s=this.survey.isSmoothScrollEnabled?{behavior:"smooth"}:void 0;this.survey.scrollElementToTop(this,this,null,this.id,t,s,void 0,(()=>{this.focusInputElement(e)}))}else this.focusInputElement(e)}focusInputElement(e){var t;const s=e?this.getFirstErrorInputElementId():this.getFirstInputElementId(),i=null===(t=this.survey)||void 0===t?void 0:t.rootElement;Jt.FocusElement(s,!1,i)&&this.fireCallback(this.focusCallback)}get isValidateVisitedEmptyFields(){return this.supportEmptyValidation()&&!!this.survey&&this.survey.getValidateVisitedEmptyFields()&&this.isEmpty()}supportEmptyValidation(){return!1}onBlur(e){this.onBlurCore(e)}onFocus(e){this.onFocusCore(e)}onBlurCore(e){this.isFocusEmpty&&this.isEmpty()&&this.validate(!0)}onFocusCore(e){this.isFocusEmpty=this.isValidateVisitedEmptyFields}expandAllParents(){this.expandAllParentsCore(this)}expandAllParentsCore(e){e&&(e.isCollapsed&&e.expand(),this.expandAllParentsCore(e.parent),this.expandAllParentsCore(e.parentQuestion))}focusIn(){!this.survey||this.isDisposed||this.isContainer||this.survey.whenQuestionFocusIn(this)}fireCallback(e){e&&e()}getOthersMaxLength(){return this.survey&&this.survey.maxCommentLength>0?this.survey.maxCommentLength:null}onCreating(){}getFirstQuestionToFocus(e){return this.hasInput&&(!e||this.currentErrorCount>0)?this:null}getFirstInputElementId(){return this.inputId}getFirstErrorInputElementId(){return this.getFirstInputElementId()}getProcessedTextValue(e){var t=e.name.toLocaleLowerCase();e.isExists=-1!==Object.keys(ti.TextPreprocessorValuesMap).indexOf(t)||void 0!==this[e.name],e.value=this[ti.TextPreprocessorValuesMap[t]||e.name]}supportComment(){const e=this.getPropertyByName("showCommentArea");return!e||e.visible}supportOther(){return!1}get isRequired(){return this.getPropertyValue("isRequired")}set isRequired(e){this.setPropertyValue("isRequired",e)}get requiredIf(){return this.getPropertyValue("requiredIf","")}set requiredIf(e){this.setPropertyValue("requiredIf",e)}get showCommentArea(){return this.getPropertyValue("showCommentArea",!1)}set showCommentArea(e){this.supportComment()&&this.setPropertyValue("showCommentArea",e)}get hasComment(){return this.showCommentArea}set hasComment(e){this.showCommentArea=e}get id(){return this.getPropertyValue("id")}set id(e){this.setPropertyValue("id",e)}get ariaTitleId(){return this.id+"_ariaTitle"}get ariaDescriptionId(){return this.id+"_ariaDescription"}get commentId(){return this.id+"_comment"}get showOtherItem(){return this.getPropertyValue("showOtherItem",!1)}set showOtherItem(e){this.supportOther()&&this.showOtherItem!=e&&(this.setPropertyValue("showOtherItem",e),this.hasOtherChanged())}get hasOther(){return this.showOtherItem}set hasOther(e){this.showOtherItem=e}hasOtherChanged(){}get requireUpdateCommentValue(){return this.hasComment||this.hasOther}get isReadOnly(){const e=!!this.parent&&this.parent.isReadOnly,t=!!this.parentQuestion&&this.parentQuestion.isReadOnly,s=!!this.survey&&this.survey.isDisplayMode,i=!!this.readOnlyCallback&&this.readOnlyCallback();return this.readOnly||e||s||t||i}get isInputReadOnly(){return void 0!==this.forceIsInputReadOnly?this.forceIsInputReadOnly:this.isReadOnly||this.isDesignMode}get renderedInputReadOnly(){return this.isInputReadOnly?"":void 0}get renderedInputDisabled(){return this.isInputReadOnly?"":void 0}get isReadOnlyAttr(){return this.isReadOnly}get isDisabledAttr(){return this.isDesignMode||!!this.readOnlyCallback&&this.readOnlyCallback()}onReadOnlyChanged(){this.setPropertyValue("isInputReadOnly",this.isInputReadOnly),super.onReadOnlyChanged(),this.isReadOnly&&this.clearErrors(),this.updateQuestionCss(),this.resetRenderedCommentPlaceholder()}get enableIf(){return this.getPropertyValue("enableIf","")}set enableIf(e){this.setPropertyValue("enableIf",e)}surveyChoiceItemVisibilityChange(){}runCondition(e,t){this.isDesignMode||(t||(t={}),t.question=this,this.runConditionCore(e,t),this.isValueChangedDirectly||this.isClearValueOnHidden&&!this.isVisibleInSurvey||(this.defaultValueRunner=this.getDefaultRunner(this.defaultValueRunner,this.defaultValueExpression),this.runDefaultValueExpression(this.defaultValueRunner,e,t)))}get isInDesignMode(){return!this.isContentElement&&this.isDesignMode}get no(){return this.getPropertyValue("no")}calcNo(){if(!this.hasTitle||!this.showNumber)return"";let e;this.parent&&(e=this.parent.visibleIndex);let t=ue.getNumberByIndex(this.visibleIndex,this.getStartIndex(),e);return this.parent&&(t=this.parent.addNoFromChild(t)),this.survey&&(t=this.survey.getUpdatedQuestionNo(this,t)),t}getStartIndex(){return this.parent?this.parent.getQuestionStartIndex():this.survey?this.survey.questionStartIndex:""}onSurveyLoad(){this.isCustomWidgetRequested=!1,this.fireCallback(this.surveyLoadCallback),this.updateValueWithDefaults(),this.isEmpty()&&this.initDataFromSurvey()}onSetData(){super.onSetData(),this.isDesignMode||!this.survey||this.isLoadingFromJson||(this.initDataFromSurvey(),this.onSurveyValueChanged(this.value),this.updateValueWithDefaults(),this.updateIsAnswered())}initDataFromSurvey(){if(this.data){const e=this.data.getValue(this.getValueName());ue.isValueEmpty(e)&&this.isLoadingFromJson||this.updateValueFromSurvey(e),this.initCommentFromSurvey()}}initCommentFromSurvey(){this.data&&this.requireUpdateCommentValue?this.updateCommentFromSurvey(this.data.getComment(this.getValueName())):this.updateCommentFromSurvey("")}runExpression(e){if(this.survey&&e)return this.survey.runExpression(e)}get commentAreaRows(){return this.survey&&this.survey.commentAreaRows}get autoGrowComment(){return this.survey&&this.survey.autoGrowComment}get allowResizeComment(){return this.survey&&this.survey.allowResizeComment}get questionValue(){return this.getPropertyValueWithoutDefault("value")}set questionValue(e){this.setPropertyValue("value",e)}get questionComment(){return this.getPropertyValueWithoutDefault("comment")}set questionComment(e){this.setPropertyValue("comment",e),this.fireCallback(this.commentChangedCallback)}get isValueArray(){return!1}get value(){return this.getValueCore()}set value(e){this.setNewValue(e)}get hasFilteredValue(){return!1}getFilteredValue(){return this.value}getFilteredName(){return this.getValueName()}get valueForSurvey(){return this.valueForSurveyCore(this.value)}valueForSurveyCore(e){return this.valueToDataCallback?this.valueToDataCallback(e):e}valueFromDataCore(e){return this.valueFromDataCallback?this.valueFromDataCallback(e):e}clearValue(e){void 0!==this.value&&(this.value=void 0),this.comment&&!0!==e&&(this.comment=void 0),this.setValueChangedDirectly(!1)}clearValueOnly(){this.clearValue(!0)}unbindValue(){this.clearValue()}createValueCopy(){return this.getUnbindValue(this.value)}initDataUI(){}getUnbindValue(e){return this.isValueSurveyElement(e)?e:ue.getUnbindValue(e)}isValueSurveyElement(e){return!!e&&(Array.isArray(e)?e.length>0&&this.isValueSurveyElement(e[0]):!0===e.isSurveyObj)}canClearValueAsInvisible(e){return"onHiddenContainer"===e&&!this.isParentVisible||!this.isVisibleInSurvey&&((!this.page||!this.page.isStartPage)&&(!this.survey||!this.survey.hasVisibleQuestionByValueName(this.getValueName())))}get isParentVisible(){if(this.parentQuestion&&!this.parentQuestion.isVisible)return!1;for(var e=this.parent;e;){if(!e.isVisible)return!1;e=e.parent}return!0}clearValueIfInvisible(e="onHidden"){const t=this.getClearIfInvisible();"none"!==t&&("onHidden"===e&&"onComplete"===t||"onHiddenContainer"===e&&t!==e||this.clearValueIfInvisibleCore(e))}clearValueIfInvisibleCore(e){this.canClearValueAsInvisible(e)&&this.clearValue()}get clearIfInvisible(){return this.getPropertyValue("clearIfInvisible")}set clearIfInvisible(e){this.setPropertyValue("clearIfInvisible",e)}getClearIfInvisible(){const e=this.clearIfInvisible;return this.survey?this.survey.getQuestionClearIfInvisible(e):"default"!==e?e:"onComplete"}get displayValue(){return this.isLoadingFromJson?"":this.getDisplayValue(!0)}getDisplayValue(e,t=void 0){var s=this.calcDisplayValue(e,t);return this.survey&&(s=this.survey.getQuestionDisplayValue(this,s)),this.displayValueCallback?this.displayValueCallback(s):s}calcDisplayValue(e,t=void 0){if(this.customWidget){var s=this.customWidget.getDisplayValue(this,t);if(s)return s}return t=null==t?this.createValueCopy():t,this.isValueEmpty(t)&&!this.locDefaultDisplayValue.isEmpty&&(t=this.defaultDisplayValue),this.isValueEmpty(t,!this.allowSpaceAsAnswer)?this.getDisplayValueEmpty():this.getDisplayValueCore(e,t)}getDisplayValueCore(e,t){return t}getDisplayValueEmpty(){return""}get defaultValue(){return this.getPropertyValue("defaultValue")}set defaultValue(e){this.isValueExpression(e)?this.defaultValueExpression=e.substring(1):(this.setPropertyValue("defaultValue",this.convertDefaultValue(e)),this.updateValueWithDefaults())}get defaultValueExpression(){return this.getPropertyValue("defaultValueExpression")}set defaultValueExpression(e){this.setPropertyValue("defaultValueExpression",e),this.defaultValueRunner=void 0,this.updateValueWithDefaults()}get resetValueIf(){return this.getPropertyValue("resetValueIf")}set resetValueIf(e){this.setPropertyValue("resetValueIf",e)}get setValueIf(){return this.getPropertyValue("setValueIf")}set setValueIf(e){this.setPropertyValue("setValueIf",e)}get setValueExpression(){return this.getPropertyValue("setValueExpression")}set setValueExpression(e){this.setPropertyValue("setValueExpression",e)}get resizeStyle(){return this.allowResizeComment?"both":"none"}getPlainData(e){if(e||(e={includeEmpty:!0,includeQuestionTypes:!1}),e.includeEmpty||!this.isEmpty()){var t={name:this.name,title:this.locTitle.renderedHtml,value:this.value,displayValue:this.displayValue,isNode:!1,getString:e=>"object"==typeof e?JSON.stringify(e):e};return!0===e.includeQuestionTypes&&(t.questionType=this.getType()),(e.calculations||[]).forEach((e=>{t[e.propertyName]=this.getPlainDataCalculatedValue(e.propertyName)})),this.hasComment&&(t.isNode=!0,t.data=[{name:0,isComment:!0,title:"Comment",value:Ps.commentSuffix,displayValue:this.comment,getString:e=>"object"==typeof e?JSON.stringify(e):e,isNode:!1}]),t}}getPlainDataCalculatedValue(e){return this[e]}get correctAnswer(){return this.getPropertyValue("correctAnswer")}set correctAnswer(e){this.setPropertyValue("correctAnswer",this.convertDefaultValue(e))}convertDefaultValue(e){return e}get quizQuestionCount(){return this.isVisible&&this.hasInput&&!this.isValueEmpty(this.correctAnswer)?this.getQuizQuestionCount():0}get correctAnswerCount(){return this.isEmpty()||this.isValueEmpty(this.correctAnswer)?0:this.getCorrectAnswerCount()}getQuizQuestionCount(){return 1}getCorrectAnswerCount(){return this.checkIfAnswerCorrect()?1:0}checkIfAnswerCorrect(){const e=ue.isTwoValueEquals(this.value,this.correctAnswer,this.getAnswerCorrectIgnoreOrder(),Ps.comparator.caseSensitive,!0),t=e?1:0,s=this.quizQuestionCount-t,i={result:e,correctAnswers:t,correctAnswerCount:t,incorrectAnswers:s,incorrectAnswerCount:s};return this.survey&&this.survey.onCorrectQuestionAnswer(this,i),i.result}getAnswerCorrectIgnoreOrder(){return!1}isAnswerCorrect(){return this.correctAnswerCount==this.quizQuestionCount}updateValueWithDefaults(){this.isLoadingFromJson||!this.isDesignMode&&this.isDefaultValueEmpty()||(this.isDesignMode||this.isEmpty())&&(this.isEmpty()&&this.isDefaultValueEmpty()||this.isClearValueOnHidden&&!this.isVisible||this.isDesignMode&&this.isContentElement&&this.isDefaultValueEmpty()||this.setDefaultValue())}get isValueDefault(){return!this.isEmpty()&&(this.isTwoValueEquals(this.defaultValue,this.value)||!this.isValueChangedDirectly&&!!this.defaultValueExpression)}get isClearValueOnHidden(){const e=this.getClearIfInvisible();return"none"!==e&&"onComplete"!==e&&("onHidden"===e||"onHiddenContainer"===e)}getQuestionFromArray(e,t){return null}getDefaultValue(){return this.defaultValue}isDefaultValueEmpty(){return!this.defaultValueExpression&&this.isValueEmpty(this.defaultValue,!this.allowSpaceAsAnswer)}getDefaultRunner(e,t){return!e&&t&&(e=this.createExpressionRunner(t)),e&&(e.expression=t),e}setDefaultValue(){this.setDefaultValueCore((e=>{this.isTwoValueEquals(this.value,e)||(this.value=e)}))}setDefaultValueCore(e){this.defaultValueRunner=this.getDefaultRunner(this.defaultValueRunner,this.defaultValueExpression),this.setValueAndRunExpression(this.defaultValueRunner,this.getUnbindValue(this.defaultValue),(t=>e(t)))}isValueExpression(e){return!!e&&"string"==typeof e&&e.length>0&&"="==e[0]}setValueAndRunExpression(e,t,s,i=null,r=null){const n=e=>{this.runExpressionSetValueCore(e,s)};this.runDefaultValueExpression(e,i,r,n)||n(t)}convertFuncValuetoQuestionValue(e){return ue.convertValToQuestionVal(e)}runExpressionSetValueCore(e,t){t(this.convertFuncValuetoQuestionValue(e))}runExpressionSetValue(e){this.runExpressionSetValueCore(e,(e=>{this.isTwoValueEquals(this.value,e)||(this.startSetValueOnExpression(),this.value=e,this.finishSetValueOnExpression())}))}startSetValueOnExpression(){var e;null===(e=this.survey)||void 0===e||e.startSetValueOnExpression()}finishSetValueOnExpression(){var e;null===(e=this.survey)||void 0===e||e.finishSetValueOnExpression()}runDefaultValueExpression(e,t=null,s=null,i){return!(!e||!this.data)&&(i||(i=e=>{this.runExpressionSetValue(e)}),t||(t=this.defaultValueExpression?this.data.getFilteredValues():{}),s||((s=this.defaultValueExpression?this.data.getFilteredProperties():{}).question=this),e&&e.canRun&&(e.onRunComplete=e=>{null==e&&(e=this.defaultValue),this.isChangingViaDefaultValue=!0,i(e),this.isChangingViaDefaultValue=!1},e.run(t,s)),!0)}get comment(){return this.getQuestionComment()}set comment(e){if(e){const t=e.toString().trim();t!==e&&(e=t)===this.comment&&this.setPropertyValueDirectly("comment",e)}this.comment!=e&&(this.setQuestionComment(e),this.updateCommentElements())}getCommentAreaCss(e=!1){return(new Ct).append("form-group",e).append(this.cssClasses.formGroup,!e).append(this.cssClasses.commentArea).toString()}getQuestionComment(){return this.questionComment}setQuestionComment(e){this.setNewComment(e)}isEmpty(){return this.isValueEmpty(this.value,!this.allowSpaceAsAnswer)}get isAnswered(){return this.getPropertyValue("isAnswered")||!1}set isAnswered(e){this.setPropertyValue("isAnswered",e)}updateIsAnswered(){const e=this.isAnswered;this.setPropertyValue("isAnswered",this.getIsAnswered()),e!==this.isAnswered&&this.updateQuestionCss()}getIsAnswered(){return!this.isEmpty()}get validators(){return this.getPropertyValue("validators")}set validators(e){this.setPropertyValue("validators",e)}getValidators(){return this.validators}getSupportedValidators(){for(var e=[],t=this.getType();t;){var s=Ps.supportedValidators[t];if(s)for(var i=s.length-1;i>=0;i--)e.splice(0,0,s[i]);t=Ie.findClass(t).parentName}return e}addConditionObjectsByContext(e,t){e.push({name:this.getFilteredName(),text:this.processedTitle,question:this})}getNestedQuestions(e=!1){const t=[];return this.collectNestedQuestions(t,e),1===t.length&&t[0]===this?[]:t}collectNestedQuestions(e,t=!1){t&&!this.isVisible||this.collectNestedQuestionsCore(e,t)}collectNestedQuestionsCore(e,t){e.push(this)}getConditionJson(e=null,t=null){const s=(new Se).toJsonObject(this);return s.type=this.getType(),s}hasErrors(e=!0,t=null){const s=this.checkForErrors(!!t&&!0===t.isOnValueChanged,e);return e&&(this.errors=s,this.errors!==s&&this.errors.forEach((e=>e.locText.strChanged()))),this.updateContainsErrors(),this.isCollapsed&&t&&e&&s.length>0&&this.expand(),s.length>0}validate(e=!0,t=null){return t&&t.isOnValueChanged&&this.parent&&this.parent.validateContainerOnly(),!this.hasErrors(e,t)}get currentErrorCount(){return this.errors.length}get requiredMark(){return null!=this.survey&&this.isRequired?this.survey.requiredMark:""}get requiredText(){return this.requiredMark}addError(e){if(!e)return;let t=null;t="string"==typeof e||e instanceof String?this.addCustomError(e):e,this.errors.push(t)}addCustomError(e){return new Fs(e,this.survey)}removeError(e){if(!e)return!1;const t=this.errors,s=t.indexOf(e);return-1!==s&&t.splice(s,1),-1!==s}checkForErrors(e,t){var s=new Array;if(this.isVisible&&this.canCollectErrors()&&this.collectErrors(s,e,t),this.survey){if(this.validateValueCallback&&0===s.length){const e=this.validateValueCallback();e&&s.push(e)}this.survey.validateQuestion(this,s,t)}return s}canCollectErrors(){return!this.isReadOnly||Ps.readOnly.enableValidation}collectErrors(e,t,s){if(this.onCheckForErrors(e,t,s),!(e.length>0)&&this.canRunValidators(t)){var i=this.runValidators();if(i.length>0){e.length=0;for(var r=0;r{e.text=this.requiredErrorText},e.push(t)}if(!this.isEmpty()&&this.customWidget){const t=this.customWidget.validate(this);t&&e.push(this.addCustomError(t))}}hasRequiredError(){return this.isRequired&&this.isEmpty()}get isRunningValidators(){return this.getIsRunningValidators()}getIsRunningValidators(){return this.isRunningValidatorsValue}runValidators(){return this.validatorRunner&&(this.validatorRunner.onAsyncCompleted=null),this.validatorRunner=new Hs,this.isRunningValidatorsValue=!0,this.validatorRunner.onAsyncCompleted=e=>{this.doOnAsyncCompleted(e)},this.validatorRunner.run(this)}doOnAsyncCompleted(e){for(var t=0;t0),this.onCompletedAsyncValidators=null)}setNewValue(e){this.isNewValueEqualsToValue(e)||this.checkIsValueCorrect(e)&&(this.isOldAnswered=this.isAnswered,this.isSettingQuestionValue=!0,this.setNewValueInData(e),this.allowNotifyValueChanged&&this.onValueChanged(),this.isSettingQuestionValue=!1,this.isAnswered!==this.isOldAnswered&&this.updateQuestionCss(),this.isOldAnswered=void 0,this.parent&&this.parent.onQuestionValueChanged(this))}checkIsValueCorrect(e){const t=this.isValueEmpty(e,!this.allowSpaceAsAnswer)||this.isNewValueCorrect(e);return t||ke.inCorrectQuestionValue(this.name,e),t}isNewValueCorrect(e){return!0}isNewValueEqualsToValue(e){const t=this.value;if(!this.isTwoValueEquals(e,t,!1,!1))return!1;return!(e===t&&!!t&&(Array.isArray(t)||"object"==typeof t))}isTextValue(){return!1}getIsInputTextUpdate(){return!!this.survey&&this.survey.isUpdateValueTextOnTyping}get requireStrictCompare(){return!1}getDataLocNotification(){return!!this.isInputTextUpdate&&"text"}get isInputTextUpdate(){return this.getIsInputTextUpdate()&&this.isTextValue()}setNewValueInData(e){e=this.valueToData(e),this.isValueChangedInSurvey||this.setValueCore(e)}getValueCore(){return this.questionValue}setValueCore(e){this.setQuestionValue(e),null!=this.data&&this.canSetValueToSurvey()&&(e=this.valueForSurvey,this.data.setValue(this.getValueName(),e,this.getDataLocNotification(),this.allowNotifyValueChanged,this.name)),this.isMouseDown=!1}canSetValueToSurvey(){return!0}valueFromData(e){return e}valueToData(e){return e}convertToCorrectValue(e){return e}onValueChanged(){}onMouseDown(){this.isMouseDown=!0}setNewComment(e){this.questionComment!==e&&(this.questionComment=e,this.setCommentIntoData(e))}setCommentIntoData(e){null!=this.data&&this.data.setComment(this.getValueName(),e,!!this.getIsInputTextUpdate()&&"text")}getValidName(e){return si(e)}updateValueFromSurvey(e,t=!1){if(e=this.getUnbindValue(e),e=this.valueFromDataCore(e),!this.checkIsValueCorrect(e))return;const s=this.isValueEmpty(e);!s&&this.defaultValueExpression?this.setDefaultValueCore((t=>{this.updateValueFromSurveyCore(e,this.isTwoValueEquals(e,t))})):(this.updateValueFromSurveyCore(e,this.data!==this.getSurvey()),t&&s&&(this.isValueChangedDirectly=!1)),this.updateDependedQuestions(),this.updateIsAnswered()}updateValueFromSurveyCore(e,t){this.isChangingViaDefaultValue=t,this.setQuestionValue(this.valueFromData(e)),this.isChangingViaDefaultValue=!1}updateCommentFromSurvey(e){this.questionComment=e}onChangeQuestionValue(e){}setValueChangedDirectly(e){this.isValueChangedDirectly=e,this.setValueChangedDirectlyCallback&&this.setValueChangedDirectlyCallback(e)}setQuestionValue(e,t=!0){e=this.convertToCorrectValue(e);const s=this.isTwoValueEquals(this.questionValue,e);s||this.isChangingViaDefaultValue||this.isParentChangingViaDefaultValue||this.setValueChangedDirectly(!0),this.questionValue=e,s||this.onChangeQuestionValue(e),!s&&this.allowNotifyValueChanged&&this.fireCallback(this.valueChangedCallback),t&&this.updateIsAnswered()}get isParentChangingViaDefaultValue(){var e;return!0===(null===(e=this.data)||void 0===e?void 0:e.isChangingViaDefaultValue)}onSurveyValueChanged(e){}setVisibleIndex(e){return e>-1&&(!this.isVisible||!this.hasTitle&&!Ps.numbering.includeQuestionsWithHiddenTitle||!this.showNumber&&!Ps.numbering.includeQuestionsWithHiddenNumber)&&(e=-1),this.setPropertyValue("visibleIndex",e),this.setPropertyValue("no",this.calcNo()),e<0?0:1}removeElement(e){return!1}supportGoNextPageAutomatic(){return this.supportAutoAdvance()}supportAutoAdvance(){return!1}supportGoNextPageError(){return!0}clearIncorrectValues(){}clearOnDeletingContainer(){}clearErrors(){this.errors=[]}clearUnusedValues(){}onAnyValueChanged(e,t){}checkBindings(e,t){if(!this.bindings.isEmpty()&&this.data)for(var s=this.bindings.getPropertiesByValueName(e),i=0;i{this.isExpanded&&(this.initResponsiveness(e),this.unregisterPropertyChangedHandlers(["state"],"for-responsiveness"))};this.registerPropertyChangedHandlers(["state"],t,"for-responsiveness")}else this.initResponsiveness(e)}getObservedElementSelector(){return".sd-scrollable-container"}onMobileChanged(){this.onMobileChangedCallback&&this.onMobileChangedCallback()}triggerResponsiveness(e=!0){this.triggerResponsivenessCallback&&this.triggerResponsivenessCallback(e)}initResponsiveness(e){if(this.destroyResizeObserver(),e&&this.isDefaultRendering()){const t=this.getObservedElementSelector();if(!t)return;if(!e.querySelector(t))return;let s,i=!1;this.triggerResponsivenessCallback=r=>{r&&(s=void 0,this.renderAs="default",i=!1);const n=()=>{const r=e.querySelector(t);!s&&this.isDefaultRendering()&&(s=r.scrollWidth),i=!(i||!bs(r))&&this.processResponsiveness(s,fs(r))};r?setTimeout(n,1):n()},this.resizeObserver=new ResizeObserver((e=>{ae.requestAnimationFrame((()=>{this.triggerResponsiveness(!1)}))})),this.onMobileChangedCallback=()=>{setTimeout((()=>{const i=e.querySelector(t);this.processResponsiveness(s,fs(i))}),0)},this.resizeObserver.observe(e)}}getCompactRenderAs(){return"default"}getDesktopRenderAs(){return"default"}onBeforeSetCompactRenderer(){}onBeforeSetDesktopRenderer(){}processResponsiveness(e,t){if(t=Math.round(t),Math.abs(e-t)>2){const s=this.renderAs;return e>t?(this.onBeforeSetCompactRenderer(),this.renderAs=this.getCompactRenderAs()):(this.onBeforeSetDesktopRenderer(),this.renderAs=this.getDesktopRenderAs()),s!==this.renderAs}return!1}destroyResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0,this.onMobileChangedCallback=void 0,this.triggerResponsivenessCallback=void 0,this.renderAs=this.getDesktopRenderAs())}dispose(){super.dispose(),this.resetDependedQuestions(),this.destroyResizeObserver()}resetDependedQuestions(){for(var e=0;esi(t)},{name:"state",default:"default",choices:["default","collapsed","expanded"]},{name:"visible:switch",default:!0,overridingProperty:"visibleIf"},{name:"useDisplayValuesInDynamicTexts:boolean",alternativeName:"useDisplayValuesInTitle",default:!0,layout:"row"},"visibleIf:condition",{name:"width"},{name:"minWidth",defaultFunc:()=>Ps.minWidth},{name:"maxWidth",defaultFunc:()=>Ps.maxWidth},{name:"colSpan:number",visible:!1,onSerializeValue:e=>e.getPropertyValue("colSpan")},{name:"effectiveColSpan:number",minValue:1,isSerializable:!1,visibleIf:function(e){return!!e&&!!e.survey&&e.survey.gridLayoutEnabled}},{name:"startWithNewLine:boolean",default:!0,layout:"row"},{name:"indent:number",default:0,choices:[0,1,2,3],layout:"row"},{name:"page",isSerializable:!1,visibleIf:function(e){var t=e?e.survey:null;return!t||!t.pages||t.pages.length>1},choices:function(e){var t=e?e.survey:null;return t?t.pages.map((e=>({value:e.name,text:e.title}))):[]}},{name:"title:text",serializationProperty:"locTitle",layout:"row",dependsOn:"name",onPropertyEditorUpdate:function(e,t){e&&t&&(t.placeholder=e.locTitle.getPlaceholder())}},{name:"titleLocation",default:"default",choices:["default","top","bottom","left","hidden"],layout:"row"},{name:"description:text",serializationProperty:"locDescription",layout:"row"},{name:"descriptionLocation",default:"default",choices:["default","underInput","underTitle"]},{name:"showNumber:boolean",dependsOn:"titleLocation",default:!0,visibleIf:function(e){if(!e)return!0;if("hidden"===e.titleLocation)return!1;var t=e?e.parent:null;if(!(!t||"off"!==t.showQuestionNumbers))return!1;var s=e?e.survey:null;return!s||"off"!==s.showQuestionNumbers||!!t&&"onpanel"===t.showQuestionNumbers}},{name:"hideNumber:boolean",visible:!1,isSerializable:!1},{name:"valueName",onSettingValue:(e,t)=>si(t)},"enableIf:condition","resetValueIf:condition","setValueIf:condition","setValueExpression:expression","defaultValue:value",{name:"defaultValueExpression:expression",category:"logic"},"correctAnswer:value",{name:"clearIfInvisible",default:"default",choices:["default","none","onComplete","onHidden","onHiddenContainer"]},{name:"isRequired:switch",overridingProperty:"requiredIf"},"requiredIf:condition",{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},{name:"errorLocation",default:"default",choices:["default","top","bottom"]},{name:"readOnly:switch",overridingProperty:"enableIf"},{name:"validators:validators",baseClassName:"surveyvalidator",classNamePart:"validator"},{name:"bindings:bindings",serializationProperty:"bindings",isSerializableFunc:e=>!e.isBindingEmpty(),visibleIf:function(e){return e.bindings.getNames().length>0}},{name:"renderAs",default:"default",visible:!1},{name:"showCommentArea",visible:!1,default:!1,alternativeName:"hasComment",category:"general"},{name:"commentText",dependsOn:"showCommentArea",visibleIf:function(e){return e.showCommentArea},serializationProperty:"locCommentText"},{name:"commentPlaceholder",alternativeName:"commentPlaceHolder",serializationProperty:"locCommentPlaceholder",dependsOn:"showCommentArea",visibleIf:function(e){return e.hasComment}},{name:"defaultDisplayValue",serializationProperty:"locDefaultDisplayValue"}]),Ie.addAlterNativeClassName("question","questionbase");class ii extends qt{getMarkdownHtml(e,t,s){return this.locOwner?this.locOwner.getMarkdownHtml(e,t,s||this):void 0}getRenderer(e){return this.locOwner?this.locOwner.getRenderer(e):null}getRendererContext(e){return this.locOwner?this.locOwner.getRendererContext(e):e}getProcessedText(e){return this.locOwner?this.locOwner.getProcessedText(e):e}static get Separator(){return Ps.itemValueSeparator}static set Separator(e){Ps.itemValueSeparator=e}static setData(e,t,s){e.length=0;for(let i=0;i{this.propertyValueChanged("text",e,t)},e.onGetTextCallback=e=>e||this.getValueText(),e}getValueText(){const e=this.value;return ue.isValueEmpty(e)?null:e.toString()}get locText(){return this.locTextValue||(this.locTextValue=this.createLocText()),this.locTextValue}setLocText(e){this.locTextValue=e}get locOwner(){return this._locOwner}set locOwner(e){this._locOwner=e}get value(){return this.getPropertyValue("value")}set value(e){this.setValue(e,!1)}setValue(e,t){let s;if(!ue.isValueEmpty(e)){var i=e.toString(),r=i.indexOf(Ps.itemValueSeparator);r>-1&&(e=i.slice(0,r),s=i.slice(r+1))}t?this.setPropertyValueDirectly("value",e):this.setPropertyValue("value",e),s&&(this.text=s),this.id=this.value}get hasText(){return!!this.pureText}get pureText(){var e;return(null===(e=this.locTextValue)||void 0===e?void 0:e.pureText)||""}set pureText(e){this.text=e}get text(){return this.calculatedText}set text(e){this.locText.text=e}get textOrHtml(){return this.locTextValue?this.locText.textOrHtml:this.getValueText()}get calculatedText(){return this.locTextValue?this.locText.calculatedText:this.getValueText()}get shortcutText(){return this.text}canSerializeValue(){const e=this.value;return null!=e&&(!Array.isArray(e)&&"object"!=typeof e)}getData(){var e=this.toJSON();if(e.value&&e.value.pos&&delete e.value.pos,ue.isValueEmpty(e.value))return e;const t=this.canSerializeValue();return t&&(Ps.serialization.itemValueSerializeAsObject||Ps.serialization.itemValueSerializeDisplayText)||1!=Object.keys(e).length?(Ps.serialization.itemValueSerializeDisplayText&&void 0===e.text&&t&&(e.text=this.value.toString()),e):this.value}toJSON(){var e={},t=Ie.getProperties(this.getType());t&&0!=t.length||(t=Ie.getProperties("itemvalue"));for(var s=new Se,i=0;ie.isItemSelected(this)))),this.selectedValue}getComponent(){return this._locOwner instanceof ti?this.componentValue||this._locOwner.itemComponent:this.componentValue}setComponent(e){this.componentValue=e}setRootElement(e){this._htmlElement=e}getRootElement(){return this._htmlElement}getEnabled(){return this.isEnabled}setEnabled(e){this.setIsEnabled(e)}getVisible(){const e=void 0===this.isVisible||this.isVisible,t=void 0===this._visible||this._visible;return e&&t}setVisible(e){this.visible!==e&&(this._visible=e)}get _visible(){return this.getPropertyValue("visible",!0)}set _visible(e){this.setPropertyValue("visible",e)}getLocTitle(){return this.locText}getTitle(){return this.text}setLocTitle(e){}setTitle(e){}get icon(){return this.getPropertyValue("icon","")}set icon(e){this.setPropertyValue("icon",e)}}ft([pe()],ii.prototype,"selectedValue",void 0),pt.createItemValue=function(e,t){var s=null;return(s=t?Se.metaData.createClass(t,{}):"function"==typeof e.getType?new ii(null,void 0,e.getType()):new ii(null)).setData(e),s},pt.itemValueLocStrChanged=function(e){ii.locStrsChanged(e)},ve.getItemValuesDefaultValue=(e,t)=>{const s=new Array;return ii.setData(s,Array.isArray(e)?e:[],t),s},Ie.addClass("itemvalue",[{name:"!value",isUnique:!0},{name:"text",serializationProperty:"locText"},{name:"visibleIf:condition",locationInTable:"detail"},{name:"enableIf:condition",locationInTable:"detail",visibleIf:e=>!e||"rateValues"!==e.ownerPropertyName}],(e=>new ii(e)));class ri extends pt{constructor(e=null,t=null){super(),this.expressionIsRunning=!1,this.isCalculated=!1,e&&(this.name=e),t&&(this.expression=t)}setOwner(e){this.data=e,this.rerunExpression()}getType(){return"calculatedvalue"}getSurvey(e=!1){return this.data&&this.data.getSurvey?this.data.getSurvey():null}get owner(){return this.data}get name(){return this.getPropertyValue("name")||""}set name(e){this.setPropertyValue("name",e)}get includeIntoResult(){return this.getPropertyValue("includeIntoResult")}set includeIntoResult(e){this.setPropertyValue("includeIntoResult",e)}get expression(){return this.getPropertyValue("expression")||""}set expression(e){this.setPropertyValue("expression",e),this.rerunExpression()}locCalculation(){this.expressionIsRunning=!0}unlocCalculation(){this.expressionIsRunning=!1}resetCalculation(){this.isCalculated=!1}doCalculation(e,t,s){this.isCalculated||(this.runExpressionCore(e,t,s),this.isCalculated=!0)}runExpression(e,t){this.runExpressionCore(null,e,t)}get value(){if(this.data)return this.data.getVariable(this.name)}setValue(e){this.data&&this.data.setVariable(this.name,e)}get canRunExpression(){return!(!this.data||this.isLoadingFromJson||!this.expression||this.expressionIsRunning||!this.name)}rerunExpression(){this.canRunExpression&&this.runExpression(this.data.getFilteredValues(),this.data.getFilteredProperties())}runExpressionCore(e,t,s){this.canRunExpression&&(this.ensureExpression(t),this.locCalculation(),e&&this.runDependentExpressions(e,t,s),this.expressionRunner.run(t,s))}runDependentExpressions(e,t,s){var i=this.expressionRunner.getVariables();if(i)for(var r=0;r{ue.isTwoValueEquals(e,this.value,!1,!0,!1)||this.setValue(e),this.unlocCalculation()})}}Ie.addClass("calculatedvalue",[{name:"!name",isUnique:!0},"expression:expression","includeIntoResult:boolean"],(function(){return new ri}),"base");class ni extends pt{constructor(e=null){super(),this.expression=e}getType(){return"expressionitem"}runCondition(e,t){return!!this.expression&&new lt(this.expression).run(e,t)}get expression(){return this.getPropertyValue("expression","")}set expression(e){this.setPropertyValue("expression",e)}get locHtml(){return this.getLocalizableString("html")}getLocale(){return this.locOwner?this.locOwner.getLocale():""}getMarkdownHtml(e,t,s){return this.locOwner?this.locOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.locOwner?this.locOwner.getRenderer(e):null}getRendererContext(e){return this.locOwner?this.locOwner.getRendererContext(e):e}getProcessedText(e){return this.locOwner?this.locOwner.getProcessedText(e):e}getSurvey(e=!1){return this.locOwner}}class ai extends ni{constructor(e=null,t=null){super(e),this.createLocalizableString("html",this),this.html=t}getType(){return"htmlconditionitem"}get html(){return this.getLocalizableStringText("html")}set html(e){this.setLocalizableStringText("html",e)}get locHtml(){return this.getLocalizableString("html")}}class oi extends ni{constructor(e=null,t=null){super(e),this.createLocalizableString("url",this),this.url=t}getType(){return"urlconditionitem"}get url(){return this.getLocalizableStringText("url")}set url(e){this.setLocalizableStringText("url",e)}get locUrl(){return this.getLocalizableString("url")}}Ie.addClass("expressionitem",["expression:condition"],(function(){return new ni}),"base"),Ie.addClass("htmlconditionitem",[{name:"html:html",serializationProperty:"locHtml"}],(function(){return new ai}),"expressionitem"),Ie.addClass("urlconditionitem",[{name:"url:string",serializationProperty:"locUrl"}],(function(){return new oi}),"expressionitem");class li{constructor(){this.parser=new DOMParser}assignValue(e,t,s){Array.isArray(e[t])?e[t].push(s):void 0!==e[t]?e[t]=[e[t]].concat(s):"object"==typeof s&&1===Object.keys(s).length&&Object.keys(s)[0]===t?e[t]=s[t]:e[t]=s}xml2Json(e,t){if(e.children&&e.children.length>0)for(let s=0;snew ii(e),this.registerPropertyChangedHandlers(["url"],(()=>{this.owner&&this.owner.setPropertyValue("isUsingRestful",!!this.url)}))}getSurvey(e=!1){return this.owner?this.owner.survey:null}run(e=null){if(this.url&&this.getResultCallback){if(this.processedText(e),!this.processedUrl)return this.doEmptyResultCallback({}),void(this.lastObjHash=this.objHash);this.lastObjHash!==this.objHash&&(this.lastObjHash=this.objHash,this.error=null,this.useChangedItemsResults()||ui.addSameRequest(this)||this.sendRequest())}}get isUsingCache(){return!0===this.isUsingCacheFromUrl||!1!==this.isUsingCacheFromUrl&&Ps.web.cacheLoadedChoices}get isRunning(){return this.getIsRunning()}getIsRunning(){return this.isRunningValue}get isWaitingForParameters(){return this.url&&!this.processedUrl}useChangedItemsResults(){return ui.getCachedItemsResult(this)}doEmptyResultCallback(e){var t=[];this.updateResultCallback&&(t=this.updateResultCallback(t,e)),this.getResultCallback(t)}processedText(e){var t=this.url;if(t&&(t=t.replace(ui.cacheText,"").replace(ui.noCacheText,"")),e){var s=e.processTextEx({text:t,runAtDesign:!0}),i=e.processTextEx({text:this.path,runAtDesign:!0});s.hasAllValuesOnLastRun&&i.hasAllValuesOnLastRun?(this.processedUrl=s.text,this.processedPath=i.text):(this.processedUrl="",this.processedPath="")}else this.processedUrl=t,this.processedPath=this.path;this.onProcessedUrlCallback&&this.onProcessedUrlCallback(this.processedUrl,this.processedPath)}parseResponse(e){let t;if(e&&"function"==typeof e.indexOf&&0===e.indexOf("<"))t=(new li).parseXmlString(e);else try{t=JSON.parse(e)}catch(s){t=(e||"").split("\n").map((e=>e.trim(" "))).filter((e=>!!e))}return t}sendRequest(){var e=new XMLHttpRequest;e.open("GET",this.processedUrl),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var t=this,s=this.objHash;e.onload=function(){t.beforeLoadRequest(),200===e.status?t.onLoad(t.parseResponse(e.response),s):t.onError(e.statusText,e.responseText)};var i={request:e};Ps.web.onBeforeRequestChoices&&Ps.web.onBeforeRequestChoices(this,i),this.beforeSendRequest(),i.request.send()}getType(){return"choicesByUrl"}get isEmpty(){return!this.url&&!this.path}getCustomPropertiesNames(){for(var e=this.getCustomProperties(),t=new Array,s=0;se.push(t.name))),this.getCustomPropertiesNames().forEach((t=>e.push(t))),e}setData(e){e||(e={}),this.getAllPropertiesNames().forEach((t=>{this[t]=e[t]}))}getData(){const e={};let t=!1;return this.getAllPropertiesNames().forEach((s=>{const i=this[s];this.isValueEmpty(i)||i===this.getDefaultPropertyValue(s)||(e[s]=i,t=!0)})),t?e:null}get url(){return this.getPropertyValue("url")||""}set url(e){this.setPropertyValue("url",e),this.isUsingCacheFromUrl=void 0,e&&(e.indexOf(ui.cacheText)>-1?this.isUsingCacheFromUrl=!0:e.indexOf(ui.noCacheText)>-1&&(this.isUsingCacheFromUrl=!1))}get path(){return this.getPropertyValue("path")||""}set path(e){this.setPropertyValue("path",e)}get valueName(){return this.getPropertyValue("valueName","")}set valueName(e){this.setPropertyValue("valueName",e)}get titleName(){return this.getPropertyValue("titleName","")}set titleName(e){this.setPropertyValue("titleName",e)}get imageLinkName(){return this.getPropertyValue("imageLinkName","")}set imageLinkName(e){this.setPropertyValue("imageLinkName",e)}get allowEmptyResponse(){return this.getPropertyValue("allowEmptyResponse")}set allowEmptyResponse(e){this.setPropertyValue("allowEmptyResponse",e)}get attachOriginalItems(){return this.getPropertyValue("attachOriginalItems")}set attachOriginalItems(e){this.setPropertyValue("attachOriginalItems",e)}get itemValueType(){if(!this.owner)return"itemvalue";var e=Ie.findProperty(this.owner.getType(),"choices");return e?"itemvalue[]"==e.type?"itemvalue":e.type:"itemvalue"}clear(){this.setData(void 0)}beforeSendRequest(){this.isRunningValue=!0,this.beforeSendRequestCallback&&this.beforeSendRequestCallback()}beforeLoadRequest(){this.isRunningValue=!1}onLoad(e,t=null){t||(t=this.objHash);var s=new Array,i=this.getResultAfterPath(e);if(i&&i.length)for(var r=0;r-1?this.path.split(";"):this.processedPath.indexOf(",")>-1?this.processedPath.split(","):this.processedPath.split(".")).length&&e.push(this.processedPath),e}getValue(e){return e?this.valueName?this.getValueCore(e,this.valueName):e instanceof Object?Object.keys(e).length<1?null:e[Object.keys(e)[0]]:e:null}setTitle(e,t){var s=this.titleName?this.titleName:"title",i=this.getValueCore(t,s);i&&("string"==typeof i?e.text=i:e.locText.setJson(i))}getImageLink(e){var t=this.imageLinkName?this.imageLinkName:"imageLink";return this.getValueCore(e,t)}getValueCore(e,t){if(!e)return null;if(t.indexOf(".")<0)return e[t];for(var s=t.split("."),i=0;i{this.isColumnVisible(t)&&e.push(t)})),e}isColumnVisible(e){return e.isVisible}get rows(){return this.getPropertyValue("rows")}set rows(e){var t=this.processRowsOnSet(e);this.setPropertyValue("rows",t)}processRowsOnSet(e){return e}getVisibleRows(){return[]}get visibleRows(){return this.getVisibleRows()}get rowsVisibleIf(){return this.getPropertyValue("rowsVisibleIf","")}set rowsVisibleIf(e){this.setPropertyValue("rowsVisibleIf",e),this.isLoadingFromJsonValue||this.runCondition(this.getDataFilteredValues(),this.getDataFilteredProperties())}get columnsVisibleIf(){return this.getPropertyValue("columnsVisibleIf","")}set columnsVisibleIf(e){this.setPropertyValue("columnsVisibleIf",e),this.isLoadingFromJson||this.runCondition(this.getDataFilteredValues(),this.getDataFilteredProperties())}runConditionCore(e,t){super.runConditionCore(e,t),this.runItemsCondition(e,t)}onColumnsChanged(){}onRowsChanged(){this.updateVisibilityBasedOnRows(),this.fireCallback(this.visibleRowsChangedCallback)}updateVisibilityBasedOnRows(){this.hideIfRowsEmpty&&this.onVisibleChanged()}isVisibleCore(){var e;const t=super.isVisibleCore();return t&&this.hideIfRowsEmpty?(null===(e=this.visibleRows)||void 0===e?void 0:e.length)>0:t}shouldRunColumnExpression(){return!this.survey||!this.survey.areInvisibleElementsShowing}hasRowsAsItems(){return!0}runItemsCondition(e,t){let s=this.hasRowsAsItems()&&this.runConditionsForRows(e,t);const i=this.runConditionsForColumns(e,t);s=i||s,s&&(this.isClearValueOnHidden&&i&&this.clearInvisibleColumnValues(),this.clearGeneratedRows(),i&&this.onColumnsChanged(),this.onRowsChanged())}isRowsFiltered(){return!!this.filteredRows}clearGeneratedRows(){this.generatedVisibleRows=null}createRowsVisibleIfRunner(){return null}runConditionsForRows(e,t){const s=!!this.survey&&this.survey.areInvisibleElementsShowing,i=s?null:this.createRowsVisibleIfRunner();this.filteredRows=[];const r=ii.runConditionsForItems(this.rows,this.filteredRows,i,e,t,!s);return ii.runEnabledConditionsForItems(this.rows,void 0,e,t),this.filteredRows.length===this.rows.length&&(this.filteredRows=null),r}runConditionsForColumns(e,t){const s=!!this.survey&&!this.survey.areInvisibleElementsShowing&&this.columnsVisibleIf?new lt(this.columnsVisibleIf):null;return ii.runConditionsForItems(this.columns,void 0,s,e,t,this.shouldRunColumnExpression())}clearInvisibleColumnValues(){}clearInvisibleValuesInRows(){}needResponsiveWidth(){return!0}get columnsAutoWidth(){return!this.isMobile&&!this.columns.some((e=>!!e.width))}getTableCss(){var e;return(new Ct).append(this.cssClasses.root).append(this.cssClasses.columnsAutoWidth,this.columnsAutoWidth).append(this.cssClasses.noHeader,!this.showHeader).append(this.cssClasses.hasFooter,!!(null===(e=this.renderedTable)||void 0===e?void 0:e.showAddRowOnBottom)).append(this.cssClasses.rootAlternateRows,this.alternateRows).append(this.cssClasses.rootVerticalAlignTop,"top"===this.verticalAlign).append(this.cssClasses.rootVerticalAlignMiddle,"middle"===this.verticalAlign).toString()}get columnMinWidth(){return this.getPropertyValue("columnMinWidth")||""}set columnMinWidth(e){this.setPropertyValue("columnMinWidth",e)}get rowTitleWidth(){return this.getPropertyValue("rowTitleWidth")||""}set rowTitleWidth(e){this.setPropertyValue("rowTitleWidth",e)}set displayMode(e){this.setPropertyValue("displayMode",e)}get displayMode(){return this.getPropertyValue("displayMode")}getCellAriaLabel(e,t){return`${(this.getLocalizationString("matrix_row")||"row").toLocaleLowerCase()} ${e}, ${(this.getLocalizationString("matrix_column")||"column").toLocaleLowerCase()} ${t}`}get isNewA11yStructure(){return!0}getIsMobile(){return"auto"==this.displayMode?super.getIsMobile():"list"===this.displayMode}}ft([pe()],di.prototype,"verticalAlign",void 0),ft([pe()],di.prototype,"alternateRows",void 0),Ie.addClass("matrixbase",[{name:"showCommentArea:switch",layout:"row",visible:!0,category:"general"},"columnsVisibleIf:condition","rowsVisibleIf:condition","columnMinWidth",{name:"showHeader:boolean",default:!0},{name:"verticalAlign",choices:["top","middle"],default:"middle"},{name:"alternateRows:boolean",default:!1},{name:"displayMode",default:"auto",choices:["auto","table","list"],visible:!1}],void 0,"question");class hi{}class ci{constructor(e,t){this.name=e,this.returnDisplayValue=t,this.isExists=!1,this.canProcess=!0}}class pi{constructor(){this._unObservableValues=[void 0]}get hasAllValuesOnLastRunValue(){return this._unObservableValues[0]}set hasAllValuesOnLastRunValue(e){this._unObservableValues[0]=e}process(e,t,s,i){if(this.hasAllValuesOnLastRunValue=!0,!e)return e;if(!this.onProcess)return e;const r=this.getItems(e);for(let a=r.length-1;a>=0;a--){const o=r[a],l=this.getName(e.substring(o.start+1,o.end));if(l){const r=new ci(l,!0===t);if(this.onProcess(r),r.isExists||r.canProcess&&(this.hasAllValuesOnLastRunValue=!1),r.isExists||i){ue.isValueEmpty(r.value)&&(this.hasAllValuesOnLastRunValue=!1);var n=ue.isValueEmpty(r.value)?"":r.value;s&&(n=encodeURIComponent(n)),e=e.substring(0,o.start)+n+e.substring(o.end+1)}}}return e}processValue(e,t){var s=new ci(e,t);return this.onProcess&&this.onProcess(s),s}get hasAllValuesOnLastRun(){return!!this.hasAllValuesOnLastRunValue}processText(e,t){return this.process(e,t)}processTextEx(e){const t={hasAllValuesOnLastRun:!0,text:e.text};return t.text=this.process(e.text,e.returnDisplayValue,e.doEncoding,e.replaceUndefinedValues),t.hasAllValuesOnLastRun=this.hasAllValuesOnLastRun,t}getItems(e){for(var t=[],s=e.length,i=-1,r="",n=0;n-1){var a=new hi;a.start=i,a.end=n,this.isValidItemName(e.substring(i+1,n-1))&&t.push(a)}i=-1}return t}isValidItemName(e){return!!e&&e.indexOf(":")<0}getName(e){if(e)return e.trim()}}class mi{constructor(e){this.variableName=e,this.textPreProcessor=new pi,this.textPreProcessor.onProcess=e=>{this.getProcessedTextValue(e)}}processValue(e,t){return this.textPreProcessor.processValue(e,t)}get survey(){return null}get panel(){return null}getValues(){return this.panel?this.panel.getValue():null}getQuestionByName(e){return this.panel?this.panel.getQuestionByValueName(e):null}getParentTextProcessor(){return null}onCustomProcessText(e){return!1}getQuestionDisplayText(e){return e.displayValue}getProcessedTextValue(e){if(e&&!this.onCustomProcessText(e)){var t=(new Re).getFirstName(e.name);if(e.isExists=t==this.variableName,e.canProcess=e.isExists,e.canProcess){e.name=e.name.replace(this.variableName+".","");t=(new Re).getFirstName(e.name);var s=this.getQuestionByName(t),i={};if(s)i[t]=e.returnDisplayValue?this.getQuestionDisplayText(s):s.value;else{var r=this.panel?this.getValues():null;r&&(i[t]=r[t])}e.value=(new Re).getValue(e.name,i)}}}processText(e,t){const s={text:e,returnDisplayValue:t};return this.processTextEx(s).text}processTextEx(e){var t;const s={hasAllValuesOnLastRun:!0,text:e.text};if(!e.runAtDesign&&(null===(t=this.survey)||void 0===t?void 0:t.isDesignMode))return s;const i=new Array;this.addTextPreProcessor(i,this.textPreProcessor),this.addTextPreProcessor(i,this.getParentTextProcessor()),this.addTextPreProcessor(i,this.survey);for(let t=0;t-1||e.push(t)}}class gi{constructor(e,t){this.name=e,this.json=t;var s=this;Ie.addClass(e,[],(function(e){return vi.Instance.createQuestion(e?e.name:"",s)}),"question"),this.onInit()}onInit(){this.json.onInit&&this.json.onInit()}onCreated(e){this.json.onCreated&&this.json.onCreated(e)}onLoaded(e){this.json.onLoaded&&this.json.onLoaded(e)}onAfterRender(e,t){this.json.onAfterRender&&this.json.onAfterRender(e,t)}onAfterRenderContentElement(e,t,s){this.json.onAfterRenderContentElement&&this.json.onAfterRenderContentElement(e,t,s)}onUpdateQuestionCssClasses(e,t,s){this.json.onUpdateQuestionCssClasses&&this.json.onUpdateQuestionCssClasses(e,t,s)}onSetQuestionValue(e,t){this.json.onSetQuestionValue&&this.json.onSetQuestionValue(e,t),this.json.onValueSet&&this.json.onValueSet(e,t)}onPropertyChanged(e,t,s){this.json.onPropertyChanged&&this.json.onPropertyChanged(e,t,s)}onValueChanged(e,t,s){this.json.onValueChanged&&this.json.onValueChanged(e,t,s)}onValueChanging(e,t,s){return this.json.onValueChanging?this.json.onValueChanging(e,t,s):s}onGetErrorText(e){if(this.json.getErrorText)return this.json.getErrorText(e)}onItemValuePropertyChanged(e,t,s,i,r){this.json.onItemValuePropertyChanged&&this.json.onItemValuePropertyChanged(e,{obj:t,propertyName:s,name:i,newValue:r})}getDisplayValue(e,t,s){return this.json.getDisplayValue?this.json.getDisplayValue(s):s.getDisplayValue(e,t)}get defaultQuestionTitle(){return this.json.defaultQuestionTitle}setValueToQuestion(e){const t=this.json.valueToQuestion||this.json.setValue;return t?t(e):e}getValueFromQuestion(e){const t=this.json.valueFromQuestion||this.json.getValue;return t?t(e):e}get isComposite(){return!!this.json.elementsJSON||!!this.json.createElements}getDynamicProperties(){return Array.isArray(this.dynamicProperties)||(this.dynamicProperties=this.calcDynamicProperties()),this.dynamicProperties}calcDynamicProperties(){const e=this.json.inheritBaseProps;if(!e||!this.json.questionJSON)return[];const t=this.json.questionJSON.type;if(!t)return[];if(Array.isArray(e)){const s=[];return e.forEach((e=>{const i=Ie.findProperty(t,e);i&&s.push(i)})),s}const s=[];for(let e in this.json.questionJSON)s.push(e);return Ie.getDynamicPropertiesByTypes(this.name,t,s)}}class vi{constructor(){this.customQuestionValues=[]}add(e){if(!e)return;let t=e.name;if(!t)throw"Attribute name is missed";if(t=t.toLowerCase(),this.getCustomQuestionByName(t))throw"There is already registered custom question with name '"+t+"'";if(Ie.findClass(t))throw"There is already class with name '"+t+"'";var s=new gi(t,e);this.onAddingJson&&this.onAddingJson(t,s.isComposite),this.customQuestionValues.push(s)}remove(e){if(!e)return!1;const t=this.getCustomQuestionIndex(e.toLowerCase());return!(t<0)&&(this.removeByIndex(t),!0)}get items(){return this.customQuestionValues}getCustomQuestionByName(e){const t=this.getCustomQuestionIndex(e);return t>=0?this.customQuestionValues[t]:void 0}getCustomQuestionIndex(e){for(var t=0;t=0;t--)!e&&this.customQuestionValues[t].json.internal||this.removeByIndex(t)}createQuestion(e,t){return t.isComposite?this.createCompositeModel(e,t):this.createCustomModel(e,t)}createCompositeModel(e,t){return this.onCreateComposite?this.onCreateComposite(e,t):new Ci(e,t)}createCustomModel(e,t){return this.onCreateCustom?this.onCreateCustom(e,t):new bi(e,t)}}vi.Instance=new vi;class fi extends ti{constructor(e,t){super(e),this.customQuestion=t,fe.createProperties(this),Jt.CreateDisabledDesignElements=!0,this.locQuestionTitle=this.createLocalizableString("questionTitle",this),this.locQuestionTitle.setJson(this.customQuestion.defaultQuestionTitle),this.createWrapper(),Jt.CreateDisabledDesignElements=!1,this.customQuestion&&this.customQuestion.onCreated(this)}getType(){return this.customQuestion?this.customQuestion.name:"custom"}locStrsChanged(){super.locStrsChanged(),this.getElement()&&this.getElement().locStrsChanged()}localeChanged(){super.locStrsChanged(),this.getElement()&&this.getElement().localeChanged()}getDefaultTitle(){return this.locQuestionTitle.isEmpty?super.getDefaultTitle():this.getProcessedText(this.locQuestionTitle.textOrHtml)}addUsedLocales(e){super.addUsedLocales(e),this.getElement()&&this.getElement().addUsedLocales(e)}needResponsiveWidth(){const e=this.getElement();return!!e&&e.needResponsiveWidth()}createWrapper(){}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),this.customQuestion&&!this.isLoadingFromJson&&this.customQuestion.onPropertyChanged(this,e,s)}itemValuePropertyChanged(e,t,s,i){super.itemValuePropertyChanged(e,t,s,i),this.customQuestion&&!this.isLoadingFromJson&&this.customQuestion.onItemValuePropertyChanged(this,e,e.ownerPropertyName,t,i)}onFirstRenderingCore(){super.onFirstRenderingCore();const e=this.getElement();e&&e.onFirstRendering()}onHidingContent(){super.onHidingContent();const e=this.getElement();e&&e.onHidingContent()}getProgressInfo(){let e=super.getProgressInfo();return this.getElement()&&(e=this.getElement().getProgressInfo()),this.isRequired&&0==e.requiredQuestionCount&&(e.requiredQuestionCount=1,this.isEmpty()||(e.answeredQuestionCount=1)),e}initElement(e){e&&(e.setSurveyImpl(this),e.disableDesignActions=!0)}setSurveyImpl(e,t){this.isSettingValOnLoading=!0,super.setSurveyImpl(e,t),this.initElement(this.getElement()),this.isSettingValOnLoading=!1}onSurveyLoad(){super.onSurveyLoad(),this.getElement()&&(this.getElement().onSurveyLoad(),this.customQuestion.onLoaded(this))}afterRenderQuestionElement(e){}afterRenderCore(e){super.afterRenderCore(e),this.customQuestion&&this.customQuestion.onAfterRender(this,e)}onUpdateQuestionCssClasses(e,t){this.customQuestion&&this.customQuestion.onUpdateQuestionCssClasses(this,e,t)}setQuestionValue(e,t=!0){super.setQuestionValue(e,t),this.updateElementCss(),this.customQuestion&&this.customQuestion.onSetQuestionValue(this,e)}setNewValue(e){super.setNewValue(e),this.updateElementCss()}onCheckForErrors(e,t,s){if(super.onCheckForErrors(e,t,s),this.customQuestion){const t=this.customQuestion.onGetErrorText(this);t&&e.push(new Fs(t,this))}}getSurveyData(){return this}getTextProcessor(){return this.textProcessor}getValue(e){return this.value}setValue(e,t,s,i){if(!this.data)return;this.customQuestion&&this.customQuestion.onValueChanged(this,e,t);var r=this.convertDataName(e);let n=this.convertDataValue(e,t);this.valueToDataCallback&&(n=this.valueToDataCallback(n)),this.data.setValue(r,n,s,i),this.updateIsAnswered(),this.updateElementCss()}getQuestionByName(e){}isValueChanging(e,t){if(this.customQuestion){const s=t;if(t=this.customQuestion.onValueChanging(this,e,t),!ue.isTwoValueEquals(t,s)){const s=this.getQuestionByName(e);if(s)return s.value=t,!0}}return!1}convertDataName(e){return this.getValueName()}convertDataValue(e,t){return t}getVariable(e){return this.data?this.data.getVariable(e):null}setVariable(e,t){this.data&&this.data.setVariable(e,t)}getComment(e){return this.data?this.data.getComment(this.getValueName()):""}setComment(e,t,s){this.data&&this.data.setComment(this.getValueName(),t,s)}getAllValues(){return this.data?this.data.getAllValues():{}}getFilteredValues(){return this.data?this.data.getFilteredValues():{}}getFilteredProperties(){return this.data?this.data.getFilteredProperties():{}}findQuestionByName(e){return this.data?this.data.findQuestionByName(e):null}getEditingSurveyElement(){}addElement(e,t){}removeElement(e){return!1}getQuestionTitleLocation(){return"left"}getQuestionTitleWidth(){}getColumsForElement(e){return[]}updateColumns(){}getQuestionStartIndex(){return this.getStartIndex()}getChildrenLayoutType(){return"row"}elementWidthChanged(e){}get elements(){return[]}indexOf(e){return-1}ensureRowsVisibility(){}validateContainerOnly(){}onQuestionValueChanged(e){}getQuestionErrorLocation(){return this.getErrorLocation()}getContentDisplayValueCore(e,t,s){return s?this.customQuestion.getDisplayValue(e,t,s):super.getDisplayValueCore(e,t)}}class bi extends fi{getTemplate(){return"custom"}getDynamicProperties(){return this.customQuestion.getDynamicProperties()||[]}getDynamicType(){return this.questionWrapper?this.questionWrapper.getType():"question"}getOriginalObj(){return this.questionWrapper}createWrapper(){this.questionWrapper=this.createQuestion(),this.createDynamicProperties(this.questionWrapper),this.getDynamicProperties().length>0&&(this.questionWrapper.onPropertyValueChangedCallback=(e,t,s,i,r)=>{this.getDynamicProperty(e)&&this.propertyValueChanged(e,t,s,r)})}getDynamicProperty(e){const t=this.getDynamicProperties();for(let s=0;s{this.onUpdateQuestionCssClasses(t,e)},t.hasCssErrorCallback=()=>this.errors.length>0,t.setValueChangedDirectlyCallback=e=>{this.setValueChangedDirectly(e)}),t}checkCreatedQuestion(e){return e?(e.isQuestion||(e=Array.isArray(e.questions)&&e.questions.length>0?e.questions[0]:Ie.createClass("text"),ke.error("Could not create component: '"+this.getType()+"'. questionJSON should be a question.")),e):e}onSurveyLoad(){super.onSurveyLoad(),this.contentQuestion&&this.isEmpty()&&!this.contentQuestion.isEmpty()&&(this.value=this.getContentQuestionValue())}runConditionCore(e,t){super.runConditionCore(e,t),this.contentQuestion&&this.contentQuestion.runCondition(e,t)}convertDataName(e){const t=this.contentQuestion;if(!t||e===this.getValueName())return super.convertDataName(e);var s=e.replace(t.getValueName(),this.getValueName());return 0==s.indexOf(this.getValueName())?s:super.convertDataName(e)}convertDataValue(e,t){return this.convertDataName(e)==super.convertDataName(e)?this.getContentQuestionValue():t}getContentQuestionValue(){if(!this.contentQuestion)return;let e=this.contentQuestion.value;return this.customQuestion&&(e=this.customQuestion.getValueFromQuestion(e)),e}setContentQuestionValue(e){this.contentQuestion&&(this.customQuestion&&(e=this.customQuestion.setValueToQuestion(e)),this.contentQuestion.value=e)}canSetValueToSurvey(){return!1}setQuestionValue(e,t=!0){super.setQuestionValue(e,t),this.isLoadingFromJson||!this.contentQuestion||this.isTwoValueEquals(this.getContentQuestionValue(),e)||this.setContentQuestionValue(this.getUnbindValue(e))}onSurveyValueChanged(e){super.onSurveyValueChanged(e),this.contentQuestion&&this.contentQuestion.onSurveyValueChanged(e)}getValueCore(){return this.contentQuestion?this.getContentQuestionValue():super.getValueCore()}setValueChangedDirectly(e){this.isSettingValueChanged||(this.isSettingValueChanged=!0,super.setValueChangedDirectly(e),this.contentQuestion&&this.contentQuestion.setValueChangedDirectly(e),this.isSettingValueChanged=!1)}createDynamicProperties(e){if(!e)return;const t=this.getDynamicProperties();Array.isArray(t)&&Ie.addDynamicPropertiesIntoObj(this,e,t)}initElement(e){super.initElement(e),e&&(e.parent=this,e.afterRenderQuestionCallback=(e,t)=>{this.customQuestion&&this.customQuestion.onAfterRenderContentElement(this,e,t)})}updateElementCss(e){this.contentQuestion&&this.questionWrapper.updateElementCss(e),super.updateElementCss(e)}updateElementCssCore(e){this.contentQuestion&&(e=this.contentQuestion.cssClasses),super.updateElementCssCore(e)}getDisplayValueCore(e,t){return super.getContentDisplayValueCore(e,t,this.contentQuestion)}}class yi extends mi{constructor(e,t){super(t),this.composite=e,this.variableName=t}get survey(){return this.composite.survey}get panel(){return this.composite.contentPanel}}class Ci extends fi{constructor(e,t){super(e,t),this.customQuestion=t,this.settingNewValue=!1,this.textProcessing=new yi(this,Ci.ItemVariableName)}createWrapper(){this.panelWrapper=this.createPanel()}getTemplate(){return"composite"}getElement(){return this.contentPanel}getCssRoot(e){return(new Ct).append(super.getCssRoot(e)).append(e.composite).toString()}get contentPanel(){return this.panelWrapper}hasErrors(e=!0,t=null){var s=super.hasErrors(e,t);return this.contentPanel&&this.contentPanel.hasErrors(e,!1,t)||s}updateElementCss(e){super.updateElementCss(e),this.contentPanel&&this.contentPanel.updateElementCss(e)}dispose(){this.unConnectEditingObj(),super.dispose()}updateEditingObj(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.getEditingSurveyElement();if(!t)return;let s=t[this.getValueName()];return s&&!s.onPropertyChanged&&(s=void 0),s!==this.editingObjValue&&(this.unConnectEditingObj(),this.editingObjValue=s,s&&(this.onEditingObjPropertyChanged=(e,t)=>{this.setNewValueIntoQuestion(t.name,this.editingObjValue[t.name])},s.onPropertyChanged.add(this.onEditingObjPropertyChanged))),this.editingObjValue}unConnectEditingObj(){this.editingObjValue&&!this.editingObjValue.isDisposed&&this.editingObjValue.onPropertyChanged.remove(this.onEditingObjPropertyChanged)}getEditingSurveyElement(){return this.editingObjValue}getTextProcessor(){return this.textProcessing}findQuestionByName(e){const t=this.getQuestionByName(e);return t||super.findQuestionByName(e)}clearValueIfInvisibleCore(e){super.clearValueIfInvisibleCore(e);const t=this.contentPanel.questions;for(var s=0;s{e.setParentQuestion(this),e.onUpdateCssClassesCallback=t=>{this.onUpdateQuestionCssClasses(e,t)}})),this.setAfterRenderCallbacks(e),e}onReadOnlyChanged(){this.contentPanel&&(this.contentPanel.readOnly=this.isReadOnly),super.onReadOnlyChanged()}updateValueFromSurvey(e,t=!1){this.updateEditingObj(),super.updateValueFromSurvey(e,t)}onSurveyLoad(){if(this.isSettingValOnLoading=!0,this.contentPanel&&(this.contentPanel.readOnly=this.isReadOnly,this.setIsContentElement(this.contentPanel)),super.onSurveyLoad(),this.contentPanel){const e=this.getContentPanelValue();ue.isValueEmpty(e)||(this.value=e)}this.isSettingValOnLoading=!1}setIsContentElement(e){e.isContentElement=!0;for(var t=e.elements,s=0;s{e.onSurveyValueChanged(t[e.getValueName()])}))}getValue(e){var t=this.value;return t?t[e]:null}getQuestionByName(e){return this.contentPanel?this.contentPanel.getQuestionByName(e):void 0}setValue(e,t,s,i){if(this.settingNewValue)this.setNewValueIntoQuestion(e,t);else if(!this.isValueChanging(e,t)){if(this.settingNewValue=!0,!this.isEditingSurveyElement&&this.contentPanel){let e=0;const t=this.contentPanel.questions.length+1;for(;e{s.runTriggers(e,t)}))}getFilteredValues(){const e=this.data?this.data.getFilteredValues():{};return this.contentPanel&&(e[Ci.ItemVariableName]=this.contentPanel.getValue()),e}updateValueCoreWithPanelValue(){const e=this.getContentPanelValue();return!this.isTwoValueEquals(this.getValueCore(),e)&&(this.setValueCore(e),!0)}getContentPanelValue(e){return e||(e=this.contentPanel.getValue()),this.customQuestion.setValueToQuestion(e)}getValueForContentPanel(e){return this.customQuestion.getValueFromQuestion(e)}setNewValueIntoQuestion(e,t){var s=this.getQuestionByName(e);s&&!this.isTwoValueEquals(t,s.value)&&(s.value=t)}addConditionObjectsByContext(e,t){if(this.contentPanel)for(var s=this.contentPanel.questions,i=this.name,r=this.title,n=0;ns.collectNestedQuestions(e,t)))}convertDataValue(e,t){var s=this.contentPanel&&!this.isEditingSurveyElement?this.contentPanel.getValue():this.getValueForContentPanel(this.value);return s||(s={}),s.getType||(s=ue.getUnbindValue(s)),this.isValueEmpty(t)&&!this.isEditingSurveyElement?delete s[e]:s[e]=t,this.getContentPanelValue(s)}setQuestionValue(e,t=!0){this.setValuesIntoQuestions(e),!this.isEditingSurveyElement&&this.contentPanel&&(e=this.getContentPanelValue()),super.setQuestionValue(e,t)}setValuesIntoQuestions(e){if(!this.contentPanel||this.settingNewValue)return;e=this.getValueForContentPanel(e);const t=this.settingNewValue;this.settingNewValue=!0;const s=this.contentPanel.questions;for(var i=0;i{this.customQuestion.onAfterRenderContentElement(this,e,t)}}get ariaRole(){return"group"}}Ci.ItemVariableName="composite";class wi{static get DefaultChoices(){const e=he("choices_Item");return[e+"1",e+"2",e+"3"]}static get DefaultColums(){var e=he("matrix_column")+" ";return[e+"1",e+"2",e+"3"]}static get DefaultRows(){var e=he("matrix_row")+" ";return[e+"1",e+"2"]}static get DefaultMutlipleTextItems(){var e=he("multipletext_itemname");return[e+"1",e+"2"]}registerQuestion(e,t,s=!0){xi.Instance.registerElement(e,t,s)}registerCustomQuestion(e){xi.Instance.registerCustomQuestion(e)}unregisterElement(e,t=!1){xi.Instance.unregisterElement(e,t)}clear(){xi.Instance.clear()}getAllTypes(){return xi.Instance.getAllTypes()}createQuestion(e,t){return xi.Instance.createElement(e,t)}}wi.Instance=new wi;class xi{constructor(){this.creatorHash={},this.registerCustomQuestion=(e,t=!0)=>{this.registerElement(e,(t=>{const s=Ie.createClass(e);return s&&(s.name=t),s}),t)}}registerElement(e,t,s=!0){this.creatorHash[e]={showInToolbox:s,creator:t}}clear(){this.creatorHash={}}unregisterElement(e,t=!1){delete this.creatorHash[e],t&&Ie.removeClass(e)}getAllToolboxTypes(){return this.getAllTypesCore(!0)}getAllTypes(){return this.getAllTypesCore(!1)}createElement(e,t){var s=this.creatorHash[e];if(s&&s.creator)return s.creator(t);const i=vi.Instance.getCustomQuestionByName(e);return i?vi.Instance.createQuestion(t,i):null}getAllTypesCore(e){var t=new Array;for(var s in this.creatorHash)e&&!this.creatorHash[s].showInToolbox||t.push(s);return t.sort()}}xi.Instance=new xi;class Vi extends ti{constructor(e){super(e),this.createLocalizableString("format",this),this.registerPropertyChangedHandlers(["expression"],(()=>{this.expressionRunner&&(this.expressionRunner=this.createRunner())})),this.registerPropertyChangedHandlers(["format","currency","displayStyle"],(()=>{this.updateFormatedValue()}))}getType(){return"expression"}get hasInput(){return!1}get format(){return this.getLocalizableStringText("format","")}set format(e){this.setLocalizableStringText("format",e)}get locFormat(){return this.getLocalizableString("format")}get expression(){return this.getPropertyValue("expression","")}set expression(e){this.setPropertyValue("expression",e)}locCalculation(){this.expressionIsRunning=!0}unlocCalculation(){this.expressionIsRunning=!1}runConditionCore(e,t){super.runConditionCore(e,t),!this.expression||this.expressionIsRunning||!this.runIfReadOnly&&this.isReadOnly||(this.locCalculation(),this.expressionRunner||(this.expressionRunner=this.createRunner()),this.expressionRunner.run(e,t))}canCollectErrors(){return!0}hasRequiredError(){return!1}createRunner(){const e=this.createExpressionRunner(this.expression);return e.onRunComplete=e=>{this.value=this.roundValue(e),this.unlocCalculation()},e}get maximumFractionDigits(){return this.getPropertyValue("maximumFractionDigits")}set maximumFractionDigits(e){e<-1||e>20||this.setPropertyValue("maximumFractionDigits",e)}get minimumFractionDigits(){return this.getPropertyValue("minimumFractionDigits")}set minimumFractionDigits(e){e<-1||e>20||this.setPropertyValue("minimumFractionDigits",e)}get runIfReadOnly(){return!0===this.runIfReadOnlyValue}set runIfReadOnly(e){this.runIfReadOnlyValue=e}get formatedValue(){return this.getPropertyValue("formatedValue","")}updateFormatedValue(){this.setPropertyValue("formatedValue",this.getDisplayValueCore(!1,this.value))}onValueChanged(){this.updateFormatedValue()}updateValueFromSurvey(e,t){super.updateValueFromSurvey(e,t),this.updateFormatedValue()}getDisplayValueCore(e,t){var s=null==t?this.defaultValue:t,i="";if(!this.isValueEmpty(s)){var r=this.getValueAsStr(s);i=this.format?this.format.format(r):r}return this.survey&&(i=this.survey.getExpressionDisplayValue(this,s,i)),i}get displayStyle(){return this.getPropertyValue("displayStyle")}set displayStyle(e){this.setPropertyValue("displayStyle",e)}get currency(){return this.getPropertyValue("currency")}set currency(e){["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"].indexOf(e)<0||this.setPropertyValue("currency",e)}get useGrouping(){return this.getPropertyValue("useGrouping")}set useGrouping(e){this.setPropertyValue("useGrouping",e)}get precision(){return this.getPropertyValue("precision")}set precision(e){this.setPropertyValue("precision",e)}roundValue(e){if(e!==1/0)return this.precision<0?e:ue.isNumber(e)?parseFloat(e.toFixed(this.precision)):e}getValueAsStr(e){if("date"==this.displayStyle){const t=le("question-expression",e);if(t&&t.toLocaleDateString)return t.toLocaleDateString()}if("none"!=this.displayStyle&&ue.isNumber(e)){var t=this.getLocale();t||(t="en");var s={style:this.displayStyle,currency:this.currency,useGrouping:this.useGrouping};return this.maximumFractionDigits>-1&&(s.maximumFractionDigits=this.maximumFractionDigits),this.minimumFractionDigits>-1&&(s.minimumFractionDigits=this.minimumFractionDigits),e.toLocaleString(t,s)}return e.toString()}}function _i(e,t,s,i){e.storeOthersAsComment=!!s&&s.storeOthersAsComment,e.choices&&0!=e.choices.length||!e.choicesByUrl.isEmpty||(e.choices=s.choices),e.choicesByUrl.isEmpty||e.choicesByUrl.run(i.getTextProcessor())}Ie.addClass("expression",["expression:expression",{name:"format",serializationProperty:"locFormat"},{name:"displayStyle",default:"none",choices:["none","decimal","currency","percent","date"]},{name:"currency",choices:()=>["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"],default:"USD",visibleIf:e=>"currency"===e.displayStyle},{name:"maximumFractionDigits:number",default:-1},{name:"minimumFractionDigits:number",default:-1},{name:"useGrouping:boolean",default:!0},{name:"precision:number",default:-1,category:"data"},{name:"enableIf",visible:!1,isSerializable:!1},{name:"isRequired",visible:!1,isSerializable:!1},{name:"readOnly",visible:!1,isSerializable:!1},{name:"requiredErrorText",visible:!1,isSerializable:!1},{name:"resetValueIf",visible:!1,isSerializable:!1},{name:"setValueIf",visible:!1,isSerializable:!1},{name:"setValueExpression",visible:!1,isSerializable:!1},{name:"defaultValueExpression",visible:!1,isSerializable:!1},{name:"defaultValue",visible:!1,isSerializable:!1},{name:"correctAnswer",visible:!1,isSerializable:!1},{name:"requiredIf",visible:!1,isSerializable:!1}],(function(){return new Vi("")}),"question"),wi.Instance.registerQuestion("expression",(e=>new Vi(e)));var Ei={dropdown:{onCellQuestionUpdate:(e,t,s,i)=>{!function(e,t,s,i){_i(e,0,s,i),e.locPlaceholder&&e.locPlaceholder.isEmpty&&!s.locPlaceholder.isEmpty&&(e.optionsCaption=s.optionsCaption)}(e,0,s,i)}},checkbox:{onCellQuestionUpdate:(e,t,s,i)=>{_i(e,0,s,i),e.colCount=t.colCount>-1?t.colCount:s.columnColCount}},radiogroup:{onCellQuestionUpdate:(e,t,s,i)=>{_i(e,0,s,i),e.colCount=t.colCount>-1?t.colCount:s.columnColCount}},tagbox:{onCellQuestionUpdate:(e,t,s,i)=>{_i(e,0,s,i)}},text:{},comment:{},boolean:{onCellQuestionUpdate:(e,t,s,i)=>{e.renderAs=t.renderAs}},expression:{},rating:{}};class Pi extends pt{static getColumnTypes(){var e=[];for(var t in Ei)e.push(t);return e}constructor(e,t,s){super(),this.indexValue=-1,this._hasVisibleCell=!0,this.isColumnsVisibleIf=!0,this.previousChoicesId=void 0,this.colOwnerValue=s,this.createLocalizableString("totalFormat",this),this.createLocalizableString("cellHint",this),this.registerPropertyChangedHandlers(["showInMultipleColumns"],(()=>{this.doShowInMultipleColumnsChanged()})),this.registerPropertyChangedHandlers(["visible"],(()=>{this.doColumnVisibilityChanged()})),this.updateTemplateQuestion(void 0,e,t)}getOriginalObj(){return this.templateQuestion}getClassNameProperty(){return"cellType"}getSurvey(e=!1){return this.colOwner?this.colOwner.survey:null}endLoadingFromJson(){super.endLoadingFromJson(),this.templateQuestion.autoOtherMode=this.isShowInMultipleColumns,this.templateQuestion.endLoadingFromJson(),this.templateQuestion.onGetSurvey=()=>this.getSurvey()}getDynamicPropertyName(){return"cellType"}getDynamicType(){return"default"===this.cellType?"question":this.calcCellQuestionType(null)}get colOwner(){return this.colOwnerValue}set colOwner(e){this.colOwnerValue=e,e&&(this.updateTemplateQuestion(),this.setParentQuestionToTemplate(this.templateQuestion))}locStrsChanged(){super.locStrsChanged(),this.locTitle.strChanged()}addUsedLocales(e){super.addUsedLocales(e),this.templateQuestion.addUsedLocales(e)}get index(){return this.indexValue}setIndex(e){this.indexValue=e}getType(){return"matrixdropdowncolumn"}get cellType(){return this.getPropertyValue("cellType")}set cellType(e){e=e.toLocaleLowerCase(),this.updateTemplateQuestion(e),this.setPropertyValue("cellType",e),this.colOwner&&this.colOwner.onColumnCellTypeChanged(this)}get templateQuestion(){return this.templateQuestionValue}get value(){return this.templateQuestion.name}get isVisible(){return!0}get isColumnVisible(){return!!this.isDesignMode||this.visible&&this.hasVisibleCell}get visible(){return this.templateQuestion.visible}set visible(e){this.templateQuestion.visible=e}get hasVisibleCell(){return this._hasVisibleCell}set hasVisibleCell(e){this._hasVisibleCell=e}getVisibleMultipleChoices(){const e=this.templateQuestion.visibleChoices;if(!Array.isArray(e))return[];if(!Array.isArray(this._visiblechoices))return e;const t=new Array;for(let s=0;s-1&&t.push(i)}return t}get getVisibleChoicesInCell(){if(Array.isArray(this._visiblechoices))return this._visiblechoices;const e=this.templateQuestion.visibleChoices;return Array.isArray(e)?e:[]}setVisibleChoicesInCell(e){this._visiblechoices=e}get isFilteredMultipleColumns(){if(!this.showInMultipleColumns)return!1;const e=this.templateQuestion.choices;if(!Array.isArray(e))return!1;for(let t=0;t-1}get isShowInMultipleColumns(){return this.showInMultipleColumns&&this.isSupportMultipleColumns}get validators(){return this.templateQuestion.validators}set validators(e){this.templateQuestion.validators=e}get totalType(){return this.getPropertyValue("totalType")}set totalType(e){this.setPropertyValue("totalType",e)}get totalExpression(){return this.getPropertyValue("totalExpression")}set totalExpression(e){this.setPropertyValue("totalExpression",e)}get hasTotal(){return"none"!=this.totalType||!!this.totalExpression}get totalFormat(){return this.getLocalizableStringText("totalFormat","")}set totalFormat(e){this.setLocalizableStringText("totalFormat",e)}get locTotalFormat(){return this.getLocalizableString("totalFormat")}get cellHint(){return this.getLocalizableStringText("cellHint","")}set cellHint(e){this.setLocalizableStringText("cellHint",e)}get locCellHint(){return this.getLocalizableString("cellHint")}get renderAs(){return this.getPropertyValue("renderAs")}set renderAs(e){this.setPropertyValue("renderAs",e),this.templateQuestion&&(this.templateQuestion.renderAs=e)}get totalMaximumFractionDigits(){return this.getPropertyValue("totalMaximumFractionDigits")}set totalMaximumFractionDigits(e){e<-1||e>20||this.setPropertyValue("totalMaximumFractionDigits",e)}get totalMinimumFractionDigits(){return this.getPropertyValue("totalMinimumFractionDigits")}set totalMinimumFractionDigits(e){e<-1||e>20||this.setPropertyValue("totalMinimumFractionDigits",e)}get totalDisplayStyle(){return this.getPropertyValue("totalDisplayStyle")}set totalDisplayStyle(e){this.setPropertyValue("totalDisplayStyle",e)}get totalAlignment(){return this.getPropertyValue("totalAlignment")}set totalAlignment(e){this.setPropertyValue("totalAlignment",e)}get totalCurrency(){return this.getPropertyValue("totalCurrency")}set totalCurrency(e){["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"].indexOf(e)<0||this.setPropertyValue("totalCurrency",e)}get minWidth(){return this.getPropertyValue("minWidth","")}set minWidth(e){this.setPropertyValue("minWidth",e)}get width(){return this.templateQuestion.width}set width(e){this.templateQuestion.width=e}get colCount(){return this.getPropertyValue("colCount")}set colCount(e){e<-1||e>4||this.setPropertyValue("colCount",e)}getLocale(){return this.colOwner?this.colOwner.getLocale():""}getMarkdownHtml(e,t,s){return this.colOwner?this.colOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.colOwner?this.colOwner.getRenderer(e):null}getRendererContext(e){return this.colOwner?this.colOwner.getRendererContext(e):e}getProcessedText(e){return this.colOwner?this.colOwner.getProcessedText(e):e}createCellQuestion(e){var t=this.calcCellQuestionType(e),s=this.createNewQuestion(t);return this.callOnCellQuestionUpdate(s,e),s}startLoadingFromJson(e){super.startLoadingFromJson(e),e&&!e.cellType&&e.choices&&(e.cellType=this.colOwner.getCellType())}updateCellQuestion(e,t,s=null){this.setQuestionProperties(e,s)}callOnCellQuestionUpdate(e,t){var s=e.getType(),i=Ei[s];i&&i.onCellQuestionUpdate&&i.onCellQuestionUpdate(e,this,this.colOwner,t)}defaultCellTypeChanged(){this.updateTemplateQuestion()}calcCellQuestionType(e){let t=this.getDefaultCellQuestionType();return e&&this.colOwner&&(t=this.colOwner.getCustomCellType(this,e,t)),t}getDefaultCellQuestionType(e){return e||(e=this.cellType),"default"!==e?e:this.colOwner?this.colOwner.getCellType():Ps.matrix.defaultCellType}updateTemplateQuestion(e,t,s){const i=this.getDefaultCellQuestionType(e),r=this.templateQuestion?this.templateQuestion.getType():"";i!==r&&(this.templateQuestion&&this.removeProperties(r),this.templateQuestionValue=this.createNewQuestion(i),this.templateQuestion.locOwner=this,this.addProperties(i),t&&(this.name=t),s?this.title=s:this.templateQuestion.locTitle.strChanged(),Ps.serialization.matrixDropdownColumnSerializeTitle&&(this.templateQuestion.locTitle.serializeCallBackText=!0),this.templateQuestion.onPropertyChanged.add(((e,t)=>{this.propertyValueChanged(t.name,t.oldValue,t.newValue,t.arrayChanges,t.target)})),this.templateQuestion.onItemValuePropertyChanged.add(((e,t)=>{this.doItemValuePropertyChanged(t.propertyName,t.obj,t.name,t.newValue,t.oldValue)})),this.templateQuestion.isContentElement=!0,this.isLoadingFromJson||(this.templateQuestion.onGetSurvey=()=>this.getSurvey()),this.templateQuestion.locTitle.strChanged())}createNewQuestion(e){var t=Ie.createClass(e);return t||(t=Ie.createClass("text")),t.loadingOwner=this,t.isEditableTemplateElement=!0,t.autoOtherMode=this.isShowInMultipleColumns,this.setQuestionProperties(t),this.setParentQuestionToTemplate(t),t}setParentQuestionToTemplate(e){this.colOwner&&this.colOwner.isQuestion&&e.setParentQuestion(this.colOwner)}setQuestionProperties(e,t=null){if(this.templateQuestion){var s=(new Se).toJsonObject(this.templateQuestion,!0);if(t&&t(s),s.type=e.getType(),"default"===this.cellType&&this.colOwner&&this.colOwner.hasChoices()&&delete s.choices,delete s.itemComponent,this.jsonObj&&"rating"===s.type&&Object.keys(this.jsonObj).forEach((e=>{s[e]=this.jsonObj[e]})),"random"===s.choicesOrder){s.choicesOrder="none";const e=this.templateQuestion.visibleChoices;Array.isArray(e)&&(s.choices=e)}(new Se).toObject(s,e),e.isContentElement=this.templateQuestion.isContentElement,this.previousChoicesId=void 0,e.loadedChoicesFromServerCallback=()=>{if(!this.isShowInMultipleColumns)return;if(this.previousChoicesId&&this.previousChoicesId!==e.id)return;this.previousChoicesId=e.id;const t=e.visibleChoices;this.templateQuestion.choices=t,this.propertyValueChanged("choices",t,t)}}}propertyValueChanged(e,t,s,i,r){if(super.propertyValueChanged(e,t,s,i,r),"isRequired"===e&&this.updateIsRenderedRequired(s),this.colOwner&&!this.isLoadingFromJson){if(this.isShowInMultipleColumns){if("choicesOrder"===e)return;["visibleChoices","choices"].indexOf(e)>-1&&this.colOwner.onShowInMultipleColumnsChanged(this)}Ie.hasOriginalProperty(this,e)&&this.colOwner.onColumnPropertyChanged(this,e,s)}}doItemValuePropertyChanged(e,t,s,i,r){Ie.hasOriginalProperty(t,s)&&(null==this.colOwner||this.isLoadingFromJson||this.colOwner.onColumnItemValuePropertyChanged(this,e,t,s,i,r))}doShowInMultipleColumnsChanged(){null!=this.colOwner&&this.colOwner.onShowInMultipleColumnsChanged(this),this.templateQuestion&&(this.templateQuestion.autoOtherMode=this.isShowInMultipleColumns)}doColumnVisibilityChanged(){null==this.colOwner||this.isDesignMode||this.colOwner.onColumnVisibilityChanged(this)}getProperties(e){return Ie.getDynamicPropertiesByObj(this,e)}removeProperties(e){for(var t=this.getProperties(e),s=0;s{var e=Pi.getColumnTypes();return e.splice(0,0,"default"),e}},{name:"colCount",default:-1,choices:[-1,0,1,2,3,4]},"isRequired:boolean","isUnique:boolean",{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},"readOnly:boolean",{name:"minWidth",onPropertyEditorUpdate:function(e,t){e&&t&&(t.value=e.minWidth)}},"width",{name:"visible:switch",default:!0,overridingProperty:"visibleIf"},"visibleIf:condition","enableIf:condition","requiredIf:condition","resetValueIf:condition","setValueIf:condition","setValueExpression:expression",{name:"showInMultipleColumns:boolean",dependsOn:"cellType",visibleIf:e=>e.isSupportMultipleColumns},{name:"validators:validators",baseClassName:"surveyvalidator",classNamePart:"validator"},{name:"totalType",visibleIf:e=>!e.isShowInMultipleColumns,default:"none",choices:["none","sum","count","min","max","avg"]},{name:"totalExpression:expression",visibleIf:e=>!e.isShowInMultipleColumns},{name:"totalFormat",serializationProperty:"locTotalFormat",visibleIf:e=>e.hasTotal},{name:"totalDisplayStyle",visibleIf:e=>e.hasTotal,default:"none",choices:["none","decimal","currency","percent"]},{name:"totalAlignment",visibleIf:e=>e.hasTotal,default:"auto",choices:["auto","left","center","right"]},{name:"totalCurrency",visibleIf:e=>e.hasTotal,choices:()=>["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"],default:"USD"},{name:"totalMaximumFractionDigits:number",default:-1,visibleIf:e=>e.hasTotal},{name:"totalMinimumFractionDigits:number",default:-1,visibleIf:e=>e.hasTotal},{name:"renderAs",default:"default",visible:!1},{name:"defaultDisplayValue",serializationProperty:"locDefaultDisplayValue"}],(function(){return new Pi("")}));class Ii{constructor(){this.minWidth="",this.width="",this.colSpans=1,this.isActionsCell=!1,this.isErrorsCell=!1,this.isDragHandlerCell=!1,this.isDetailRowCell=!1,this.classNameValue="",this.idValue=Ii.counter++}get requiredMark(){return this.column&&this.column.isRenderedRequired?this.column.requiredMark:void 0}get hasQuestion(){return!!this.question&&!this.isErrorsCell}get hasTitle(){return!!this.locTitle}get hasPanel(){return!!this.panel}get id(){let e=this.question?this.question.id:this.idValue.toString();return this.isChoice&&(e+="-"+(Number.isInteger(this.choiceIndex)?"index"+this.choiceIndex.toString():this.item.id)),Si(e,this.isErrorsCell,this.isDetailRowCell)}get item(){return this.itemValue}set item(e){this.itemValue=e,e&&(e.hideCaption=!0)}get isChoice(){return!!this.item}get isItemChoice(){return this.isChoice&&!this.isOtherChoice}get choiceValue(){return this.isChoice?this.item.value:null}get isCheckbox(){return this.isItemChoice&&this.question.isDescendantOf("checkbox")}get isRadio(){return this.isItemChoice&&this.question.isDescendantOf("radiogroup")}get isFirstChoice(){return 0===this.choiceIndex}set className(e){this.classNameValue=e}get className(){const e=(new Ct).append(this.classNameValue);return this.hasQuestion&&e.append(this.question.cssClasses.hasError,this.question.errors.length>0).append(this.question.cssClasses.answered,this.question.isAnswered),e.toString()}get cellQuestionWrapperClassName(){return this.cell.getQuestionWrapperClassName(this.matrix.cssClasses.cellQuestionWrapper)}get isVisible(){var e;return!this.hasQuestion&&!this.isErrorsCell||!(null===(e=this.matrix)||void 0===e?void 0:e.isMobile)||this.question.isVisible}get showResponsiveTitle(){var e;return this.hasQuestion&&(null===(e=this.matrix)||void 0===e?void 0:e.isMobile)}get responsiveTitleCss(){return(new Ct).append(this.matrix.cssClasses.cellResponsiveTitle).toString()}get responsiveLocTitle(){return this.cell.column.locTitle}get headers(){if(this.cell&&this.cell.column){if(this.matrix.IsMultiplyColumn(this.cell.column))return this.item?this.item.locText.renderedHtml:"";let e=this.cell.column.cellHint;return e?""===e.trim()?"":this.cell.column.locCellHint.renderedHtml:this.hasQuestion&&this.question.isVisible&&this.question.title?this.question.title:this.cell.column.title}return this.hasQuestion&&this.question.isVisible?this.question.locTitle.renderedHtml:this.hasTitle&&this.locTitle.renderedHtml||""}getTitle(){return this.matrix&&this.matrix.showHeader?this.headers:""}calculateFinalClassName(e){const t=this.cell.question.cssClasses,s=(new Ct).append(t.itemValue,!!t).append(t.asCell,!!t);return s.append(e.cell,s.isEmpty()&&!!e).append(e.choiceCell,this.isChoice).toString()}focusIn(){this.question&&this.question.focusIn()}}Ii.counter=1;class Ti extends pt{constructor(e,t=!1){super(),this.cssClasses=e,this.isDetailRow=t,this.hasEndActions=!1,this.isErrorsRow=!1,this.cells=[],this.idValue=Ti.counter++}get id(){var e;return Si((null===(e=this.row)||void 0===e?void 0:e.id)||this.idValue.toString(),this.isErrorsRow,this.isDetailRow)}get attributes(){return this.row?{"data-sv-drop-target-matrix-row":this.row.id}:{}}get className(){var e,t;return(new Ct).append(this.cssClasses.row).append(this.cssClasses.detailRow,this.isDetailRow).append(this.cssClasses.rowHasPanel,null===(e=this.row)||void 0===e?void 0:e.hasPanel).append(this.cssClasses.expandedRow,(null===(t=this.row)||void 0===t?void 0:t.isDetailPanelShowing)&&!this.isDetailRow).append(this.cssClasses.rowHasEndActions,this.hasEndActions).append(this.cssClasses.ghostRow,this.isGhostRow).append(this.cssClasses.rowAdditional,this.isAdditionalClasses).toString()}setRootElement(e){this.rootElement=e}getRootElement(){return this.rootElement}focusCell(e){if(this.rootElement){const t=`:scope td:nth-of-type(${e+1}) input, :scope td:nth-of-type(${e+1}) button`,s=this.rootElement.querySelectorAll(t)[0];s&&s.focus()}}}Ti.counter=1,ft([pe({defaultValue:!1})],Ti.prototype,"isGhostRow",void 0),ft([pe({defaultValue:!1})],Ti.prototype,"isAdditionalClasses",void 0),ft([pe({defaultValue:!0})],Ti.prototype,"visible",void 0);class Ri extends Ti{constructor(e){super(e),this.isErrorsRow=!0}get attributes(){return{}}get className(){return(new Ct).append(this.cssClasses.row).append(this.cssClasses.errorRow).toString()}onAfterCreated(){const e=()=>{this.visible=this.cells.some((e=>e.question&&e.question.hasVisibleErrors))};this.cells.forEach((t=>{t.question&&t.question.registerFunctionOnPropertyValueChanged("hasVisibleErrors",e)})),e()}}class ki extends pt{getIsAnimationAllowed(){return super.getIsAnimationAllowed()&&this.matrix.animationAllowed}getRenderedRowsAnimationOptions(){const e=e=>{e.querySelectorAll(":scope > td > *").forEach((e=>{xs(e)}))},t=e=>{e.querySelectorAll(":scope > td > *").forEach((e=>{Vs(e)}))};return{isAnimationEnabled:()=>this.animationAllowed,getRerenderEvent:()=>this.onElementRerendered,getAnimatedElement:e=>e.getRootElement(),getLeaveOptions:()=>({cssClass:this.cssClasses.rowLeave,onBeforeRunAnimation:e,onAfterRunAnimation:t}),getEnterOptions:(s,i)=>({cssClass:this.cssClasses.rowEnter,onBeforeRunAnimation:e,onAfterRunAnimation:t}),getKey:e=>e.id}}updateRenderedRows(){this.renderedRows=this.rows}get renderedRows(){return this._renderedRows}set renderedRows(e){this.renderedRowsAnimation.sync(e)}constructor(e){super(),this.matrix=e,this._renderedRows=[],this.renderedRowsAnimation=new Ut(this.getRenderedRowsAnimationOptions(),(e=>{this._renderedRows=e}),(()=>this._renderedRows)),this.hasActionCellInRowsValues={},this.build()}get showTable(){return this.getPropertyValue("showTable",!0)}get showHeader(){return this.getPropertyValue("showHeader")}get showAddRow(){return this.getPropertyValue("showAddRow",!1)}get showAddRowOnTop(){return this.getPropertyValue("showAddRowOnTop",!1)}get showAddRowOnBottom(){return this.getPropertyValue("showAddRowOnBottom",!1)}get showFooter(){return this.matrix.hasFooter&&this.matrix.isColumnLayoutHorizontal}get hasFooter(){return!!this.footerRow}get hasRemoveRows(){return this.hasRemoveRowsValue}isRequireReset(){return this.hasRemoveRows!=this.matrix.canRemoveRows||!this.matrix.isColumnLayoutHorizontal}get headerRow(){return this.headerRowValue}get footerRow(){return this.footerRowValue}get isRowsDragAndDrop(){return this.matrix.isRowsDragAndDrop&&this.matrix.isColumnLayoutHorizontal}get showCellErrorsTop(){return"top"===this.matrix.getErrorLocation()}get showCellErrorsBottom(){return"bottom"===this.matrix.getErrorLocation()}build(){this.hasRemoveRowsValue=this.matrix.canRemoveRows,this.matrix.visibleRows,this.cssClasses=this.matrix.cssClasses,this.buildRowsActions(),this.buildHeader(),this.buildRows(),this.buildFooter(),this.updateShowTableAndAddRow()}updateShowTableAndAddRow(){var e=this.rows.length>0||this.matrix.isDesignMode||!this.matrix.getShowColumnsIfEmpty();this.setPropertyValue("showTable",e);var t=this.matrix.canAddRow&&e,s=t,i=t;s&&(s="default"===this.matrix.getAddRowLocation()?!this.matrix.isColumnLayoutHorizontal:"bottom"!==this.matrix.getAddRowLocation()),i&&"topBottom"!==this.matrix.getAddRowLocation()&&(i=!s),this.setPropertyValue("showAddRow",this.matrix.canAddRow),this.setPropertyValue("showAddRowOnTop",s),this.setPropertyValue("showAddRowOnBottom",i)}onAddedRow(e,t){if(this.getRenderedDataRowCount()>=this.matrix.visibleRows.length)return;let s=this.getRenderedRowIndexByIndex(t);this.rowsActions.splice(t,0,this.buildRowActions(e)),this.addHorizontalRow(this.rows,e,s),this.updateShowTableAndAddRow()}getRenderedRowIndexByIndex(e){let t=0,s=0;for(var i=0;i0&&this.showCellErrorsTop&&this.rows[t-1].isErrorsRow&&(t--,s++),this.rows.splice(t,s),this.updateShowTableAndAddRow()}}onDetailPanelChangeVisibility(e,t){const s=this.getRenderedRowIndex(e);if(s<0)return;let i=s;this.showCellErrorsBottom&&i++;var r=i-1||!t&&r<0))if(t){var n=this.createDetailPanelRow(e,this.rows[s]);this.rows.splice(i+1,0,n)}else this.rows.splice(r,1)}focusActionCell(e,t){let s=this.rows[this.rows.length-1];if(this.matrix.isColumnLayoutHorizontal){const t=this.getRenderedRowIndex(e);s=this.rows[t]}null==s||s.focusCell(t)}getRenderedRowIndex(e){for(var t=0;t!this.isValueEmpty(this.getRowActions(s,e))))}canRemoveRow(e){return this.matrix.canRemoveRow(e)}buildHorizontalRows(){for(var e=this.matrix.visibleRows,t=[],s=0;s=s,t.isEmpty=!t.isDragHandlerCell,t.className=this.getActionsCellClassName(t),t.row=this.matrix.visibleRows[e],t}getActionsCellClassName(e=null){const t=(new Ct).append(this.cssClasses.actionsCell).append(this.cssClasses.actionsCellDrag,null==e?void 0:e.isDragHandlerCell).append(this.cssClasses.detailRowCell,null==e?void 0:e.isDetailRowCell).append(this.cssClasses.verticalCell,!this.matrix.isColumnLayoutHorizontal);if(e.isActionsCell){const s=e.item.value.actions;this.cssClasses.actionsCellPrefix&&s.forEach((e=>{t.append(this.cssClasses.actionsCellPrefix+"--"+e.id)}))}return t.toString()}getRowActionsCell(e,t,s=!1){const i=this.getRowActions(e,t);if(!this.isValueEmpty(i)){const t=new Ii,r=this.matrix.allowAdaptiveActions?new Ft:new xt;this.matrix.survey&&this.matrix.survey.getCss().actionBar&&(r.cssClasses=this.matrix.survey.getCss().actionBar),r.setItems(i);const n=new ii(r);return t.item=n,t.isActionsCell=!0,t.isDragHandlerCell=!1,t.isDetailRowCell=s,t.className=this.getActionsCellClassName(t),t.row=this.matrix.visibleRows[e],t}return null}getRowActions(e,t){var s=this.rowsActions[e];return Array.isArray(s)?s.filter((e=>(e.location||(e.location="start"),e.location===t))):[]}buildRowActions(e){var t=[];return this.setDefaultRowActions(e,t),this.matrix.survey&&(t=this.matrix.survey.getUpdatedMatrixRowActions(this.matrix,e,t)),t}get showRemoveButtonAsIcon(){return Ps.matrix.renderRemoveAsIcon&&this.matrix.survey&&"sd-root-modern"===this.matrix.survey.css.root}setDefaultRowActions(e,t){const s=this.matrix;this.hasRemoveRows&&this.canRemoveRow(e)&&(this.showRemoveButtonAsIcon?t.push(new Nt({id:"remove-row",iconName:"icon-delete-24x24",iconSize:"auto",component:"sv-action-bar-item",innerCss:(new Ct).append(this.matrix.cssClasses.button).append(this.matrix.cssClasses.buttonRemove).toString(),location:"end",showTitle:!1,title:s.removeRowText,enabled:!s.isInputReadOnly,data:{row:e,question:s},action:()=>{s.removeRowUI(e)}})):t.push(new Nt({id:"remove-row",location:"end",enabled:!this.matrix.isInputReadOnly,component:"sv-matrix-remove-button",data:{row:e,question:this.matrix}}))),e.hasPanel&&(this.matrix.isMobile?t.unshift(new Nt({id:"show-detail-mobile",title:new ct((()=>e.isDetailPanelShowing?this.matrix.getLocalizationString("hideDetails"):this.matrix.getLocalizationString("showDetails"))),showTitle:!0,location:"end",action:t=>{e.showHideDetailPanelClick()}})):t.push(new Nt({id:"show-detail",title:this.matrix.getLocalizationString("editText"),showTitle:!1,location:"start",component:"sv-matrix-detail-button",data:{row:e,question:this.matrix}})))}createErrorRow(e){const t=this.createErrorRenderedRow(this.cssClasses);for(let s=0;se.hideCaption=!1));var r=this.createEditCell(s);t.cells.push(r),this.setCellWidth(s.column,r)}}return this.addRowActionsCell(e,t,"end"),t}addRowActionsCell(e,t,s){var i=this.matrix.visibleRows.indexOf(e);if(this.hasActionCellInRows(s)){const e=this.getRowActionsCell(i,s,t.isDetailRow);if(e)t.cells.push(e),t.hasEndActions=!0;else{var r=new Ii;r.isEmpty=!0,r.isDetailRowCell=t.isDetailRow,t.cells.push(r)}}}createDetailPanelRow(e,t){const s=this.matrix.isDesignMode;var i=this.createRenderedRow(this.cssClasses,!0);i.row=e;var r=new Ii;this.matrix.hasRowText&&(r.colSpans=2),r.isEmpty=!0,s||i.cells.push(r);var n=null;this.hasActionCellInRows("end")&&((n=new Ii).isEmpty=!0);var a=new Ii;return a.panel=e.detailPanel,a.colSpans=t.cells.length-(s?0:r.colSpans)-(n?n.colSpans:0),a.className=this.cssClasses.detailPanelCell,i.cells.push(a),n&&(this.matrix.isMobile?this.addRowActionsCell(e,i,"end"):i.cells.push(n)),"function"==typeof this.matrix.onCreateDetailPanelRenderedRowCallback&&this.matrix.onCreateDetailPanelRenderedRowCallback(i),i}buildVerticalRows(){for(var e=this.matrix.columns,t=[],s=0;s=0?i:l,h=o[l].cells[t],c=s?h.question.visibleChoices:void 0;c&&d{s.updateRenderedRows()},onRemove:(e,t,s)=>{s.updateRenderedRows()}})],ki.prototype,"rows",void 0),ft([ge()],ki.prototype,"_renderedRows",void 0);class Di{constructor(e,t,s){this.column=e,this.row=t,this.data=s,this.questionValue=this.createQuestion(e,t,s),this.questionValue.updateCustomWidget(),this.updateCellQuestionTitleDueToAccessebility(t)}updateCellQuestionTitleDueToAccessebility(e){this.questionValue.locTitle.onGetTextCallback=t=>{if(!e||!e.getSurvey())return this.questionValue.title;const s=e.getAccessbilityText();return s?this.column.colOwner.getCellAriaLabel(s,this.questionValue.title):this.questionValue.title}}locStrsChanged(){this.question.locStrsChanged()}createQuestion(e,t,s){const i=s.createQuestion(this.row,this.column);return i.readOnlyCallback=()=>!this.row.isRowEnabled(),i.validateValueCallback=function(){return s.validateCell(t,e.name,t.value)},fe.getProperties(e.getType()).forEach((t=>{let s=t.name;void 0!==e[s]&&(i[s]=e[s])})),i}get question(){return this.questionValue}get value(){return this.question.value}set value(e){this.question.value=e}getQuestionWrapperClassName(e){return e}runCondition(e,t){this.question.runCondition(e,t)}}class Li extends Di{constructor(e,t,s){super(e,t,s),this.column=e,this.row=t,this.data=s,this.updateCellQuestion()}createQuestion(e,t,s){var i=Ie.createClass("expression");return i.setSurveyImpl(t),i}locStrsChanged(){this.updateCellQuestion(),super.locStrsChanged()}updateCellQuestion(){this.question.locCalculation(),this.column.updateCellQuestion(this.question,null,(function(e){delete e.defaultValue})),this.question.expression=this.getTotalExpression(),this.question.format=this.column.totalFormat,this.question.currency=this.column.totalCurrency,this.question.displayStyle=this.column.totalDisplayStyle,this.question.maximumFractionDigits=this.column.totalMaximumFractionDigits,this.question.minimumFractionDigits=this.column.totalMinimumFractionDigits,this.question.unlocCalculation(),this.question.runIfReadOnly=!0}getQuestionWrapperClassName(e){let t=super.getQuestionWrapperClassName(e);if(!t)return t;this.question.expression&&"''"!=this.question.expression&&(t+=" "+e+"--expression");let s=this.column.totalAlignment;return"auto"===s&&"dropdown"===this.column.cellType&&(s="left"),t+" "+e+"--"+s}getTotalExpression(){if(this.column.totalExpression)return this.column.totalExpression;if("none"==this.column.totalType)return"''";var e=this.column.totalType+"InArray";return De.Instance.hasFunction(e)?e+"({self}, '"+this.column.name+"')":""}}class Ai extends mi{constructor(e,t,s){super(t),this.row=e,this.variableName=t,this.parentTextProcessor=s}getParentTextProcessor(){return this.parentTextProcessor}get survey(){return this.row.getSurvey()}getValues(){return this.row.value}getQuestionByName(e){return this.row.getQuestionByName(e)}onCustomProcessText(e){return e.name==ji.IndexVariableName?(e.isExists=!0,e.value=this.row.rowIndex,!0):[ji.RowValueVariableName,ji.RowNameVariableName].indexOf(e.name)>-1&&(e.isExists=!0,e.value=this.row.rowName,!0)}}class ji{static getId(){return"srow_"+ji.idCounter++}constructor(e,t){this.isSettingValue=!1,this.detailPanelValue=null,this.visibleValue=!0,this.cells=[],this.isCreatingDetailPanel=!1,this.data=e,this.subscribeToChanges(t),this.textPreProcessor=new Ai(this,ji.RowVariableName,e?e.getParentTextProcessor():null),this.showHideDetailPanelClick=()=>{if(this.getSurvey().isDesignMode)return!0;this.showHideDetailPanel()},this.idValue=ji.getId()}get id(){return this.idValue}get rowName(){return null}get dataName(){return this.rowName}get text(){return this.rowName}isRowEnabled(){return!0}isRowHasEnabledCondition(){return!1}get isVisible(){return this.visible&&this.isItemVisible()}get visible(){return this.visibleValue}set visible(e){var t;this.visible!==e&&(this.visibleValue=e,null===(t=this.data)||void 0===t||t.onRowVisibilityChanged(this))}isItemVisible(){return!0}get value(){for(var e={},t=this.questions,s=0;s0?this.data.getRowValue(this.rowIndex-1):this.value;s?(e[ji.RowVariableName]=n,this.setRowsVisibleIfValues(e),this.visible=new lt(s).run(e,t)):this.visible=!0;for(var a=0;a0&&ys(this.value,n),e[ji.RowVariableName]=n,this.cells[a].runCondition(e,r);this.detailPanel&&this.detailPanel.runCondition(e,r),this.isRowHasEnabledCondition()&&this.onQuestionReadOnlyChanged()}updateElementVisibility(){this.cells.forEach((e=>e.question.updateElementVisibility())),this.detailPanel&&this.detailPanel.updateElementVisibility()}setRowsVisibleIfValues(e){}getNamesWithDefaultValues(){const e=[];return this.questions.forEach((t=>{t.isValueDefault&&e.push(t.getValueName())})),e}clearValue(e){for(var t=this.questions,s=0;s1)for(let e=0;es.runTriggers(e,t)))}hasQuestonError(e){if(!e)return!1;if(e.hasErrors(!0,{isOnValueChanged:!this.data.isValidateOnValueChanging}))return!0;if(e.isEmpty())return!1;var t=this.getCellByColumnName(e.name);return!!(t&&t.column&&t.column.isUnique)&&this.data.checkIfValueInRowDuplicated(this,e)}get isEmpty(){var e=this.value;if(ue.isValueEmpty(e))return!0;for(var t in e)if(void 0!==e[t]&&null!==e[t])return!1;return!0}getQuestionByColumn(e){var t=this.getCellByColumn(e);return t?t.question:null}getCellByColumn(e){for(var t=0;t{s()},t&&!0===t.isOnValueChanged&&a.isEmpty()||(i=a.hasErrors(e,t)||i))}if(this.hasPanel){this.ensureDetailPanel();var o=this.detailPanel.hasErrors(e,!1,t);!t.hideErroredPanel&&o&&e&&(t.isSingleDetailPanel&&(t.hideErroredPanel=!0),this.showDetailPanel()),i=o||i}return this.validationValues=void 0,i}updateCellOnColumnChanged(e,t,s){"choices"===t&&Array.isArray(s)&&0===s.length&&this.data&&(s=this.data.choices),e.question[t]=s}updateCellOnColumnItemValueChanged(e,t,s,i,r,n){var a=e.question[t];if(Array.isArray(a)){var o="value"===i?n:s.value,l=ii.getItemByValue(a,o);l&&(l[i]=r)}}buildCells(e){this.isSettingValue=!0;for(var t=this.data.columns,s=0;s{this.updateOnSetValue(t.name,t.newValue)},this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged))}updateOnSetValue(e,t){this.isSettingValue=!0;let s=this.getQuestionsByName(e);for(let e=0;e{e.colOwner=this,this.onAddColumn&&this.onAddColumn(e),this.survey&&this.survey.matrixColumnAdded(this,e)}),(e=>{e.colOwner=null,this.onRemoveColumn&&this.onRemoveColumn(e)}))}constructor(e){super(e),this.isRowChanging=!1,this.lockResetRenderedTable=!1,this.isDoingonAnyValueChanged=!1,this.createItemValues("choices"),this.createLocalizableString("placeholder",this,!1,!0),this.createLocalizableString("keyDuplicationError",this,!1,!0),this.detailPanelValue=this.createNewDetailPanel(),this.detailPanel.selectedElementInDesign=this,this.detailPanel.renderWidth="100%",this.detailPanel.isInteractiveDesignElement=!1,this.detailPanel.showTitle=!1,this.registerPropertyChangedHandlers(["columns","cellType"],(()=>{this.updateColumnsAndRows()})),this.registerPropertyChangedHandlers(["placeholder","columnColCount","rowTitleWidth","choices"],(()=>{this.clearRowsAndResetRenderedTable()})),this.registerPropertyChangedHandlers(["transposeData","addRowButtonLocation","hideColumnsIfEmpty","showHeader","minRowCount","isReadOnly","rowCount","hasFooter","detailPanelMode","displayMode"],(()=>{this.resetRenderedTable()}))}getType(){return"matrixdropdownbase"}dispose(){super.dispose(),this.clearGeneratedRows()}get hasSingleInput(){return!1}get isContainer(){return!0}get isRowsDynamic(){return!1}get isUpdateLocked(){return this.isLoadingFromJson||this.isUpdating}beginUpdate(){this.isUpdating=!0}endUpdate(){this.isUpdating=!1,this.updateColumnsAndRows()}updateColumnsAndRows(){this.updateColumnsIndexes(this.columns),this.updateColumnsCellType(),this.generatedTotalRow=null,this.clearRowsAndResetRenderedTable()}itemValuePropertyChanged(e,t,s,i){super.itemValuePropertyChanged(e,t,s,i),"choices"===e.ownerPropertyName&&this.clearRowsAndResetRenderedTable()}get transposeData(){return this.getPropertyValue("transposeData")}set transposeData(e){this.setPropertyValue("transposeData",e)}get columnLayout(){return this.transposeData?"vertical":"horizontal"}set columnLayout(e){this.transposeData="vertical"===e}get columnsLocation(){return this.columnLayout}set columnsLocation(e){this.columnLayout=e}get detailErrorLocation(){return this.getPropertyValue("detailErrorLocation")}set detailErrorLocation(e){this.setPropertyValue("detailErrorLocation",e.toLowerCase())}get cellErrorLocation(){return this.getPropertyValue("cellErrorLocation")}set cellErrorLocation(e){this.setPropertyValue("cellErrorLocation",e.toLowerCase())}getChildErrorLocation(e){const t=e.parent?this.detailErrorLocation:this.cellErrorLocation;return"default"!==t?t:super.getChildErrorLocation(e)}get isColumnLayoutHorizontal(){return!!this.isMobile||!this.transposeData}get useCaseSensitiveComparison(){return void 0!==this.useCaseSensitiveComparisonValue?this.useCaseSensitiveComparisonValue:Ps.comparator.caseSensitive}set useCaseSensitiveComparison(e){this.useCaseSensitiveComparisonValue=e}get isUniqueCaseSensitive(){return this.useCaseSensitiveComparison}set isUniqueCaseSensitive(e){this.useCaseSensitiveComparison=e}get detailPanelMode(){return this.getPropertyValue("detailPanelMode")}set detailPanelMode(e){this.setPropertyValue("detailPanelMode",e)}get detailPanel(){return this.detailPanelValue}getPanel(){return this.detailPanel}get detailElements(){return this.detailPanel.elements}createNewDetailPanel(){return Ie.createClass("panel")}get hasRowText(){return!0}getFooterText(){return null}get canAddRow(){return!1}get canRemoveRows(){return!1}canRemoveRow(e){return!0}onPointerDown(e,t){}onRowsChanged(){this.clearVisibleRows(),this.resetRenderedTable(),super.onRowsChanged()}onStartRowAddingRemoving(){this.lockResetRenderedTable=!0,this.setValueChangedDirectly(!0)}onEndRowAdding(){if(this.lockResetRenderedTable=!1,this.renderedTable)if(this.renderedTable.isRequireReset())this.resetRenderedTable();else{const e=this.visibleRows.length-1;this.renderedTable.onAddedRow(this.visibleRows[e],e)}}onEndRowRemoving(e){this.lockResetRenderedTable=!1,this.renderedTable.isRequireReset()?this.resetRenderedTable():e&&this.renderedTable.onRemovedRow(e)}get renderedTableValue(){return this.getPropertyValue("renderedTable",null)}set renderedTableValue(e){this.setPropertyValue("renderedTable",e)}clearRowsAndResetRenderedTable(){this.clearGeneratedRows(),this.resetRenderedTable(),this.fireCallback(this.columnsChangedCallback)}resetRenderedTable(){this.lockResetRenderedTable||this.isUpdateLocked||(this.renderedTableValue=null,this.fireCallback(this.onRenderedTableResetCallback))}clearGeneratedRows(){if(this.clearVisibleRows(),this.generatedVisibleRows){for(var e=0;e4||this.setPropertyValue("columnColCount",e)}get horizontalScroll(){return this.getPropertyValue("horizontalScroll")}set horizontalScroll(e){this.setPropertyValue("horizontalScroll",e)}get allowAdaptiveActions(){return this.getPropertyValue("allowAdaptiveActions")}set allowAdaptiveActions(e){this.setPropertyValue("allowAdaptiveActions",e),this.detailPanel&&(this.detailPanel.allowAdaptiveActions=e)}hasChoices(){return this.choices.length>0}onColumnPropertyChanged(e,t,s){if(this.updateHasFooter(),this.generatedVisibleRows){for(var i=0;i=0&&"."!=t[e];e--)i=t[e]+i;let r=this.getColumnByName(i);return r?s=r.createCellQuestion(null):"none"!==this.detailPanelMode&&(s=this.detailPanel.getQuestionByName(i)),s?s.getConditionJson(e):null}clearIncorrectValues(){if(!Array.isArray(this.visibleRows))return;const e=this.generatedVisibleRows;for(let t=0;t{e.clearErrors()}))}localeChanged(){super.localeChanged(),this.runFuncForCellQuestions((e=>{e.localeChanged()}))}runFuncForCellQuestions(e){const t=this.generatedVisibleRows;if(t)for(let s=0;s{i.runTriggers(e,t,s)}))}updateElementVisibility(){super.updateElementVisibility();const e=this.generatedVisibleRows;e&&e.forEach((e=>e.updateElementVisibility()))}shouldRunColumnExpression(){return!1}runCellsCondition(e,t){if(this.isDesignMode)return;const s=this.generatedVisibleRows;if(s){const r=this.getRowConditionValues(e);for(var i=0;i{if(this.columnsVisibleIf){const i=new lt(this.columnsVisibleIf);e.item=s.name,s.isColumnsVisibleIf=!0===i.run(e,t)}else s.isColumnsVisibleIf=!0})),!1}checkColumnsVisibility(){if(!this.isDesignMode){for(var e=!1,t=0;t0;for(var s=0;sthis.onMatrixRowCreated(e))),this.data&&this.runCellsCondition(this.data.getFilteredValues(),this.data.getFilteredProperties()),this.generatedVisibleRows&&(this.updateValueOnRowsGeneration(this.generatedVisibleRows),this.updateIsAnswered()))}getVisibleFromGenerated(e){const t=[];return e?(e.forEach((e=>{e.isVisible&&t.push(e)})),t.length===e.length?e:t):t}updateValueOnRowsGeneration(e){for(var t=this.createNewValue(!0),s=this.createNewValue(),i=0;i=t.length)return null;const s=this.value,i=this.getRowValueCore(t[e],s);return this.isValueSurveyElement(s)?i:ue.getUnbindValue(i)}checkIfValueInRowDuplicated(e,t){return!!this.generatedVisibleRows&&this.isValueInColumnDuplicated(t.name,!0,e)}setRowValue(e,t){if(e<0)return null;var s=this.visibleRows;if(e>=s.length)return null;s[e].value=t,this.onRowChanged(s[e],"",t,!1)}generateRows(){return null}generateTotalRow(){return new Oi(this)}createNewValue(e=!1){var t=this.value?this.createValueCopy():{};return e&&this.isMatrixValueEmpty(t)?null:t}getRowValueCore(e,t,s=!1){var i=t&&t[e.rowName]?t[e.rowName]:null;return!i&&s&&(i={},t&&(t[e.rowName]=i)),i}getRowObj(e){var t=this.getRowValueCore(e,this.value);return t&&t.getType?t:null}getRowDisplayValue(e,t,s){if(!s)return s;if(t.editingObj)return s;for(var i=Object.keys(s),r=0;r{var s={name:t.dataName,title:t.text,value:t.value,displayValue:this.getRowDisplayValue(!1,t,t.value),getString:e=>"object"==typeof e?JSON.stringify(e):e,isNode:!0,data:t.cells.map((t=>t.question.getPlainData(e))).filter((e=>!!e))};return(e.calculations||[]).forEach((e=>{s[e.propertyName]=t[e.propertyName]})),s})),t.data=t.data.concat(s)}return t}addConditionObjectsByContext(e,t){let s=[].concat(this.columns);"none"!==this.detailPanelMode&&(s=s.concat(this.detailPanel.questions));const i=!!t&&s.indexOf(t)>-1,r=!0===t||i,n=this.getConditionObjectsRowIndeces();r&&n.push(-1);for(var a=0;a-1?this.getConditionObjectRowName(r):"row";if(!l)continue;const u=r>-1?this.getConditionObjectRowText(r):"row",d=r>-1||!0===t,h=d&&-1===r?".":"",c=(d?this.getValueName():"")+h+l+".",p=(d?this.processedTitle:"")+h+u+".";for(var o=0;oe.onHidingContent()))}getIsReadyNestedQuestions(){if(!this.generatedVisibleRows)return[];const e=new Array;return this.collectNestedQuestonsInRows(this.generatedVisibleRows,e,!1),this.generatedTotalRow&&this.collectNestedQuestonsInRows([this.generatedTotalRow],e,!1),e}collectNestedQuestionsCore(e,t){this.collectNestedQuestonsInRows(this.visibleRows,e,t)}collectNestedQuestonsInRows(e,t,s){Array.isArray(e)&&e.forEach((e=>{e.questions.forEach((e=>e.collectNestedQuestions(t,s)))}))}getConditionObjectRowName(e){return""}getConditionObjectRowText(e){return this.getConditionObjectRowName(e)}getConditionObjectsRowIndeces(){return[]}getProgressInfo(){if(this.getIsRequireToGenerateRows()&&this.generateVisibleRowsIfNeeded(),this.generatedVisibleRows)return Jt.getProgressInfoByElements(this.getCellQuestions(),this.isRequired);const e=pt.createProgressInfo();return this.updateProgressInfoByValues(e),0===e.requiredQuestionCount&&this.isRequired&&(e.requiredQuestionCount=1,e.requiredAnsweredQuestionCount=this.isEmpty()?0:1),e}getIsRequireToGenerateRows(){return!!this.rowsVisibleIf}updateProgressInfoByValues(e){}updateProgressInfoByRow(e,t){for(var s=0;s{e.push(t)})),e}onBeforeValueChanged(e){}onSetQuestionValue(){if(!this.isRowChanging&&(this.onBeforeValueChanged(this.value),this.generatedVisibleRows&&0!=this.generatedVisibleRows.length)){this.isRowChanging=!0;for(var e=this.createNewValue(),t=0;te.containsErrors),!1)}getIsAnswered(){return super.getIsAnswered()&&this.checkForAnswersOrErrors((e=>e.isAnswered),!0)}checkForAnswersOrErrors(e,t=!1){var s=this.generatedVisibleRows;if(!s)return!1;for(var i=0;i0&&(e=e.concat(n))}return e}hasErrorInRows(e,t){let s=this.generatedVisibleRows;this.generatedVisibleRows||(s=this.visibleRows);var i=!1;if(t||(t={}),!s)return t;t.validationValues=this.getDataFilteredValues(),t.isSingleDetailPanel="underRowSingle"===this.detailPanelMode;for(var r=0;r{this.raiseOnCompletedAsyncValidators()}))||i);return i}isValueDuplicated(){if(!this.generatedVisibleRows)return!1;for(var e=this.getUniqueColumnsNames(),t=!1,s=0;s-1:i.length>0}getDuplicatedRows(e){const t={},s=[],i=this.generatedVisibleRows;for(var r=0;r1&&t[e].forEach((e=>s.push(e)));return s}showDuplicatedErrorsInRows(e,t){e.forEach((e=>{let s=e.getQuestionByName(t);const i=this.detailPanel.getQuestionByName(t);!s&&i&&(e.showDetailPanel(),e.detailPanel&&(s=e.detailPanel.getQuestionByName(t))),s&&(i&&e.showDetailPanel(),this.addDuplicationError(s))}))}removeDuplicatedErrorsInRows(e,t){this.generatedVisibleRows.forEach((s=>{if(e.indexOf(s)<0){const e=s.getQuestionByName(t);e&&this.removeDuplicationError(s,e)}}))}getDuplicationError(e){const t=e.errors;for(let e=0;e0)return s[i].question}return null}onReadOnlyChanged(){if(super.onReadOnlyChanged(),this.generateRows)for(var e=0;ee.getQuestionByName(t),cellQuestion:e.getQuestionByName(t),column:this.getColumnByName(t)}}onCellValueChanged(e,t,s){if(this.survey){var i=this.getOnCellValueChangedOptions(e,t,s);this.onCellValueChangedCallback&&this.onCellValueChangedCallback(i),this.survey.matrixCellValueChanged(this,i)}}validateCell(e,t,s){if(this.survey){var i=this.getOnCellValueChangedOptions(e,t,s);return this.survey.matrixCellValidate(this,i)}}get isValidateOnValueChanging(){return!!this.survey&&this.survey.isValidateOnValueChanging}get hasInvisibleRows(){const e=this.generatedVisibleRows;if(!Array.isArray(e))return!1;for(let t=0;t-1&&this.isValueInColumnDuplicated(t,!!r)}getNewValueOnRowChanged(e,t,s,i,r){const n=this.getRowValueCore(e,r,!0);if(i&&delete n[t],e.questions.forEach((e=>{delete n[e.getValueName()]})),s)for(var a in s=JSON.parse(JSON.stringify(s)))this.isValueEmpty(s[a])||(n[a]=s[a]);return this.isObject(n)&&0===Object.keys(n).length&&(r=this.deleteRowValue(r,e)),{value:r,rowValue:n}}getRowIndex(e){return Array.isArray(this.generatedVisibleRows)?this.generatedVisibleRows.indexOf(e):-1}getElementsInDesign(e=!1){let t;return t="none"==this.detailPanelMode?super.getElementsInDesign(e):e?[this.detailPanel]:this.detailElements,this.columns.concat(t)}hasDetailPanel(e){return"none"!=this.detailPanelMode&&(!!this.isDesignMode||(this.onHasDetailPanelCallback?this.onHasDetailPanelCallback(e):this.detailElements.length>0))}getIsDetailPanelShowing(e){if("none"==this.detailPanelMode)return!1;if(this.isDesignMode){var t=0==this.visibleRows.indexOf(e);return t&&(e.detailPanel||e.showDetailPanel()),t}return this.getPropertyValue("isRowShowing"+e.id,!1)}setIsDetailPanelShowing(e,t){if(t!=this.getIsDetailPanelShowing(e)&&(this.setPropertyValue("isRowShowing"+e.id,t),this.updateDetailPanelButtonCss(e),this.renderedTable&&this.renderedTable.onDetailPanelChangeVisibility(e,t),this.survey&&this.survey.matrixDetailPanelVisibleChanged(this,e.rowIndex-1,e,t),t&&"underRowSingle"===this.detailPanelMode))for(var s=this.visibleRows,i=0;ie.setParentQuestion(this))),t.onSurveyLoad(),t}getSharedQuestionByName(e,t){if(!this.survey||!this.valueName)return null;var s=this.getRowIndex(t);return s<0?null:this.survey.getQuestionByValueNameFromArray(this.valueName,e,s)}onTotalValueChanged(){this.data&&this.visibleTotalRow&&!this.isUpdateLocked&&!this.isSett&&this.data.setValue(this.getValueName()+Ps.matrix.totalsSuffix,this.totalValue,!1)}getDataFilteredValues(){return this.data?this.data.getFilteredValues():{}}getParentTextProcessor(){if(!this.parentQuestion||!this.parent)return null;const e=this.parent.data;return e&&e.getTextProcessor?e.getTextProcessor():null}isMatrixReadOnly(){return this.isReadOnly}onRowVisibilityChanged(e){this.clearVisibleRows(),this.resetRenderedTable()}clearValueIfInvisibleCore(e){super.clearValueIfInvisibleCore(e),this.clearInvisibleValuesInRows()}clearInvisibleValuesInRows(){var e;if(this.isEmpty()||!this.isRowsFiltered())return;((null===(e=this.survey)||void 0===e?void 0:e.questionsByValueName(this.getValueName()))||[]).length<2&&(this.value=this.getFilteredData())}isRowsFiltered(){return super.isRowsFiltered()||this.visibleRows!==this.generatedVisibleRows}getQuestionFromArray(e,t){return t>=this.visibleRows.length?null:this.visibleRows[t].getQuestionByName(e)}isMatrixValueEmpty(e){if(e){if(Array.isArray(e)){for(var t=0;t0)return!1;return!0}return 0==Object.keys(e).length}}get SurveyModel(){return this.survey}getCellTemplateData(e){return this.SurveyModel.getMatrixCellTemplateData(e)}getCellWrapperComponentName(e){return this.SurveyModel.getElementWrapperComponentName(e,e.row instanceof Oi?"row-footer":"cell")}getCellWrapperComponentData(e){return this.SurveyModel.getElementWrapperComponentData(e,e.row instanceof Oi?"row-footer":"cell")}getColumnHeaderWrapperComponentName(e){return this.SurveyModel.getElementWrapperComponentName(e,"column-header")}getColumnHeaderWrapperComponentData(e){return this.SurveyModel.getElementWrapperComponentData(e,"column-header")}getRowHeaderWrapperComponentName(e){return this.SurveyModel.getElementWrapperComponentName(e,"row-header")}getRowHeaderWrapperComponentData(e){return this.SurveyModel.getElementWrapperComponentData(e,"row-header")}get showHorizontalScroll(){return!this.isDefaultV2Theme&&this.horizontalScroll}onMobileChanged(){super.onMobileChanged(),this.resetRenderedTable()}getRootCss(){return(new Ct).append(super.getRootCss()).append(this.cssClasses.rootScroll,this.horizontalScroll).toString()}afterRenderQuestionElement(e){super.afterRenderQuestionElement(e),this.setRootElement(null==e?void 0:e.parentElement)}beforeDestroyQuestionElement(e){super.beforeDestroyQuestionElement(e),this.setRootElement(void 0)}setRootElement(e){this.rootElement=e}getRootElement(){return this.rootElement}}Ie.addClass("matrixdropdownbase",[{name:"columns:matrixdropdowncolumns",className:"matrixdropdowncolumn",isArray:!0},{name:"columnLayout",alternativeName:"columnsLocation",choices:["horizontal","vertical"],visible:!1,isSerializable:!1},{name:"transposeData:boolean",version:"1.9.130",oldName:"columnLayout"},{name:"detailElements",baseClassName:"question",visible:!1,isLightSerializable:!1},{name:"detailPanelMode",choices:["none","underRow","underRowSingle"],default:"none"},{name:"cellErrorLocation",default:"default",choices:["default","top","bottom"]},{name:"detailErrorLocation",default:"default",choices:["default","top","bottom"],visibleIf:e=>!!e&&"none"!=e.detailPanelMode},{name:"horizontalScroll:boolean",visible:!1},{name:"choices:itemvalue[]",uniqueProperty:"value",visibleIf:e=>e.isSelectCellType()},{name:"placeholder",alternativeName:"optionsCaption",serializationProperty:"locPlaceholder"},{name:"keyDuplicationError",serializationProperty:"locKeyDuplicationError"},{name:"cellType",default:"dropdown",choices:()=>Pi.getColumnTypes()},{name:"columnColCount",default:0,choices:[0,1,2,3,4]},"columnMinWidth",{name:"allowAdaptiveActions:boolean",default:!1,visible:!1}],(function(){return new qi("")}),"matrixbase");class Ni extends ji{constructor(e,t,s,i){super(s,i),this.name=e,this.item=t,this.buildCells(i)}get rowName(){return this.name}get text(){return this.item.text}get locText(){return this.item.locText}isItemVisible(){return this.item.isVisible}isRowEnabled(){return this.item.isEnabled}isRowHasEnabledCondition(){return!!this.item.enableIf}setRowsVisibleIfValues(e){e.item=this.item.value,e.choice=this.item.value}}class Mi extends qi{constructor(e){super(e),this.defaultValuesInRows={},this.createLocalizableString("totalText",this,!0),this.registerPropertyChangedHandlers(["rows"],(()=>{this.generatedVisibleRows&&(this.clearGeneratedRows(),this.resetRenderedTable(),this.getVisibleRows(),this.clearIncorrectValues())})),this.registerPropertyChangedHandlers(["hideIfRowsEmpty"],(()=>{this.updateVisibilityBasedOnRows()}))}getType(){return"matrixdropdown"}get totalText(){return this.getLocalizableStringText("totalText","")}set totalText(e){this.setLocalizableStringText("totalText",e)}get locTotalText(){return this.getLocalizableString("totalText")}getFooterText(){return this.locTotalText}getRowTitleWidth(){return this.rowTitleWidth}get hideIfRowsEmpty(){return this.getPropertyValue("hideIfRowsEmpty")}set hideIfRowsEmpty(e){this.setPropertyValue("hideIfRowsEmpty",e)}getDisplayValueCore(e,t){if(!t)return t;var s=this.visibleRows,i={};if(!s)return i;for(var r=0;r{this.defaultValuesInRows[e.rowName]=e.getNamesWithDefaultValues()})),super.clearGeneratedRows())}getRowValueForCreation(e,t){const s=e[t];if(!s)return s;const i=this.defaultValuesInRows[t];return Array.isArray(i)&&0!==i.length?(i.forEach((e=>{delete s[e]})),s):s}generateRows(){var e=new Array,t=this.rows;if(!t||0===t.length)return e;var s=this.value;s||(s={});for(var i=0;i{const i=t[s.rowName];s.isVisible&&!ue.isValueEmpty(i)&&(e[s.rowName]=i)})),e}getSearchableItemValueKeys(e){e.push("rows")}getIsRequireToGenerateRows(){if(super.getIsRequireToGenerateRows())return!0;for(let e=0;e{var t=new Mi(e);return t.choices=[1,2,3,4,5],t.rows=wi.DefaultRows,qi.addDefaultColumns(t),t})),"undefined"!=typeof window&&window.addEventListener("touchmove",(e=>{Fi.PreventScrolling&&e.preventDefault()}),{passive:!1});class Fi{constructor(e,t=!0,s=!1){this.dd=e,this.longTap=t,this.fitToContainer=s,this.scrollIntervalId=null,this.stopLongTapIfMoveEnough=e=>{e.preventDefault(),this.currentX=e.pageX,this.currentY=e.pageY,this.isMicroMovement||(this.returnUserSelectBack(),this.stopLongTap())},this.stopLongTap=e=>{clearTimeout(this.timeoutID),this.timeoutID=null,document.removeEventListener("pointerup",this.stopLongTap),document.removeEventListener("pointermove",this.stopLongTapIfMoveEnough)},this.handlePointerCancel=e=>{this.clear()},this.handleEscapeButton=e=>{27==e.keyCode&&this.clear()},this.onContextMenu=e=>{e.preventDefault(),e.stopPropagation()},this.dragOver=e=>{this.moveShortcutElement(e),this.draggedElementShortcut.style.cursor="grabbing",this.dd.dragOver(e)},this.clear=()=>{cancelAnimationFrame(this.scrollIntervalId),document.removeEventListener("pointermove",this.dragOver),document.removeEventListener("pointercancel",this.handlePointerCancel),document.removeEventListener("keydown",this.handleEscapeButton),document.removeEventListener("pointerup",this.drop),this.draggedElementShortcut.removeEventListener("pointerup",this.drop),Dt&&this.draggedElementShortcut.removeEventListener("contextmenu",this.onContextMenu),this.draggedElementShortcut.parentElement.removeChild(this.draggedElementShortcut),this.dd.clear(),this.draggedElementShortcut=null,this.scrollIntervalId=null,Dt&&(this.savedTargetNode.style.cssText=null,this.savedTargetNode&&this.savedTargetNode.parentElement.removeChild(this.savedTargetNode),this.insertNodeToParentAtIndex(this.savedTargetNodeParent,this.savedTargetNode,this.savedTargetNodeIndex),Fi.PreventScrolling=!1),this.savedTargetNode=null,this.savedTargetNodeParent=null,this.savedTargetNodeIndex=null,this.returnUserSelectBack()},this.drop=()=>{this.dd.drop(),this.clear()},this.draggedElementShortcut=null}get documentOrShadowRoot(){return Ps.environment.root}get rootElement(){return ts(Ps.environment.root)?this.rootContainer||Ps.environment.root.host:this.rootContainer||Ps.environment.root.documentElement||document.body}get isMicroMovement(){const e=Math.abs(this.currentX-this.startX),t=Math.abs(this.currentY-this.startY);return e<5&&t<5}startLongTapProcessing(e,t,s,i,r=!1){this.startX=e.pageX,this.startY=e.pageY,document.body.style.setProperty("touch-action","none","important"),this.timeoutID=setTimeout((()=>{this.doStartDrag(e,t,s,i),r||(this.savedTargetNode=e.target,this.savedTargetNode.style.cssText="\n position: absolute;\n height: 1px!important;\n width: 1px!important;\n overflow: hidden;\n clip: rect(1px 1px 1px 1px);\n clip: rect(1px, 1px, 1px, 1px);\n ",this.savedTargetNodeParent=this.savedTargetNode.parentElement,this.savedTargetNodeIndex=this.getNodeIndexInParent(this.savedTargetNode),this.rootElement.appendChild(this.savedTargetNode)),this.stopLongTap()}),this.longTap?500:0),document.addEventListener("pointerup",this.stopLongTap),document.addEventListener("pointermove",this.stopLongTapIfMoveEnough)}moveShortcutElement(e){let t=this.rootElement.getBoundingClientRect().x,s=this.rootElement.getBoundingClientRect().y,i=this.rootElement.scrollLeft,r=this.rootElement.scrollTop;this.doScroll(e.clientY,e.clientX);const n=this.draggedElementShortcut.offsetHeight,a=this.draggedElementShortcut.offsetWidth;let o=this.draggedElementShortcut.shortcutXOffset||a/2,l=this.draggedElementShortcut.shortcutYOffset||n/2;0!==document.querySelectorAll("[dir='rtl']").length&&(o=a/2,l=n/2);const u=document.documentElement.clientHeight,d=document.documentElement.clientWidth,h=e.pageX,c=e.pageY,p=e.clientX,m=e.clientY;t-=i,s-=r;const g=this.getShortcutBottomCoordinate(m,n,l);return this.getShortcutRightCoordinate(p,a,o)>=d?(this.draggedElementShortcut.style.left=d-a-t+"px",void(this.draggedElementShortcut.style.top=m-l-s+"px")):p-o<=0?(this.draggedElementShortcut.style.left=h-p-t+"px",void(this.draggedElementShortcut.style.top=m-s-l+"px")):g>=u?(this.draggedElementShortcut.style.left=p-o-t+"px",void(this.draggedElementShortcut.style.top=u-n-s+"px")):m-l<=0?(this.draggedElementShortcut.style.left=p-o-t+"px",void(this.draggedElementShortcut.style.top=c-m-s+"px")):(this.draggedElementShortcut.style.left=p-t-o+"px",void(this.draggedElementShortcut.style.top=m-s-l+"px"))}getShortcutBottomCoordinate(e,t,s){return e+t-s}getShortcutRightCoordinate(e,t,s){return e+t-s}requestAnimationFrame(e){return requestAnimationFrame(e)}scrollByDrag(e,t,s){const i=100;let r,n,a,o;"HTML"===e.tagName?(r=0,n=document.documentElement.clientHeight,a=0,o=document.documentElement.clientWidth):(r=e.getBoundingClientRect().top,n=e.getBoundingClientRect().bottom,a=e.getBoundingClientRect().left,o=e.getBoundingClientRect().right);const l=()=>{const u=t-r<=i,d=n-t<=i,h=s-a<=i,c=o-s<=i;!u||h||c?!d||h||c?!c||u||d?!h||u||d||(e.scrollLeft-=15):e.scrollLeft+=15:e.scrollTop+=15:e.scrollTop-=15,this.scrollIntervalId=this.requestAnimationFrame(l)};this.scrollIntervalId=this.requestAnimationFrame(l)}doScroll(e,t){cancelAnimationFrame(this.scrollIntervalId);const s=this.draggedElementShortcut.style.display;this.draggedElementShortcut.style.display="none";let i=this.documentOrShadowRoot.elementFromPoint(t,e);this.draggedElementShortcut.style.display=s||"block";let r=ss(i);this.scrollByDrag(r,e,t)}doStartDrag(e,t,s,i){Dt&&(Fi.PreventScrolling=!0),3!==e.which&&(this.dd.dragInit(e,t,s,i),this.rootElement.append(this.draggedElementShortcut),this.moveShortcutElement(e),document.addEventListener("pointermove",this.dragOver),document.addEventListener("pointercancel",this.handlePointerCancel),document.addEventListener("keydown",this.handleEscapeButton),document.addEventListener("pointerup",this.drop),Dt?this.draggedElementShortcut.addEventListener("contextmenu",this.onContextMenu):this.draggedElementShortcut.addEventListener("pointerup",this.drop))}returnUserSelectBack(){document.body.style.setProperty("touch-action","auto"),document.body.style.setProperty("user-select","auto"),document.body.style.setProperty("-webkit-user-select","auto")}startDrag(e,t,s,i,r=!1){document.body.style.setProperty("user-select","none","important"),document.body.style.setProperty("-webkit-user-select","none","important"),Dt?this.startLongTapProcessing(e,t,s,i,r):this.doStartDrag(e,t,s,i)}getNodeIndexInParent(e){return[...e.parentElement.childNodes].indexOf(e)}insertNodeToParentAtIndex(e,t,s){e.insertBefore(t,e.childNodes[s])}}Fi.PreventScrolling=!1;class Bi{get isBottom(){return!!this._isBottom}set isBottom(e){this._isBottom=e,this.ghostPositionChanged()}ghostPositionChanged(){this.onGhostPositionChanged.fire({},{})}get dropTargetDataAttributeName(){return`[data-sv-drop-target-${this.draggedElementType}]`}get survey(){var e;return this.surveyValue||(null===(e=this.creator)||void 0===e?void 0:e.survey)}constructor(e,t,s,i){var r;this.surveyValue=e,this.creator=t,this._isBottom=null,this.onGhostPositionChanged=new vt,this.onDragStart=new vt,this.onDragEnd=new vt,this.onDragClear=new vt,this.onBeforeDrop=this.onDragStart,this.onAfterDrop=this.onDragEnd,this.draggedElement=null,this.dropTarget=null,this.prevDropTarget=null,this.allowDropHere=!1,this.banDropHere=()=>{this.allowDropHere=!1,this.doBanDropHere(),this.dropTarget=null,this.domAdapter.draggedElementShortcut.style.cursor="not-allowed",this.isBottom=null},this.doBanDropHere=()=>{},this.domAdapter=i||new Fi(this,s,null===(r=this.survey)||void 0===r?void 0:r.fitToContainer)}startDrag(e,t,s,i,r=!1){this.domAdapter.rootContainer=this.getRootElement(this.survey,this.creator),this.domAdapter.startDrag(e,t,s,i,r)}getRootElement(e,t){return t?t.rootElement:e.rootElement}dragInit(e,t,s,i){this.draggedElement=t,this.parentElement=s;const r=this.getShortcutText(this.draggedElement);this.domAdapter.draggedElementShortcut=this.createDraggedElementShortcut(r,i,e),this.onStartDrag(e);const n=this.draggedElement&&this.draggedElement.parent;this.onDragStart.fire(this,{fromElement:n,draggedElement:this.draggedElement})}onStartDrag(e){}isDropTargetDoesntChanged(e){return this.dropTarget===this.prevDropTarget&&e===this.isBottom}getShortcutText(e){return null==e?void 0:e.shortcutText}createDraggedElementShortcut(e,t,s){const i=oe.createElement("div");return i&&(i.innerText=e,i.className=this.getDraggedElementClass()),i}getDraggedElementClass(){return"sv-dragged-element-shortcut"}doDragOver(){}afterDragOver(e){}findDropTargetNodeFromPoint(e,t){const s=this.domAdapter.draggedElementShortcut.style.display;if(this.domAdapter.draggedElementShortcut.style.display="none",!oe.isAvailable())return null;let i=this.domAdapter.documentOrShadowRoot.elementsFromPoint(e,t);this.domAdapter.draggedElementShortcut.style.display=s||"block";let r=0,n=i[r];for(;n&&n.className&&"function"==typeof n.className.indexOf&&-1!=n.className.indexOf("sv-drag-target-skipped");)r++,n=i[r];return n?this.findDropTargetNodeByDragOverNode(n):null}getDataAttributeValueByNode(e){let t="svDropTarget";return this.draggedElementType.split("-").forEach((e=>{t+=this.capitalizeFirstLetter(e)})),e.dataset[t]}getDropTargetByNode(e,t){let s=this.getDataAttributeValueByNode(e);return this.getDropTargetByDataAttributeValue(s,e,t)}capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}calculateVerticalMiddleOfHTMLElement(e){const t=e.getBoundingClientRect();return t.y+t.height/2}calculateHorizontalMiddleOfHTMLElement(e){const t=e.getBoundingClientRect();return t.x+t.width/2}calculateIsBottom(e,t){return!1}findDropTargetNodeByDragOverNode(e){return e.closest(this.dropTargetDataAttributeName)}dragOver(e){const t=this.findDropTargetNodeFromPoint(e.clientX,e.clientY);if(!t)return void this.banDropHere();this.dropTarget=this.getDropTargetByNode(t,e);const s=this.isDropTargetValid(this.dropTarget,t);if(this.doDragOver(),!s)return void this.banDropHere();let i=this.calculateIsBottom(e.clientY,t);this.allowDropHere=!0,this.isDropTargetDoesntChanged(i)||(this.isBottom=null,this.isBottom=i,this.draggedElement!=this.dropTarget&&this.afterDragOver(t),this.prevDropTarget=this.dropTarget)}drop(){if(this.allowDropHere){const e=this.draggedElement.parent,t=this.doDrop();this.onDragEnd.fire(this,{fromElement:e,draggedElement:t,toElement:this.dropTarget})}}clear(){const e={draggedElement:this.draggedElement};this.dropTarget=null,this.prevDropTarget=null,this.draggedElement=null,this.isBottom=null,this.parentElement=null,this.onDragClear.fire(this,e)}}class zi extends Bi{constructor(){super(...arguments),this.fromIndex=null,this.toIndex=null,this.doDrop=()=>(this.parentElement.moveRowByIndex(this.fromIndex,this.toIndex),this.parentElement)}get draggedElementType(){return"matrix-row"}onStartDrag(){const e=oe.getBody();e&&(this.restoreUserSelectValue=e.style.userSelect,e.style.userSelect="none")}get shortcutClass(){return(new Ct).append(this.parentElement.cssClasses.draggedRow).toString()}createDraggedElementShortcut(e,t,s){const i=oe.createElement("div");if(!i)return;i.className=this.shortcutClass;if(t){const e=t.closest("[data-sv-drop-target-matrix-row]"),r=e.cloneNode(true);r.style.cssText=`\n width: ${e.offsetWidth}px;\n `,r.classList.remove("sv-matrix__drag-drop--moveup"),r.classList.remove("sv-matrix__drag-drop--movedown"),this.draggedElement.isDragDropMoveDown=!1,this.draggedElement.isDragDropMoveUp=!1,i.appendChild(r);const n=t.getBoundingClientRect();i.shortcutXOffset=s.clientX-n.x,i.shortcutYOffset=s.clientY-n.y}return this.parentElement.renderedTable.rows.forEach(((e,t)=>{e.row===this.draggedElement&&(e.isGhostRow=!0)})),this.fromIndex=this.parentElement.visibleRows.indexOf(this.draggedElement),i}getDropTargetByDataAttributeValue(e){let t;return t=this.parentElement.renderedTable.rows.filter((t=>t.row&&t.row.id===e))[0],t.row}canInsertIntoThisRow(e){const t=this.parentElement.lockedRowCount;return t<=0||e.rowIndex>t}isDropTargetValid(e,t){return this.canInsertIntoThisRow(e)}calculateIsBottom(e){const t=this.parentElement.renderedTable.rows.map((e=>e.row));return t.indexOf(this.dropTarget)-t.indexOf(this.draggedElement)>0}afterDragOver(e){if(this.isDropTargetDoesntChanged(this.isBottom))return;let t,s,i;const r=this.parentElement.renderedTable.rows;r.forEach(((e,r)=>{e.row===this.dropTarget&&(t=r),e.row===this.draggedElement&&(i=e,s=r,i.isGhostRow=!0)})),r.splice(s,1),r.splice(t,0,i),this.toIndex=this.parentElement.visibleRows.indexOf(this.dropTarget),super.ghostPositionChanged()}clear(){this.parentElement.renderedTable.rows.forEach((e=>{e.isGhostRow=!1})),this.parentElement.clearOnDrop(),this.fromIndex=null,this.toIndex=null;const e=oe.getBody();e&&(e.style.userSelect=this.restoreUserSelectValue||"initial"),super.clear()}}class Hi{constructor(e){this.dragHandler=e,this.onPointerUp=e=>{this.clearListeners()},this.tryToStartDrag=e=>{if(this.currentX=e.pageX,this.currentY=e.pageY,!this.isMicroMovement)return this.clearListeners(),this.dragHandler(this.pointerDownEvent,this.currentTarget,this.itemModel),!0}}onPointerDown(e,t){Dt?this.dragHandler(e,e.currentTarget,t):(this.pointerDownEvent=e,this.currentTarget=e.currentTarget,this.startX=e.pageX,this.startY=e.pageY,oe.addEventListener("pointermove",this.tryToStartDrag),this.currentTarget.addEventListener("pointerup",this.onPointerUp),this.itemModel=t)}get isMicroMovement(){const e=Math.abs(this.currentX-this.startX),t=Math.abs(this.currentY-this.startY);return e<10&&t<10}clearListeners(){this.pointerDownEvent&&(oe.removeEventListener("pointermove",this.tryToStartDrag),this.currentTarget.removeEventListener("pointerup",this.onPointerUp))}}class Qi extends ji{constructor(e,t,s){super(t,s),this.index=e,this.buildCells(s)}getRowIndex(){const e=super.getRowIndex();return e>0?e:this.index+1}get rowName(){return this.id}get dataName(){return"row"+(this.index+1)}get text(){return"row "+(this.index+1)}getAccessbilityText(){return(this.index+1).toString()}get shortcutText(){const e=this.data.visibleRows.indexOf(this)+1,t=this.cells.length>1?this.cells[1].questionValue:void 0,s=this.cells.length>0?this.cells[0].questionValue:void 0;return t&&t.value||s&&s.value||""+e}}class Wi extends qi{constructor(e){super(e),this.rowCounter=0,this.setRowCountValueFromData=!1,this.startDragMatrixRow=(e,t)=>{this.dragDropMatrixRows.startDrag(e,this.draggedRow,this,e.target)},this.initialRowCount=this.getDefaultPropertyValue("rowCount"),this.createLocalizableString("confirmDeleteText",this,!1,"confirmDelete"),this.createLocalizableString("addRowText",this).onGetTextCallback=e=>e||this.defaultAddRowText,this.createLocalizableString("removeRowText",this,!1,"removeRow"),this.createLocalizableString("noRowsText",this,!1,!0),this.registerPropertyChangedHandlers(["hideColumnsIfEmpty","allowAddRows"],(()=>{this.updateShowTableAndAddRow()})),this.registerPropertyChangedHandlers(["allowRowReorder","isReadOnly","lockedRowCount"],(()=>{this.resetRenderedTable()})),this.registerPropertyChangedHandlers(["minRowCount"],(()=>{this.onMinRowCountChanged()})),this.registerPropertyChangedHandlers(["maxRowCount"],(()=>{this.onMaxRowCountChanged()})),this.dragOrClickHelper=new Hi(this.startDragMatrixRow)}setSurveyImpl(e,t){super.setSurveyImpl(e,t),this.dragDropMatrixRows=new zi(this.survey,null,!0)}isBanStartDrag(e){const t=e.target;return"true"===t.getAttribute("contenteditable")||"INPUT"===t.nodeName||!this.isDragHandleAreaValid(t)}isDragHandleAreaValid(e){return"icon"!==this.survey.matrixDragHandleArea||e.classList.contains(this.cssClasses.dragElementDecorator)}onPointerDown(e,t){t&&this.isRowsDragAndDrop&&!this.isDesignMode&&(this.isBanStartDrag(e)||t.isDetailPanelShowing||(this.draggedRow=t,this.dragOrClickHelper.onPointerDown(e)))}getType(){return"matrixdynamic"}get isRowsDynamic(){return!0}get confirmDelete(){return this.getPropertyValue("confirmDelete")}set confirmDelete(e){this.setPropertyValue("confirmDelete",e)}get isValueArray(){return!0}get keyName(){return this.getPropertyValue("keyName","")}set keyName(e){this.setPropertyValue("keyName",e)}get defaultRowValue(){return this.getPropertyValue("defaultRowValue")}set defaultRowValue(e){this.setPropertyValue("defaultRowValue",e)}get copyDefaultValueFromLastEntry(){return this.getPropertyValue("copyDefaultValueFromLastEntry")}set copyDefaultValueFromLastEntry(e){this.setPropertyValue("copyDefaultValueFromLastEntry",e)}get defaultValueFromLastRow(){return this.copyDefaultValueFromLastEntry}set defaultValueFromLastRow(e){this.copyDefaultValueFromLastEntry=e}isDefaultValueEmpty(){return super.isDefaultValueEmpty()&&this.isValueEmpty(this.defaultRowValue)}valueFromData(e){if(this.minRowCount<1||this.isEmpty())return super.valueFromData(e);Array.isArray(e)||(e=[]);for(var t=e.length;t=s.length)return;const i=s[e];s.splice(e,1),s.splice(t,0,i),this.value=s}clearOnDrop(){this.isEditingSurveyElement||this.resetRenderedTable()}initDataUI(){this.generatedVisibleRows||this.getVisibleRows()}get rowCount(){return this.rowCountValue}set rowCount(e){if(!((e=ue.getNumber(e))<0||e>Ps.matrix.maxRowCount)){this.setRowCountValueFromData=!1;var t=this.rowCountValue;if(this.rowCountValue=e,this.value&&this.value.length>e){var s=this.value;s.splice(e),this.value=s}if(this.isUpdateLocked)this.initialRowCount=e;else{if(this.generatedVisibleRows||0==t){this.generatedVisibleRows||(this.clearGeneratedRows(),this.generatedVisibleRows=[]),this.generatedVisibleRows.splice(e);for(var i=t;ithis.maxRowCount&&(this.maxRowCount=e),this.initialRowCountPs.matrix.maxRowCount&&(e=Ps.matrix.maxRowCount),e!=this.maxRowCount&&this.setPropertyValue("maxRowCount",e))}onMaxRowCountChanged(){const e=this.maxRowCount;ee&&(this.rowCount=e)}get allowAddRows(){return this.getPropertyValue("allowAddRows")}set allowAddRows(e){this.setPropertyValue("allowAddRows",e)}get allowRemoveRows(){return this.getPropertyValue("allowRemoveRows")}set allowRemoveRows(e){this.setPropertyValue("allowRemoveRows",e),this.isUpdateLocked||this.resetRenderedTable()}get canAddRow(){return this.allowAddRows&&!this.isReadOnly&&this.rowCountthis.minRowCount;return this.canRemoveRowsCallback?this.canRemoveRowsCallback(e):e}canRemoveRow(e){if(!this.survey)return!0;const t=e.rowIndex-1;return!(this.lockedRowCount>0&&t0&&this.visibleRows[this.visibleRows.length-1].showDetailPanel(),e&&t!==this.rowCount)){const e=this.getQuestionToFocusOnAddingRow();e&&e.focus()}}get detailPanelShowOnAdding(){return this.getPropertyValue("detailPanelShowOnAdding")}set detailPanelShowOnAdding(e){this.setPropertyValue("detailPanelShowOnAdding",e)}hasRowsAsItems(){return!1}unbindValue(){this.clearGeneratedRows(),this.clearPropertyValue("value"),this.rowCountValue=0,super.unbindValue()}isValueSurveyElement(e){return this.isEditingSurveyElement||super.isValueSurveyElement(e)}addRowCore(){var e=this.rowCount;this.rowCount=this.rowCount+1;var t=this.getDefaultRowValue(!0),s=null;if(this.isValueEmpty(t)||(s=this.createNewValue()).length==this.rowCount&&(s[s.length-1]=t,this.value=s),this.data){this.runCellsCondition(this.getDataFilteredValues(),this.getDataFilteredProperties());const e=this.visibleRows;if(this.isValueEmpty(t)&&e.length>0){const t=e[e.length-1];this.isValueEmpty(t.value)||(s||(s=this.createNewValue()),this.isValueSurveyElement(s)||this.isTwoValueEquals(s[s.length-1],t.value)||(s[s.length-1]=t.value,this.value=s))}}if(this.survey){const t=this.visibleRows;if(e+1==this.rowCount&&t.length>0){const e=t[t.length-1];this.survey.matrixRowAdded(this,e),this.onRowsChanged()}}}getDefaultRowValue(e){for(var t=null,s=0;s=this.rowCount-1){var a=n[this.rowCount-2];for(var r in a)(t=t||{})[r]=a[r]}}return t}focusAddBUtton(){const e=this.getRootElement();if(e&&this.cssClasses.buttonAdd){const t=e.querySelectorAll("."+this.cssClasses.buttonAdd)[0];t&&t.focus()}}getActionCellIndex(e){const t=this.showHeader?1:0;return this.isColumnLayoutHorizontal?e.cells.length-1+t:this.visibleRows.indexOf(e)+t}removeRowUI(e){if(e&&e.rowName){var t=this.visibleRows.indexOf(e);if(t<0)return;e=t}this.removeRow(e,void 0,(()=>{const e=this.visibleRows.length,s=t>=e?e-1:t,i=s>-1?this.visibleRows[s]:void 0;setTimeout((()=>{i?this.renderedTable.focusActionCell(i,this.getActionCellIndex(i)):this.focusAddBUtton()}),10)}))}isRequireConfirmOnRowDelete(e){if(!this.confirmDelete)return!1;if(e<0||e>=this.rowCount)return!1;var t=this.createNewValue();return!(this.isValueEmpty(t)||!Array.isArray(t))&&(!(e>=t.length)&&!this.isValueEmpty(t[e]))}removeRow(e,t,s){if(this.canRemoveRows&&!(e<0||e>=this.rowCount)){var i=this.visibleRows&&e{this.removeRowAsync(e,i),s&&s()},locale:this.getLocale(),rootElement:this.survey.rootElement,cssClass:this.cssClasses.confirmDialog}):(this.removeRowAsync(e,i),s&&s())}}removeRowAsync(e,t){t&&this.survey&&!this.survey.matrixRowRemoving(this,e,t)||(this.onStartRowAddingRemoving(),this.removeRowCore(e),this.onEndRowRemoving(t))}removeRowCore(e){var t=this.generatedVisibleRows?this.generatedVisibleRows[e]:null;if(this.generatedVisibleRows&&e1||s.length===e.length)return!1;const i=this.getInsertedDeletedIndex(s,e);if(s.length>e.length){this.lastDeletedRow=s[i];const e=s[i];s.splice(i,1),this.isRendredTableCreated&&this.renderedTable.onRemovedRow(e)}else{let r;t&&t.editingObj===e[i]?r=t:(t=void 0,r=this.createMatrixRow(e[i])),s.splice(i,0,r),t||this.onMatrixRowCreated(r),this.isRendredTableCreated&&this.renderedTable.onAddedRow(r,i)}return this.setPropertyValueDirectly("rowCount",e.length),!0}updateValueFromSurvey(e,t=!1){if(this.setRowCountValueFromData=!0,this.minRowCount>0&&ue.isValueEmpty(e)&&!ue.isValueEmpty(this.defaultRowValue)){e=[];for(let t=0;tthis.rowCount&&e.splice(this.rowCount);var t=this.getDefaultRowValue(!1);t=t||{};for(var s=e.length;s0){s=!1;break}return s?null:e}getRowValueByIndex(e,t){return Array.isArray(e)&&t>=0&&t{var t=new Wi(e);return t.choices=[1,2,3,4,5],qi.addDefaultColumns(t),t}));var Gi={currentType:"default",getCss:function(){var e=this.currentType?this[this.currentType]:Zi;return e||(e=Zi),e},getAvailableThemes:function(){return Object.keys(this).filter((e=>-1===["currentType","getCss","getAvailableThemes"].indexOf(e)))}},Zi={root:"sd-root-modern",rootProgress:"sd-progress",rootMobile:"sd-root-modern--mobile",rootAnimationDisabled:"sd-root-modern--animation-disabled",rootReadOnly:"sd-root--readonly",rootCompact:"sd-root--compact",rootFitToContainer:"sd-root-modern--full-container",rootWrapper:"sd-root-modern__wrapper",rootWrapperFixed:"sd-root-modern__wrapper--fixed",rootWrapperHasImage:"sd-root-modern__wrapper--has-image",rootBackgroundImage:"sd-root_background-image",container:"sd-container-modern",header:"sd-title sd-container-modern__title",bodyContainer:"sv-components-row",body:"sd-body",bodyWithTimer:"sd-body--with-timer",clockTimerRoot:"sd-timer",clockTimerRootTop:"sd-timer--top",clockTimerRootBottom:"sd-timer--bottom",clockTimerProgress:"sd-timer__progress",clockTimerProgressAnimation:"sd-timer__progress--animation",clockTimerTextContainer:"sd-timer__text-container",clockTimerMinorText:"sd-timer__text--minor",clockTimerMajorText:"sd-timer__text--major",bodyEmpty:"sd-body sd-body--empty",bodyLoading:"sd-body--loading",footer:"sd-footer sd-body__navigation sd-clearfix",title:"sd-title",description:"sd-description",logo:"sd-logo",logoImage:"sd-logo__image",headerText:"sd-header__text",headerClose:"sd-hidden",navigationButton:"",bodyNavigationButton:"sd-btn",completedPage:"sd-completedpage",completedBeforePage:"sd-completed-before-page",timerRoot:"sd-body__timer",navigation:{complete:"sd-btn--action sd-navigation__complete-btn",prev:"sd-navigation__prev-btn",next:"sd-navigation__next-btn",start:"sd-navigation__start-btn",preview:"sd-navigation__preview-btn",edit:"sd-btn sd-btn--small"},panel:{contentEnter:"sd-element__content--enter",contentLeave:"sd-element__content--leave",enter:"sd-element-wrapper--enter",leave:"sd-element-wrapper--leave",asPage:"sd-panel--as-page",number:"sd-element__num",title:"sd-title sd-element__title sd-panel__title",titleExpandable:"sd-element__title--expandable",titleExpandableSvg:"sd-element__title-expandable-svg",titleNumInline:"sd-element__title--num-inline",titleExpanded:"sd-element__title--expanded",titleCollapsed:"sd-element__title--collapsed",titleDisabled:"sd-element__title--disabled",titleOnExpand:"sd-panel__title--expanded",titleOnError:"sd-panel__title--error",titleBar:"sd-action-title-bar",description:"sd-description sd-panel__description",container:"sd-element sd-element--complex sd-panel sd-row__panel",withFrame:"sd-element--with-frame",content:"sd-element__content sd-panel__content",icon:"sd-panel__icon",iconExpanded:"sd-panel__icon--expanded",footer:"sd-panel__footer",requiredMark:"sd-panel__required-text",header:"sd-panel__header sd-element__header sd-element__header--location-top",collapsed:"sd-element--collapsed",expanded:"sd-element--expanded",expandable:"sd-element--expandable",expandableAnimating:"sd-elemenet--expandable--animating",nested:"sd-element--nested sd-element--nested-with-borders",invisible:"sd-element--invisible",navigationButton:"",compact:"sd-element--with-frame sd-element--compact",errorsContainer:"sd-panel__errbox sd-element__erbox sd-element__erbox--above-element"},paneldynamic:{mainRoot:"sd-element sd-question sd-question--paneldynamic sd-element--complex sd-question--complex sd-row__question",empty:"sd-question--empty",root:"sd-paneldynamic",iconRemove:"sd-hidden",navigation:"sd-paneldynamic__navigation",title:"sd-title sd-element__title sd-question__title",header:"sd-paneldynamic__header sd-element__header",headerTab:"sd-paneldynamic__header-tab",button:"sd-action sd-paneldynamic__btn",buttonRemove:"sd-action--negative sd-paneldynamic__remove-btn",buttonAdd:"sd-paneldynamic__add-btn",buttonPrev:"sd-paneldynamic__prev-btn sd-action--icon sd-action",buttonPrevDisabled:"sd-action--disabled",buttonNextDisabled:"sd-action--disabled",buttonNext:"sd-paneldynamic__next-btn sd-action--icon sd-action",progressContainer:"sd-paneldynamic__progress-container",progress:"sd-progress",progressBar:"sd-progress__bar",nested:"sd-element--nested sd-element--nested-with-borders",progressText:"sd-paneldynamic__progress-text",separator:"sd-paneldynamic__separator",panelWrapper:"sd-paneldynamic__panel-wrapper",footer:"sd-paneldynamic__footer",panelFooter:"sd-paneldynamic__panel-footer",footerButtonsContainer:"sd-paneldynamic__buttons-container",panelsContainer:"sd-paneldynamic__panels-container",panelWrapperInRow:"sd-paneldynamic__panel-wrapper--in-row",panelWrapperEnter:"sd-paneldynamic__panel-wrapper--enter",panelWrapperLeave:"sd-paneldynamic__panel-wrapper--leave",panelWrapperList:"sd-paneldynamic__panel-wrapper--list",progressBtnIcon:"icon-progressbuttonv2",noEntriesPlaceholder:"sd-paneldynamic__placeholder sd-question__placeholder",compact:"sd-element--with-frame sd-element--compact",tabsContainer:"sd-paneldynamic__tabs-container",tabsContainerWithHeader:"sd-paneldynamic__tabs-container--with-header",tabsRoot:"sd-tabs-toolbar",tabsLeft:"sd-tabs-toolbar--left",tabsRight:"sd-tabs-toolbar--right",tabsCenter:"sd-tabs-toolbar--center",tabs:{item:"sd-tab-item",itemPressed:"sd-tab-item--pressed",itemAsIcon:"sd-tab-item--icon",itemIcon:"sd-tab-item__icon",itemTitle:"sd-tab-item__title"}},progress:"sd-progress sd-body__progress",progressTop:"sd-body__progress--top",progressBottom:"sd-body__progress--bottom",progressBar:"sd-progress__bar",progressText:"sd-progress__text",progressButtonsRoot:"sd-progress-buttons",progressButtonsNumbered:"sd-progress-buttons--numbered",progressButtonsFitSurveyWidth:"sd-progress-buttons--fit-survey-width",progressButtonsContainerCenter:"sd-progress-buttons__container-center",progressButtonsContainer:"sd-progress-buttons__container",progressButtonsConnector:"sd-progress-buttons__connector",progressButtonsButton:"sd-progress-buttons__button",progressButtonsButtonBackground:"sd-progress-buttons__button-background",progressButtonsButtonContent:"sd-progress-buttons__button-content",progressButtonsHeader:"sd-progress-buttons__header",progressButtonsFooter:"sd-progress-buttons__footer",progressButtonsImageButtonLeft:"sd-progress-buttons__image-button-left",progressButtonsImageButtonRight:"sd-progress-buttons__image-button-right",progressButtonsImageButtonHidden:"sd-progress-buttons__image-button--hidden",progressButtonsListContainer:"sd-progress-buttons__list-container",progressButtonsList:"sd-progress-buttons__list",progressButtonsListElementPassed:"sd-progress-buttons__list-element--passed",progressButtonsListElementCurrent:"sd-progress-buttons__list-element--current",progressButtonsListElementNonClickable:"sd-progress-buttons__list-element--nonclickable",progressButtonsPageTitle:"sd-progress-buttons__page-title",progressButtonsPageDescription:"sd-progress-buttons__page-description",progressTextInBar:"sd-hidden",page:{root:"sd-page sd-body__page",emptyHeaderRoot:"sd-page__empty-header",title:"sd-title sd-page__title",description:"sd-description sd-page__description",number:"sd-page__num",errorsContainer:"sd-page__errbox"},pageTitle:"sd-title sd-page__title",pageDescription:"sd-description sd-page__description",row:"sd-row sd-clearfix",rowMultiple:"sd-row--multiple",rowCompact:"sd-row--compact",rowEnter:"sd-row--enter",rowDelayedEnter:"sd-row--delayed-enter",rowLeave:"sd-row--leave",rowReplace:"sd-row--replace",pageRow:"sd-page__row",question:{contentEnter:"sd-element__content--enter",contentLeave:"sd-element__content--leave",enter:"sd-element-wrapper--enter",leave:"sd-element-wrapper--leave",mobile:"sd-question--mobile",mainRoot:"sd-element sd-question sd-row__question",flowRoot:"sd-element sd-question sd-row__question sd-row__question--flow",withFrame:"sd-element--with-frame",asCell:"sd-table__cell",answered:"sd-question--answered",header:"sd-question__header sd-element__header",headerLeft:"sd-question__header--location--left",headerTop:"sd-question__header--location-top sd-element__header--location-top",headerBottom:"sd-question__header--location--bottom",content:"sd-element__content sd-question__content",contentSupportContainerQueries:"sd-question__content--support-container-queries",contentLeft:"sd-question__content--left",titleNumInline:"sd-element__title--num-inline",titleLeftRoot:"sd-question--left",titleTopRoot:"sd-question--title-top",descriptionUnderInputRoot:"sd-question--description-under-input",titleBottomRoot:"sd-question--title-bottom",titleOnAnswer:"sd-question__title--answer",titleEmpty:"sd-question__title--empty",titleOnError:"sd-question__title--error",title:"sd-title sd-element__title sd-question__title",titleExpandable:"sd-element__title--expandable",titleExpandableSvg:"sd-element__title-expandable-svg",titleExpanded:"sd-element__title--expanded",titleCollapsed:"sd-element__title--collapsed",titleDisabled:"sd-element__title--disabled",titleReadOnly:"sd-element__title--readonly",titleBar:"sd-action-title-bar",requiredMark:"sd-question__required-text",number:"sd-element__num",description:"sd-description sd-question__description",descriptionUnderInput:"sd-question__description--under-input",comment:"sd-input sd-comment",other:"sd-input sd-comment",required:"sd-question--required",titleRequired:"sd-question__title--required",indent:20,footer:"sd-question__footer",commentArea:"sd-question__comment-area",formGroup:"sd-question__form-group",hasError:"sd-question--error",hasErrorTop:"sd-question--error-top",hasErrorBottom:"sd-question--error-bottom",collapsed:"sd-element--collapsed",expandable:"sd-element--expandable",expandableAnimating:"sd-elemenet--expandable--animating",expanded:"sd-element--expanded",nested:"sd-element--nested",invisible:"sd-element--invisible",composite:"sd-element--complex sd-composite",disabled:"sd-question--disabled",readOnly:"sd-question--readonly",preview:"sd-question--preview",noPointerEventsMode:"sd-question--no-pointer-events",errorsContainer:"sd-element__erbox sd-question__erbox",errorsContainerTop:"sd-element__erbox--above-element sd-question__erbox--above-question",errorsContainerBottom:"sd-question__erbox--below-question",confirmDialog:"sd-popup--confirm sv-popup--confirm"},image:{mainRoot:"sd-element sd-question sd-question--image",root:"sd-image",image:"sd-image__image",adaptive:"sd-image__image--adaptive",noImage:"sd-image__no-image",noImageSvgIconId:"icon-no-image",withFrame:""},html:{mainRoot:"sd-element sd-question sd-row__question sd-question--html",root:"sd-html",withFrame:"",nested:"sd-element--nested sd-html--nested"},error:{root:"sd-error",icon:"",item:"",locationTop:"",locationBottom:""},checkbox:{root:"sd-selectbase",rootMobile:"sd-selectbase--mobile",rootRow:"sd-selectbase--row",rootMultiColumn:"sd-selectbase--multi-column",item:"sd-item sd-checkbox sd-selectbase__item",itemEnter:"sd-item--enter",itemLeave:"sd-item--leave",itemOnError:"sd-item--error",itemSelectAll:"sd-checkbox--selectall",itemNone:"sd-checkbox--none",itemDisabled:"sd-item--disabled sd-checkbox--disabled",itemReadOnly:"sd-item--readonly sd-checkbox--readonly",itemPreview:"sd-item--preview sd-checkbox--preview",itemPreviewSvgIconId:"#icon-check-16x16",itemChecked:"sd-item--checked sd-checkbox--checked",itemHover:"sd-item--allowhover sd-checkbox--allowhover",itemInline:"sd-selectbase__item--inline",label:"sd-selectbase__label",labelChecked:"",itemControl:"sd-visuallyhidden sd-item__control sd-checkbox__control",itemDecorator:"sd-item__svg sd-checkbox__svg",itemSvgIconId:"#icon-check-16x16",controlLabel:"sd-item__control-label",materialDecorator:"sd-item__decorator sd-checkbox__decorator",other:"sd-input sd-comment sd-selectbase__other",column:"sd-selectbase__column"},radiogroup:{root:"sd-selectbase",rootMobile:"sd-selectbase--mobile",rootRow:"sd-selectbase--row",rootMultiColumn:"sd-selectbase--multi-column",item:"sd-item sd-radio sd-selectbase__item",itemOnError:"sd-item--error",itemInline:"sd-selectbase__item--inline",label:"sd-selectbase__label",labelChecked:"",itemEnter:"sd-item--enter",itemLeave:"sd-item--leave",itemDisabled:"sd-item--disabled sd-radio--disabled",itemReadOnly:"sd-item--readonly sd-radio--readonly",itemPreview:"sd-item--preview sd-radio--preview",itemPreviewSvgIconId:"#icon-check-16x16",itemChecked:"sd-item--checked sd-radio--checked",itemHover:"sd-item--allowhover sd-radio--allowhover",itemControl:"sd-visuallyhidden sd-item__control sd-radio__control",itemDecorator:"sd-item__svg sd-radio__svg",controlLabel:"sd-item__control-label",materialDecorator:"sd-item__decorator sd-radio__decorator",other:"sd-input sd-comment sd-selectbase__other",clearButton:"",column:"sd-selectbase__column"},boolean:{mainRoot:"sd-element sd-question sd-row__question sd-question--boolean",root:"sv_qcbc sv_qbln sd-scrollable-container sd-boolean-root",rootRadio:"sv_qcbc sv_qbln sd-scrollable-container sd-scrollable-container--compact",item:"sd-boolean",itemOnError:"sd-boolean--error",control:"sd-boolean__control sd-visuallyhidden",itemChecked:"sd-boolean--checked",itemExchanged:"sd-boolean--exchanged",itemIndeterminate:"sd-boolean--indeterminate",itemDisabled:"sd-boolean--disabled",itemReadOnly:"sd-boolean--readonly",itemPreview:"sd-boolean--preview",itemHover:"sd-boolean--allowhover",label:"sd-boolean__label",labelTrue:"sd-boolean__label--true",labelFalse:"sd-boolean__label--false",switch:"sd-boolean__switch",disabledLabel:"sd-checkbox__label--disabled",labelReadOnly:"sd-checkbox__label--readonly",labelPreview:"sd-checkbox__label--preview",sliderText:"sd-boolean__thumb-text",slider:"sd-boolean__thumb",sliderGhost:"sd-boolean__thumb-ghost",radioItem:"sd-item",radioItemChecked:"sd-item--checked sd-radio--checked",radioItemDisabled:"sd-item--disabled sd-radio--disabled",radioItemReadOnly:"sd-item--readonly sd-radio--readonly",radioItemPreview:"sd-item--preview sd-radio--preview",itemPreviewSvgIconId:"#icon-check-16x16",radioLabel:"sd-selectbase__label",radioControlLabel:"sd-item__control-label",radioFieldset:"sd-selectbase",itemRadioDecorator:"sd-item__svg sd-radio__svg",materialRadioDecorator:"sd-item__decorator sd-radio__decorator",itemRadioControl:"sd-visuallyhidden sd-item__control sd-radio__control",rootCheckbox:"sd-selectbase",checkboxItem:"sd-item sd-selectbase__item sd-checkbox",checkboxLabel:"sd-selectbase__label",checkboxItemOnError:"sd-item--error",checkboxItemIndeterminate:"sd-checkbox--intermediate",checkboxItemChecked:"sd-item--checked sd-checkbox--checked",checkboxItemDecorator:"sd-item__svg sd-checkbox__svg",checkboxItemDisabled:"sd-item--disabled sd-checkbox--disabled",checkboxItemReadOnly:"sd-item--readonly sd-checkbox--readonly",checkboxItemPreview:"sd-item--preview sd-checkbox--preview",controlCheckbox:"sd-visuallyhidden sd-item__control sd-checkbox__control",checkboxMaterialDecorator:"sd-item__decorator sd-checkbox__decorator",checkboxControlLabel:"sd-item__control-label",svgIconCheckedId:"#icon-check-16x16"},text:{root:"sd-input sd-text",small:"sd-row__question--small",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",constrolWithCharacterCounter:"sd-text__character-counter",characterCounterBig:"sd-text__character-counter--big",content:"sd-text__content sd-question__content",remainingCharacterCounter:"sd-remaining-character-counter",onError:"sd-input--error"},multipletext:{root:"sd-multipletext",rootMobile:"sd-multipletext--mobile",itemLabel:"sd-multipletext__item-container sd-input",itemLabelReadOnly:"sd-input--readonly",itemLabelDisabled:"sd-input--disabled",itemLabelPreview:"sd-input--preview",itemLabelOnError:"sd-multipletext__item-container--error",itemLabelAllowFocus:"sd-multipletext__item-container--allow-focus",itemLabelAnswered:"sd-multipletext__item-container--answered",itemWithCharacterCounter:"sd-multipletext-item__character-counter",item:"sd-multipletext__item",itemTitle:"sd-multipletext__item-title",content:"sd-multipletext__content sd-question__content",row:"sd-multipletext__row",cell:"sd-multipletext__cell",cellError:"sd-multipletext__cell--error",cellErrorTop:"sd-multipletext__cell--error-top",cellErrorBottom:"sd-multipletext__cell--error-bottom"},dropdown:{root:"sd-selectbase",popup:"sv-dropdown-popup",small:"sd-row__question--small",selectWrapper:"sv-dropdown_select-wrapper",other:"sd-input sd-comment sd-selectbase__other",onError:"sd-input--error",label:"sd-selectbase__label",itemEnter:"sd-item--enter",itemLeave:"sd-item--leave",item:"sd-item sd-radio sd-selectbase__item",itemDisabled:"sd-item--disabled sd-radio--disabled",itemChecked:"sd-item--checked sd-radio--checked",itemHover:"sd-item--allowhover sd-radio--allowhover",itemControl:"sd-visuallyhidden sd-item__control sd-radio__control",itemDecorator:"sd-item__svg sd-radio__svg",cleanButton:"sd-dropdown_clean-button",cleanButtonSvg:"sd-dropdown_clean-button-svg",cleanButtonIconId:"icon-cancel",chevronButton:"sd-dropdown_chevron-button",chevronButtonSvg:"sd-dropdown_chevron-button-svg",chevronButtonIconId:"icon-chevron",control:"sd-input sd-dropdown",controlInputFieldComponent:"sd-dropdown__input-field-component",controlValue:"sd-dropdown__value",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",controlEmpty:"sd-dropdown--empty",controlLabel:"sd-item__control-label",filterStringInput:"sd-dropdown__filter-string-input",materialDecorator:"sd-item__decorator sd-radio__decorator",hintPrefix:"sd-dropdown__hint-prefix",hintSuffix:"sd-dropdown__hint-suffix"},imagepicker:{mainRoot:"sd-element sd-question sd-row__question",root:"sd-selectbase sd-imagepicker",rootResponsive:"sd-imagepicker--responsive",rootStatic:"sd-imagepicker--static",rootColumn:"sd-imagepicker--column",item:"sd-imagepicker__item",itemOnError:"sd-imagepicker__item--error",itemInline:"sd-imagepicker__item--inline",itemChecked:"sd-imagepicker__item--checked",itemDisabled:"sd-imagepicker__item--disabled",itemReadOnly:"sd-imagepicker__item--readonly",itemPreview:"sd-imagepicker__item--preview",itemHover:"sd-imagepicker__item--allowhover",label:"sd-imagepicker__label",itemDecorator:"sd-imagepicker__item-decorator",imageContainer:"sd-imagepicker__image-container",itemControl:"sd-imagepicker__control sd-visuallyhidden",image:"sd-imagepicker__image",itemText:"sd-imagepicker__text",other:"sd-input sd-comment",itemNoImage:"sd-imagepicker__no-image",itemNoImageSvgIcon:"sd-imagepicker__no-image-svg",itemNoImageSvgIconId:"icon-no-image",column:"sd-selectbase__column sd-imagepicker__column",checkedItemDecorator:"sd-imagepicker__check-decorator",checkedItemSvgIcon:"sd-imagepicker__check-icon",checkedItemSvgIconId:"icon-check-24x24"},matrix:{mainRoot:"sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",tableWrapper:"sd-matrix sd-table-wrapper",root:"sd-table sd-matrix__table",columnsAutoWidth:"sd-table--columnsautowidth",noHeader:"sd-table--no-header",rootVerticalAlignTop:"sd-table--align-top",rootVerticalAlignMiddle:"sd-table--align-middle",rootAlternateRows:"sd-table--alternate-rows",rowError:"sd-matrix__row--error",cell:"sd-table__cell sd-matrix__cell",row:"sd-table__row",rowDisabled:"sd-table__row-disabled",rowReadOnly:"sd-table__row-readonly",headerCell:"sd-table__cell sd-table__cell--header",rowTextCell:"sd-table__cell sd-matrix__cell sd-table__cell--row-text",label:"sd-item sd-radio sd-matrix__label",itemOnError:"sd-item--error",itemValue:"sd-visuallyhidden sd-item__control sd-radio__control",itemChecked:"sd-item--checked sd-radio--checked",itemDisabled:"sd-item--disabled sd-radio--disabled",itemReadOnly:"sd-item--readonly sd-radio--readonly",itemPreview:"sd-item--preview sd-radio--preview",itemPreviewSvgIconId:"#icon-check-16x16",itemHover:"sd-radio--allowhover",materialDecorator:"sd-item__decorator sd-radio__decorator",itemDecorator:"sd-item__svg sd-radio__svg",cellText:"sd-matrix__text",cellTextSelected:"sd-matrix__text--checked",cellTextDisabled:"sd-matrix__text--disabled",cellResponsiveTitle:"sd-matrix__responsive-title",compact:"sd-element--with-frame sd-element--compact"},matrixdropdown:{mainRoot:"sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",rootScroll:"sd-question--scroll",root:"sd-table sd-matrixdropdown",columnsAutoWidth:"sd-table--columnsautowidth",noHeader:"sd-table--no-header",hasFooter:"sd-table--has-footer",rootVerticalAlignTop:"sd-table--align-top",rootVerticalAlignMiddle:"sd-table--align-middle",tableWrapper:"sd-table-wrapper",rootAlternateRows:"sd-table--alternate-rows",cell:"sd-table__cell",cellResponsiveTitle:"sd-table__responsive-title",errorsCell:"sd-table__cell--error",errorsCellTop:"sd-table__cell--error-top",errorsCellBottom:"sd-table__cell--error-bottom",itemCell:"sd-table__cell--item",row:"sd-table__row",rowDelayedEnter:"sd-table__row--delayed-enter",rowEnter:"sd-table__row--enter",rowLeave:"sd-table__row--leave",expandedRow:"sd-table__row--expanded",rowHasPanel:"sd-table__row--has-panel",rowHasEndActions:"sd-table__row--has-end-actions",headerCell:"sd-table__cell sd-table__cell--header",rowTextCell:"sd-table__cell sd-table__cell--row-text",footerCell:"sd-table__cell sd-table__cell--footer",footerTotalCell:"sd-table__cell sd-table__cell--footer-total",columnTitleCell:"sd-table__cell--column-title",cellRequiredMark:"sd-question__required-text",detailButton:"sd-table__cell--detail-button",detailButtonExpanded:"sd-table__cell--detail-button--expanded",detailIcon:"sd-detail-panel__icon",detailIconExpanded:"sd-detail-panel__icon--expanded",detailIconId:"icon-expanddetail",detailIconExpandedId:"icon-collapsedetail",detailPanelCell:"sd-table__cell--detail-panel",detailRowCell:"sd-table__cell--detail",actionsCellPrefix:"sd-table__cell-action",actionsCell:"sd-table__cell sd-table__cell--actions",actionsCellDrag:"sd-table__cell--drag",emptyCell:"sd-table__cell--empty",verticalCell:"sd-table__cell--vertical",cellQuestionWrapper:"sd-matrix__question-wrapper sd-table__question-wrapper",compact:"sd-element--with-frame sd-element--compact"},matrixdynamic:{mainRoot:"sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",rootScroll:"sd-question--scroll",empty:"sd-question--empty",root:"sd-table sd-matrixdynamic",columnsAutoWidth:"sd-table--columnsautowidth",noHeader:"sd-table--no-header",hasFooter:"sd-table--has-footer",tableWrapper:"sd-table-wrapper",rootAlternateRows:"sd-table--alternate-rows",content:"sd-matrixdynamic__content sd-question__content",cell:"sd-table__cell",cellResponsiveTitle:"sd-table__responsive-title",row:"sd-table__row",rowDelayedEnter:"sd-table__row--delayed-enter",rowEnter:"sd-table__row--enter",rowLeave:"sd-table__row--leave",rowHasPanel:"sd-table__row--has-panel",rowHasEndActions:"sd-table__row--has-end-actions",expandedRow:"sd-table__row--expanded",itemCell:"sd-table__cell--item",headerCell:"sd-table__cell sd-table__cell--header",rowTextCell:"sd-table__cell sd-table__cell--row-text",footerCell:"sd-table__cell sd-table__cell--footer",columnTitleCell:"sd-table__cell--column-title",cellRequiredMark:"sd-question__required-text",button:"sd-action sd-matrixdynamic__btn",detailRow:"sd-table__row sd-table__row--detail",detailButton:"sd-table__cell--detail-button",detailButtonExpanded:"sd-table__cell--detail-button--expanded",detailIcon:"sd-detail-panel__icon",detailIconExpanded:"sd-detail-panel__icon--expanded",detailIconId:"icon-expanddetail",detailIconExpandedId:"icon-collapsedetail",detailPanelCell:"sd-table__cell--detail-panel",detailRowCell:"sd-table__cell--detail",actionsCellPrefix:"sd-table__cell-action",actionsCell:"sd-table__cell sd-table__cell--actions",actionsCellDrag:"sd-table__cell--drag",buttonAdd:"sd-matrixdynamic__add-btn",buttonRemove:"sd-action--negative sd-matrixdynamic__remove-btn",iconAdd:"sd-hidden",iconRemove:"",dragElementDecorator:"sd-drag-element__svg",iconDragElement:"#icon-drag-24x24",footer:"sd-matrixdynamic__footer",footerTotalCell:"sd-table__cell sd-table__cell--footer-total",noRowsSection:"sd-matrixdynamic__placeholder sd-question__placeholder",iconDrag:"sv-matrixdynamic__drag-icon",ghostRow:"sv-matrix-row--drag-drop-ghost-mod",draggedRow:"sv-matrixdynamic-dragged-row",emptyCell:"sd-table__cell--empty",verticalCell:"sd-table__cell--vertical",cellQuestionWrapper:"sd-matrix__question-wrapper sd-table__question-wrapper",errorsCell:"sd-table__cell--error",errorsCellTop:"sd-table__cell--error-top",errorsCellBottom:"sd-table__cell--error-bottom",compact:"sd-element--with-frame sd-element--compact"},rating:{rootDropdown:"sd-scrollable-container sd-scrollable-container--compact sd-selectbase",root:"sd-scrollable-container sd-rating",rootWrappable:"sd-rating--wrappable",rootLabelsTop:"sd-rating--labels-top",rootLabelsBottom:"sd-rating--labels-bottom",rootLabelsDiagonal:"sd-rating--labels-diagonal",item:"sd-rating__item",itemOnError:"sd-rating__item--error",itemHover:"sd-rating__item--allowhover",selected:"sd-rating__item--selected",itemStar:"sd-rating__item-star",itemStarOnError:"sd-rating__item-star--error",itemStarHover:"sd-rating__item-star--allowhover",itemStarSelected:"sd-rating__item-star--selected",itemStarDisabled:"sd-rating__item-star--disabled",itemStarReadOnly:"sd-rating__item-star--readonly",itemStarPreview:"sd-rating__item-star--preview",itemStarHighlighted:"sd-rating__item-star--highlighted",itemStarUnhighlighted:"sd-rating__item-star--unhighlighted",itemStarSmall:"sd-rating__item-star--small",itemSmiley:"sd-rating__item-smiley",itemSmileyOnError:"sd-rating__item-smiley--error",itemSmileyHover:"sd-rating__item-smiley--allowhover",itemSmileySelected:"sd-rating__item-smiley--selected",itemSmileyDisabled:"sd-rating__item-smiley--disabled",itemSmileyReadOnly:"sd-rating__item-smiley--readonly",itemSmileyPreview:"sd-rating__item-smiley--preview",itemSmileyHighlighted:"sd-rating__item-star--highlighted",itemSmileyScaleColored:"sd-rating__item-smiley--scale-colored",itemSmileyRateColored:"sd-rating__item-smiley--rate-colored",itemSmileySmall:"sd-rating__item-smiley--small",minText:"sd-rating__item-text sd-rating__min-text",itemText:"sd-rating__item-text",maxText:"sd-rating__item-text sd-rating__max-text",itemDisabled:"sd-rating__item--disabled",itemReadOnly:"sd-rating__item--readonly",itemPreview:"sd-rating__item--preview",itemFixedSize:"sd-rating__item--fixed-size",control:"sd-input sd-dropdown",itemSmall:"sd-rating--small",selectWrapper:"sv-dropdown_select-wrapper",controlValue:"sd-dropdown__value",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",controlEmpty:"sd-dropdown--empty",filterStringInput:"sd-dropdown__filter-string-input",chevronButton:"sd-dropdown_chevron-button",chevronButtonSvg:"sd-dropdown_chevron-button-svg",chevronButtonIconId:"icon-chevron",popup:"sv-dropdown-popup",onError:"sd-input--error"},comment:{root:"sd-input sd-comment",small:"sd-row__question--small",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",content:"sd-comment__content sd-question__content",remainingCharacterCounter:"sd-remaining-character-counter",onError:"sd-input--error"},expression:"sd-expression",file:{root:"sd-file",rootDragging:"sd-file--dragging",rootAnswered:"sd-file--answered",rootDisabled:"sd-file--disabled",rootReadOnly:"sd-file--readonly",rootPreview:"sd-file--preview",other:"sd-input sd-comment",placeholderInput:"sd-visuallyhidden",previewItem:"sd-file__preview-item",fileSign:"",fileList:"sd-file__list",fileSignBottom:"sd-file__sign",dragArea:"sd-file__drag-area",dragAreaActive:"sd-file__drag-area--active",fileDecorator:"sd-file__decorator",onError:"sd-file__decorator--error",fileDecoratorDrag:"sd-file__decorator--drag",fileInput:"sd-visuallyhidden",noFileChosen:"sd-description sd-file__no-file-chosen",chooseFile:"sd-file__choose-btn",chooseFileAsText:"sd-action sd-file__choose-btn--text",chooseFileAsTextDisabled:"sd-action--disabled",chooseFileAsIcon:"sd-file__choose-btn--icon",chooseFileIconId:"icon-choosefile",disabled:"sd-file__choose-btn--disabled",controlDisabled:"sd-file__choose-file-btn--disabled",removeButton:"sd-context-btn--negative",removeButtonBottom:"",removeButtonIconId:"icon-clear",removeFile:"sd-hidden",removeFileSvg:"",removeFileSvgIconId:"icon-close_16x16",wrapper:"sd-file__wrapper",defaultImage:"sd-file__default-image",defaultImageIconId:"icon-defaultfile",leftIconId:"icon-arrowleft",rightIconId:"icon-arrowright",removeFileButton:"sd-context-btn--small sd-context-btn--with-border sd-context-btn--colorful sd-context-btn--negative sd-file__remove-file-button",dragAreaPlaceholder:"sd-file__drag-area-placeholder",imageWrapper:"sd-file__image-wrapper",imageWrapperDefaultImage:"sd-file__image-wrapper--default-image",single:"sd-file--single",singleImage:"sd-file--single-image",mobile:"sd-file--mobile",videoContainer:"sd-file__video-container",contextButton:"sd-context-btn",video:"sd-file__video",actionsContainer:"sd-file__actions-container",closeCameraButton:"sd-file__close-camera-button",changeCameraButton:"sd-file__change-camera-button",takePictureButton:"sd-file__take-picture-button",loadingIndicator:"sd-file__loading-indicator",page:"sd-file__page"},signaturepad:{mainRoot:"sd-element sd-question sd-question--signature sd-row__question",root:"sd-signaturepad sjs_sp_container",small:"sd-row__question--small",controls:"sjs_sp_controls sd-signaturepad__controls",placeholder:"sjs_sp_placeholder",canvas:"sjs_sp_canvas sd-signaturepad__canvas",backgroundImage:"sjs_sp__background-image sd-signaturepad__background-image",clearButton:"sjs_sp_clear sd-context-btn sd-context-btn--negative sd-signaturepad__clear",clearButtonIconId:"icon-clear",loadingIndicator:"sd-signaturepad__loading-indicator"},saveData:{root:"sv-save-data_root",rootWithButtons:"sv-save-data_root--with-buttons",info:"sv-save-data_info",error:"sv-save-data_error",success:"sv-save-data_success",button:"sv-save-data_button",shown:"sv-save-data_root--shown"},window:{root:"sv_window",rootCollapsedMod:"sv_window--collapsed",rootFullScreenMode:"sv_window--full-screen",rootContent:"sv_window_root-content",body:"sv_window_content",header:{root:"sv_window_header",titleCollapsed:"sv_window_header_title_collapsed",buttonsContainer:"sv_window_buttons_container",button:"sv_window_button",buttonExpanded:"",buttonCollapsed:"",collapseButton:"sv_window_button sv_window_button_collapse",closeButton:"sv_window_button sv_window_button_close",fullScreenButton:"sv_window_button sv_window_button_full_screen"}},ranking:{root:"sv-ranking",rootMobileMod:"sv-ranking--mobile",rootDragMod:"sv-ranking--drag",rootDisabled:"sd-ranking--disabled",rootReadOnly:"sd-ranking--readonly",rootPreview:"sd-ranking--preview",rootDesignMode:"sv-ranking--design-mode",rootDragHandleAreaIcon:"sv-ranking--drag-handle-area-icon",rootSelectToRankMod:"sv-ranking--select-to-rank",rootSelectToRankEmptyValueMod:"sv-ranking--select-to-rank-empty-value",rootSelectToRankAlignVertical:"sv-ranking--select-to-rank-vertical",rootSelectToRankAlignHorizontal:"sv-ranking--select-to-rank-horizontal",rootSelectToRankSwapAreas:"sv-ranking--select-to-rank-swap-areas",item:"sv-ranking-item",itemContent:"sv-ranking-item__content sd-ranking-item__content",itemIndex:"sv-ranking-item__index sd-ranking-item__index",itemIndexEmptyMode:"sv-ranking-item__index--empty sd-ranking-item__index--empty",itemDisabled:"sv-ranking-item--disabled",itemReadOnly:"sv-ranking-item--readonly",itemPreview:"sv-ranking-item--preview",controlLabel:"sv-ranking-item__text",itemGhostNode:"sv-ranking-item__ghost",itemIconContainer:"sv-ranking-item__icon-container",itemIcon:"sv-ranking-item__icon",itemIconHoverMod:"sv-ranking-item__icon--hover",itemIconFocusMod:"sv-ranking-item__icon--focus",itemGhostMod:"sv-ranking-item--ghost",itemDragMod:"sv-ranking--drag",itemOnError:"sv-ranking-item--error",container:"sv-ranking__container",containerEmptyMode:"sv-ranking__container--empty",containerFromMode:"sv-ranking__container--from",containerToMode:"sv-ranking__container--to",containerPlaceholder:"sv-ranking__container-placeholder",containersDivider:"sv-ranking__containers-divider"},buttongroup:{root:"sv-button-group",item:"sv-button-group__item",itemIcon:"sv-button-group__item-icon",itemDecorator:"sv-button-group__item-decorator",itemCaption:"sv-button-group__item-caption",itemHover:"sv-button-group__item--hover",itemSelected:"sv-button-group__item--selected",itemDisabled:"sv-button-group__item--disabled",itemControl:"sv-visuallyhidden"},list:{root:"sv-list__container sd-list",item:"sv-list__item sd-list__item",itemBody:"sv-list__item-body sd-list__item-body",itemSelected:"sv-list__item--selected sd-list__item--selected",itemFocused:"sv-list__item--focused sd-list__item--focused",itemHovered:"sv-list__item--hovered sd-list__item--hovered"},actionBar:{root:"sd-action-bar",item:"sd-action",defaultSizeMode:"",smallSizeMode:"",itemPressed:"sd-action--pressed",itemAsIcon:"sd-action--icon",itemIcon:"sd-action__icon",itemTitle:"sd-action__title"},variables:{mobileWidth:"--sd-mobile-width",themeMark:"--sv-defaultV2-mark"},tagbox:{root:"sd-selectbase",popup:"sv-dropdown-popup",small:"sd-row__question--small",selectWrapper:"sv-dropdown_select-wrapper",other:"sd-input sd-comment sd-selectbase__other",onError:"sd-input--error",label:"sd-selectbase__label",itemSvgIconId:"#icon-check-16x16",item:"sd-item sd-checkbox sd-selectbase__item",itemDisabled:"sd-item--disabled sd-checkbox--disabled",itemChecked:"sd-item--checked sd-checkbox--checked",itemHover:"sd-item--allowhover sd-checkbox--allowhover",itemControl:"sd-visuallyhidden sd-item__control sd-checkbox__control",itemDecorator:"sd-item__svg sd-checkbox__svg",itemEnter:"sd-item--enter",itemLeave:"sd-item--leave",cleanButton:"sd-tagbox_clean-button sd-dropdown_clean-button",cleanButtonSvg:"sd-tagbox_clean-button-svg sd-dropdown_clean-button-svg",cleanButtonIconId:"icon-cancel-24x24",cleanItemButton:"sd-tagbox-item_clean-button",cleanItemButtonSvg:"sd-tagbox-item_clean-button-svg",cleanItemButtonIconId:"icon-clear_16x16",chevronButton:"sd-dropdown_chevron-button",chevronButtonSvg:"sd-dropdown_chevron-button-svg",chevronButtonIconId:"icon-chevron",control:"sd-input sd-tagbox sd-dropdown",controlValue:"sd-tagbox__value sd-dropdown__value",controlValueItems:"sd-tagbox__value-items",placeholderInput:"sd-tagbox__placeholder",controlEditable:"sd-input--editable",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",controlEmpty:"sd-dropdown--empty sd-tagbox--empty",controlLabel:"sd-item__control-label",filterStringInput:"sd-tagbox__filter-string-input sd-dropdown__filter-string-input",materialDecorator:"sd-item__decorator sd-checkbox__decorator",hint:"sd-tagbox__hint",hintPrefix:"sd-dropdown__hint-prefix sd-tagbox__hint-prefix",hintSuffix:"sd-dropdown__hint-suffix sd-tagbox__hint-suffix",hintSuffixWrapper:"sd-tagbox__hint-suffix-wrapper"}};Gi.default=Zi;var Ji={setTimeout:e=>Ji.safeTimeOut(e,1e3),clearTimeout:e=>{clearTimeout(e)},safeTimeOut:(e,t)=>t<=0?(e(),0):setTimeout(e,t),now:()=>Date.now()};class Ki{constructor(){this.listenerCounter=0,this.timerId=-1,this.onTimerTick=new vt,this.onTimer=this.onTimerTick}static get instance(){return Ki.instanceValue||(Ki.instanceValue=new Ki),Ki.instanceValue}start(e=null){e&&this.onTimerTick.add(e),this.prevTimeInMs=Ji.now(),this.timerId<0&&(this.timerId=Ji.setTimeout((()=>{this.doTimer()}))),this.listenerCounter++}stop(e=null){e&&this.onTimerTick.remove(e),this.listenerCounter--,0==this.listenerCounter&&this.timerId>-1&&(Ji.clearTimeout(this.timerId),this.timerId=-1)}doTimer(){if((this.onTimerTick.isEmpty||0==this.listenerCounter)&&(this.timerId=-1),this.timerId<0)return;const e=Ji.now();let t=Math.floor((e-this.prevTimeInMs)/1e3);this.prevTimeInMs=e,t<0&&(t=1);const s=this.timerId;this.onTimerTick.fire(this,{seconds:t}),s===this.timerId&&(this.timerId=Ji.setTimeout((()=>{this.doTimer()})))}}Ki.instanceValue=null;class Xi extends pt{constructor(e){super(),this.timerFunc=null,this.surveyValue=e,this.onCreating()}get survey(){return this.surveyValue}onCreating(){}start(){this.survey&&(this.isRunning||this.isDesignMode||(this.survey.onCurrentPageChanged.add((()=>{this.update()})),this.timerFunc=(e,t)=>{this.doTimer(t.seconds)},this.setIsRunning(!0),this.update(),Ki.instance.start(this.timerFunc)))}stop(){this.isRunning&&(this.setIsRunning(!1),Ki.instance.stop(this.timerFunc))}get isRunning(){return this.getPropertyValue("isRunning",!1)}setIsRunning(e){this.setPropertyValue("isRunning",e)}update(){this.updateText(),this.updateProgress()}doTimer(e){var t=this.survey.currentPage;if(t){const s=t.getMaxTimeToFinish();s>0&&s{this.progress=Math.floor((e+1)/t*100)/100}),0)):e<=t&&(this.progress=Math.floor((e+1)/t*100)/100),this.progress>1&&(this.progress=void 0)):this.progress=void 0}updateText(){let e=this.survey.timerClock;this.clockMajorText=e.majorText,this.clockMinorText=e.minorText,this.text=this.survey.timerInfoText}get showProgress(){return void 0!==this.progress}get showTimerAsClock(){return!!this.survey.getCss().clockTimerRoot}get rootCss(){return(new Ct).append(this.survey.getCss().clockTimerRoot).append(this.survey.getCss().clockTimerRootTop,this.survey.isTimerPanelShowingOnTop).append(this.survey.getCss().clockTimerRootBottom,this.survey.isTimerPanelShowingOnBottom).toString()}getProgressCss(){return(new Ct).append(this.survey.getCss().clockTimerProgress).append(this.survey.getCss().clockTimerProgressAnimation,this.progress>0).toString()}get textContainerCss(){return this.survey.getCss().clockTimerTextContainer}get minorTextCss(){return this.survey.getCss().clockTimerMinorText}get majorTextCss(){return this.survey.getCss().clockTimerMajorText}}ft([pe()],Xi.prototype,"text",void 0),ft([pe()],Xi.prototype,"progress",void 0),ft([pe()],Xi.prototype,"clockMajorText",void 0),ft([pe()],Xi.prototype,"clockMinorText",void 0),ft([pe({defaultValue:0})],Xi.prototype,"spent",void 0);class Yi extends pt{constructor(e){super(),this.cssClasses=e,this.timeout=Ps.notifications.lifetime,this.timer=void 0,this.actionsVisibility={},this.showActions=!0,this.actionBar=new xt,this.actionBar.updateCallback=e=>{this.actionBar.actions.forEach((e=>e.cssClasses={}))},this.css=this.cssClasses.root}getCssClass(e){return(new Ct).append(this.cssClasses.root).append(this.cssClasses.rootWithButtons,this.actionBar.visibleActions.length>0).append(this.cssClasses.info,"error"!==e&&"success"!==e).append(this.cssClasses.error,"error"===e).append(this.cssClasses.success,"success"===e).append(this.cssClasses.shown,this.active).toString()}updateActionsVisibility(e){this.actionBar.actions.forEach((t=>t.visible=this.showActions&&this.actionsVisibility[t.id]===e))}notify(e,t="info",s=!1){this.isDisplayed=!0,setTimeout((()=>{this.updateActionsVisibility(t),this.message=e,this.active=!0,this.css=this.getCssClass(t),this.timer&&(clearTimeout(this.timer),this.timer=void 0),s||(this.timer=setTimeout((()=>{this.timer=void 0,this.active=!1,this.css=this.getCssClass(t)}),this.timeout))}),1)}addAction(e,t){e.visible=!1,e.innerCss=this.cssClasses.button;const s=this.actionBar.addAction(e);this.actionsVisibility[s.id]=t}}ft([pe({defaultValue:!1})],Yi.prototype,"active",void 0),ft([pe({defaultValue:!1})],Yi.prototype,"isDisplayed",void 0),ft([pe()],Yi.prototype,"message",void 0),ft([pe()],Yi.prototype,"css",void 0);class $i{calcRow(e){return"top"===e?1:"middle"===e?2:3}calcColumn(e){return"left"===e?1:"center"===e?2:3}calcAlignItems(e){return"left"===e?"flex-start":"center"===e?"center":"flex-end"}calcAlignText(e){return"left"===e?"start":"center"===e?"center":"end"}calcJustifyContent(e){return"top"===e?"flex-start":"middle"===e?"center":"flex-end"}constructor(e,t,s){this.cover=e,this.positionX=t,this.positionY=s}get survey(){return this.cover.survey}get css(){return(new Ct).append($i.CLASSNAME).append(`${$i.CLASSNAME}--${this.positionX}`).append(`${$i.CLASSNAME}--${this.positionY}`).append($i.CLASSNAME+"--empty",this.isEmpty).toString()}get style(){const e={};return e.gridColumn=this.calcColumn(this.positionX),e.gridRow=this.calcRow(this.positionY),e.width=this.width?this.width+"px":void 0,e}get contentStyle(){const e={};return e.textAlign=this.calcAlignText(this.positionX),e.alignItems=this.calcAlignItems(this.positionX),e.justifyContent=this.calcJustifyContent(this.positionY),e.maxWidth=this.contentMaxWidth,e}get showLogo(){return this.survey.hasLogo&&this.positionX===this.cover.logoPositionX&&this.positionY===this.cover.logoPositionY}get showTitle(){return this.survey.hasTitle&&this.positionX===this.cover.titlePositionX&&this.positionY===this.cover.titlePositionY}get showDescription(){return this.survey.renderedHasDescription&&this.positionX===this.cover.descriptionPositionX&&this.positionY===this.cover.descriptionPositionY}get isEmpty(){return!this.showLogo&&!this.showTitle&&!this.showDescription}get textAreaWidth(){return this.cover.renderedTextAreaWidth}get width(){if(this.cover.width)return Math.ceil(this.cover.width/3)}get contentMaxWidth(){return this.cover.getContentMaxWidth(this)}}$i.CLASSNAME="sv-header__cell";class er extends pt{calcBackgroundSize(e){return"fill"===e?"100% 100%":"tile"===e?"auto":e}updateHeaderClasses(){const e=!this.backgroundColor||"transparent"===this.backgroundColor,t="var(--sjs-primary-backcolor)"===this.backgroundColor,s=!e&&!t;this.headerClasses=(new Ct).append("sv-header").append("sv-header--height-auto",!this.renderedHeight).append("sv-header__without-background",e&&!this.backgroundImage).append("sv-header__background-color--none",e&&!this.titleColor&&!this.descriptionColor).append("sv-header__background-color--accent",t&&!this.titleColor&&!this.descriptionColor).append("sv-header__background-color--custom",s&&!this.titleColor&&!this.descriptionColor).append("sv-header__overlap",this.overlapEnabled).toString()}updateContentClasses(){const e=!!this.survey&&this.survey.calculateWidthMode();this.maxWidth="survey"===this.inheritWidthFrom&&!!e&&"static"===e&&this.survey.renderedWidth,this.contentClasses=(new Ct).append("sv-header__content").append("sv-header__content--static","survey"===this.inheritWidthFrom&&!!e&&"static"===e).append("sv-header__content--responsive","container"===this.inheritWidthFrom||!!e&&"responsive"===e).toString()}updateBackgroundImageClasses(){this.backgroundImageClasses=(new Ct).append("sv-header__background-image").append("sv-header__background-image--contain","contain"===this.backgroundImageFit).append("sv-header__background-image--tile","tile"===this.backgroundImageFit).toString()}fromTheme(e){super.fromJSON(e.header||{}),e.cssVariables&&(this.backgroundColor=e.cssVariables["--sjs-header-backcolor"],this.titleColor=e.cssVariables["--sjs-font-headertitle-color"],this.descriptionColor=e.cssVariables["--sjs-font-headerdescription-color"]),this.init()}init(){this.renderBackgroundImage=ns(this.backgroundImage),this.updateHeaderClasses(),this.updateContentClasses(),this.updateBackgroundImageClasses()}constructor(){super(),this.cells=[],["top","middle","bottom"].forEach((e=>["left","center","right"].forEach((t=>this.cells.push(new $i(this,t,e)))))),this.init()}getType(){return"cover"}get renderedHeight(){return this.survey&&!this.survey.isMobile||!this.survey?this.height?this.height+"px":void 0:this.survey&&this.survey.isMobile&&this.mobileHeight?this.mobileHeight+"px":void 0}get renderedTextAreaWidth(){return this.textAreaWidth?this.textAreaWidth+"px":void 0}get isEmpty(){return!this.survey.hasLogo&&!this.survey.hasTitle&&!this.survey.renderedHasDescription}get survey(){return this._survey}set survey(e){this._survey!==e&&(this._survey=e,e&&(this.updateContentClasses(),this._survey.onPropertyChanged.add(((e,t)=>{"widthMode"!=t.name&&"width"!=t.name||this.updateContentClasses()}))))}get backgroundImageStyle(){return this.backgroundImage?{opacity:this.backgroundImageOpacity,backgroundImage:this.renderBackgroundImage,backgroundSize:this.calcBackgroundSize(this.backgroundImageFit)}:null}propertyValueChanged(e,t,s,i,r){super.propertyValueChanged(e,t,s),"height"!==e&&"backgroundColor"!==e&&"backgroundImage"!==e&&"overlapEnabled"!==e||this.updateHeaderClasses(),"inheritWidthFrom"===e&&this.updateContentClasses(),"backgroundImageFit"===e&&this.updateBackgroundImageClasses()}getContentMaxWidth(e){if(e.isEmpty||e.showLogo)return;const t=this.cells.indexOf(e),s=Math.floor(t/3),i=t%3;if(1==i){if(!this.cells[3*s].isEmpty||!this.cells[3*s+2].isEmpty)return"100%"}else{if(0==i){let e=0,t=i+1;for(;t<3&&this.cells[3*s+t].isEmpty;)this.cells[3*s+t].isEmpty&&e++,t++;return 100*(e+1)+"%"}if(2==i){let e=0,t=i-1;for(;t>0&&this.cells[3*s+t].isEmpty;)this.cells[3*s+t].isEmpty&&e++,t--;return 100*(e+1)+"%"}}}processResponsiveness(){if(this.survey&&this.survey.rootElement&&!this.survey.isMobile){const e=this.survey.rootElement.querySelectorAll(".sv-header__content")[0];if(!e)return;let t=e.getBoundingClientRect().width;const s=oe.getComputedStyle(e),i=parseFloat(s.paddingLeft)||0,r=parseFloat(s.paddingRight)||0,n=parseFloat(s.columnGap)||0;this.width=t-i-r-2*n}}get hasBackground(){return!!this.backgroundImage||"transparent"!==this.backgroundColor}}ft([pe()],er.prototype,"height",void 0),ft([pe()],er.prototype,"mobileHeight",void 0),ft([pe()],er.prototype,"inheritWidthFrom",void 0),ft([pe()],er.prototype,"textAreaWidth",void 0),ft([pe()],er.prototype,"textGlowEnabled",void 0),ft([pe()],er.prototype,"overlapEnabled",void 0),ft([pe({defaultValue:"transparent"})],er.prototype,"backgroundColor",void 0),ft([pe()],er.prototype,"titleColor",void 0),ft([pe()],er.prototype,"descriptionColor",void 0),ft([pe({onSet:(e,t)=>{t.renderBackgroundImage=ns(e)}})],er.prototype,"backgroundImage",void 0),ft([pe()],er.prototype,"renderBackgroundImage",void 0),ft([pe()],er.prototype,"backgroundImageFit",void 0),ft([pe()],er.prototype,"backgroundImageOpacity",void 0),ft([pe()],er.prototype,"logoPositionX",void 0),ft([pe()],er.prototype,"logoPositionY",void 0),ft([pe()],er.prototype,"titlePositionX",void 0),ft([pe()],er.prototype,"titlePositionY",void 0),ft([pe()],er.prototype,"descriptionPositionX",void 0),ft([pe()],er.prototype,"descriptionPositionY",void 0),ft([pe()],er.prototype,"logoStyle",void 0),ft([pe()],er.prototype,"titleStyle",void 0),ft([pe()],er.prototype,"descriptionStyle",void 0),ft([pe()],er.prototype,"headerClasses",void 0),ft([pe()],er.prototype,"contentClasses",void 0),ft([pe()],er.prototype,"width",void 0),ft([pe()],er.prototype,"maxWidth",void 0),ft([pe()],er.prototype,"backgroundImageClasses",void 0),Ie.addClass("cover",[{name:"height:number",minValue:0,default:0},{name:"mobileHeight:number",minValue:0,default:0},{name:"inheritWidthFrom",default:"survey"},{name:"textAreaWidth:number",minValue:0,default:0},{name:"textGlowEnabled:boolean"},{name:"overlapEnabled:boolean"},{name:"backgroundImage:file"},{name:"backgroundImageOpacity:number",minValue:0,maxValue:1,default:1},{name:"backgroundImageFit",default:"cover",choices:["cover","fill","contain"]},{name:"logoPositionX",default:"left"},{name:"logoPositionY",default:"top"},{name:"titlePositionX",default:"left"},{name:"titlePositionY",default:"bottom"},{name:"descriptionPositionX",default:"left"},{name:"descriptionPositionY",default:"bottom"}],(function(){return new er}));class tr{constructor(e){this.type=e,this.timestamp=new Date}}class sr extends pt{constructor(){super(),this.taskList=[],this.onAllTasksCompleted=this.addEvent()}runTask(e,t){const s=new tr(e);return this.taskList.push(s),this.hasActiveTasks=!0,t((()=>this.taskFinished(s))),s}waitAndExecute(e){this.hasActiveTasks?this.onAllTasksCompleted.add((()=>{e()})):e()}taskFinished(e){const t=this.taskList.indexOf(e);t>-1&&this.taskList.splice(t,1),this.hasActiveTasks&&0==this.taskList.length&&(this.hasActiveTasks=!1,this.onAllTasksCompleted.fire(this,{}))}}ft([pe({defaultValue:!1})],sr.prototype,"hasActiveTasks",void 0);class ir extends pt{constructor(e,t){super(),this.effectiveWidth=e,this.questionTitleWidth=t}getType(){return"panellayoutcolumn"}isEmpty(){return!this.width&&!this.questionTitleWidth}}ft([pe()],ir.prototype,"width",void 0),ft([pe({onSet:(e,t,s)=>{e!==s&&(t.width=e)}})],ir.prototype,"effectiveWidth",void 0),ft([pe()],ir.prototype,"questionTitleWidth",void 0),Ie.addClass("panellayoutcolumn",[{name:"effectiveWidth:number",isSerializable:!1,minValue:0},{name:"width:number",visible:!1},"questionTitleWidth"],(e=>new ir));class rr extends pt{static getRowId(){return"pr_"+rr.rowCounter++}get allowRendering(){return!this.panel||!this.panel.survey||!this.panel.survey.isLazyRenderingSuspended}startLazyRendering(e,t=ss){if(!oe.isAvailable())return;this._scrollableParent=t(e),this._scrollableParent===oe.getDocumentElement()&&(this._scrollableParent=ae.getWindow());const s=this._scrollableParent.scrollHeight>this._scrollableParent.clientHeight;this.isNeedRender=!s,s&&(this._updateVisibility=()=>{if(this.allowRendering){var t=function(e,t=0){if(void 0===Ps.environment)return!1;const{root:s}=Ps.environment,i=ts(s)?s.host.clientHeight:s.documentElement.clientHeight,r=e.getBoundingClientRect(),n=-t,a=Math.max(i,ae.getInnerHeight())+t,o=r.top,l=r.bottom;return Math.max(n,o)<=Math.min(a,l)}(e,50);!this.isNeedRender&&t&&(this.isNeedRender=!0,this.stopLazyRendering())}},setTimeout((()=>{this._scrollableParent&&this._scrollableParent.addEventListener&&this._scrollableParent.addEventListener("scroll",this._updateVisibility),this.ensureVisibility()}),10))}ensureVisibility(){this._updateVisibility&&this._updateVisibility()}stopLazyRendering(){this._scrollableParent&&this._updateVisibility&&this._scrollableParent.removeEventListener&&this._scrollableParent.removeEventListener("scroll",this._updateVisibility),this._scrollableParent=void 0,this._updateVisibility=void 0}constructor(e){super(),this.panel=e,this._scrollableParent=void 0,this._updateVisibility=void 0,this.visibleElementsAnimation=new Ut(this.getVisibleElementsAnimationOptions(),(e=>{this.setWidth(e),this.setPropertyValue("visibleElements",e)}),(()=>this.visibleElements)),this.idValue=rr.getRowId(),this.visible=e.areInvisibleElementsShowing,this.createNewArray("elements"),this.createNewArray("visibleElements")}setIsLazyRendering(e){this.isLazyRenderingValue=e,this.isNeedRender=!e}isLazyRendering(){return!0===this.isLazyRenderingValue}get id(){return this.idValue}equalsCore(e){return this==e}get elements(){return this.getPropertyValue("elements")}getIsAnimationAllowed(){var e;return super.getIsAnimationAllowed()&&this.visible&&(null===(e=this.panel)||void 0===e?void 0:e.animationAllowed)}getVisibleElementsAnimationOptions(){const e=e=>{xs(e),ws(e,{width:fs(e)+"px"})};return{getRerenderEvent:()=>this.onElementRerendered,isAnimationEnabled:()=>this.animationAllowed,allowSyncRemovalAddition:!1,getAnimatedElement:e=>e.getWrapperElement(),getLeaveOptions:t=>{const s=t;return{cssClass:(t.isPanel?s.cssClasses.panel:s.cssClasses).leave,onBeforeRunAnimation:e,onAfterRunAnimation:Vs}},getEnterOptions:t=>{const s=t;return{cssClass:(t.isPanel?s.cssClasses.panel:s.cssClasses).enter,onBeforeRunAnimation:e,onAfterRunAnimation:Vs}}}}set visibleElements(e){if(!e.length)return this.visible=!1,void this.visibleElementsAnimation.cancel();this.visible=!0,this.visibleElementsAnimation.sync(e)}get visibleElements(){return this.getPropertyValue("visibleElements")}get visible(){return this.getPropertyValue("visible",!0)}set visible(e){this.setPropertyValue("visible",e),this.onVisibleChangedCallback&&this.onVisibleChangedCallback()}get isNeedRender(){return this.getPropertyValue("isneedrender",!0)}set isNeedRender(e){this.setPropertyValue("isneedrender",e)}updateVisible(){for(var e=[],t=0;t-1||(0==n.length?l.renderWidth=`${Number.parseFloat((100/s).toFixed(6))}%`:l.renderWidth=this.getRenderedCalcWidth(l,n,s))}}getRenderedCalcWidth(e,t,s){for(var i="100%",r=0;r1&&(i="("+i+")/"+n.toString()),"calc("+i+")"}getElementWidth(e){var t=e.width;return t&&"string"==typeof t?t.trim():""}getRenderedWidthFromWidth(e){return ue.isNumber(e)?e+"px":e}dispose(){super.dispose(),this.stopLazyRendering()}getRowCss(){return(new Ct).append(this.panel.cssClasses.row).append(this.panel.cssClasses.rowCompact,this.panel.isCompact).append(this.panel.cssClasses.pageRow,this.panel.isPage||this.panel.showPanelAsPage).append(this.panel.cssClasses.rowMultiple,this.visibleElements.length>1).toString()}setRootElement(e){this.rootElement=e}getRootElement(){return this.rootElement}}rr.rowCounter=100;class nr extends Jt{static getPanelId(){return"sp_"+nr.panelCounter++}get gridLayoutColumns(){let e=this.getPropertyValue("gridLayoutColumns");return this._columns||(this.generateColumns([].concat(e)),e=this._columns,this.gridLayoutColumns=e),e}set gridLayoutColumns(e){this.setPropertyValue("gridLayoutColumns",e)}onAddRow(e){this.onRowVisibleChanged(),e.onVisibleChangedCallback=()=>this.onRowVisibleChanged()}getRowsAnimationOptions(){return{getRerenderEvent:()=>this.onElementRerendered,isAnimationEnabled:()=>this.animationAllowed,getAnimatedElement:e=>e.getRootElement(),getLeaveOptions:(e,t)=>({cssClass:this.cssClasses.rowLeave,onBeforeRunAnimation:xs,onAfterRunAnimation:Vs}),getEnterOptions:(e,t)=>{const s=this.cssClasses;return{cssClass:(new Ct).append(s.rowEnter).append(s.rowDelayedEnter,t.isDeletingRunning).toString(),onBeforeRunAnimation:xs,onAfterRunAnimation:Vs}}}}get visibleRows(){return this.getPropertyValue("visibleRows")}set visibleRows(e){this.rowsAnimation.sync(e)}onRemoveRow(e){e.visibleElementsAnimation.cancel(),this.visibleRows=this.rows.filter((e=>e.visible)),e.onVisibleChangedCallback=void 0}onRowVisibleChanged(){this.visibleRows=this.rows.filter((e=>e.visible))}constructor(e=""){super(e),this.isQuestionsReady=!1,this.questionsValue=new Array,this._columns=void 0,this._columnsReady=!1,this.rowsAnimation=new Ut(this.getRowsAnimationOptions(),(e=>{this.setPropertyValue("visibleRows",e)}),(()=>this.visibleRows)),this.isRandomizing=!1,this.onColumnPropertyValueChangedCallback=(e,t,s,i,r)=>{this._columnsReady&&(this.updateColumnWidth(this.gridLayoutColumns),this.updateRootStyle())},this.locCountRowUpdates=0,this.createNewArray("rows",((e,t)=>{this.onAddRow(e)}),(e=>{this.onRemoveRow(e)})),this.createNewArray("visibleRows"),this.createNewArray("gridLayoutColumns",(e=>{e.onPropertyValueChangedCallback=this.onColumnPropertyValueChangedCallback})),this.elementsValue=this.createNewArray("elements",this.onAddElement.bind(this),this.onRemoveElement.bind(this)),this.setPropertyValueDirectly("id",nr.getPanelId()),this.addExpressionProperty("visibleIf",((e,t)=>{this.visible=!0===t}),(e=>!this.areInvisibleElementsShowing)),this.addExpressionProperty("enableIf",((e,t)=>{this.readOnly=!1===t})),this.addExpressionProperty("requiredIf",((e,t)=>{this.isRequired=!0===t})),this.createLocalizableString("requiredErrorText",this),this.createLocalizableString("navigationTitle",this,!0).onGetTextCallback=e=>e||this.title||this.name,this.registerPropertyChangedHandlers(["questionTitleLocation"],(()=>{this.onVisibleChanged.bind(this),this.updateElementCss(!0)})),this.registerPropertyChangedHandlers(["questionStartIndex","showQuestionNumbers"],(()=>{this.updateVisibleIndexes()})),this.registerPropertyChangedHandlers(["title"],(()=>{this.resetHasTextInTitle()}))}getType(){return"panelbase"}setSurveyImpl(e,t){this.blockAnimations(),super.setSurveyImpl(e,t),this.isDesignMode&&this.onVisibleChanged();for(var s=0;s!!this.title))}resetHasTextInTitle(){this.resetPropertyValue("hasTextInTitle")}get hasTitle(){return this.canShowTitle(this.survey)&&(this.hasTextInTitle||this.locTitle.textOrHtml.length>0)||this.isDesignMode&&!this.isPanel&&this.showTitle&&Ps.designMode.showEmptyTitles}delete(e=!0){this.deletePanel(),this.removeFromParent(),e&&this.dispose()}deletePanel(){const e=this.elements;for(let t=0;t{s.push(e),e.getNestedQuestions().forEach((e=>s.push(e)))})),s}getValidName(e){return e?e.trim():e}getQuestionByName(e){for(var t=this.questions,s=0;s0?t[0]:null}getQuestionsByValueName(e){const t=[];for(var s=this.questions,i=0;i0?t-5:0;e<=i;e++){if(e===t)continue;const s=this.questions[e];s.errors.length>0&&s.validate(!1)&&s.validate(!0)}}hasErrorsInPanels(e){var t=[];this.hasRequiredError(e,t),this.survey&&(this.survey.validatePanel(this,t,e.fireCallback),t.length>0&&(e.result=!0)),e.fireCallback&&(this.errors=t)}getErrorCustomText(e,t){return this.survey?this.survey.getSurveyErrorCustomText(this,e,t):e}hasRequiredError(e,t){if(this.isRequired){var s=[];if(this.addQuestionsToList(s,!0),0!=s.length){for(var i=0;i0&&(i=this.getFirstQuestionToFocus(!1,!0),e.firstErrorQuestion||(e.firstErrorQuestion=i)),e.fireCallback&&i&&(i===e.firstErrorQuestion&&e.focusOnFirstError?i.focus(!0):i.expandAllParents())}getContainsErrors(){var e=super.getContainsErrors();if(e)return e;for(var t=this.elements,s=0;s{let s=0,i=!1;t.elements.forEach((e=>{e.width&&(i=!0),s+=e.colSpan||1})),!i&&s>e&&(e=s)})),e}updateColumnWidth(e){let t=0,s=0;if(e.forEach((e=>{e.width?(t+=e.width,e.setPropertyValue("effectiveWidth",e.width)):s++})),s){const r=(i=(100-t)/s,Math.floor(100*i)/100);for(let t=0;te.updateRootStyle()))}updateCustomWidgets(){for(var e=0;ee instanceof nr?e.hasElementWithTitleLocationLeft():e instanceof ti?"left"===e.getTitleLocation():void 0))}getQuestionTitleWidth(){return this.questionTitleWidth||this.parent&&this.parent.getQuestionTitleWidth()}get columns(){return this._columns||(this.generateColumns(this.gridLayoutColumns),this.gridLayoutColumns=this._columns),this._columns||[]}generateColumns(e){var t;const s=null===(t=this.survey)||void 0===t?void 0:t.gridLayoutEnabled;let i=[].concat(e);if(s){let t=this.calcMaxRowColSpan();if(t<=e.length)i=e.slice(0,t);else for(let s=e.length;s{e.isPanel&&e.updateGridColumns()}))}getColumsForElement(e){const t=this.findRowByElement(e);if(!t||!this.survey||!this.survey.gridLayoutEnabled)return[];let s=t.elements.length-1;for(;s>=0&&t.elements[s].getPropertyValueWithoutDefault("colSpan");)s--;const i=t.elements.indexOf(e);let r=0;for(let e=0;e=this.survey.lazyRenderFirstBatchSize||!this.canRenderFirstRows())}createRowAndSetLazy(e){const t=this.createRow();return t.setIsLazyRendering(this.isLazyRenderInRow(e)),t}createRow(){return new rr(this)}onSurveyLoad(){this.blockAnimations(),super.onSurveyLoad();for(var e=0;ee.onFirstRendering()))}updateRows(){this.isLoadingFromJson||(this.getElementsForRows().forEach((e=>{e.isPanel&&e.updateRows()})),this.onRowsChanged())}get rows(){return this.getPropertyValue("rows")}ensureRowsVisibility(){this.rows.forEach((e=>{e.ensureVisibility()}))}onRowsChanged(){this.isLoadingFromJson||(this.blockAnimations(),this.setArrayPropertyDirectly("rows",this.buildRows()),this.updateColumns(),this.releaseAnimations())}blockRowsUpdates(){this.locCountRowUpdates++}releaseRowsUpdates(){this.locCountRowUpdates--}updateRowsBeforeElementRemoved(e){const t=this.findRowByElement(e),s=this.rows.indexOf(t),i=t.elements.indexOf(e);t.elements.splice(i,1),0==t.elements.length?this.rows.splice(s,1):!t.elements[0].startWithNewLine&&this.rows[s-1]?(t.elements.forEach((e=>this.rows[s-1].addElement(e))),this.rows.splice(s,1)):t.updateVisible()}updateRowsOnElementAdded(e){const t=this.elements.indexOf(e),s=this.elements[t+1],i=e=>{const t=this.createRowAndSetLazy(e);return this.isDesignMode&&t.setIsLazyRendering(!1),this.rows.splice(e,0,t),t},r=(e,t,s,...i)=>{const r=e.elements.splice(t,s,...i);return e.updateVisible(),r};if(!s)return void(0==t||e.startWithNewLine?r(i(this.rows.length),0,0,e):this.rows[this.rows.length-1].addElement(e));const n=this.findRowByElement(s);if(!n)return;const a=this.rows.indexOf(n),o=n.elements.indexOf(s);0==o?s.startWithNewLine?e.startWithNewLine||a<1?i(a).addElement(e):this.rows[a-1].addElement(e):r(n,0,0,e):e.startWithNewLine?r(i(a+1),0,0,...[e].concat(r(n,o,n.elements.length))):r(n,o,0,e)}canFireAddRemoveNotifications(e){return!!this.survey&&e.prevSurvey!==this.survey}onAddElement(e,t){const s=this.survey,i=this.canFireAddRemoveNotifications(e);this.surveyImpl&&e.setSurveyImpl(this.surveyImpl),e.parent=this,this.markQuestionListDirty(),this.canBuildRows()&&this.updateRowsOnElementAdded(e),i&&(e.isPanel?s.panelAdded(e,t,this,this.root):s.questionAdded(e,t,this,this.root)),this.addElementCallback&&this.addElementCallback(e),e.registerPropertyChangedHandlers(["visible","isVisible"],(()=>{this.onElementVisibilityChanged(e)}),this.id),e.registerPropertyChangedHandlers(["startWithNewLine"],(()=>{this.onElementStartWithNewLineChanged(e)}),this.id),this.onElementVisibilityChanged(this)}onRemoveElement(e){e.parent=null,this.unregisterElementPropertiesChanged(e),this.markQuestionListDirty(),this.updateRowsOnElementRemoved(e),this.isRandomizing||(this.onRemoveElementNotifySurvey(e),this.removeElementCallback&&this.removeElementCallback(e),this.onElementVisibilityChanged(this))}unregisterElementPropertiesChanged(e){e.unregisterPropertyChangedHandlers(["visible","isVisible","startWithNewLine"],this.id)}onRemoveElementNotifySurvey(e){this.canFireAddRemoveNotifications(e)&&(e.isPanel?this.survey.panelRemoved(e):this.survey.questionRemoved(e))}onElementVisibilityChanged(e){this.isLoadingFromJson||this.isRandomizing||(this.updateRowsVisibility(e),this.childVisibilityChanged(),this.parent&&this.parent.onElementVisibilityChanged(this))}onElementStartWithNewLineChanged(e){this.locCountRowUpdates>0||(this.blockAnimations(),this.updateRowsBeforeElementRemoved(e),this.updateRowsOnElementAdded(e),this.releaseAnimations())}updateRowsVisibility(e){for(var t=this.rows,s=0;s-1){i.updateVisible(),i.visible&&!i.isNeedRender&&(i.isNeedRender=!0);break}}}canBuildRows(){return!this.isLoadingFromJson&&"row"==this.getChildrenLayoutType()}buildRows(){if(!this.canBuildRows())return[];const e=new Array,t=this.getElementsForRows();for(let s=0;se.updateVisible())),e}getElementsForRows(){return this.elements}getDragDropInfo(){const e=this.getPage(this.parent);return e?e.getDragDropInfo():void 0}updateRowsOnElementRemoved(e){this.canBuildRows()&&(this.updateRowsRemoveElementFromRow(e,this.findRowByElement(e)),this.updateColumns())}updateRowsRemoveElementFromRow(e,t){if(t&&t.panel){var s=t.elements.indexOf(e);s<0||(t.elements.splice(s,1),t.elements.length>0?(this.blockRowsUpdates(),t.elements[0].startWithNewLine=!0,this.releaseRowsUpdates(),t.updateVisible()):t.index>=0&&t.panel.rows.splice(t.index,1))}}getAllRows(){const e=[];return this.rows.forEach((t=>{const s=[];t.elements.forEach((e=>{e.isPanel?s.push(...e.getAllRows()):"paneldynamic"==e.getType()&&(this.isDesignMode?s.push(...e.template.getAllRows()):e.panels.forEach((e=>s.push(...e.getAllRows()))))})),e.push(t),e.push(...s)})),e}findRowAndIndexByElement(e,t){if(!e)return{row:void 0,index:this.rows.length-1};t=t||this.rows;for(var s=0;s-1)return{row:t[s],index:s};return{row:null,index:-1}}forceRenderRow(e){e&&!e.isNeedRender&&(e.isNeedRender=!0,e.stopLazyRendering())}forceRenderElement(e,t=()=>{},s=0){const i=this.getAllRows(),{row:r,index:n}=this.findRowAndIndexByElement(e,i);if(n>=0&&n=n-s&&t>=0;t--)e.push(i[t]);this.forceRenderRows(e,t)}}forceRenderRows(e,t=()=>{}){const s=(i=e.length,()=>{--i<=0&&t()});var i;e.forEach((e=>new Kt(e.visibleElements,s))),e.forEach((e=>this.forceRenderRow(e)))}findRowByElement(e){return this.findRowAndIndexByElement(e).row}elementWidthChanged(e){if(!this.isLoadingFromJson){var t=this.findRowByElement(e);t&&t.updateVisible()}}get processedTitle(){return this.getRenderedTitle(this.locTitle.textOrHtml)}getRenderedTitle(e){return null!=this.textProcessor?this.textProcessor.processText(e,!0):e}get visible(){return this.getPropertyValue("visible",!0)}set visible(e){e!==this.visible&&(this.setPropertyValue("visible",e),this.setPropertyValue("isVisible",this.isVisible),this.isLoadingFromJson||this.onVisibleChanged())}onHidingContent(){this.questions.forEach((e=>e.onHidingContent()))}onVisibleChanged(){if(!this.isRandomizing&&(this.setPropertyValue("isVisible",this.isVisible),this.survey&&"none"!==this.survey.getQuestionClearIfInvisible("default")&&!this.isLoadingFromJson)){const t=this.questions,s=this.isVisible;for(var e=0;ee.onHidingContent()))}get isVisible(){return this.areInvisibleElementsShowing||this.getIsPageVisible(null)}getIsContentVisible(e){if(this.areInvisibleElementsShowing)return!0;for(var t=0;t=this.elements.length?this.elements.push(e):this.elements.splice(t,0,e),this.wasRendered&&e.onFirstRendering(),this.updateColumns(),!0)}insertElement(e,t,s="bottom"){if(!t)return void this.addElement(e);this.blockRowsUpdates();let i=this.elements.indexOf(t);const r=this.findRowByElement(t);"left"==s||"right"==s?"right"==s?(e.startWithNewLine=!1,i++):0==r.elements.indexOf(t)?(t.startWithNewLine=!1,e.startWithNewLine=!0):e.startWithNewLine=!1:(e.startWithNewLine=!0,i="top"==s?this.elements.indexOf(r.elements[0]):this.elements.indexOf(r.elements[r.elements.length-1])+1),this.releaseRowsUpdates(),this.addElement(e,i)}insertElementAfter(e,t){const s=this.elements.indexOf(t);s>=0&&this.addElement(e,s+1)}insertElementBefore(e,t){const s=this.elements.indexOf(t);s>=0&&this.addElement(e,s)}canAddElement(e){return!!e&&e.isLayoutTypeSupported(this.getChildrenLayoutType())}addQuestion(e,t=-1){return this.addElement(e,t)}addPanel(e,t=-1){return this.addElement(e,t)}addNewQuestion(e,t=null,s=-1){var i=wi.Instance.createQuestion(e,t);return this.addQuestion(i,s)?i:null}addNewPanel(e=null){var t=this.createNewPanel(e);return this.addPanel(t)?t:null}indexOf(e){return this.elements.indexOf(e)}createNewPanel(e){var t=Ie.createClass("panel");return t.name=e,t}removeElement(e){var t=this.elements.indexOf(e);if(t<0){for(var s=0;s{t.needResponsiveWidth()&&(e=!0)})),this.rows.forEach((t=>{t.elements.length>1&&(e=!0)})),e}get hasDescriptionUnderTitle(){return this.hasDescription}get cssHeader(){return this.cssClasses.panel.header}get cssDescription(){return this.cssClasses.panel.description}get questionErrorLocation(){return this.getPropertyValue("questionErrorLocation")}set questionErrorLocation(e){this.setPropertyValue("questionErrorLocation",e)}getQuestionErrorLocation(){return"default"!==this.questionErrorLocation?this.questionErrorLocation:this.parent?this.parent.getQuestionErrorLocation():this.survey?this.survey.questionErrorLocation:"top"}getTitleOwner(){return this}get no(){return""}get cssTitleNumber(){return this.cssClasses.panel.number}get cssRequiredMark(){return this.cssClasses.panel.requiredMark}get cssError(){return this.getCssError(this.cssClasses)}getCssError(e){return(new Ct).append(e.error.root).toString()}getSerializableColumnsValue(){let e=-1;for(let t=this.gridLayoutColumns.length-1;t>=0;t--)if(!this.gridLayoutColumns[t].isEmpty()){e=t;break}return this.gridLayoutColumns.slice(0,e+1)}afterRender(e){this.afterRenderCore(e)}dispose(){if(super.dispose(),this.rows){for(let e=0;e{this.parent&&this.parent.elementWidthChanged(this)})),this.registerPropertyChangedHandlers(["indent","innerIndent","rightIndent"],(()=>{this.resetIndents()})),this.registerPropertyChangedHandlers(["colSpan"],(()=>{var e;null===(e=this.parent)||void 0===e||e.updateColumns()}))}getType(){return"panel"}get contentId(){return this.id+"_content"}getSurvey(e=!1){return e&&this.isPanel?this.parent?this.parent.getSurvey(e):null:super.getSurvey(e)}get isPanel(){return!0}get page(){return this.getPage(this.parent)}set page(e){this.setPage(this.parent,e)}removeFromParent(){this.parent&&this.removeSelfFromList(this.parent.elements)}moveTo(e,t=null){return this.moveToBase(this.parent,e,t)}get visibleIndex(){return this.getPropertyValue("visibleIndex",-1)}get showNumber(){return this.getPropertyValue("showNumber")}set showNumber(e){this.setPropertyValue("showNumber",e),this.notifySurveyOnVisibilityChanged()}addNoFromChild(e){return this.isQuestionIndexRecursive?this.calcNo()+e:super.addNoFromChild(e)}get showQuestionNumbers(){return this.getPropertyValue("showQuestionNumbers")}set showQuestionNumbers(e){this.setPropertyValue("showQuestionNumbers",e),this.notifySurveyOnVisibilityChanged()}get questionStartIndex(){return this.getPropertyValue("questionStartIndex","")}set questionStartIndex(e){this.setPropertyValue("questionStartIndex",e)}getQuestionStartIndex(){return this.questionStartIndex?this.questionStartIndex:super.getQuestionStartIndex()}get no(){return this.getPropertyValue("no",void 0,(()=>this.calcNo()))}calcNo(){let e=ue.getNumberByIndex(this.visibleIndex,this.getStartIndex());return this.parent&&(e=this.parent.addNoFromChild(e)),this.survey&&(e=this.survey.getUpdatedPanelNo(this,e)),e||""}notifyStateChanged(e){this.isLoadingFromJson||this.locTitle.strChanged(),super.notifyStateChanged(e)}createLocTitleProperty(){const e=super.createLocTitleProperty();return e.onGetTextCallback=e=>(e||"default"===this.state||(e=this.name),e),e}beforeSetVisibleIndex(e){if(this.isPage)return super.beforeSetVisibleIndex(e);let t=-1;return!this.showNumber&&!this.isQuestionIndexRecursive||!this.isDesignMode&&this.locTitle.isEmpty&&!this.hasParentInQuestionIndex()||(t=e),this.setPropertyValue("visibleIndex",t),this.resetPropertyValue("no"),t<0?0:1}getPanelStartIndex(e){return"off"===this.showQuestionNumbers?-1:this.isQuestionIndexOnPanel?0:e}get isQuestionIndexOnPanel(){return"onpanel"===this.showQuestionNumbers||this.isQuestionIndexRecursive}get isQuestionIndexRecursive(){if(this.isPage)return!1;const e=this.showQuestionNumbers;return"default"!==e?"recursive"===e:!!this.survey&&"recursive"===this.survey.showQuestionNumbers}hasParentInQuestionIndex(){if(!this.isQuestionIndexOnPanel)return!1;const e=this.questionStartIndex,t=e.indexOf(".");return t>-1&&tthis.getIndentSize(this.innerIndent)))}set innerPaddingLeft(e){this.setPropertyValue("innerPaddingLeft",e)}calcPaddingLeft(){return this.getIndentSize(this.indent)}calcPaddingRight(){return this.getIndentSize(this.rightIndent)}resetIndents(){this.resetPropertyValue("innerPaddingLeft"),super.resetIndents()}getIndentSize(e){if(this.survey){if(e<1)return"";var t=this.survey.css;return t&&t.question&&t.question.indent?e*t.question.indent+"px":""}}clearOnDeletingContainer(){this.elements.forEach((e=>{(e instanceof ti||e instanceof ar)&&e.clearOnDeletingContainer()}))}get footerActions(){return this.getPropertyValue("footerActions")}getFooterToolbar(){var e,t;if(!this.footerToolbarValue){var s=this.footerActions;this.hasEditButton&&s.push({id:"cancel-preview",locTitle:this.survey.locEditText,innerCss:this.survey.cssNavigationEdit,component:"sv-nav-btn",action:()=>{this.cancelPreview()}}),s=this.onGetFooterActionsCallback?this.onGetFooterActionsCallback():null===(e=this.survey)||void 0===e?void 0:e.getUpdatedPanelFooterActions(this,s),this.footerToolbarValue=this.createActionContainer(this.allowAdaptiveActions);let i=this.onGetFooterToolbarCssCallback?this.onGetFooterToolbarCssCallback():"";i||(i=null===(t=this.cssClasses.panel)||void 0===t?void 0:t.footer),i&&(this.footerToolbarValue.containerCss=i),this.footerToolbarValue.setItems(s)}return this.footerToolbarValue}get hasEditButton(){return!1}cancelPreview(){this.hasEditButton&&this.survey.cancelPreviewByPage(this)}get cssTitle(){return this.getCssPanelTitle()}getCssPanelTitle(){return this.getCssTitle(this.cssClasses.panel)}getCssTitleExpandableSvg(){return"default"===this.state?null:this.cssClasses.panel.titleExpandableSvg}get showErrorsAbovePanel(){return this.isDefaultV2Theme&&!this.showPanelAsPage}getCssError(e){if(this.isPage)return super.getCssError(e);const t=(new Ct).append(super.getCssError(e)).append(e.panel.errorsContainer);return t.append("panel-error-root",t.isEmpty()).toString()}onVisibleChanged(){super.onVisibleChanged(),this.notifySurveyOnVisibilityChanged()}needResponsiveWidth(){return!this.startWithNewLine||super.needResponsiveWidth()}focusIn(){this.survey&&this.survey.whenPanelFocusIn(this)}getHasFrameV2(){return super.getHasFrameV2()&&!this.showPanelAsPage}getIsNested(){return super.getIsNested()&&void 0!==this.parent}get showPanelAsPage(){return!1}expand(e=!0){this.forcusFirstQuestionOnExpand=e,super.expand()}onElementExpanded(e){if(this.forcusFirstQuestionOnExpand&&null!=this.survey&&!this.isLoadingFromJson){const t=this.getFirstQuestionToFocus(!1);t&&setTimeout((()=>{!this.isDisposed&&this.survey&&this.survey.scrollElementToTop(t,t,null,t.inputId,!1,{behavior:"smooth"})}),e?0:15)}}getCssRoot(e){return(new Ct).append(super.getCssRoot(e)).append(e.container).append(e.asPage,this.showPanelAsPage).append(e.invisible,!this.isDesignMode&&this.areInvisibleElementsShowing&&!this.visible).toString()}getContainerCss(){return this.getCssRoot(this.cssClasses.panel)}afterRenderCore(e){var t;super.afterRenderCore(e),this.isPanel&&(null===(t=this.survey)||void 0===t||t.afterRenderPanel(this,e))}}Ie.addClass("panelbase",["name",{name:"elements",alternativeName:"questions",baseClassName:"question",visible:!1,isLightSerializable:!1},{name:"visible:switch",default:!0,overridingProperty:"visibleIf"},{name:"readOnly:boolean",overridingProperty:"enableIf"},"visibleIf:condition","enableIf:condition","requiredIf:condition",{name:"questionTitleWidth",visibleIf:function(e){return!!e&&e.availableQuestionTitleWidth()}},{name:"questionTitleLocation",default:"default",choices:["default","top","bottom","left","hidden"]},{name:"gridLayoutColumns:panellayoutcolumns",className:"panellayoutcolumn",isArray:!0,onSerializeValue:e=>e.getSerializableColumnsValue(),visibleIf:function(e){return!!e&&!!e.survey&&e.survey.gridLayoutEnabled}},{name:"title:text",serializationProperty:"locTitle"},{name:"description:text",serializationProperty:"locDescription"},{name:"questionOrder",alternativeName:"questionsOrder",default:"default",choices:["default","initial","random"]},{name:"questionErrorLocation",default:"default",choices:["default","top","bottom"]}],(function(){return new nr})),Ie.addClass("panel",[{name:"state",default:"default",choices:["default","collapsed","expanded"]},{name:"isRequired:switch",overridingProperty:"requiredIf"},{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},{name:"startWithNewLine:boolean",default:!0},{name:"width"},{name:"minWidth",defaultFunc:()=>"auto"},{name:"maxWidth",defaultFunc:()=>Ps.maxWidth},{name:"colSpan:number",visible:!1,onSerializeValue:e=>e.getPropertyValue("colSpan")},{name:"effectiveColSpan:number",minValue:1,isSerializable:!1,visibleIf:function(e){return!!e.survey&&e.survey.gridLayoutEnabled}},{name:"innerIndent:number",default:0,choices:[0,1,2,3]},{name:"indent:number",default:0,choices:[0,1,2,3],visible:!1},{name:"page",isSerializable:!1,visibleIf:function(e){var t=e?e.survey:null;return!t||!t.pages||t.pages.length>1},choices:function(e){var t=e?e.survey:null;return t?t.pages.map((e=>({value:e.name,text:e.title}))):[]}},{name:"showNumber:boolean"},{name:"showQuestionNumbers",default:"default",choices:["default","onpanel","recursive","off"]},{name:"questionStartIndex",visibleIf:e=>e.isPanel},{name:"allowAdaptiveActions:boolean",default:!0,visible:!1}],(function(){return new ar}),"panelbase"),xi.Instance.registerElement("panel",(e=>new ar(e)));class or extends ar{constructor(e=""){super(e),this.hasShownValue=!1,this.timeSpent=0,this._isReadyForClean=!0,this.createLocalizableString("navigationDescription",this,!0)}getType(){return"page"}toString(){return this.name}get isPage(){return!this.isPanel}get isPanel(){return!!this.parent}get showPanelAsPage(){return!0}get hasEditButton(){return this.isPanel&&this.survey&&"preview"===this.survey.state&&!!this.parent&&!this.parent.isPanel}getElementsForRows(){var e;if(!this.isStartPage){const t=null===(e=this.survey)||void 0===e?void 0:e.currentSingleElement;if(t)return t.page===this?[t]:[]}return super.getElementsForRows()}disposeElements(){this.isPageContainer||super.disposeElements()}onRemoveElement(e){this.isPageContainer?(e.parent=null,this.unregisterElementPropertiesChanged(e)):super.onRemoveElement(e)}getTemplate(){return this.isPanel?"panel":super.getTemplate()}get no(){if(!this.canShowPageNumber()||!this.survey)return"";let e=this.isStartPage?"":this.num+". ";return this.survey.getUpdatedPageNo(this,e)}get cssTitleNumber(){return this.isPanel?this.cssClasses.panel.number:this.cssClasses.page.number}getCssTitleExpandableSvg(){return null}get cssRequiredMark(){return""}canShowPageNumber(){return this.survey&&this.survey.showPageNumbers}canShowTitle(e){return!e||e.showPageTitles}setTitleValue(e){super.setTitleValue(e),this.navigationLocStrChanged()}get navigationTitle(){return this.getLocalizableStringText("navigationTitle")}set navigationTitle(e){this.setLocalizableStringText("navigationTitle",e)}get navigationDescription(){return this.getLocalizableStringText("navigationDescription")}set navigationDescription(e){this.setLocalizableStringText("navigationDescription",e)}get locNavigationDescription(){return this.getLocalizableString("navigationDescription")}navigationLocStrChanged(){this.locNavigationTitle.isEmpty&&this.locTitle.strChanged(),this.locNavigationTitle.strChanged(),this.locNavigationDescription.strChanged()}getMarkdownHtml(e,t,s){const i=super.getMarkdownHtml(e,t,s);return"navigationTitle"===t&&this.canShowPageNumber()&&i?this.num+". "+i:i}get passed(){return this.getPropertyValue("passed",!1)}set passed(e){this.setPropertyValue("passed",e)}removeFromParent(){this.survey&&this.removeSelfFromList(this.survey.pages)}get visibleIndex(){return this.getPropertyValue("visibleIndex",-1)}set visibleIndex(e){this.setPropertyValue("visibleIndex",e)}canRenderFirstRows(){return!this.isDesignMode||0==this.visibleIndex}get isStartPage(){return this.survey&&this.survey.isPageStarted(this)}get isStarted(){return this.isStartPage}calcCssClasses(e){if(this.isPanel)return super.calcCssClasses(e);const t={page:{},error:{},pageTitle:"",pageDescription:"",row:"",rowMultiple:"",pageRow:"",rowCompact:"",rowEnter:"",rowLeave:"",rowDelayedEnter:"",rowReplace:""};return this.copyCssClasses(t.page,e.page),this.copyCssClasses(t.error,e.error),e.pageTitle&&(t.pageTitle=e.pageTitle),e.pageDescription&&(t.pageDescription=e.pageDescription),e.row&&(t.row=e.row),e.pageRow&&(t.pageRow=e.pageRow),e.rowMultiple&&(t.rowMultiple=e.rowMultiple),e.rowCompact&&(t.rowCompact=e.rowCompact),e.rowEnter&&(t.rowEnter=e.rowEnter),e.rowDelayedEnter&&(t.rowDelayedEnter=e.rowDelayedEnter),e.rowLeave&&(t.rowLeave=e.rowLeave),e.rowReplace&&(t.rowReplace=e.rowReplace),this.survey&&this.survey.updatePageCssClasses(this,t),t}getCssPanelTitle(){return this.isPanel?super.getCssPanelTitle():this.cssClasses.page?(new Ct).append(this.cssClasses.page.title).toString():""}get cssRoot(){return!this.isPanel&&this.cssClasses.page&&this.survey?(new Ct).append(this.cssClasses.page.root).append(this.cssClasses.page.emptyHeaderRoot,!(this.survey.renderedHasHeader||this.survey.isShowProgressBarOnTop&&!this.survey.isStaring)).toString():""}getCssError(e){return this.isPanel?super.getCssError(e):(new Ct).append(super.getCssError(e)).append(e.page.errorsContainer).toString()}get navigationButtonsVisibility(){const e=this.showNavigationButtons;return null==e?"inherit":e?"show":"hide"}set navigationButtonsVisibility(e){"string"==typeof e&&(e=e.toLowerCase()),this.showNavigationButtons=e}get showNavigationButtons(){return this.getPropertyValue("showNavigationButtons",void 0)}set showNavigationButtons(e){this.setShowNavigationButtonsProperty(e)}setShowNavigationButtonsProperty(e){!0===e||!1===e?this.setPropertyValue("showNavigationButtons",e):"show"===e?this.setPropertyValue("showNavigationButtons",!0):"hide"===e?this.setPropertyValue("showNavigationButtons",!1):this.setPropertyValue("showNavigationButtons",void 0)}get isActive(){return!!this.survey&&this.survey.currentPage===this}get wasShown(){return this.hasShownValue}get hasShown(){return this.wasShown}setWasShown(e){var t;if(e!=this.hasShownValue&&(this.hasShownValue=e,!this.isDesignMode&&!0===e)){for(var s=this.elements,i=0;i0?e:0}onNumChanged(e){}onVisibleChanged(){this.isRandomizing||(super.onVisibleChanged(),null!=this.survey&&this.survey.pageVisibilityChanged(this,this.isVisible))}ensureRowsVisibility(){super.ensureRowsVisibility(),this.getPanels().forEach((e=>e.ensureRowsVisibility()))}get isReadyForClean(){return this._isReadyForClean}set isReadyForClean(e){const t=this._isReadyForClean;this._isReadyForClean=e,this._isReadyForClean!==t&&this.isReadyForCleanChangedCallback&&this.isReadyForCleanChangedCallback()}enableOnElementRerenderedEvent(){super.enableOnElementRerenderedEvent(),this.isReadyForClean=!1}disableOnElementRerenderedEvent(){super.disableOnElementRerenderedEvent(),this.isReadyForClean=!0}}ft([pe({defaultValue:-1,onSet:(e,t)=>t.onNumChanged(e)})],or.prototype,"num",void 0),Ie.addClass("page",[{name:"showNavigationButtons:boolean",defaultFunc:()=>{},onSetValue:function(e,t){e&&e.setShowNavigationButtonsProperty(t)},alternativeName:"navigationButtonsVisibility"},{name:"timeLimit:number",alternativeName:"maxTimeToFinish",default:0,minValue:0,visibleIf:e=>!!e.survey&&e.survey.showTimer},{name:"navigationTitle",serializationProperty:"locNavigationTitle"},{name:"navigationDescription",visibleIf:function(e){return!!e.survey&&"buttons"===e.survey.progressBarType},serializationProperty:"locNavigationDescription"},{name:"title:text",serializationProperty:"locTitle"},{name:"description:text",serializationProperty:"locDescription"},{name:"state",visible:!1},{name:"isRequired",visible:!1},{name:"startWithNewLine",visible:!1},{name:"width",visible:!1},{name:"minWidth",visible:!1},{name:"maxWidth",visible:!1},{name:"colSpan",visible:!1,isSerializable:!1},{name:"effectiveColSpan:number",visible:!1,isSerializable:!1},{name:"innerIndent",visible:!1},{name:"indent",visible:!1},{name:"page",visible:!1,isSerializable:!1},{name:"showNumber",visible:!1},{name:"showQuestionNumbers",visible:!1},{name:"questionStartIndex",visible:!1},{name:"allowAdaptiveActions",visible:!1},{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText",visible:!1}],(function(){return new or}),"panel");class lr extends pt{constructor(e){super(),this.survey=e,this.onResize=this.addEvent()}isListElementClickable(e){return!(this.survey.onServerValidateQuestions&&!this.survey.onServerValidateQuestions.isEmpty&&"onComplete"!==this.survey.checkErrorsMode)||e<=this.survey.currentPageNo+1}getRootCss(e="center"){let t=this.survey.css.progressButtonsContainerCenter;return this.survey.css.progressButtonsRoot&&(t+=" "+this.survey.css.progressButtonsRoot+" "+this.survey.css.progressButtonsRoot+"--"+(-1!==["footer","contentBottom"].indexOf(e)?"bottom":"top"),t+=" "+this.survey.css.progressButtonsRoot+"--"+(this.showItemTitles?"with-titles":"no-titles")),this.showItemNumbers&&this.survey.css.progressButtonsNumbered&&(t+=" "+this.survey.css.progressButtonsNumbered),this.isFitToSurveyWidth&&(t+=" "+this.survey.css.progressButtonsFitSurveyWidth),t}getListElementCss(e){if(!(e>=this.survey.visiblePages.length))return(new Ct).append(this.survey.css.progressButtonsListElementPassed,this.survey.visiblePages[e].passed).append(this.survey.css.progressButtonsListElementCurrent,this.survey.currentPageNo===e).append(this.survey.css.progressButtonsListElementNonClickable,!this.isListElementClickable(e)).toString()}getScrollButtonCss(e,t){return(new Ct).append(this.survey.css.progressButtonsImageButtonLeft,t).append(this.survey.css.progressButtonsImageButtonRight,!t).append(this.survey.css.progressButtonsImageButtonHidden,!e).toString()}clickListElement(e){e instanceof or||(e=this.survey.visiblePages[e]),this.survey.tryNavigateToPage(e)}isListContainerHasScroller(e){const t=e.querySelector("."+this.survey.css.progressButtonsListContainer);return!!t&&t.scrollWidth>t.offsetWidth}isCanShowItemTitles(e){const t=e.querySelector("ul");if(!t||t.children.length<2)return!0;if(t.clientWidth>t.parentElement.clientWidth)return!1;const s=t.children[0].clientWidth;for(let e=0;e5)return!1;return!0}clearConnectorsWidth(e){const t=e.querySelectorAll(".sd-progress-buttons__connector");for(let e=0;ethis.survey.getProgressText()))}resetProgressText(){this.resetPropertyValue("progressText")}processResponsiveness(e){this.onResize.fire(this,{width:e})}}class ur{constructor(e,t,s){this.model=e,this.element=t,this.viewModel=s,this.criticalProperties=["progressBarType","progressBarShowPageTitles"],this.canShowItemTitles=!0,this.processResponsiveness=(e,t)=>{if(this.viewModel.onUpdateScroller(e.isListContainerHasScroller(this.element)),this.model.clearConnectorsWidth(this.element),e.showItemTitles){if(e.survey.isMobile)return this.prevWidth=t.width,this.canShowItemTitles=!1,this.model.adjustConnectors(this.element),void this.viewModel.onResize(this.canShowItemTitles);void 0!==this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{(void 0===this.prevWidth||this.prevWidtht.width&&this.canShowItemTitles)&&(this.prevWidth=t.width,this.canShowItemTitles=e.isCanShowItemTitles(this.element),this.viewModel.onResize(this.canShowItemTitles),this.timer=void 0)}),10)}else this.model.adjustConnectors(this.element)},this.model.survey.registerFunctionOnPropertiesValueChanged(this.criticalProperties,(()=>this.forceUpdate()),"ProgressButtonsResponsivityManager"+this.viewModel.container),this.model.onResize.add(this.processResponsiveness),this.forceUpdate()}forceUpdate(){this.viewModel.onUpdateSettings(),this.processResponsiveness(this.model,{})}dispose(){clearTimeout(this.timer),this.model.onResize.remove(this.processResponsiveness),this.model.survey.unRegisterFunctionOnPropertiesValueChanged(this.criticalProperties,"ProgressButtonsResponsivityManager"+this.viewModel.container),this.element=void 0,this.model=void 0}}function dr(e){if(e.parentQuestion)return dr(e.parentQuestion);let t=e.parent;for(;t&&"page"!==t.getType()&&t.parent;)t=t.parent;return t&&"page"===t.getType()?t:null}function hr(e,t){var s=cr(e,t);var i=new Et({items:s,searchEnabled:!1,locOwner:e});i.allowSelection=!1;const r=(e,t)=>{i.selectedItem=!!e&&i.actions.filter((t=>t.id===e.name))[0]||t};return r(e.currentPage,s[0]),e.onCurrentPageChanged.add(((t,s)=>{r(e.currentPage)})),e.onFocusInQuestion.add(((e,t)=>{r(dr(t.question))})),e.registerFunctionOnPropertyValueChanged("pages",(()=>{i.setItems(cr(e,t))}),"toc"),i}function cr(e,t){return(e.pages||[]).map((s=>new Nt({id:s.name,locTitle:s.locNavigationTitle,action:()=>{if(oe.activeElementBlur(),t&&t(),s.isPage)return e.tryNavigateToPage(s)},visible:new ct((()=>s.isVisible&&!s.isStartPage))})))}class pr{constructor(e){this.survey=e,this.icon="icon-navmenu_24x24",this.togglePopup=()=>{this.popupModel.toggleVisibility()},this.listModel=hr(e,(()=>{this.popupModel.isVisible=!1})),this.popupModel=new At("sv-list",{model:this.listModel}),this.popupModel.overlayDisplayMode="tablet-dropdown-overlay",this.popupModel.displayMode=new ct((()=>this.isMobile?"overlay":"popup")),pr.StickyPosition&&(e.onAfterRenderSurvey.add(((e,t)=>this.initStickyTOCSubscriptions(t.htmlElement))),this.initStickyTOCSubscriptions(e.rootElement))}initStickyTOCSubscriptions(e){pr.StickyPosition&&e&&(e.addEventListener("scroll",(t=>{this.updateStickyTOCSize(e)})),this.updateStickyTOCSize(e))}updateStickyTOCSize(e){if(!e)return;const t=e.querySelector("."+pr.RootStyle);if(t&&(t.style.height="",!this.isMobile&&pr.StickyPosition&&e)){const s=e.getBoundingClientRect().height,i="advanced"===this.survey.headerView?".sv-header":".sv_custom_header+div div."+(this.survey.css.title||"sd-title"),r=e.querySelector(i),n=r?r.getBoundingClientRect().height:0,a=e.scrollTop>n?0:n-e.scrollTop;t.style.height=s-a-1+"px"}}get isMobile(){return this.survey.isMobile}get containerCss(){return function(e,t=!1){let s=pr.RootStyle;return t?s+" "+pr.RootStyle+"--mobile":(s+=" "+pr.RootStyle+"--"+(e.tocLocation||"").toLowerCase(),pr.StickyPosition&&(s+=" "+pr.RootStyle+"--sticky"),s)}(this.survey,this.isMobile)}dispose(){this.survey.unRegisterFunctionOnPropertyValueChanged("pages","toc"),this.popupModel.dispose(),this.listModel.dispose()}}pr.RootStyle="sv_progress-toc",pr.StickyPosition=!0;class mr extends Zt{get platformName(){return mr.platform}get commentSuffix(){return Ps.commentSuffix}set commentSuffix(e){Ps.commentSuffix=e}get commentPrefix(){return this.commentSuffix}set commentPrefix(e){this.commentSuffix=e}constructor(e=null,t=null){super(),this.valuesHash={},this.variablesHash={},this.onTriggerExecuted=this.addEvent(),this.onCompleting=this.addEvent(),this.onComplete=this.addEvent(),this.onShowingPreview=this.addEvent(),this.onNavigateToUrl=this.addEvent(),this.onStarted=this.addEvent(),this.onPartialSend=this.addEvent(),this.onCurrentPageChanging=this.addEvent(),this.onCurrentPageChanged=this.addEvent(),this.onValueChanging=this.addEvent(),this.onValueChanged=this.addEvent(),this.onVariableChanged=this.addEvent(),this.onQuestionVisibleChanged=this.addEvent(),this.onVisibleChanged=this.onQuestionVisibleChanged,this.onPageVisibleChanged=this.addEvent(),this.onPanelVisibleChanged=this.addEvent(),this.onQuestionCreated=this.addEvent(),this.onQuestionAdded=this.addEvent(),this.onQuestionRemoved=this.addEvent(),this.onPanelAdded=this.addEvent(),this.onPanelRemoved=this.addEvent(),this.onPageAdded=this.addEvent(),this.onValidateQuestion=this.addEvent(),this.onSettingQuestionErrors=this.addEvent(),this.onServerValidateQuestions=this.addEvent(),this.onValidatePanel=this.addEvent(),this.onErrorCustomText=this.addEvent(),this.onValidatePage=this.addEvent(),this.onValidatedErrorsOnCurrentPage=this.onValidatePage,this.onProcessHtml=this.addEvent(),this.onGetQuestionDisplayValue=this.addEvent(),this.onGetQuestionTitle=this.addEvent(),this.onGetTitleTagName=this.addEvent(),this.onGetQuestionNumber=this.addEvent(),this.onGetQuestionNo=this.onGetQuestionNumber,this.onGetPanelNumber=this.addEvent(),this.onGetPageNumber=this.addEvent(),this.onGetProgressText=this.addEvent(),this.onProgressText=this.onGetProgressText,this.onTextMarkdown=this.addEvent(),this.onTextRenderAs=this.addEvent(),this.onSendResult=this.addEvent(),this.onGetResult=this.addEvent(),this.onOpenFileChooser=this.addEvent(),this.onUploadFiles=this.addEvent(),this.onDownloadFile=this.addEvent(),this.onClearFiles=this.addEvent(),this.onChoicesLoaded=this.addEvent(),this.onLoadChoicesFromServer=this.onChoicesLoaded,this.onLoadedSurveyFromService=this.addEvent(),this.onProcessDynamicText=this.addEvent(),this.onProcessTextValue=this.onProcessDynamicText,this.onUpdateQuestionCssClasses=this.addEvent(),this.onUpdatePanelCssClasses=this.addEvent(),this.onUpdatePageCssClasses=this.addEvent(),this.onUpdateChoiceItemCss=this.addEvent(),this.onAfterRenderSurvey=this.addEvent(),this.onAfterRenderHeader=this.addEvent(),this.onAfterRenderPage=this.addEvent(),this.onAfterRenderQuestion=this.addEvent(),this.onAfterRenderQuestionInput=this.addEvent(),this.onAfterRenderPanel=this.addEvent(),this.onFocusInQuestion=this.addEvent(),this.onFocusInPanel=this.addEvent(),this.onShowingChoiceItem=this.addEvent(),this.onChoicesLazyLoad=this.addEvent(),this.onChoicesSearch=this.addEvent(),this.onGetChoiceDisplayValue=this.addEvent(),this.onMatrixRowAdded=this.addEvent(),this.onMatrixRowAdding=this.addEvent(),this.onMatrixBeforeRowAdded=this.onMatrixRowAdding,this.onMatrixRowRemoving=this.addEvent(),this.onMatrixRowRemoved=this.addEvent(),this.onMatrixRenderRemoveButton=this.addEvent(),this.onMatrixAllowRemoveRow=this.onMatrixRenderRemoveButton,this.onMatrixDetailPanelVisibleChanged=this.addEvent(),this.onMatrixCellCreating=this.addEvent(),this.onMatrixCellCreated=this.addEvent(),this.onAfterRenderMatrixCell=this.addEvent(),this.onMatrixAfterCellRender=this.onAfterRenderMatrixCell,this.onMatrixCellValueChanged=this.addEvent(),this.onMatrixCellValueChanging=this.addEvent(),this.onMatrixCellValidate=this.addEvent(),this.onMatrixColumnAdded=this.addEvent(),this.onMultipleTextItemAdded=this.addEvent(),this.onDynamicPanelAdded=this.addEvent(),this.onDynamicPanelRemoved=this.addEvent(),this.onDynamicPanelRemoving=this.addEvent(),this.onTimerTick=this.addEvent(),this.onTimer=this.onTimerTick,this.onTimerPanelInfoText=this.addEvent(),this.onDynamicPanelValueChanged=this.addEvent(),this.onDynamicPanelItemValueChanged=this.onDynamicPanelValueChanged,this.onDynamicPanelValueChanging=this.addEvent(),this.onGetDynamicPanelTabTitle=this.addEvent(),this.onDynamicPanelCurrentIndexChanged=this.addEvent(),this.onCheckAnswerCorrect=this.addEvent(),this.onIsAnswerCorrect=this.onCheckAnswerCorrect,this.onDragDropAllow=this.addEvent(),this.onScrollToTop=this.addEvent(),this.onScrollingElementToTop=this.onScrollToTop,this.onLocaleChangedEvent=this.addEvent(),this.onGetQuestionTitleActions=this.addEvent(),this.onGetPanelTitleActions=this.addEvent(),this.onGetPageTitleActions=this.addEvent(),this.onGetPanelFooterActions=this.addEvent(),this.onGetMatrixRowActions=this.addEvent(),this.onElementContentVisibilityChanged=this.addEvent(),this.onGetExpressionDisplayValue=this.addEvent(),this.onPopupVisibleChanged=this.addEvent(),this.onOpenDropdownMenu=this.addEvent(),this.onElementWrapperComponentName=this.addEvent(),this.onElementWrapperComponentData=this.addEvent(),this.jsonErrors=null,this.cssValue=null,this.showHeaderOnCompletePage="auto",this._isLazyRenderingSuspended=!1,this.hideRequiredErrors=!1,this.cssVariables={},this._isMobile=!1,this._isCompact=!1,this.setValueOnExpressionCounter=0,this._isDesignMode=!1,this.validationAllowSwitchPages=!1,this.validationAllowComplete=!1,this.isNavigationButtonPressed=!1,this.mouseDownPage=null,this.isSmoothScrollEnabled=!1,this.onResize=new vt,this.isCurrentPageRendering=!0,this.isCurrentPageRendered=void 0,this.skeletonHeight=void 0,this.isTriggerIsRunning=!1,this.triggerValues=null,this.triggerKeys=null,this.conditionValues=null,this.isValueChangedOnRunningCondition=!1,this.conditionRunnerCounter=0,this.conditionUpdateVisibleIndexes=!1,this.conditionNotifyElementsOnAnyValueOrVariableChanged=!1,this.isEndLoadingFromJson=null,this.questionHashes={names:{},namesInsensitive:{},valueNames:{},valueNamesInsensitive:{}},this.setValueFromTriggerCounter=0,this.isMovingPage=!1,this.needRenderIcons=!0,this.skippedPages=[],this.skeletonComponentName="sv-skeleton",this.taskManager=new sr,this.questionErrorComponent="sv-question-error",this.onBeforeRunConstructor();const s=e=>"

"+e+"

";this.createHtmlLocString("completedHtml","completingSurvey",s),this.createHtmlLocString("completedBeforeHtml","completingSurveyBefore",s,"completed-before"),this.createHtmlLocString("loadingHtml","loadingSurvey",s,"loading"),this.createLocalizableString("emptySurveyText",this,!0,"emptySurvey"),this.createLocalizableString("logo",this,!1),this.createLocalizableString("startSurveyText",this,!1,!0),this.createLocalizableString("pagePrevText",this,!1,!0),this.createLocalizableString("pageNextText",this,!1,!0),this.createLocalizableString("completeText",this,!1,!0),this.createLocalizableString("previewText",this,!1,!0),this.createLocalizableString("editText",this,!1,!0),this.createLocalizableString("questionTitleTemplate",this,!0),this.timerModelValue=new Xi(this),this.timerModelValue.onTimerTick=e=>{this.doTimer(e)},this.createNewArray("pages",(e=>{e.isReadyForCleanChangedCallback&&e.isReadyForCleanChangedCallback(),this.doOnPageAdded(e)}),(e=>{e.isReadyForClean?this.doOnPageRemoved(e):e.isReadyForCleanChangedCallback=()=>{this.doOnPageRemoved(e),e.isReadyForCleanChangedCallback=void 0}})),this.createNewArray("triggers",(e=>{e.setOwner(this)})),this.createNewArray("calculatedValues",(e=>{e.setOwner(this)})),this.createNewArray("completedHtmlOnCondition",(e=>{e.locOwner=this})),this.createNewArray("navigateToUrlOnCondition",(e=>{e.locOwner=this})),this.registerPropertyChangedHandlers(["locale"],(()=>{this.onSurveyLocaleChanged()})),this.registerPropertyChangedHandlers(["firstPageIsStartPage"],(()=>{this.onFirstPageIsStartedChanged()})),this.registerPropertyChangedHandlers(["readOnly"],(()=>{this.onReadOnlyChanged()})),this.registerPropertyChangedHandlers(["progressBarType"],(()=>{this.updateProgressText()})),this.registerPropertyChangedHandlers(["questionStartIndex","requiredMark","questionTitlePattern"],(()=>{this.resetVisibleIndexes()})),this.registerPropertyChangedHandlers(["isLoading","isCompleted","isCompletedBefore","readOnly","isStartedState","currentPage","isShowingPreview"],(()=>{this.updateState()})),this.registerPropertyChangedHandlers(["state","currentPage","showPreviewBeforeComplete"],(()=>{this.onStateAndCurrentPageChanged()})),this.registerPropertyChangedHandlers(["logo","logoPosition"],(()=>{this.resetHasLogo()})),this.registerPropertyChangedHandlers(["backgroundImage"],(()=>{this.resetPropertyValue("renderBackgroundImage")})),this.registerPropertyChangedHandlers(["backgroundImage","backgroundOpacity","backgroundImageFit","fitToContainer","backgroundImageAttachment"],(()=>{this.resetPropertyValue("backgroundImageStyle")})),this.registerPropertyChangedHandlers(["showPrevButton","showCompleteButton"],(()=>{this.updateButtonsVisibility()})),this.onGetQuestionNumber.onCallbacksChanged=()=>{this.resetVisibleIndexes()},this.onGetPanelNumber.onCallbacksChanged=()=>{this.resetVisibleIndexes()},this.onGetProgressText.onCallbacksChanged=()=>{this.updateProgressText()},this.onTextMarkdown.onCallbacksChanged=()=>{this.locStrsChanged()},this.onProcessHtml.onCallbacksChanged=()=>{this.locStrsChanged()},this.onGetQuestionTitle.onCallbacksChanged=()=>{this.locStrsChanged()},this.onUpdatePageCssClasses.onCallbacksChanged=()=>{this.currentPage&&this.currentPage.updateElementCss()},this.onUpdatePanelCssClasses.onCallbacksChanged=()=>{this.currentPage&&this.currentPage.updateElementCss()},this.onUpdateQuestionCssClasses.onCallbacksChanged=()=>{this.currentPage&&this.currentPage.updateElementCss()},this.onShowingChoiceItem.onCallbacksChanged=()=>{this.rebuildQuestionChoices()},this.locTitle.onStringChanged.add((()=>this.resetPropertyValue("titleIsEmpty"))),this.onBeforeCreating(),e&&(("string"==typeof e||e instanceof String)&&(e=JSON.parse(e)),e&&e.clientId&&(this.clientId=e.clientId),this.fromJSON(e),this.surveyId&&this.loadSurveyFromService(this.surveyId,this.clientId)),this.onCreating(),t&&this.render(t),this.updateCss(),this.setCalculatedWidthModeUpdater(),this.notifier=new Yi(this.css.saveData),this.notifier.addAction(this.createTryAgainAction(),"error"),this.onPopupVisibleChanged.add(((e,t)=>{t.visible?this.onScrollCallback=()=>{t.popup.hide()}:this.onScrollCallback=void 0})),this.layoutElements.push({id:"timerpanel",template:"survey-timerpanel",component:"sv-timerpanel",data:this.timerModel}),this.layoutElements.push({id:"progress-buttons",component:"sv-progress-buttons",getData:()=>this.progressBar,processResponsiveness:e=>this.progressBar.processResponsiveness&&this.progressBar.processResponsiveness(e)}),this.layoutElements.push({id:"progress-questions",component:"sv-progress-questions",data:this}),this.layoutElements.push({id:"progress-pages",component:"sv-progress-pages",data:this}),this.layoutElements.push({id:"progress-correctquestions",component:"sv-progress-correctquestions",data:this}),this.layoutElements.push({id:"progress-requiredquestions",component:"sv-progress-requiredquestions",data:this}),this.addLayoutElement({id:"toc-navigation",component:"sv-navigation-toc",getData:()=>this.tocModel,processResponsiveness:e=>this.tocModel.updateStickyTOCSize(this.rootElement)}),this.layoutElements.push({id:"buttons-navigation",component:"sv-action-bar",getData:()=>this.navigationBar})}get tocModel(){return this.tocModelValue||(this.tocModelValue=new pr(this)),this.tocModelValue}get sjsVersion(){return this.getPropertyValue("sjsVersion")}set sjsVersion(e){this.setPropertyValue("sjsVersion",e)}processClosedPopup(e,t){throw new Error("Method not implemented.")}createTryAgainAction(){return{id:"save-again",title:this.getLocalizationString("saveAgainButton"),action:()=>{this.isCompleted?this.saveDataOnComplete():this.doComplete()}}}createHtmlLocString(e,t,s,i){const r=this.createLocalizableString(e,this,!1,t);r.onGetLocalizationTextCallback=s,i&&(r.onGetTextCallback=e=>this.processHtml(e,i))}getType(){return"survey"}onPropertyValueChanged(e,t,s){"questionsOnPageMode"===e&&this.onQuestionsOnPageModeChanged(t)}get pages(){return this.getPropertyValue("pages")}render(e=null){this.renderCallback&&this.renderCallback()}updateSurvey(e,t){for(var s in e)if("model"!=s&&"children"!=s)if(0==s.indexOf("on")&&this[s]&&this[s].add){let t=e[s],i=function(e,s){t(e,s)};this[s].add(i)}else this[s]=e[s];e&&e.data&&this.onValueChanged.add(((t,s)=>{e.data[s.name]=s.value}))}getCss(){return this.css}updateCompletedPageCss(){this.containerCss=this.css.container,this.completedCss=(new Ct).append(this.css.body).append(this.css.completedPage).toString(),this.completedBeforeCss=(new Ct).append(this.css.body).append(this.css.completedBeforePage).toString(),this.loadingBodyCss=(new Ct).append(this.css.body).append(this.css.bodyLoading).toString()}updateCss(){this.rootCss=this.getRootCss(),this.updateNavigationCss(),this.updateCompletedPageCss(),this.updateWrapperFormCss()}get css(){return this.cssValue||(this.cssValue={},this.copyCssClasses(this.cssValue,Gi.getCss())),this.cssValue}set css(e){this.setCss(e)}setCss(e,t=!0){t?this.mergeValues(e,this.css):this.cssValue=e,this.updateElementCss(!1)}get cssTitle(){return this.css.title}get cssNavigationComplete(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.complete)}get cssNavigationPreview(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.preview)}get cssNavigationEdit(){return this.getNavigationCss(this.css.navigationButton,this.css.navigation.edit)}get cssNavigationPrev(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.prev)}get cssNavigationStart(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.start)}get cssNavigationNext(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.next)}get cssSurveyNavigationButton(){return(new Ct).append(this.css.navigationButton).append(this.css.bodyNavigationButton).toString()}get bodyCss(){return(new Ct).append(this.css.body).append(this.css.bodyWithTimer,this.showTimer&&"running"===this.state).append(this.css.body+"--"+this.calculatedWidthMode).toString()}get bodyContainerCss(){return this.css.bodyContainer}insertAdvancedHeader(e){e.survey=this,this.layoutElements.push({id:"advanced-header",container:"header",component:"sv-header",index:-100,data:e,processResponsiveness:t=>e.processResponsiveness()})}getNavigationCss(e,t){return(new Ct).append(e).append(t).toString()}get lazyRenderEnabled(){return!0===this.lazyRenderEnabledValue}set lazyRenderEnabled(e){if(this.lazyRenderEnabled===e)return;this.lazyRenderEnabledValue=e;const t=this.currentPage;t&&t.updateRows()}get lazyRendering(){return this.lazyRenderEnabled}set lazyRendering(e){this.lazyRenderEnabled=e}get isLazyRendering(){return this.lazyRenderEnabled||Ps.lazyRender.enabled}get lazyRenderFirstBatchSize(){return this.lazyRenderFirstBatchSizeValue||Ps.lazyRender.firstBatchSize}set lazyRenderFirstBatchSize(e){this.lazyRenderFirstBatchSizeValue=e}get isLazyRenderingSuspended(){return this._isLazyRenderingSuspended}suspendLazyRendering(){this.isLazyRendering&&(this._isLazyRenderingSuspended=!0)}releaseLazyRendering(){this.isLazyRendering&&(this._isLazyRenderingSuspended=!1)}updateLazyRenderingRowsOnRemovingElements(){if(this.isLazyRendering){var e=this.currentPage;e&&is(e.id)}}get triggers(){return this.getPropertyValue("triggers")}set triggers(e){this.setPropertyValue("triggers",e)}get calculatedValues(){return this.getPropertyValue("calculatedValues")}set calculatedValues(e){this.setPropertyValue("calculatedValues",e)}get surveyId(){return this.getPropertyValue("surveyId","")}set surveyId(e){this.setPropertyValue("surveyId",e)}get surveyPostId(){return this.getPropertyValue("surveyPostId","")}set surveyPostId(e){this.setPropertyValue("surveyPostId",e)}get clientId(){return this.getPropertyValue("clientId","")}set clientId(e){this.setPropertyValue("clientId",e)}get cookieName(){return this.getPropertyValue("cookieName","")}set cookieName(e){this.setPropertyValue("cookieName",e)}get partialSendEnabled(){return this.getPropertyValue("partialSendEnabled")}set partialSendEnabled(e){this.setPropertyValue("partialSendEnabled",e)}get sendResultOnPageNext(){return this.partialSendEnabled}set sendResultOnPageNext(e){this.partialSendEnabled=e}get surveyShowDataSaving(){return this.getPropertyValue("surveyShowDataSaving")}set surveyShowDataSaving(e){this.setPropertyValue("surveyShowDataSaving",e)}get autoFocusFirstQuestion(){return this.getPropertyValue("autoFocusFirstQuestion")}set autoFocusFirstQuestion(e){this.setPropertyValue("autoFocusFirstQuestion",e)}get focusFirstQuestionAutomatic(){return this.autoFocusFirstQuestion}set focusFirstQuestionAutomatic(e){this.autoFocusFirstQuestion=e}get autoFocusFirstError(){return this.getPropertyValue("autoFocusFirstError")}set autoFocusFirstError(e){this.setPropertyValue("autoFocusFirstError",e)}get focusOnFirstError(){return this.autoFocusFirstError}set focusOnFirstError(e){this.autoFocusFirstError=e}get showNavigationButtons(){return this.getPropertyValue("showNavigationButtons")}set showNavigationButtons(e){!0===e||!1===e?this.setPropertyValue("showNavigationButtons",e):"none"===e?this.setPropertyValue("showNavigationButtons",!1):["top","bottom","both","topBottom"].indexOf(e)>-1&&(this.setPropertyValue("showNavigationButtons",!0),this.navigationButtonsLocation=e)}get navigationButtonsLocation(){return this.getPropertyValue("navigationButtonsLocation")}set navigationButtonsLocation(e){this.setPropertyValue("navigationButtonsLocation",e)}get showPrevButton(){return this.getPropertyValue("showPrevButton")}set showPrevButton(e){this.setPropertyValue("showPrevButton",e)}get showCompleteButton(){return this.getPropertyValue("showCompleteButton",!0)}set showCompleteButton(e){this.setPropertyValue("showCompleteButton",e)}get showTOC(){return this.getPropertyValue("showTOC")}set showTOC(e){this.setPropertyValue("showTOC",e)}get tocLocation(){return this.getPropertyValue("tocLocation")}set tocLocation(e){this.setPropertyValue("tocLocation",e)}get showTitle(){return this.getPropertyValue("showTitle")}set showTitle(e){this.setPropertyValue("showTitle",e)}get showPageTitles(){return this.getPropertyValue("showPageTitles")}set showPageTitles(e){this.setPropertyValue("showPageTitles",e)}get showCompletePage(){return this.getPropertyValue("showCompletePage")}set showCompletePage(e){this.setPropertyValue("showCompletePage",e)}get showCompletedPage(){return this.showCompletePage}set showCompletedPage(e){this.showCompletePage=e}get navigateToUrl(){return this.getPropertyValue("navigateToUrl")}set navigateToUrl(e){this.setPropertyValue("navigateToUrl",e)}get navigateToUrlOnCondition(){return this.getPropertyValue("navigateToUrlOnCondition")}set navigateToUrlOnCondition(e){this.setPropertyValue("navigateToUrlOnCondition",e)}getNavigateToUrl(){var e=this.getExpressionItemOnRunCondition(this.navigateToUrlOnCondition),t=e?e.url:this.navigateToUrl;return t&&(t=this.processText(t,!1)),t}navigateTo(){var e={url:this.getNavigateToUrl(),allow:!0};this.onNavigateToUrl.fire(this,e),e.url&&e.allow&&rs(e.url)}get requiredMark(){return this.getPropertyValue("requiredMark")}set requiredMark(e){this.setPropertyValue("requiredMark",e)}get requiredText(){return this.requiredMark}set requiredText(e){this.requiredMark=e}beforeSettingQuestionErrors(e,t){this.makeRequiredErrorsInvisible(t),this.onSettingQuestionErrors.fire(this,{question:e,errors:t})}makeRequiredErrorsInvisible(e){if(this.hideRequiredErrors)for(var t=0;t-1){var s=de.defaultLocale,i=e.indexOf(s);i>-1&&e.splice(i,1),t=e.indexOf("default"),e[t]=s}return e}localeChanged(){for(var e=0;ee.locStrsChanged()));else{var e=this.activePage;e&&e.locStrsChanged();const s=this.visiblePages;for(var t=0;t!!this.logo&&"none"!==this.logoPosition))}resetHasLogo(){this.resetPropertyValue("hasLogo")}get isLogoBefore(){return!this.isDesignMode&&(this.renderedHasLogo&&("left"===this.logoPosition||"top"===this.logoPosition))}get isLogoAfter(){return this.isDesignMode?this.renderedHasLogo:this.renderedHasLogo&&("right"===this.logoPosition||"bottom"===this.logoPosition)}get logoClassNames(){return(new Ct).append(this.css.logo).append({left:"sv-logo--left",right:"sv-logo--right",top:"sv-logo--top",bottom:"sv-logo--bottom"}[this.logoPosition]).toString()}get titleIsEmpty(){return this.getPropertyValue("titleIsEmpty",void 0,(()=>this.locTitle.isEmpty))}get renderedHasTitle(){return this.isDesignMode?this.isPropertyVisible("title"):!this.titleIsEmpty&&this.showTitle}get renderedHasDescription(){return this.isDesignMode?this.isPropertyVisible("description"):!!this.hasDescription}get hasTitle(){return this.renderedHasTitle}get renderedHasLogo(){return this.isDesignMode?this.isPropertyVisible("logo"):this.hasLogo}get renderedHasHeader(){return this.renderedHasTitle||this.renderedHasLogo}get logoFit(){return this.getPropertyValue("logoFit")}set logoFit(e){this.setPropertyValue("logoFit",e)}get themeVariables(){return Object.assign({},this.cssVariables)}setIsMobile(e=!0){this._isMobile!==e&&(this._isMobile=e,this.updateCss(),this.getAllQuestions().forEach((t=>t.setIsMobile(e))))}get isMobile(){return this._isMobile&&!this.isDesignMode}set isCompact(e){e!==this._isCompact&&(this._isCompact=e,this.updateElementCss(),this.triggerResponsiveness(!0))}get isCompact(){return this._isCompact}isLogoImageChoosen(){return this.locLogo.renderedHtml}get titleMaxWidth(){return""}get renderBackgroundImage(){return this.getPropertyValue("renderBackgroundImage",void 0,(()=>ns(this.backgroundImage)))}get backgroundOpacity(){return this.getPropertyValue("backgroundOpacity")}set backgroundOpacity(e){this.setPropertyValue("backgroundOpacity",e)}get backgroundImageStyle(){return this.getPropertyValue("backgroundImageStyle",void 0,(()=>this.calcBackgroundImageStyle()))}calcBackgroundImageStyle(){return{opacity:this.backgroundOpacity,backgroundImage:this.renderBackgroundImage,backgroundSize:this.backgroundImageFit,backgroundAttachment:this.fitToContainer?void 0:this.backgroundImageAttachment}}updateWrapperFormCss(){this.wrapperFormCss=(new Ct).append(this.css.rootWrapper).append(this.css.rootWrapperHasImage,!!this.backgroundImage).append(this.css.rootWrapperFixed,!this.formScrollDisabled).toString()}get completedHtml(){return this.getLocalizableStringText("completedHtml")}set completedHtml(e){this.setLocalizableStringText("completedHtml",e)}get locCompletedHtml(){return this.getLocalizableString("completedHtml")}get completedHtmlOnCondition(){return this.getPropertyValue("completedHtmlOnCondition")}set completedHtmlOnCondition(e){this.setPropertyValue("completedHtmlOnCondition",e)}runExpression(e,t){if(!e)return null;var s=this.getFilteredValues(),i=this.getFilteredProperties();const r=new ut(e);let n;return r.onRunComplete=e=>{n=e,t&&t(e)},r.run(s,i)||n}get isSettingValueOnExpression(){return this.setValueOnExpressionCounter>0}startSetValueOnExpression(){this.setValueOnExpressionCounter++}finishSetValueOnExpression(){this.setValueOnExpressionCounter--}runCondition(e){if(!e)return!1;var t=this.getFilteredValues(),s=this.getFilteredProperties();return new lt(e).run(t,s)}runTriggers(){this.checkTriggers(this.getFilteredValues(),!1)}get renderedCompletedHtml(){var e=this.getExpressionItemOnRunCondition(this.completedHtmlOnCondition);return e?e.html:this.completedHtml}getExpressionItemOnRunCondition(e){if(0==e.length)return null;for(var t=this.getFilteredValues(),s=this.getFilteredProperties(),i=0;i"+this.getLocalizationString("loadingSurvey")+""}get navigationBar(){return this.navigationBarValue||(this.navigationBarValue=this.createNavigationBar(),this.updateNavigationCss()),this.navigationBarValue}addNavigationItem(e){return e.component||(e.component="sv-nav-btn"),e.innerCss||(e.innerCss=this.cssSurveyNavigationButton),this.navigationBar.addAction(e)}get startSurveyText(){return this.getLocalizableStringText("startSurveyText")}set startSurveyText(e){this.setLocalizableStringText("startSurveyText",e)}get locStartSurveyText(){return this.getLocalizableString("startSurveyText")}get pagePrevText(){return this.getLocalizableStringText("pagePrevText")}set pagePrevText(e){this.setLocalizableStringText("pagePrevText",e)}get locPagePrevText(){return this.getLocalizableString("pagePrevText")}get pageNextText(){return this.getLocalizableStringText("pageNextText")}set pageNextText(e){this.setLocalizableStringText("pageNextText",e)}get locPageNextText(){return this.getLocalizableString("pageNextText")}get completeText(){return this.getLocalizableStringText("completeText")}set completeText(e){this.setLocalizableStringText("completeText",e)}get locCompleteText(){return this.getLocalizableString("completeText")}get previewText(){return this.getLocalizableStringText("previewText")}set previewText(e){this.setLocalizableStringText("previewText",e)}get locPreviewText(){return this.getLocalizableString("previewText")}get editText(){return this.getLocalizableStringText("editText")}set editText(e){this.setLocalizableStringText("editText",e)}get locEditText(){return this.getLocalizableString("editText")}getElementTitleTagName(e,t){if(this.onGetTitleTagName.isEmpty)return t;const s={element:e,tagName:t};return this.onGetTitleTagName.fire(this,s),s.tagName}get questionTitlePattern(){return this.getPropertyValue("questionTitlePattern","numTitleRequire")}set questionTitlePattern(e){"numRequireTitle"!==e&&"requireNumTitle"!==e&&"numTitle"!=e&&(e="numTitleRequire"),this.setPropertyValue("questionTitlePattern",e)}getQuestionTitlePatternOptions(){const e=new Array,t=this.getLocalizationString("questionTitlePatternText"),s=this.questionStartIndex?this.questionStartIndex:"1.";return e.push({value:"numTitleRequire",text:s+" "+t+" "+this.requiredMark}),e.push({value:"numRequireTitle",text:s+" "+this.requiredMark+" "+t}),e.push({value:"numTitle",text:s+" "+t}),e}get questionTitleTemplate(){return this.getLocalizableStringText("questionTitleTemplate")}set questionTitleTemplate(e){this.setLocalizableStringText("questionTitleTemplate",e),this.questionTitlePattern=this.getNewTitlePattern(e),this.questionStartIndex=this.getNewQuestionTitleElement(e,"no",this.questionStartIndex,"1"),this.requiredMark=this.getNewQuestionTitleElement(e,"require",this.requiredMark,"*")}getNewTitlePattern(e){if(e){for(var t=[];e.indexOf("{")>-1;){var s=(e=e.substring(e.indexOf("{")+1)).indexOf("}");if(s<0)break;t.push(e.substring(0,s)),e=e.substring(s+1)}if(t.length>1){if("require"==t[0])return"requireNumTitle";if("require"==t[1]&&3==t.length)return"numRequireTitle";if(t.indexOf("require")<0)return"numTitle"}if(1==t.length&&"title"==t[0])return"numTitle"}return"numTitleRequire"}getNewQuestionTitleElement(e,t,s,i){if(t="{"+t+"}",!e||e.indexOf(t)<0)return s;for(var r=e.indexOf(t),n="",a="",o=r-1;o>=0&&"}"!=e[o];o--);for(or&&(a=e.substring(r,o)),o=0;o=0&&a.charCodeAt(o)<33;)o--;return a=a.substring(0,o+1),n||a?n+(s||i)+a:s}get locQuestionTitleTemplate(){return this.getLocalizableString("questionTitleTemplate")}getUpdatedQuestionTitle(e,t){if(this.onGetQuestionTitle.isEmpty)return t;const s={question:e,title:t};return this.onGetQuestionTitle.fire(this,s),s.title}getUpdatedQuestionNo(e,t){if(this.onGetQuestionNumber.isEmpty)return t;const s={question:e,number:t,no:t};return this.onGetQuestionNumber.fire(this,s),s.no===t?s.number:s.no}getUpdatedPanelNo(e,t){if(this.onGetPanelNumber.isEmpty)return t;const s={panel:e,number:t};return this.onGetPanelNumber.fire(this,s),s.number}getUpdatedPageNo(e,t){if(this.onGetPageNumber.isEmpty)return t;const s={page:e,number:t};return this.onGetPageNumber.fire(this,s),s.number}get showPageNumbers(){return this.getPropertyValue("showPageNumbers")}set showPageNumbers(e){e!==this.showPageNumbers&&(this.setPropertyValue("showPageNumbers",e),this.updateVisibleIndexes())}get showQuestionNumbers(){return this.getPropertyValue("showQuestionNumbers")}set showQuestionNumbers(e){!0===e&&(e="on"),!1===e&&(e="off"),(e="onpage"===(e=e.toLowerCase())?"onPage":e)!==this.showQuestionNumbers&&(this.setPropertyValue("showQuestionNumbers",e),this.updateVisibleIndexes())}get progressBar(){return this.progressBarValue||(this.progressBarValue=new lr(this)),this.progressBarValue}get showProgressBar(){return this.getPropertyValue("showProgressBar")}set showProgressBar(e){this.setShowProgressBar(e)}setShowProgressBar(e){"off"===e&&(e=!1),!0===e||!1===e?this.setPropertyValue("showProgressBar",e):(this.setPropertyValue("showProgressBar",!0),this.progressBarLocation=e)}get progressBarLocation(){return this.getPropertyValue("progressBarLocation")}set progressBarLocation(e){this.setPropertyValue("progressBarLocation",e.toLowerCase())}get progressBarType(){return this.getPropertyValue("progressBarType")}set progressBarType(e){"correctquestion"===e&&(e="correctQuestion"),"requiredquestion"===e&&(e="requiredQuestion"),this.setPropertyValue("progressBarType",e)}get progressBarComponentName(){let e=this.progressBarType;return Ps.legacyProgressBarView||"default"!==Gi.currentType||gr(e,"pages")&&(e="buttons"),"progress-"+e}get isShowProgressBarOnTop(){return!!this.canShowProgressBar()&&(!!this.showProgressBar&&-1!==["auto","aboveheader","belowheader","topbottom","top","both"].indexOf(this.progressBarLocation))}get isShowProgressBarOnBottom(){return!!this.canShowProgressBar()&&(!!this.showProgressBar&&("bottom"===this.progressBarLocation||"both"===this.progressBarLocation||"topbottom"===this.progressBarLocation))}getProgressTypeComponent(){return"sv-progress-"+this.progressBarType.toLowerCase()}getProgressCssClasses(e=""){return(new Ct).append(this.css.progress).append(this.css.progressTop,this.isShowProgressBarOnTop&&(!e||"header"==e)).append(this.css.progressBottom,this.isShowProgressBarOnBottom&&(!e||"footer"==e)).toString()}canShowProgressBar(){return!this.isShowingPreview||!this.showPreviewBeforeComplete||"allQuestions"!=this.previewMode}get processedTitle(){return this.locTitle.renderedHtml}get questionTitleLocation(){return this.getPropertyValue("questionTitleLocation")}set questionTitleLocation(e){this.setPropertyValue("questionTitleLocation",e.toLowerCase()),this.isLoadingFromJson||this.updateElementCss(!0)}updateElementCss(e){this.startPage&&this.startPage.updateElementCss(e);for(var t=this.visiblePages,s=0;s{if(e){const e={};i.collectValues(e,t-1)&&(s[i.name]=e)}else i.collectValues(s,t)})),s}setStructuredData(e,t=!1){if(!e)return;const s={};for(let t in e){if(this.getQuestionByValueName(t))s[t]=e[t];else{let i=this.getPageByName(t);i||(i=this.getPanelByName(t)),i&&this.collectDataFromPanel(i,s,e[t])}}t?this.mergeData(s):this.data=s}collectDataFromPanel(e,t,s){for(let i in s){let r=e.getElementByName(i);r&&(r.isPanel?this.collectDataFromPanel(r,t,s[i]):t[i]=s[i])}}get editingObj(){return this.editingObjValue}set editingObj(e){if(this.editingObj!=e&&(this.unConnectEditingObj(),this.editingObjValue=e,!this.isDisposed)){if(!e)for(var t=this.getAllQuestions(),s=0;s{Ie.hasOriginalProperty(this.editingObj,t.name)&&("locale"===t.name&&this.setDataCore({}),this.updateOnSetValue(t.name,this.editingObj[t.name],t.oldValue))},this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged))}}unConnectEditingObj(){this.editingObj&&!this.editingObj.isDisposed&&this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged)}get isEditingSurveyElement(){return!!this.editingObj}setCalculatedValuesIntoResult(e){for(var t=0;t{var r=i.getPlainData(e);r&&(t.push(r),s.push(i.valueName||i.name))})),e.includeValues){const e=this.getValuesKeys();for(var i=0;i"object"==typeof e?JSON.stringify(e):e})}}}return t}getFilteredValues(){const e={};for(var t in this.variablesHash)e[t]=this.variablesHash[t];if(this.addCalculatedValuesIntoFilteredValues(e),!this.isDesignMode){const i=this.getValuesKeys();for(var s=0;s{t.hasFilteredValue&&(e[t.getFilteredName()]=t.getFilteredValue())}))}return e}addCalculatedValuesIntoFilteredValues(e){for(var t=this.calculatedValues,s=0;s0&&(e[i]=this.getDataValueCore(this.valuesHash,i))}return e}get visiblePages(){if(this.isDesignMode)return this.pages;if(this.pageContainerValue&&(this.isShowingPreview||this.isSinglePage))return[this.pageContainerValue];for(var e=new Array,t=0;t1?this.pages[0]:null;return e&&(e.onFirstRendering(),e.setWasShown(!0)),e}get startedPage(){return this.startPage}get currentPage(){return this.getPropertyValue("currentPage",null)}set currentPage(e){if(!this.isLoadingFromJson){var t=this.getPageByObject(e);if((!e||t)&&(t||!this.isCurrentPageAvailable)){var s=this.visiblePages;if(!(null!=t&&s.indexOf(t)<0)&&t!=this.currentPage){var i=this.currentPage;(this.isShowingPreview||this.currentSingleElement||this.currentPageChanging(t,i))&&(this.setPropertyValue("currentPage",t),t&&(t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0)),this.locStrsChanged(),this.isShowingPreview||this.currentPageChanged(t,i))}}}}tryNavigateToPage(e){if(!this.performValidationOnPageChanging(e))return!1;const t=this.visiblePages.indexOf(e)=this.visiblePageCount)return!1;if(t===this.currentPageNo)return!1;if(t-1||!!this.onContainsPageCallback&&this.onContainsPageCallback(e)}get activePage(){return this.getPropertyValue("activePage")}get isStartPageActive(){return"starting"===this.state}get isShowStartingPage(){return this.isStartPageActive}get matrixDragHandleArea(){return this.getPropertyValue("matrixDragHandleArea","entireItem")}set matrixDragHandleArea(e){this.setPropertyValue("matrixDragHandleArea",e)}get isShowingPage(){return"running"==this.state||"preview"==this.state||this.isStartPageActive}updateActivePage(){const e=this.isStartPageActive?this.startPage:this.currentPage;e!==this.activePage&&this.setPropertyValue("activePage",e)}onStateAndCurrentPageChanged(){this.updateActivePage(),this.updateButtonsVisibility()}getPageByObject(e){if(!e)return null;if(e.getType&&"page"==e.getType())return e;if("string"==typeof e||e instanceof String)return this.getPageByName(String(e));if(!isNaN(e)){var t=Number(e),s=this.visiblePages;return e<0||e>=s.length?null:s[t]}return e}get currentPageNo(){return this.visiblePages.indexOf(this.currentPage)}set currentPageNo(e){var t=this.visiblePages;e<0||e>=t.length||(this.currentPage=t[e])}get questionOrder(){return this.getPropertyValue("questionOrder")}set questionOrder(e){this.setPropertyValue("questionOrder",e)}get questionsOrder(){return this.questionOrder}set questionsOrder(e){this.questionOrder=e}focusFirstQuestion(){if(!this.focusingQuestionInfo){var e=this.activePage;e&&(e.scrollToTop(),e.focusFirstQuestion())}}scrollToTopOnPageChange(e=!0){var t=this.activePage;t&&(e&&t.scrollToTop(),this.isCurrentPageRendering&&this.autoFocusFirstQuestion&&!this.focusingQuestionInfo&&(t.focusFirstQuestion(),this.isCurrentPageRendering=!1))}get state(){return this.getPropertyValue("state","empty")}updateState(){this.setPropertyValue("state",this.calcState())}calcState(){return this.isLoading?"loading":this.isCompleted?"completed":this.isCompletedBefore?"completedbefore":!this.isDesignMode&&this.isEditMode&&this.isStartedState&&this.startPage?"starting":this.isShowingPreview?this.currentPage?"preview":"empty":this.currentPage?"running":"empty"}get isCompleted(){return this.getPropertyValue("isCompleted",!1)}set isCompleted(e){this.setPropertyValue("isCompleted",e)}get isShowingPreview(){return this.getPropertyValue("isShowingPreview",!1)}set isShowingPreview(e){this.isShowingPreview!=e&&(this.setPropertyValue("isShowingPreview",e),this.onShowingPreviewChanged())}get isStartedState(){return this.getPropertyValue("isStartedState",!1)}set isStartedState(e){this.setPropertyValue("isStartedState",e)}get isCompletedBefore(){return this.getPropertyValue("isCompletedBefore",!1)}set isCompletedBefore(e){this.setPropertyValue("isCompletedBefore",e)}get isLoading(){return this.getPropertyValue("isLoading",!1)}set isLoading(e){this.setPropertyValue("isLoading",e)}beginLoading(){this.isLoading=!0}endLoading(){this.isLoading=!1}get completedState(){return this.getPropertyValue("completedState","")}get completedStateText(){return this.getPropertyValue("completedStateText","")}setCompletedState(e,t){this.setPropertyValue("completedState",e),t||("saving"==e&&(t=this.getLocalizationString("savingData")),"error"==e&&(t=this.getLocalizationString("savingDataError")),"success"==e&&(t=this.getLocalizationString("savingDataSuccess"))),this.setPropertyValue("completedStateText",t),"completed"===this.state&&this.showCompletePage&&this.completedState&&this.notify(this.completedStateText,this.completedState,"error"===e)}notify(e,t,s=!1){this.notifier.showActions=s,this.notifier.notify(e,t,s)}clear(e=!0,t=!0){this.isCompleted=!1,this.isCompletedBefore=!1,this.isLoading=!1,this.completedByTriggers=void 0,e&&this.setDataCore(null,!0),this.timerModel.spent=0;for(var s=0;s0?e[0]:void 0}e&&this.updateValuesWithDefaults()}mergeValues(e,t){ys(e,t)}updateValuesWithDefaults(){if(!this.isDesignMode&&!this.isLoading)for(var e=0;ee.onHidingContent()))}createPageChangeEventOptions(e,t,s,i){const r=e&&t?e.visibleIndex-t.visibleIndex:0;let n=r;return 0===n&&i&&s&&(n=e.elements.indexOf(s)-e.elements.indexOf(i)),{oldCurrentQuestion:i,newCurrentQuestion:s,oldCurrentPage:t,newCurrentPage:e,isNextPage:1===r,isPrevPage:-1===r,isGoingForward:n>0,isGoingBackward:n<0,isAfterPreview:!0===this.changeCurrentPageFromPreview}}getProgress(){if(null==this.currentPage)return 0;if("pages"!==this.progressBarType){var e=this.getProgressInfo();return"requiredQuestions"===this.progressBarType?e.requiredQuestionCount>=1?Math.ceil(100*e.requiredAnsweredQuestionCount/e.requiredQuestionCount):100:e.questionCount>=1?Math.ceil(100*e.answeredQuestionCount/e.questionCount):100}const t=this.visiblePages;var s=t.indexOf(this.currentPage);return Math.ceil(100*s/t.length)}get isNavigationButtonsShowing(){if(this.isDesignMode)return"none";var e=this.activePage;return e?"hide"===e.navigationButtonsVisibility?"none":"show"===e.navigationButtonsVisibility?this.showNavigationButtons?this.navigationButtonsLocation:"bottom":this.showNavigationButtons?this.navigationButtonsLocation:"none":"none"}get isNavigationButtonsShowingOnTop(){return this.getIsNavigationButtonsShowingOn("top")}get isNavigationButtonsShowingOnBottom(){return this.getIsNavigationButtonsShowingOn("bottom")}getIsNavigationButtonsShowingOn(e){var t=this.isNavigationButtonsShowing;return"both"==t||"topBottom"==t||t==e}get isEditMode(){return!this.readOnly}get isDisplayMode(){return this.readOnly&&!this.isDesignMode||"preview"==this.state}get isUpdateValueTextOnTyping(){return"onTyping"==this.textUpdateMode}get isDesignMode(){return this._isDesignMode}setDesignMode(e){!!this._isDesignMode!=!!e&&(this._isDesignMode=!!e,this.onQuestionsOnPageModeChanged("standard"))}get showInvisibleElements(){return this.getPropertyValue("showInvisibleElements",!1)}set showInvisibleElements(e){var t=this.visiblePages;this.setPropertyValue("showInvisibleElements",e),this.isLoadingFromJson||(this.runConditions(),this.updateAllElementsVisibility(t))}updateAllElementsVisibility(e){for(var t=0;t-1!=s.isVisible&&this.onPageVisibleChanged.fire(this,{page:s,visible:s.isVisible})}}get areInvisibleElementsShowing(){return this.isDesignMode||this.showInvisibleElements}get areEmptyElementsHidden(){return this.isShowingPreview&&this.showPreviewBeforeComplete&&"answeredQuestions"==this.previewMode&&this.isAnyQuestionAnswered}get isAnyQuestionAnswered(){const e=this.getAllQuestions(!0);for(let t=0;t-1}setCookie(){this.cookieName&&oe.setCookie(this.cookieName+"=true; expires=Fri, 31 Dec 9999 0:0:0 GMT")}deleteCookie(){this.cookieName&&oe.setCookie(this.cookieName+"=;")}get ignoreValidation(){return!this.validationEnabled}set ignoreValidation(e){this.validationEnabled=!e}nextPage(){return this.currentSingleElement?this.performNext():!this.isLastPage&&this.doCurrentPageComplete(!1)}performNext(){const e=this.currentSingleElement;if(!e)return this.nextPage();if(this.validationEnabled&&!e.validate(!0))return!1;const t=this.getSingleElements(),s=t.indexOf(e);if(s<0||s===t.length-1)return!1;let i={};return e.isQuestion?i[e.name]=e.value:e.isPanel&&(i=e.getValue()),this.checkTriggers(i,!1,!1,!0,e.name),this.currentSingleElement=t[s+1],!0}performPrevious(){const e=this.currentSingleElement;if(!e)return this.prevPage();const t=this.getSingleElements(),s=t.indexOf(e);return 0!==s&&(this.currentSingleElement=t[s-1],!0)}hasErrorsOnNavigate(e){if(this.canGoTroughValidation())return!1;const t=e&&this.validationAllowComplete||!e&&this.validationAllowSwitchPages,s=s=>{s&&!t||this.doCurrentPageCompleteCore(e)};return this.isValidateOnComplete?!!this.isLastPage&&(!0!==this.validate(!0,this.autoFocusFirstError,s,!0)&&!t):!0!==this.validateCurrentPage(s)&&!t}canGoTroughValidation(){return!this.isEditMode||!this.validationEnabled}checkForAsyncQuestionValidation(e,t){this.clearAsyncValidationQuesitons();for(var s=0;s{this.onCompletedAsyncQuestionValidators(i,t,e)},this.asyncValidationQuesitons.push(e[s])}return this.asyncValidationQuesitons.length>0}clearAsyncValidationQuesitons(){if(this.asyncValidationQuesitons)for(var e=this.asyncValidationQuesitons,t=0;t0)return;e.focus(!0)}}else{for(var i=this.asyncValidationQuesitons,r=0;rt(e)))||void 0))}hasErrors(e=!0,t=!1,s){const i=this.validate(e,t,s);return void 0===i?i:!i}validate(e=!0,t=!1,s,i){s&&(e=!0);var r=this.visiblePages,n=!0;const a={fireCallback:e,focusOnFirstError:t,firstErrorQuestion:null,result:!1};for(var o=0;os(e)))||void 0:n}ensureUniqueNames(e=null){if(null==e)for(var t=0;tthis.getPageByName(e)))}ensureUniquePanelName(e){return this.ensureUniqueElementName(e,(e=>this.getPanelByName(e)))}ensureUniqueQuestionName(e){return this.ensureUniqueElementName(e,(e=>this.getQuestionByName(e)))}ensureUniqueElementName(e,t){var s=t(e.name);if(s&&s!=e){for(var i=this.getNewName(e.name);t(i);)i=this.getNewName(e.name);e.name=i}}getNewName(e){for(var t=e.length;t>0&&e[t-1]>="0"&&e[t-1]<="9";)t--;var s=e.substring(0,t),i=0;return t0){s.push(n);for(var a=0;ae.to==this.currentPage));if(e)this.currentPage=e.from,this.skippedPages.splice(this.skippedPages.indexOf(e),1);else{const e=this.visiblePages,t=e.indexOf(this.currentPage);this.currentPage=e[t-1]}return!0}tryComplete(){this.isValidateOnComplete&&this.cancelPreview();let e=this.doCurrentPageComplete(!0);return e&&this.cancelPreview(),e}completeLastPage(){return this.tryComplete()}navigationMouseDown(){return this.isNavigationButtonPressed=!0,!0}resetNavigationButton(){this.isNavigationButtonPressed=!1}nextPageUIClick(){return(!this.mouseDownPage||this.mouseDownPage===this.activePage)&&(this.mouseDownPage=null,this.performNext())}nextPageMouseDown(){return this.mouseDownPage=this.activePage,this.navigationMouseDown()}showPreview(){if(this.resetNavigationButton(),!this.isValidateOnComplete){if(this.hasErrorsOnNavigate(!0))return!1;if(this.doServerValidation(!0,!0))return!1}return this.showPreviewCore(),this.isShowingPreview}showPreviewCore(){var e={allowShowPreview:!0,allow:!0};this.onShowingPreview.fire(this,e),this.isShowingPreview=e.allowShowPreview&&e.allow}cancelPreview(e=null){var t;if(!this.isShowingPreview)return;this.gotoPageFromPreview=e,this.isShowingPreview=!1;const s=null===(t=this.currentSingleElement)||void 0===t?void 0:t.page;s&&(s.updateRows(),this.currentPage=s)}cancelPreviewByPage(e){this.cancelPreview(e)}doCurrentPageComplete(e){return!this.isValidatingOnServer&&(this.resetNavigationButton(),!this.hasErrorsOnNavigate(e)&&this.doCurrentPageCompleteCore(e))}doCurrentPageCompleteCore(e){return!this.doServerValidation(e)&&(e?(this.currentPage.passed=!0,this.doComplete(this.canBeCompletedByTrigger,this.completedTrigger)):(this.doNextPage(),!0))}get isSinglePage(){return"singlePage"==this.questionsOnPageMode}set isSinglePage(e){this.questionsOnPageMode=e?"singlePage":"standard"}get isSingleVisibleQuestion(){return this.isSingleVisibleQuestionVal(this.questionsOnPageMode)}isSingleVisibleQuestionVal(e){return"questionPerPage"===e||"questionOnPage"===e}get questionsOnPageMode(){return this.getPropertyValue("questionsOnPageMode")}set questionsOnPageMode(e){this.setPropertyValue("questionsOnPageMode",e)}get firstPageIsStartPage(){return this.getPropertyValue("firstPageIsStartPage")}set firstPageIsStartPage(e){this.setPropertyValue("firstPageIsStartPage",e)}get firstPageIsStarted(){return this.firstPageIsStartPage}set firstPageIsStarted(e){this.firstPageIsStartPage=e}isPageStarted(e){return this.firstPageIsStartPage&&this.pages.length>1&&this.pages[0]===e}get showPreviewBeforeComplete(){return this.getPropertyValue("showPreviewBeforeComplete")}set showPreviewBeforeComplete(e){this.setShowPreviewBeforeComplete(e)}setShowPreviewBeforeComplete(e){void 0===e||"noPreview"===e||!1===e?this.setPropertyValue("showPreviewBeforeComplete",!1):(this.setPropertyValue("showPreviewBeforeComplete",!0),"showAllQuestions"===e&&(this.previewMode="allQuestions"),"showAnsweredQuestions"===e&&(this.previewMode="answeredQuestions"))}get previewMode(){return this.getPropertyValue("previewMode")}set previewMode(e){this.setPropertyValue("previewMode",e)}onFirstPageIsStartedChanged(){this.isStartedState=this.firstPageIsStartPage&&this.pages.length>1,this.pageVisibilityChanged(this.pages[0],!this.isStartedState)}onShowingPreviewChanged(){this.updatePagesContainer()}createRootPage(e,t){const s=Ie.createClass("page");return s.name=e,s.isPageContainer=!0,t.forEach((e=>{e.isStartPage||s.addElement(e)})),s}disposeContainerPage(){let e=this.pageContainerValue;[].concat(e.elements).forEach((t=>e.removeElement(t))),e.dispose(),this.pageContainerValue=void 0}updatePagesContainer(){if(this.isDesignMode)return;this.getAllQuestions().forEach((e=>e.updateElementVisibility())),this.setPropertyValue("currentPage",void 0);const e="preview-page";let t;if(this.isSinglePage){const s=this.pageContainerValue;s&&s.name===e?(t=s.elements[0],this.disposeContainerPage()):t=this.createRootPage("single-page",this.pages)}if(this.isShowingPreview&&(t=this.createRootPage(e,t?[t]:this.pages)),t&&(t.setSurveyImpl(this),this.pageContainerValue=t,this.currentPage=t,this.currentSingleElementValue&&this.visiblePages.forEach((e=>e.updateRows()))),!this.isSinglePage&&!this.isShowingPreview){this.disposeContainerPage();let e=this.gotoPageFromPreview;this.gotoPageFromPreview=null,ue.isValueEmpty(e)&&this.visiblePageCount>0&&(e=this.visiblePages[this.visiblePageCount-1]),e&&(this.changeCurrentPageFromPreview=!0,this.currentPage=e,this.changeCurrentPageFromPreview=!1)}!this.currentPage&&this.visiblePageCount>0&&(this.currentPage=this.visiblePages[0]),this.pages.forEach((e=>{e.hasShown&&e.updateElementCss(!0)})),this.updateButtonsVisibility()}getSingleElements(e){const t=new Array,s=this.pages;for(var i=0;is.push(e))),s.forEach((s=>{(s===e||s.isVisible)&&t.push(s)}))}}return t}get currentSingleElement(){return this.isShowingPreview?void 0:this.currentSingleElementValue}set currentSingleElement(e){const t=this.currentSingleElement;if(e!==t&&!this.isCompleted){const s=(null==e?void 0:e.isQuestion)?e:void 0,i=(null==t?void 0:t.isQuestion)?t:void 0,r=null==e?void 0:e.page,n=r&&t?this.createPageChangeEventOptions(r,t.page,s,i):void 0;if(n&&!this.currentPageChangingFromOptions(n))return;this.currentSingleElementValue=e,e?(r.updateRows(),r!==this.currentPage?this.currentPage=r:s&&this.autoFocusFirstQuestion&&s.focus(),this.updateButtonsVisibility(),n&&this.onCurrentPageChanged.fire(this,n)):this.visiblePages.forEach((e=>e.updateRows()))}}get currentSingleQuestion(){const e=this.currentSingleElement;return e&&e.isQuestion?e:void 0}set currentSingleQuestion(e){this.currentSingleElement=e}changeCurrentSingleElementOnVisibilityChanged(){const e=this.currentSingleElement;if(!e||e.isVisible)return;const t=this.getSingleElements(e),s=t.indexOf(e),i=s>0?t[s-1]:s0&&(this.currentSingleElement=e[0])}}getPageStartIndex(){return this.firstPageIsStartPage&&this.pages.length>0?1:0}get isFirstPage(){return this.getPropertyValue("isFirstPage")}get isLastPage(){return this.getPropertyValue("isLastPage")}updateButtonsVisibility(){this.updateIsFirstLastPageState(),this.setPropertyValue("isShowPrevButton",this.calcIsShowPrevButton()),this.setPropertyValue("isShowNextButton",this.calcIsShowNextButton()),this.setPropertyValue("isCompleteButtonVisible",this.calcIsCompleteButtonVisible()),this.setPropertyValue("isPreviewButtonVisible",this.calcIsPreviewButtonVisible()),this.setPropertyValue("isCancelPreviewButtonVisible",this.calcIsCancelPreviewButtonVisible())}get isShowPrevButton(){return this.getPropertyValue("isShowPrevButton")}get isShowNextButton(){return this.getPropertyValue("isShowNextButton")}get isCompleteButtonVisible(){return this.getPropertyValue("isCompleteButtonVisible")}get isPreviewButtonVisible(){return this.getPropertyValue("isPreviewButtonVisible")}get isCancelPreviewButtonVisible(){return this.getPropertyValue("isCancelPreviewButtonVisible")}get isFirstElement(){return this.getPropertyValue("isFirstElement")}get isLastElement(){return this.getPropertyValue("isLastElement")}updateIsFirstLastPageState(){const e=this.currentPage;let t,s;const i=this.currentSingleElement;if(i){const e=this.getSingleElements(),r=e.indexOf(i);r>=0&&(t=0===r,s=r===e.length-1)}this.setPropertyValue("isFirstPage",!(!e||e!==this.firstVisiblePage||i&&!0!==t)),this.setPropertyValue("isLastPage",!(!e||e!==this.lastVisiblePage||i&&!0!==s)),this.setPropertyValue("isFirstElement",t),this.setPropertyValue("isLastElement",s)}get isLastPageOrElement(){return void 0!==this.isLastElement?this.isLastElement:this.isLastPage}get isFirstPageOrElement(){return void 0!==this.isFirstElement?this.isFirstElement:this.isFirstPage}calcIsShowPrevButton(){if(this.isFirstPageOrElement||!this.showPrevButton||"running"!==this.state)return!1;if(void 0!==this.isFirstElement)return!0;const e=this.visiblePages[this.currentPageNo-1];return e&&e.getMaxTimeToFinish()<=0}calcIsShowNextButton(){return"running"===this.state&&!this.isLastPageOrElement&&!this.canBeCompletedByTrigger}calcIsCompleteButtonVisible(){const e=this.state;return this.isEditMode&&("running"===this.state&&(this.isLastPageOrElement&&!this.showPreviewBeforeComplete||this.canBeCompletedByTrigger)||"preview"===e)&&this.showCompleteButton}calcIsPreviewButtonVisible(){return this.isEditMode&&this.showPreviewBeforeComplete&&"running"==this.state&&this.isLastPageOrElement}calcIsCancelPreviewButtonVisible(){return this.isEditMode&&this.showPreviewBeforeComplete&&"preview"==this.state}get firstVisiblePage(){if(1===this.visiblePageCount)return this.visiblePages[0];const e=this.pages;for(let t=0;t=0;t--)if(this.isPageInVisibleList(e[t]))return e[t];return null}doComplete(e=!1,t){if(!this.isCompleted)return this.checkOnCompletingEvent(e,t)?(this.checkOnPageTriggers(!0),this.stopTimer(),this.notifyQuestionsOnHidingContent(this.currentPage),this.isCompleted=!0,this.clearUnusedValues(),this.saveDataOnComplete(e,t),this.setCookie(),!0):(this.isCompleted=!1,!1)}saveDataOnComplete(e=!1,t){let s=this.hasCookie;const i=e=>{o=!0,this.setCompletedState("saving",e)},r=e=>{this.setCompletedState("error",e)},n=e=>{this.setCompletedState("success",e),this.navigateTo()},a=e=>{this.setCompletedState("","")};var o=!1,l={isCompleteOnTrigger:e,completeTrigger:t,showSaveInProgress:i,showSaveError:r,showSaveSuccess:n,clearSaveMessages:a,showDataSaving:i,showDataSavingError:r,showDataSavingSuccess:n,showDataSavingClear:a};this.onComplete.fire(this,l),!s&&this.surveyPostId&&this.sendResult(),o||this.navigateTo()}checkOnCompletingEvent(e,t){var s={allowComplete:!0,allow:!0,isCompleteOnTrigger:e,completeTrigger:t};return this.onCompleting.fire(this,s),s.allowComplete&&s.allow}start(){return!!this.firstPageIsStartPage&&(this.isCurrentPageRendering=!0,!this.checkIsPageHasErrors(this.startPage,!0)&&(this.isStartedState=!1,this.notifyQuestionsOnHidingContent(this.pages[0]),this.startTimerFromUI(),this.onStarted.fire(this,{}),this.updateVisibleIndexes(),this.currentPageNo=0,this.currentPage&&this.currentPage.locStrsChanged(),!0))}get isValidatingOnServer(){return this.getPropertyValue("isValidatingOnServer",!1)}setIsValidatingOnServer(e){e!=this.isValidatingOnServer&&(this.setPropertyValue("isValidatingOnServer",e),this.onIsValidatingOnServerChanged())}createServerValidationOptions(e,t,s){var i=this;const r={data:{},errors:{},survey:this,complete:function(){i.completeServerValidation(r,t,s)}};if(e&&this.isValidateOnComplete)r.data=this.data;else for(var n=this.activePage.questions,a=0;athis.createServerValidationOptions(e,t,s))),!0}completeServerValidation(e,t,s){if(!(this.serverValidationEventCount>1&&(this.serverValidationEventCount--,e&&e.errors&&0===Object.keys(e.errors).length))&&(this.serverValidationEventCount=0,this.setIsValidatingOnServer(!1),e||e.survey)){var i=e.survey,r=!1;if(e.errors){var n=this.autoFocusFirstError;for(var a in e.errors){var o=i.getQuestionByName(a);o&&o.errors&&(r=!0,o.addError(new Fs(e.errors[a],this)),n&&(n=!1,o.page&&(this.currentPage=o.page),o.focus(!0)))}this.fireValidatedErrorsOnPage(this.currentPage)}r||(t?this.showPreviewCore():s?this.currentPage=s:i.isLastPage?i.doComplete():i.doNextPage())}}doNextPage(){var e=this.currentPage;if(this.checkOnPageTriggers(!1),this.isCompleted)this.doComplete(!0);else if(this.partialSendEnabled&&this.sendResult(this.surveyPostId,this.clientId,!0),e===this.currentPage){var t=this.visiblePages,s=t.indexOf(this.currentPage);this.currentPage=t[s+1]}}setCompleted(e){this.doComplete(!0,e)}canBeCompleted(e,t){var s;if(!Ps.triggers.changeNavigationButtonsOnComplete)return;const i=this.canBeCompletedByTrigger;this.completedByTriggers||(this.completedByTriggers={}),t?this.completedByTriggers[e.id]={trigger:e,pageId:null===(s=this.currentPage)||void 0===s?void 0:s.id}:delete this.completedByTriggers[e.id],i!==this.canBeCompletedByTrigger&&this.updateButtonsVisibility()}get canBeCompletedByTrigger(){var e;if(!this.completedByTriggers)return!1;const t=Object.keys(this.completedByTriggers);if(0===t.length)return!1;const s=null===(e=this.currentPage)||void 0===e?void 0:e.id;if(!s)return!0;for(let e=0;ethis.getProgress()))}updateProgressText(e=!1){this.isShowingPreview||e&&"pages"==this.progressBarType&&this.onGetProgressText.isEmpty||(this.progressBarValue&&this.progressBarValue.resetProgressText(),this.resetPropertyValue("progressValue"))}getProgressText(){if(!this.isDesignMode&&null==this.currentPage)return"";const e={questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0,text:""};var t=this.progressBarType.toLowerCase();if("questions"===t||"requiredquestions"===t||"correctquestions"===t||!this.onGetProgressText.isEmpty){var s=this.getProgressInfo();e.questionCount=s.questionCount,e.answeredQuestionCount=s.answeredQuestionCount,e.requiredQuestionCount=s.requiredQuestionCount,e.requiredAnsweredQuestionCount=s.requiredAnsweredQuestionCount}return e.text=this.getProgressTextCore(e),this.onGetProgressText.fire(this,e),e.text}getProgressTextCore(e){var t=this.progressBarType.toLowerCase();if("questions"===t)return this.getLocalizationFormatString("questionsProgressText",e.answeredQuestionCount,e.questionCount);if("requiredquestions"===t)return this.getLocalizationFormatString("questionsProgressText",e.requiredAnsweredQuestionCount,e.requiredQuestionCount);if("correctquestions"===t){var s=this.getCorrectedAnswerCount();return this.getLocalizationFormatString("questionsProgressText",s,e.questionCount)}var i=this.isDesignMode?this.pages:this.visiblePages,r=i.indexOf(this.currentPage)+1;return this.getLocalizationFormatString("progressText",r,i.length)}getRootCss(){return(new Ct).append(this.css.root).append(this.css.rootProgress+"--"+this.progressBarType).append(this.css.rootMobile,this.isMobile).append(this.css.rootAnimationDisabled,!Ps.animationEnabled).append(this.css.rootReadOnly,this.readOnly&&!this.isDesignMode).append(this.css.rootCompact,this.isCompact).append(this.css.rootFitToContainer,this.fitToContainer).toString()}afterRenderSurvey(e){this.destroyResizeObserver(),Array.isArray(e)&&(e=Jt.GetFirstNonTextElement(e));let t=e;const s=this.css.variables;if(s){const e=Number.parseFloat(oe.getComputedStyle(t).getPropertyValue(s.mobileWidth));if(e){let s=!1;this.resizeObserver=new ResizeObserver((i=>{ae.requestAnimationFrame((()=>{s=!(s||!bs(t))&&this.processResponsiveness(t.offsetWidth,e,t.offsetHeight)}))})),this.resizeObserver.observe(t)}}this.onAfterRenderSurvey.fire(this,{survey:this,htmlElement:e}),this.rootElement=e,this.scrollerElement=e.getElementsByClassName("sv-scroll__scroller")[0],this.addScrollEventListener()}beforeDestroySurveyElement(){this.destroyResizeObserver(),this.removeScrollEventListener(),this.rootElement=void 0,this.scrollerElement=void 0}processResponsiveness(e,t,s){const i=et.processResponsiveness&&t.processResponsiveness(e)));const n={height:s,width:e};return this.onResize.fire(this,n),r}triggerResponsiveness(e){this.getAllQuestions().forEach((t=>{t.triggerResponsiveness(e)}))}destroyResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)}updateQuestionCssClasses(e,t){this.onUpdateQuestionCssClasses.fire(this,{question:e,cssClasses:t})}updatePanelCssClasses(e,t){this.onUpdatePanelCssClasses.fire(this,{panel:e,cssClasses:t})}updatePageCssClasses(e,t){this.onUpdatePageCssClasses.fire(this,{page:e,cssClasses:t})}updateChoiceItemCss(e,t){t.question=e,this.onUpdateChoiceItemCss.fire(this,t)}afterRenderPage(e){if(!this.isDesignMode&&!this.focusingQuestionInfo){const e=!1===this.isCurrentPageRendered;setTimeout((()=>this.scrollToTopOnPageChange(e)),1)}this.focusQuestionInfo(),this.isCurrentPageRendered=!0,this.onAfterRenderPage.isEmpty||this.onAfterRenderPage.fire(this,{page:this.activePage,htmlElement:e})}afterRenderHeader(e){this.onAfterRenderHeader.isEmpty||this.onAfterRenderHeader.fire(this,{htmlElement:e})}afterRenderQuestion(e,t){this.onAfterRenderQuestion.fire(this,{question:e,htmlElement:t})}afterRenderQuestionInput(e,t){if(this.onAfterRenderQuestionInput.isEmpty)return;let s=e.inputId;const{root:i}=Ps.environment;if(s&&(!t||t.id!==s)&&void 0!==i){let e=i.getElementById(s);e&&(t=e)}this.onAfterRenderQuestionInput.fire(this,{question:e,htmlElement:t})}afterRenderPanel(e,t){this.onAfterRenderPanel.fire(this,{panel:e,htmlElement:t})}whenQuestionFocusIn(e){this.onFocusInQuestion.fire(this,{question:e})}whenPanelFocusIn(e){this.onFocusInPanel.fire(this,{panel:e})}rebuildQuestionChoices(){this.getAllQuestions().forEach((e=>e.surveyChoiceItemVisibilityChange()))}canChangeChoiceItemsVisibility(){return!this.onShowingChoiceItem.isEmpty}getChoiceItemVisibility(e,t,s){const i={question:e,item:t,visible:s};return this.onShowingChoiceItem.fire(this,i),i.visible}loadQuestionChoices(e){this.onChoicesLazyLoad.fire(this,e)}getChoiceDisplayValue(e){this.onGetChoiceDisplayValue.isEmpty?e.setItems(null):this.onGetChoiceDisplayValue.fire(this,e)}matrixBeforeRowAdded(e){this.onMatrixRowAdding.fire(this,e)}matrixRowAdded(e,t){this.onMatrixRowAdded.fire(this,{question:e,row:t})}matrixColumnAdded(e,t){this.onMatrixColumnAdded.fire(this,{question:e,column:t})}multipleTextItemAdded(e,t){this.onMultipleTextItemAdded.fire(this,{question:e,item:t})}getQuestionByValueNameFromArray(e,t,s){var i=this.getQuestionsByValueName(e);if(i){for(var r=0;r{this.suspendLazyRendering(),Jt.ScrollElementToTop(l.elementId,r,n,(()=>{this.releaseLazyRendering(),is(t.id),o&&o()}))}),s)}else if(e.isPage&&!this.isSinglePage&&!this.isDesignMode&&this.rootElement){const e=this.rootElement.querySelector(vs(this.css.rootWrapper));Jt.ScrollElementToViewCore(e,!1,r,n,o)}else Jt.ScrollElementToTop(l.elementId,r,n,o)}}chooseFiles(e,t,s){this.onOpenFileChooser.isEmpty?function(e,t){ae.isFileReaderAvailable()&&(e.value="",e.onchange=s=>{if(!ae.isFileReaderAvailable())return;if(!e||!e.files||e.files.length<1)return;let i=[];for(let t=0;t{this.onUploadFiles.fire(this,{question:e,name:t,files:s||[],callback:(e,t)=>{i(e,t),r()}})})),this.surveyPostId&&this.uploadFilesCore(t,s,i)}downloadFile(e,t,s,i){this.onDownloadFile.isEmpty&&i&&i("skipped",s.content||s),this.onDownloadFile.fire(this,{question:e,name:t,content:s.content||s,fileValue:s,callback:i})}clearFiles(e,t,s,i,r){this.onClearFiles.isEmpty&&r&&r("success",s),this.onClearFiles.fire(this,{question:e,name:t,value:s,fileName:i,callback:r})}updateChoicesFromServer(e,t,s){var i={question:e,choices:t,serverResult:s};return this.onChoicesLoaded.fire(this,i),i.choices}loadedChoicesFromServer(e){this.locStrsChanged()}uploadFilesCore(e,t,s){this.reportWarningOnUsingService()}getPage(e){return this.pages[e]}addPage(e,t=-1){null!=e&&(t<0||t>=this.pages.length?this.pages.push(e):this.pages.splice(t,0,e))}addNewPage(e=null,t=-1){var s=this.createNewPage(e);return this.addPage(s,t),s}removePage(e){var t=this.pages.indexOf(e);t<0||(this.pages.splice(t,1),this.currentPage==e&&(this.currentPage=this.pages.length>0?this.pages[0]:null))}getQuestionByName(e,t=!1){if(!e)return null;t&&(e=e.toLowerCase());var s=(t?this.questionHashes.namesInsensitive:this.questionHashes.names)[e];return s?s[0]:null}findQuestionByName(e){return this.getQuestionByName(e)}getEditingSurveyElement(){return this.editingObjValue}getQuestionByValueName(e,t=!1){var s=this.getQuestionsByValueName(e,t);return s?s[0]:null}getQuestionsByValueName(e,t=!1){var s=(t?this.questionHashes.valueNamesInsensitive:this.questionHashes.valueNames)[e];return s||null}getCalculatedValueByName(e){for(var t=0;t{s.push(e),e.getNestedQuestions(t).forEach((e=>s.push(e)))})),s}getQuizQuestions(){for(var e=new Array,t=this.getPageStartIndex();t0&&e.push(r)}return e}getPanelByName(e,t=!1){var s=this.getAllPanels();t&&(e=e.toLowerCase());for(var i=0;i0)&&this.checkQuestionErrorOnValueChangedCore(e)}checkQuestionErrorOnValueChangedCore(e){var t=e.getAllErrors().length,s=!e.validate(!0,{isOnValueChanged:!this.isValidateOnValueChanging});return e.page&&this.isValidateOnValueChange&&(t>0||e.getAllErrors().length>0)&&this.fireValidatedErrorsOnPage(e.page),s}checkErrorsOnValueChanging(e,t){if(this.isLoadingFromJson)return!1;var s=this.getQuestionsByValueName(e);if(!s)return!1;for(var i=!1,r=0;r0}return i}fireOnValueChanged(e,t,s){this.onValueChanged.fire(this,{name:e,question:s,value:t,reason:this.getValueChangeReason()})}notifyQuestionOnValueChanged(e,t,s){if(!this.isLoadingFromJson){var i=this.getQuestionsByValueName(e);if(i)for(var r=0;r{s.runTriggers(e,t,this.questionTriggersKeys)}))}checkIfNewPagesBecomeVisible(e){var t=this.pages.indexOf(this.currentPage);if(!(t<=e+1))for(var s=e+1;s0||!s.isStartPage);s.visibleIndex=i?e++:-1,s.num=i?s.visibleIndex+1:-1}}fromJSON(e,t){if(!e)return;this.questionHashesClear(),this.jsonErrors=null,this.sjsVersion=void 0;const s=new Se;s.toObject(e,this,t),s.errors.length>0&&(this.jsonErrors=s.errors),this.onStateAndCurrentPageChanged(),this.endLoading(),this.updateState(),this.sjsVersion&&Ps.version&&ue.compareVerions(this.sjsVersion,Ps.version)>0&&ke.warn("The version of the survey JSON schema (v"+this.sjsVersion+") is newer than your current Form Library version ("+Ps.version+"). Please update the Form Library to make sure that all survey features work as expected.")}startLoadingFromJson(e){super.startLoadingFromJson(e),e&&e.locale&&(this.locale=e.locale)}setJsonObject(e){this.fromJSON(e)}endLoadingFromJson(){this.isEndLoadingFromJson="processing",this.onFirstPageIsStartedChanged(),super.endLoadingFromJson(),this.hasCookie&&(this.isCompletedBefore=!0),this.doElementsOnLoad(),this.onQuestionsOnPageModeChanged("standard"),this.isEndLoadingFromJson="conditions",this.runConditions(),this.notifyElementsOnAnyValueOrVariableChanged(""),this.isEndLoadingFromJson=null,this.updateVisibleIndexes(),this.updateCurrentPage(),this.setCalculatedWidthModeUpdater()}updateNavigationCss(){const e=this.navigationBarValue;e&&(e.cssClasses=this.css.actionBar,e.containerCss=this.css.footer,this.updateNavigationItemCssCallback&&this.updateNavigationItemCssCallback())}createNavigationBar(){const e=new xt;return e.setItems(this.createNavigationActions()),e.locOwner=this,e}createNavigationActions(){const e="sv-nav-btn",t=new Nt({id:"sv-nav-start",visible:new ct((()=>this.isStartPageActive)),visibleIndex:10,locTitle:this.locStartSurveyText,action:()=>this.start(),component:e}),s=new Nt({id:"sv-nav-prev",visible:new ct((()=>this.isShowPrevButton)),visibleIndex:20,data:{mouseDown:()=>this.navigationMouseDown()},locTitle:this.locPagePrevText,action:()=>this.performPrevious(),component:e}),i=new Nt({id:"sv-nav-next",visible:new ct((()=>this.isShowNextButton)),visibleIndex:30,data:{mouseDown:()=>this.nextPageMouseDown()},locTitle:this.locPageNextText,action:()=>this.nextPageUIClick(),component:e}),r=new Nt({id:"sv-nav-preview",visible:new ct((()=>this.isPreviewButtonVisible)),visibleIndex:40,data:{mouseDown:()=>this.navigationMouseDown()},locTitle:this.locPreviewText,action:()=>this.showPreview(),component:e}),n=new Nt({id:"sv-nav-complete",visible:new ct((()=>this.isCompleteButtonVisible)),visibleIndex:50,data:{mouseDown:()=>this.navigationMouseDown()},locTitle:this.locCompleteText,action:()=>this.taskManager.waitAndExecute((()=>this.tryComplete())),component:e});return this.updateNavigationItemCssCallback=()=>{t.innerCss=this.cssNavigationStart,s.innerCss=this.cssNavigationPrev,i.innerCss=this.cssNavigationNext,r.innerCss=this.cssNavigationPreview,n.innerCss=this.cssNavigationComplete},[t,s,i,r,n]}onBeforeRunConstructor(){}onBeforeCreating(){}onCreating(){}getProcessedTextValue(e){if(this.getProcessedTextValueCore(e),!this.onProcessDynamicText.isEmpty){var t=this.isValueEmpty(e.value);this.onProcessDynamicText.fire(this,e),e.isExists=e.isExists||t&&!this.isValueEmpty(e.value)}}getBuiltInVariableValue(e){if("pageno"===e){var t=this.currentPage;return null!=t?this.visiblePages.indexOf(t)+1:0}return"pagecount"===e?this.visiblePageCount:"correctedanswers"===e||"correctanswers"===e||"correctedanswercount"===e?this.getCorrectedAnswerCount():"incorrectedanswers"===e||"incorrectanswers"===e||"incorrectedanswercount"===e?this.getInCorrectedAnswerCount():"questioncount"===e?this.getQuizQuestionCount():void 0}getProcessedTextValueCore(e){var t=e.name.toLocaleLowerCase();if(-1!==["no","require","title"].indexOf(t))return;const s=this.getBuiltInVariableValue(t);if(void 0!==s)return e.isExists=!0,void(e.value=s);if("locale"===t)return e.isExists=!0,void(e.value=this.locale?this.locale:de.defaultLocale);var i=this.getVariable(t);if(void 0!==i)return e.isExists=!0,void(e.value=i);var r=this.getFirstName(t);if(r){const s=r.useDisplayValuesInDynamicTexts;e.isExists=!0;const i=r.getValueName().toLowerCase();t=(t=i+t.substring(i.length)).toLocaleLowerCase();var n={};return n[i]=e.returnDisplayValue&&s?r.getDisplayValue(!1,void 0):r.value,void(e.value=(new Re).getValue(t,n))}this.getProcessedValuesWithoutQuestion(e)}getProcessedValuesWithoutQuestion(e){var t=this.getValue(e.name);if(void 0!==t)return e.isExists=!0,void(e.value=t);const s=new Re,i=s.getFirstName(e.name);if(i===e.name)return;const r={};let n=this.getValue(i);ue.isValueEmpty(n)&&(n=this.getVariable(i)),ue.isValueEmpty(n)||(r[i]=n,e.value=s.getValue(e.name,r),e.isExists=s.hasValue(e.name,r))}getFirstName(e){var t;e=e.toLowerCase();do{t=this.getQuestionByValueName(e,!0),e=this.reduceFirstName(e)}while(!t&&e);return t}reduceFirstName(e){var t=e.lastIndexOf("."),s=e.lastIndexOf("[");if(t<0&&s<0)return"";var i=Math.max(t,s);return e.substring(0,i)}clearUnusedValues(){this.isClearingUnsedValues=!0;for(var e=this.getAllQuestions(),t=0;t-1||e.indexOf("[")>-1)&&(new Re).hasValue(e,this.variablesHash)?(new Re).getValue(e,this.variablesHash):t}setVariable(e,t){if(!e)return;const s=this.getVariable(e);this.valuesHash&&delete this.valuesHash[e],e=e.toLowerCase(),this.variablesHash[e]=t,this.notifyElementsOnAnyValueOrVariableChanged(e),ue.isTwoValueEquals(s,t)||(this.checkTriggersAndRunConditions(e,t,s),this.onVariableChanged.fire(this,{name:e,value:t}))}getVariableNames(){var e=[];for(var t in this.variablesHash)e.push(t);return e}getUnbindValue(e){return this.editingObj?e:ue.getUnbindValue(e)}getValue(e){if(!e||0==e.length)return null;var t=this.getDataValueCore(this.valuesHash,e);return this.getUnbindValue(t)}setValue(e,t,s=!1,i=!0,r){var n=t;if(i&&(n=this.questionOnValueChanging(e,t)),(!this.isValidateOnValueChanging||!this.checkErrorsOnValueChanging(e,n))&&(this.editingObj||!this.isValueEqual(e,n)||!this.isTwoValueEquals(n,t))){var a=this.getValue(e);this.isValueEmpyOnSetValue(e,n)?this.deleteDataValueCore(this.valuesHash,e):(n=this.getUnbindValue(n),this.setDataValueCore(this.valuesHash,e,n)),this.updateOnSetValue(e,n,a,s,i,r)}}isValueEmpyOnSetValue(e,t){return!!this.isValueEmpty(t,!1)&&(!this.editingObj||null==t||this.editingObj.getDefaultPropertyValue(e)===t)}updateOnSetValue(e,t,s,i=!1,r=!0,n){this.updateQuestionValue(e,t),!0===i||this.isDisposed||this.isRunningElementsBindings||(n=n||e,this.checkTriggersAndRunConditions(e,t,s),r&&this.notifyQuestionOnValueChanged(e,t,n),"text"!==i&&this.tryGoNextPageAutomatic(e))}isValueEqual(e,t){""!==t&&void 0!==t||(t=null);var s=this.getValue(e);return""!==s&&void 0!==s||(s=null),null===t||null===s?t===s:this.isTwoValueEquals(t,s)}doOnPageAdded(e){if(e.setSurveyImpl(this),e.name||(e.name=this.generateNewName(this.pages,"page")),this.questionHashesPanelAdded(e),this.updateVisibleIndexes(),!this.runningPages&&(this.isLoadingFromJson||(this.updateProgressText(),this.updateCurrentPage()),this.canFireAddPage())){var t={page:e};this.onPageAdded.fire(this,t)}}canFireAddPage(){return!this.isMovingPage}doOnPageRemoved(e){e.setSurveyImpl(null),this.runningPages||(e===this.currentPage&&this.updateCurrentPage(),this.updateVisibleIndexes(),this.updateProgressText(),this.updateLazyRenderingRowsOnRemovingElements())}generateNewName(e,t){for(var s={},i=0;i{e===this.currentSingleElement&&(this.isLastElement?this.autoAdvanceAllowComplete&&this.tryCompleteOrShowPreview():this.performNext())};Ji.safeTimeOut(t,Ps.autoAdvanceDelay)}var s=this.getCurrentPageQuestions();if(s.indexOf(t)<0)return;for(var i=0;i{r===this.currentPage&&(this.isLastPage?this.tryCompleteOrShowPreview():this.nextPage())}),Ps.autoAdvanceDelay)}tryCompleteOrShowPreview(){this.showPreviewBeforeComplete?this.showPreview():this.tryComplete()}getComment(e){return this.getValue(e+this.commentSuffix)||""}setComment(e,t,s=!1){if(t||(t=""),this.isTwoValueEquals(t,this.getComment(e)))return;const i=e+this.commentSuffix;t=this.questionOnValueChanging(i,t,e),this.isValueEmpty(t)?this.deleteDataValueCore(this.valuesHash,i):this.setDataValueCore(this.valuesHash,i,t);var r=this.getQuestionsByValueName(e);if(r)for(var n=0;n-1&&i.splice(r,1),0==i.length&&delete e[s]}}panelAdded(e,t,s,i){e.name||(e.name=this.generateNewName(this.getAllPanels(!1,!0),"panel")),this.questionHashesPanelAdded(e),this.updateVisibleIndexes(e.page),this.canFireAddElement()&&this.onPanelAdded.fire(this,{panel:e,name:e.name,index:t,parent:s,page:i,parentPanel:s,rootPanel:i})}panelRemoved(e){this.updateVisibleIndexes(e.page),this.onPanelRemoved.fire(this,{panel:e,name:e.name}),this.updateLazyRenderingRowsOnRemovingElements()}validateQuestion(e,t,s){if(!this.onValidateQuestion.isEmpty){var i={name:e.name,question:e,value:e.value,errors:t,error:null};this.onValidateQuestion.fire(this,i),i.error&&t.push(new Fs(i.error,this))}s&&this.beforeSettingQuestionErrors(e,t)}validatePanel(e,t,s){if(e.isPanel&&!this.onValidatePanel.isEmpty){const s={name:e.name,panel:e,error:null,errors:t};this.onValidatePanel.fire(this,s),s.error&&t.push(new Fs(s.error,this))}s&&this.makeRequiredErrorsInvisible(t)}processHtml(e,t){t||(t="");var s={html:e,reason:t};return this.onProcessHtml.fire(this,s),this.processText(s.html,!0)}processText(e,t){return this.processTextEx({text:e,returnDisplayValue:t,doEncoding:!1}).text}processTextEx(e){const t=void 0===e.doEncoding?Ps.web.encodeUrlParams:e.doEncoding;let s=e.text;!e.runAtDesign&&this.isDesignMode||(s=this.textPreProcessor.process(s,!0===e.returnDisplayValue,t,e.replaceUndefinedValues));const i={text:s,hasAllValuesOnLastRun:!0};return i.hasAllValuesOnLastRun=this.textPreProcessor.hasAllValuesOnLastRun,i}get textPreProcessor(){return this.textPreProcessorValue||(this.textPreProcessorValue=new pi,this.textPreProcessorValue.onProcess=e=>{this.getProcessedTextValue(e)}),this.textPreProcessorValue}getSurveyMarkdownHtml(e,t,s,i){const r={element:e,text:t,name:s,item:i,html:null};return this.onTextMarkdown.fire(this,r),r.html}getCorrectedAnswerCount(){return this.getCorrectAnswerCount()}getCorrectAnswerCount(){return this.getCorrectedAnswerCountCore(!0)}getQuizQuestionCount(){for(var e=this.getQuizQuestions(),t=0,s=0;se.updateGridColumns()))}get widthMode(){return this.getPropertyValue("widthMode")}set widthMode(e){this.setPropertyValue("widthMode",e)}setCalculatedWidthModeUpdater(){this.isLoadingFromJson||(this.calculatedWidthModeUpdater&&this.calculatedWidthModeUpdater.dispose(),this.calculatedWidthModeUpdater=new ct((()=>this.calculateWidthMode())),this.calculatedWidthMode=this.calculatedWidthModeUpdater)}calculateWidthMode(){if("auto"==this.widthMode){let e=!1;return this.pages.forEach((t=>{t.needResponsiveWidth()&&(e=!0)})),e?"responsive":"static"}return this.widthMode}get width(){return this.getPropertyValue("width")}set width(e){this.setPropertyValue("width",e)}get renderedWidth(){const e="static"==this.getPropertyValue("calculatedWidthMode");let t=this.getPropertyValue("width");if(this.isScaled&&this.responsiveStartWidth>1){let s=this.responsiveStartWidth;try{t=t||this.staticStartWidth,s=isNaN(t)?parseFloat(t.toString().replace("px","")):t}catch(e){}return(e?s:this.responsiveStartWidth)*this.widthScale/100+"px"}return t&&!isNaN(t)&&(t+="px"),e&&t||void 0}setStaticStartWidth(e){this.staticStartWidth=e}setResponsiveStartWidth(e){this.responsiveStartWidth=e}get isScaled(){return Math.abs(this.widthScale-100)>.001}get timerInfo(){return this.getTimerInfo()}get timerClock(){let e,t;if(this.currentPage){let{spent:s,limit:i,minorSpent:r,minorLimit:n}=this.getTimerInfo();e=i>0?this.getDisplayClockTime(i-s):this.getDisplayClockTime(s),void 0!==r&&(t=n>0?this.getDisplayClockTime(n-r):this.getDisplayClockTime(r))}return{majorText:e,minorText:t}}get timerInfoText(){const e={text:this.getTimerInfoText()};this.onTimerPanelInfoText.fire(this,e);var t=new Xt(this,!0);return t.text=e.text,t.textOrHtml}getTimerInfo(){let e=this.currentPage;if(!e)return{spent:0,limit:0};let t=e.timeSpent,s=this.timeSpent,i=e.getMaxTimeToFinish(),r=this.timeLimit;return"page"==this.timerInfoMode?{spent:t,limit:i}:"survey"==this.timerInfoMode?{spent:s,limit:r}:i>0&&r>0?{spent:t,limit:i,minorSpent:s,minorLimit:r}:i>0?{spent:t,limit:i,minorSpent:s}:r>0?{spent:s,limit:r,minorSpent:t}:{spent:t,minorSpent:s}}getTimerInfoText(){var e=this.currentPage;if(!e)return"";var t=this.getDisplayTime(e.timeSpent),s=this.getDisplayTime(this.timeSpent),i=e.getMaxTimeToFinish(),r=this.getDisplayTime(i),n=this.getDisplayTime(this.timeLimit);if("page"==this.timerInfoMode)return this.getTimerInfoPageText(e,t,r);if("survey"==this.timerInfoMode)return this.getTimerInfoSurveyText(s,n);if("combined"==this.timerInfoMode){if(i<=0&&this.timeLimit<=0)return this.getLocalizationFormatString("timerSpentAll",t,s);if(i>0&&this.timeLimit>0)return this.getLocalizationFormatString("timerLimitAll",t,r,s,n);return this.getTimerInfoPageText(e,t,r)+" "+this.getTimerInfoSurveyText(s,n)}return""}getTimerInfoPageText(e,t,s){return e&&e.getMaxTimeToFinish()>0?this.getLocalizationFormatString("timerLimitPage",t,s):this.getLocalizationFormatString("timerSpentPage",t,s)}getTimerInfoSurveyText(e,t){const s=this.timeLimit>0?"timerLimitSurvey":"timerSpentSurvey";return this.getLocalizationFormatString(s,e,t)}getDisplayClockTime(e){e<0&&(e=0);const t=Math.floor(e/60),s=e%60;let i=s.toString();return s<10&&(i="0"+i),`${t}:${i}`}getDisplayTime(e){const t=Math.floor(e/60),s=e%60;let i="";return t>0&&(i+=t+" "+this.getLocalizationString("timerMin")),i&&0==s?i:(i&&(i+=" "),i+s+" "+this.getLocalizationString("timerSec"))}get timerModel(){return this.timerModelValue}startTimer(){this.isEditMode&&this.timerModel.start()}startTimerFromUI(){this.showTimer&&"running"===this.state&&this.startTimer()}stopTimer(){this.timerModel.stop()}get timeSpent(){return this.timerModel.spent}set timeSpent(e){this.timerModel.spent=e}get timeLimit(){return this.getPropertyValue("timeLimit",0)}set timeLimit(e){this.setPropertyValue("timeLimit",e)}get maxTimeToFinish(){return this.timeLimit}set maxTimeToFinish(e){this.timeLimit=e}get timeLimitPerPage(){return this.getPropertyValue("timeLimitPerPage",0)}set timeLimitPerPage(e){this.setPropertyValue("timeLimitPerPage",e)}get maxTimeToFinishPage(){return this.timeLimitPerPage}set maxTimeToFinishPage(e){this.timeLimitPerPage=e}doTimer(e){if(this.onTimerTick.fire(this,{}),this.timeLimit>0&&this.timeLimit<=this.timeSpent&&(this.timeSpent=this.timeLimit,this.tryComplete()),e){var t=e.getMaxTimeToFinish();t>0&&t==e.timeSpent&&(this.isLastPage?this.tryComplete():this.nextPage())}}get inSurvey(){return!0}getSurveyData(){return this}getSurvey(){return this}getTextProcessor(){return this}getObjects(e,t){var s=[];return Array.prototype.push.apply(s,this.getPagesByNames(e)),Array.prototype.push.apply(s,this.getQuestionsByNames(t)),s}setTriggerValue(e,t,s){if(e)if(s)this.setVariable(e,t);else{var i=this.getQuestionByName(e);if(this.startSetValueFromTrigger(),i)i.value=t;else{var r=new Re,n=r.getFirstName(e);if(n==e)this.setValue(e,t);else{if(!this.getQuestionByName(n))return;var a=this.getUnbindValue(this.getFilteredValues());r.setValue(a,e,t),this.setValue(n,a[n])}}this.finishSetValueFromTrigger()}}copyTriggerValue(e,t,s){if(!e||!t)return;let i;if(s)i=this.processText("{"+t+"}",!0);else{i=(new Re).getValue(t,this.getFilteredValues())}this.setTriggerValue(e,i,!1)}triggerExecuted(e){this.onTriggerExecuted.fire(this,{trigger:e})}get isSettingValueFromTrigger(){return this.setValueFromTriggerCounter>0}startSetValueFromTrigger(){this.setValueFromTriggerCounter++}finishSetValueFromTrigger(){this.setValueFromTriggerCounter--}startMovingQuestion(){this.isMovingQuestion=!0}stopMovingQuestion(){this.isMovingQuestion=!1}get isQuestionDragging(){return this.isMovingQuestion}startMovingPage(){this.isMovingPage=!0}stopMovingPage(){this.isMovingPage=!1}focusQuestion(e){return this.focusQuestionByInstance(this.getQuestionByName(e,!0))}focusQuestionByInstance(e,t=!1){var s;if(!e||!e.isVisible||!e.page)return!1;if((null===(s=this.focusingQuestionInfo)||void 0===s?void 0:s.question)===e)return!1;this.focusingQuestionInfo={question:e,onError:t},this.skippedPages.push({from:this.currentPage,to:e.page});const i=this.activePage!==e.page&&!e.page.isStartPage;return i&&(this.currentPage=e.page,this.isSingleVisibleQuestion&&!this.isDesignMode&&(this.currentSingleElement=e)),i||this.focusQuestionInfo(),!0}focusQuestionInfo(){var e;const t=null===(e=this.focusingQuestionInfo)||void 0===e?void 0:e.question;t&&!t.isDisposed&&t.focus(this.focusingQuestionInfo.onError),this.focusingQuestionInfo=void 0}questionEditFinishCallback(e,t){const s=this.enterKeyAction||Ps.enterKeyAction;if("loseFocus"==s&&t.target.blur(),"moveToNextEditor"==s){const s=this.currentPage.questions,i=s.indexOf(e);i>-1&&it.id===e))[0];return t}removeLayoutElement(e){const t=this.findLayoutElement(e);if(t){const e=this.layoutElements.indexOf(t);this.layoutElements.splice(e,1)}return t}getContainerContent(e){const t=new Array;for(let s of this.layoutElements)if("display"!==this.mode&&gr(s.id,"timerpanel"))"header"===e&&this.isTimerPanelShowingOnTop&&!this.isStartPageActive&&t.push(s),"footer"===e&&this.isTimerPanelShowingOnBottom&&!this.isStartPageActive&&t.push(s);else if("running"===this.state&&gr(s.id,this.progressBarComponentName)){if("singlePage"!=this.questionsOnPageMode||"questions"==this.progressBarType){const i=this.findLayoutElement("advanced-header"),r=i&&i.data;let n=!r||r.hasBackground;gr(this.progressBarLocation,"aboveHeader")&&(n=!1),gr(this.progressBarLocation,"belowHeader")&&(n=!0),"header"!==e||n||(s.index=-150,this.isShowProgressBarOnTop&&!this.isStartPageActive&&t.push(s)),"center"===e&&n&&(s.index&&delete s.index,this.isShowProgressBarOnTop&&!this.isStartPageActive&&t.push(s)),"footer"===e&&this.isShowProgressBarOnBottom&&!this.isStartPageActive&&t.push(s)}}else gr(s.id,"buttons-navigation")?("contentTop"===e&&-1!==["top","both"].indexOf(this.isNavigationButtonsShowing)&&t.push(s),"contentBottom"===e&&-1!==["bottom","both"].indexOf(this.isNavigationButtonsShowing)&&t.push(s)):"running"===this.state&&gr(s.id,"toc-navigation")&&this.showTOC?("left"===e&&-1!==["left","both"].indexOf(this.tocLocation)&&t.push(s),"right"===e&&-1!==["right","both"].indexOf(this.tocLocation)&&t.push(s)):gr(s.id,"advanced-header")?("running"===this.state||"starting"===this.state||!0===this.showHeaderOnCompletePage&&"completed"===this.state)&&s.container===e&&t.push(s):(Array.isArray(s.container)&&-1!==s.container.indexOf(e)||s.container===e)&&t.push(s);return t.sort(((e,t)=>(e.index||0)-(t.index||0))),t.forEach((e=>{e.getData&&(e.data=e.getData())})),t}processPopupVisiblityChanged(e,t,s){this.onPopupVisibleChanged.fire(this,{question:e,popup:t,visible:s})}processOpenDropdownMenu(e,t){const s=Object.assign({question:e},t);this.onOpenDropdownMenu.fire(this,s),t.menuType=s.menuType}getCssTitleExpandableSvg(){return null}applyTheme(e){if(e){if(Object.keys(e).forEach((t=>{"header"!==t&&("isPanelless"===t?this.isCompact=e[t]:this[t]=e[t])})),"header"in e&&!e.headerView&&(this.headerView="advanced"),"basic"!==this.headerView){this.removeLayoutElement("advanced-header");const t=new er;t.fromTheme(e),this.insertAdvancedHeader(t)}this.themeChanged(e)}}themeChanged(e){this.getAllQuestions().forEach((t=>t.themeChanged(e)))}dispose(){if(this.unConnectEditingObj(),this.removeScrollEventListener(),this.destroyResizeObserver(),this.rootElement=void 0,this.layoutElements){for(var e=0;e0&&s.getBoundingClientRect().y<=this.scrollerElement.getBoundingClientRect().y)}get rootScrollDisabled(){return!(this.fitToContainer&&this.formScrollDisabled)}get formScrollDisabled(){return!this.backgroundImage||"fixed"!==this.backgroundImageAttachment}onScroll(){this.rootElement&&(this._isElementShouldBeSticky(".sv-components-container-center")?this.rootElement.classList&&this.rootElement.classList.add("sv-root--sticky-top"):this.rootElement.classList&&this.rootElement.classList.remove("sv-root--sticky-top")),this.onScrollCallback&&this.onScrollCallback()}addScrollEventListener(){this.scrollHandler=()=>{this.onScroll()},this.rootElement.addEventListener("scroll",this.scrollHandler),this.rootElement.getElementsByTagName("form")[0]&&this.rootElement.getElementsByTagName("form")[0].addEventListener("scroll",this.scrollHandler),this.scrollerElement&&this.scrollerElement.addEventListener("scroll",this.scrollHandler)}removeScrollEventListener(){this.rootElement&&this.scrollHandler&&(this.rootElement.removeEventListener("scroll",this.scrollHandler),this.rootElement.getElementsByTagName("form")[0]&&this.rootElement.getElementsByTagName("form")[0].removeEventListener("scroll",this.scrollHandler),this.scrollerElement&&this.scrollerElement.removeEventListener("scroll",this.scrollHandler))}}function gr(e,t){return!!e&&(!!t&&e.toUpperCase()===t.toUpperCase())}mr.TemplateRendererComponentName="sv-template-renderer",mr.platform="unknown",ft([pe()],mr.prototype,"completedCss",void 0),ft([pe()],mr.prototype,"completedBeforeCss",void 0),ft([pe()],mr.prototype,"loadingBodyCss",void 0),ft([pe()],mr.prototype,"containerCss",void 0),ft([pe({onSet:(e,t)=>{t.updateCss()}})],mr.prototype,"fitToContainer",void 0),ft([pe({onSet:(e,t)=>{if("basic"===e)t.removeLayoutElement("advanced-header");else{if(!t.findLayoutElement("advanced-header")){const e=new er;t.insertAdvancedHeader(e)}}}})],mr.prototype,"headerView",void 0),ft([pe()],mr.prototype,"showBrandInfo",void 0),ft([pe()],mr.prototype,"enterKeyAction",void 0),ft([pe()],mr.prototype,"lazyRenderFirstBatchSizeValue",void 0),ft([pe({defaultValue:{}})],mr.prototype,"cssVariables",void 0),ft([pe()],mr.prototype,"_isMobile",void 0),ft([pe()],mr.prototype,"_isCompact",void 0),ft([pe({onSet:(e,t)=>{t.updateCss()}})],mr.prototype,"backgroundImage",void 0),ft([pe()],mr.prototype,"backgroundImageFit",void 0),ft([pe({onSet:(e,t)=>{t.updateCss()}})],mr.prototype,"backgroundImageAttachment",void 0),ft([pe()],mr.prototype,"wrapperFormCss",void 0),ft([pe({getDefaultValue:e=>"buttons"===e.progressBarType})],mr.prototype,"progressBarShowPageTitles",void 0),ft([pe()],mr.prototype,"progressBarShowPageNumbers",void 0),ft([pe()],mr.prototype,"progressBarInheritWidthFrom",void 0),ft([pe({defaultValue:!0})],mr.prototype,"validationEnabled",void 0),ft([pe()],mr.prototype,"rootCss",void 0),ft([pe({onSet:(e,t)=>{t.updateGridColumns()}})],mr.prototype,"gridLayoutEnabled",void 0),ft([pe()],mr.prototype,"calculatedWidthMode",void 0),ft([pe({defaultValue:100,onSet(e,t,s){t.pages.forEach((e=>e.updateRootStyle()))}})],mr.prototype,"widthScale",void 0),ft([pe()],mr.prototype,"staticStartWidth",void 0),ft([pe()],mr.prototype,"responsiveStartWidth",void 0),ft([ge()],mr.prototype,"layoutElements",void 0),Ie.addClass("survey",[{name:"locale",choices:()=>de.getLocales(!0),onGetValue:e=>e.locale==de.defaultLocale?null:e.locale},{name:"title",serializationProperty:"locTitle",dependsOn:"locale"},{name:"description:text",serializationProperty:"locDescription",dependsOn:"locale"},{name:"logo:file",serializationProperty:"locLogo"},{name:"logoWidth",default:"auto",minValue:0},{name:"logoHeight",default:"40px",minValue:0},{name:"logoFit",default:"contain",choices:["none","contain","cover","fill"]},{name:"logoPosition",default:"left",choices:["none","left","right","top","bottom"]},{name:"autoFocusFirstQuestion:boolean",alternativeName:"focusFirstQuestionAutomatic"},{name:"autoFocusFirstError:boolean",default:!0,alternativeName:"focusOnFirstError"},{name:"completedHtml:html",serializationProperty:"locCompletedHtml"},{name:"completedBeforeHtml:html",serializationProperty:"locCompletedBeforeHtml"},{name:"completedHtmlOnCondition:htmlconditions",className:"htmlconditionitem",isArray:!0},{name:"loadingHtml:html",serializationProperty:"locLoadingHtml"},{name:"pages:surveypages",className:"page",isArray:!0,onSerializeValue:e=>e.originalPages||e.pages},{name:"elements",alternativeName:"questions",baseClassName:"question",visible:!1,isLightSerializable:!1,onGetValue:function(e){return null},onSetValue:function(e,t,s){e.pages.splice(0,e.pages.length);var i=e.addNewPage("");s.toObject({questions:t},i,null==s?void 0:s.options)}},{name:"triggers:triggers",baseClassName:"surveytrigger",classNamePart:"trigger"},{name:"calculatedValues:calculatedvalues",className:"calculatedvalue",isArray:!0},{name:"sjsVersion",visible:!1},{name:"surveyId",visible:!1},{name:"surveyPostId",visible:!1},{name:"surveyShowDataSaving:boolean",visible:!1},"cookieName",{name:"partialSendEnabled:boolean",alternativeName:"sendResultOnPageNext"},{name:"showNavigationButtons:boolean",default:!0},{name:"navigationButtonsLocation",default:"bottom",choices:["top","bottom","topBottom"]},{name:"showPrevButton:boolean",default:!0,visibleIf:e=>"none"!==e.showNavigationButtons},{name:"showTitle:boolean",default:!0},{name:"showPageTitles:boolean",default:!0},{name:"showCompletePage:boolean",default:!0,alternativeName:"showCompletedPage"},"navigateToUrl",{name:"navigateToUrlOnCondition:urlconditions",className:"urlconditionitem",isArray:!0},{name:"questionOrder",alternativeName:"questionsOrder",default:"initial",choices:["initial","random"]},{name:"matrixDragHandleArea",visible:!1,default:"entireItem",choices:["entireItem","icon"]},"showPageNumbers:boolean",{name:"showQuestionNumbers",default:"off",choices:["on","onPage","recursive","off"]},{name:"questionTitleLocation",default:"top",choices:["top","bottom","left"]},{name:"questionDescriptionLocation",default:"underTitle",choices:["underInput","underTitle"]},{name:"questionErrorLocation",default:"top",choices:["top","bottom"]},{name:"showProgressBar:boolean",default:!1,onSetValue:(e,t,s)=>{e&&e.setShowProgressBar(t)}},{name:"progressBarLocation",default:"auto",choices:["auto","aboveheader","belowheader","bottom","topbottom"],visibleIf:e=>e.showProgressBar},{name:"progressBarType",default:"pages",choices:["pages","questions","requiredQuestions","correctQuestions"],visibleIf:e=>e.showProgressBar},{name:"progressBarShowPageTitles:switch",category:"navigation",visibleIf:e=>e.showProgressBar&&"pages"===e.progressBarType},{name:"progressBarShowPageNumbers:switch",default:!1,category:"navigation",visibleIf:e=>e.showProgressBar&&"pages"===e.progressBarType},{name:"progressBarInheritWidthFrom",default:"container",choices:["container","survey"],category:"navigation",visibleIf:e=>e.showProgressBar&&"pages"===e.progressBarType},{name:"showTOC:switch",default:!1},{name:"tocLocation",default:"left",choices:["left","right"],dependsOn:["showTOC"],visibleIf:e=>!!e&&e.showTOC},{name:"readOnly:boolean",default:!1},{name:"mode",default:"edit",choices:["edit","display"],visible:!1},{name:"storeOthersAsComment:boolean",default:!0},{name:"maxTextLength:number",default:0,minValue:0},{name:"maxCommentLength:number",default:0,minValue:0,alternativeName:"maxOthersLength"},{name:"autoAdvanceEnabled:boolean",alternativeName:"goNextPageAutomatic",onSetValue:function(e,t){"autogonext"!==t&&(t=ue.isTwoValueEquals(t,!0)),"autogonext"===t&&(t=!0),e.setPropertyValue("autoAdvanceEnabled",t)}},{name:"autoAdvanceAllowComplete:boolean",default:!0,alternativeName:"allowCompleteSurveyAutomatic",visibleIf:e=>!0===e.autoAdvanceEnabled},{name:"clearInvisibleValues",default:"onComplete",choices:["none","onComplete","onHidden","onHiddenContainer"]},{name:"checkErrorsMode",default:"onNextPage",choices:["onNextPage","onValueChanged","onComplete"]},{name:"validateVisitedEmptyFields:boolean",dependsOn:"checkErrorsMode",visibleIf:e=>"onValueChanged"===e.checkErrorsMode},{name:"textUpdateMode",default:"onBlur",choices:["onBlur","onTyping"]},{name:"autoGrowComment:boolean",default:!1},{name:"allowResizeComment:boolean",default:!0},{name:"commentAreaRows:number",minValue:1},{name:"startSurveyText",serializationProperty:"locStartSurveyText",visibleIf:e=>e.firstPageIsStartPage},{name:"pagePrevText",serializationProperty:"locPagePrevText",visibleIf:e=>"none"!==e.showNavigationButtons&&e.showPrevButton},{name:"pageNextText",serializationProperty:"locPageNextText",visibleIf:e=>"none"!==e.showNavigationButtons},{name:"completeText",serializationProperty:"locCompleteText",visibleIf:e=>"none"!==e.showNavigationButtons},{name:"previewText",serializationProperty:"locPreviewText",visibleIf:e=>e.showPreviewBeforeComplete},{name:"editText",serializationProperty:"locEditText",visibleIf:e=>e.showPreviewBeforeComplete},{name:"requiredMark",default:"*",alternativeName:"requiredText"},{name:"questionStartIndex",dependsOn:["showQuestionNumbers"],visibleIf:e=>!e||"off"!==e.showQuestionNumbers},{name:"questionTitlePattern",default:"numTitleRequire",dependsOn:["questionStartIndex","requiredMark"],choices:e=>e?e.getQuestionTitlePatternOptions():[]},{name:"questionTitleTemplate",visible:!1,isSerializable:!1,serializationProperty:"locQuestionTitleTemplate"},{name:"firstPageIsStartPage:boolean",default:!1,alternativeName:"firstPageIsStarted"},{name:"isSinglePage:boolean",default:!1,visible:!1,isSerializable:!1},{name:"questionsOnPageMode",default:"standard",choices:["standard","singlePage","questionPerPage"]},{name:"showPreviewBeforeComplete:boolean",default:!1,onSetValue:(e,t,s)=>{e&&e.setShowPreviewBeforeComplete(t)}},{name:"previewMode",default:"allQuestions",choices:["allQuestions","answeredQuestions"],visibleIf:e=>e.showPreviewBeforeComplete},{name:"showTimer:boolean"},{name:"timeLimit:number",alternativeName:"maxTimeToFinish",default:0,minValue:0,enableIf:e=>e.showTimer},{name:"timeLimitPerPage:number",alternativeName:"maxTimeToFinishPage",default:0,minValue:0,enableIf:e=>e.showTimer},{name:"timerLocation",default:"top",choices:["top","bottom"],enableIf:e=>e.showTimer},{name:"timerInfoMode",alternativeName:"showTimerPanelMode",default:"combined",choices:["page","survey","combined"],enableIf:e=>e.showTimer},{name:"showTimerPanel",visible:!1,isSerializable:!1},{name:"widthMode",default:"auto",choices:["auto","static","responsive"]},{name:"gridLayoutEnabled:boolean",default:!1},{name:"width",visibleIf:e=>"static"===e.widthMode},{name:"fitToContainer:boolean",default:!0,visible:!1},{name:"headerView",default:"basic",choices:["basic","advanced"],visible:!1},{name:"backgroundImage:file",visible:!1},{name:"backgroundImageFit",default:"cover",choices:["auto","contain","cover"],visible:!1},{name:"backgroundImageAttachment",default:"scroll",choices:["scroll","fixed"],visible:!1},{name:"backgroundOpacity:number",minValue:0,maxValue:1,default:1,visible:!1},{name:"showBrandInfo:boolean",default:!1,visible:!1}]);class vr extends ti{get waitingChoicesByURL(){return!this.isChoicesLoaded&&this.hasChoicesUrl}get selectedItemValues(){return this.getPropertyValue("selectedItemValues")}set selectedItemValues(e){this.setPropertyValue("selectedItemValues",e)}constructor(e){super(e),this.otherItemValue=new ii("other"),this.isSettingDefaultValue=!1,this.isSettingComment=!1,this.isRunningChoices=!1,this.isFirstLoadChoicesFromUrl=!0,this.isUpdatingChoicesDependedQuestions=!1,this._renderedChoices=[],this.renderedChoicesAnimation=new Ut(this.getRenderedChoicesAnimationOptions(),(e=>{this._renderedChoices=e,this.renderedChoicesChangedCallback&&this.renderedChoicesChangedCallback()}),(()=>this._renderedChoices)),this.headItemsCount=0,this.footItemsCount=0,this.prevIsOtherSelected=!1,this.noneItemValue=this.createDefaultItem(Ps.noneItemValue,"noneText","noneItemText"),this.refuseItemValue=this.createDefaultItem(Ps.refuseItemValue,"refuseText","refuseItemText"),this.dontKnowItemValue=this.createDefaultItem(Ps.dontKnowItemValue,"dontKnowText","dontKnowItemText"),this.createItemValues("choices"),this.registerPropertyChangedHandlers(["choices"],(()=>{this.filterItems()||this.onVisibleChoicesChanged()})),this.registerPropertyChangedHandlers(["choicesFromQuestion","choicesFromQuestionMode","choiceValuesFromQuestion","choiceTextsFromQuestion","showNoneItem","showRefuseItem","showDontKnowItem","isUsingRestful","isMessagePanelVisible"],(()=>{this.onVisibleChoicesChanged()})),this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"],(()=>{this.onVisibleChanged()})),this.registerPropertyChangedHandlers(["selecteditemValues"],(e=>{this.onSelectedItemValuesChangedHandler(e)})),this.createNewArray("visibleChoices",(()=>this.updateRenderedChoices()),(()=>this.updateRenderedChoices())),this.setNewRestfulProperty();var t=this.createLocalizableString("otherText",this.otherItemValue,!0,"otherItemText");this.createLocalizableString("otherErrorText",this,!0,"otherRequiredError"),this.createLocalizableString("otherPlaceholder",this,!1,!0),this.otherItemValue.locOwner=this,this.otherItemValue.setLocText(t),this.choicesByUrl.createItemValue=e=>this.createItemValue(e),this.choicesByUrl.beforeSendRequestCallback=()=>{this.onBeforeSendRequest()},this.choicesByUrl.getResultCallback=e=>{this.onLoadChoicesFromUrl(e)},this.choicesByUrl.updateResultCallback=(e,t)=>this.survey?this.survey.updateChoicesFromServer(this,e,t):e}getType(){return"selectbase"}dispose(){super.dispose();const e=this.getQuestionWithChoices();e&&e.removeDependedQuestion(this)}get otherTextAreaModel(){return this.otherTextAreaModelValue||(this.otherTextAreaModelValue=new $s(this.getOtherTextAreaOptions())),this.otherTextAreaModelValue}getOtherTextAreaOptions(){return{question:this,id:()=>this.otherId,propertyName:"otherValue",className:()=>this.cssClasses.other,placeholder:()=>this.otherPlaceholder,isDisabledAttr:()=>this.isInputReadOnly||!1,rows:()=>this.commentAreaRows,maxLength:()=>this.getOthersMaxLength(),autoGrow:()=>this.survey&&this.survey.autoGrowComment,ariaRequired:()=>this.ariaRequired||this.a11y_input_ariaRequired,ariaLabel:()=>this.ariaLabel||this.a11y_input_ariaLabel,getTextValue:()=>this.otherValue,onTextAreaChange:e=>{this.onOtherValueChange(e)},onTextAreaInput:e=>{this.onOtherValueInput(e)}}}resetDependedQuestion(){this.choicesFromQuestion=""}get otherId(){return this.id+"_other"}getCommentElementsId(){return[this.commentId,this.otherId]}getItemValueType(){return"itemvalue"}createItemValue(e,t){const s=Ie.createClass(this.getItemValueType(),{value:e});return s.locOwner=this,t&&(s.text=t),s}hasErrors(e=!0,t=null){return t&&!0===t.isOnValueChanged||this.clearIncorrectValues(),super.hasErrors(e,t)}get isUsingCarryForward(){return!!this.carryForwardQuestionType}get carryForwardQuestionType(){return this.getPropertyValue("carryForwardQuestionType")}setCarryForwardQuestionType(e,t){const s=e?"select":t?"array":void 0;this.setPropertyValue("carryForwardQuestionType",s)}get isUsingRestful(){return this.getPropertyValueWithoutDefault("isUsingRestful")||!1}updateIsUsingRestful(){this.setPropertyValueDirectly("isUsingRestful",this.hasChoicesUrl)}supportGoNextPageError(){return!this.isOtherSelected||!!this.otherValue}isLayoutTypeSupported(e){return!0}localeChanged(){super.localeChanged(),"none"!==this.choicesOrder&&(this.updateVisibleChoices(),this.onVisibleChoicesChanged())}locStrsChanged(){super.locStrsChanged(),this.choicesFromUrl&&(ii.locStrsChanged(this.choicesFromUrl),ii.locStrsChanged(this.visibleChoices)),this.isUsingCarryForward&&ii.locStrsChanged(this.visibleChoices)}updatePrevOtherErrorValue(e){const t=this.otherValue;e!==t&&(this.prevOtherErrorValue=t)}get otherValue(){return this.showCommentArea?this.otherValueCore:this.comment}set otherValue(e){this.updatePrevOtherErrorValue(e),this.showCommentArea?this.setOtherValueInternally(e):this.comment=e}get otherValueCore(){return this.getPropertyValue("otherValue")}set otherValueCore(e){this.setPropertyValue("otherValue",e)}get otherItem(){return this.otherItemValue}get isOtherSelected(){return this.hasOther&&this.getHasOther(this.renderedValue)}get isNoneSelected(){return this.showNoneItem&&this.getIsItemValue(this.renderedValue,this.noneItem)}get showNoneItem(){return this.getPropertyValue("showNoneItem")}set showNoneItem(e){this.setPropertyValue("showNoneItem",e)}get hasNone(){return this.showNoneItem}set hasNone(e){this.showNoneItem=e}get noneItem(){return this.noneItemValue}get noneText(){return this.getLocalizableStringText("noneText")}set noneText(e){this.setLocalizableStringText("noneText",e)}get locNoneText(){return this.getLocalizableString("noneText")}get showRefuseItem(){return this.getPropertyValue("showRefuseItem")}set showRefuseItem(e){this.setPropertyValue("showRefuseItem",e)}get refuseItem(){return this.refuseItemValue}get refuseText(){return this.getLocalizableStringText("refuseText")}set refuseText(e){this.setLocalizableStringText("refuseText",e)}get locRefuseText(){return this.getLocalizableString("refuseText")}get showDontKnowItem(){return this.getPropertyValue("showDontKnowItem")}set showDontKnowItem(e){this.setPropertyValue("showDontKnowItem",e)}get dontKnowItem(){return this.dontKnowItemValue}get dontKnowText(){return this.getLocalizableStringText("dontKnowText")}set dontKnowText(e){this.setLocalizableStringText("dontKnowText",e)}get locDontKnowText(){return this.getLocalizableString("dontKnowText")}createDefaultItem(e,t,s){const i=new ii(e),r=this.createLocalizableString(t,i,!0,s);return i.locOwner=this,i.setLocText(r),i}get choicesVisibleIf(){return this.getPropertyValue("choicesVisibleIf","")}set choicesVisibleIf(e){this.setPropertyValue("choicesVisibleIf",e),this.filterItems()}get choicesEnableIf(){return this.getPropertyValue("choicesEnableIf","")}set choicesEnableIf(e){this.setPropertyValue("choicesEnableIf",e),this.filterItems()}surveyChoiceItemVisibilityChange(){this.filterItems()}runConditionCore(e,t){super.runConditionCore(e,t),this.runItemsEnableCondition(e,t),this.runItemsCondition(e,t),this.choices.forEach((s=>{s.runConditionCore(e,t)}))}isTextValue(){return!0}setDefaultValue(){this.isSettingDefaultValue=!this.isValueEmpty(this.defaultValue)&&this.hasUnknownValue(this.defaultValue),this.prevOtherValue=void 0;const e=this.comment;super.setDefaultValue(),this.isSettingDefaultValue=!1,this.comment&&this.getStoreOthersAsComment()&&e!==this.comment&&(this.setValueCore(this.setOtherValueIntoValue(this.value)),this.setCommentIntoData(this.comment))}getIsMultipleValue(){return!1}convertDefaultValue(e){if(null==e||null==e)return e;if(this.getIsMultipleValue()){if(!Array.isArray(e))return[e]}else if(Array.isArray(e)&&e.length>0)return e[0];return e}filterItems(){if(this.isLoadingFromJson||!this.data||this.areInvisibleElementsShowing)return!1;var e=this.getDataFilteredValues(),t=this.getDataFilteredProperties();return this.runItemsEnableCondition(e,t),this.runItemsCondition(e,t)}runItemsCondition(e,t){this.setConditionalChoicesRunner();var s=this.runConditionsForItems(e,t);return this.filteredChoicesValue&&this.filteredChoicesValue.length===this.activeChoices.length&&(this.filteredChoicesValue=void 0),s&&(this.onVisibleChoicesChanged(),this.clearIncorrectValues()),s}runItemsEnableCondition(e,t){this.setConditionalEnableChoicesRunner(),ii.runEnabledConditionsForItems(this.activeChoices,this.conditionChoicesEnableIfRunner,e,t,((e,t)=>t&&this.onEnableItemCallBack(e)))&&this.clearDisabledValues(),this.onAfterRunItemsEnableCondition()}onAfterRunItemsEnableCondition(){}onEnableItemCallBack(e){return!0}onSelectedItemValuesChangedHandler(e){var t;null===(t=this.survey)||void 0===t||t.loadedChoicesFromServer(this)}getItemIfChoicesNotContainThisValue(e,t){return this.waitingChoicesByURL?this.createItemValue(e,t):null}getSingleSelectedItem(){const e=this.selectedItemValues;if(this.isEmpty())return null;const t=ii.getItemByValue(this.visibleChoices,this.value);return this.onGetSingleSelectedItem(t),t||e&&this.value==e.id||this.updateSelectedItemValues(),t||e||(this.isOtherSelected?this.otherItem:this.getItemIfChoicesNotContainThisValue(this.value))}onGetSingleSelectedItem(e){}getMultipleSelectedItems(){return[]}setConditionalChoicesRunner(){this.choicesVisibleIf?(this.conditionChoicesVisibleIfRunner||(this.conditionChoicesVisibleIfRunner=new lt(this.choicesVisibleIf)),this.conditionChoicesVisibleIfRunner.expression=this.choicesVisibleIf):this.conditionChoicesVisibleIfRunner=null}setConditionalEnableChoicesRunner(){this.choicesEnableIf?(this.conditionChoicesEnableIfRunner||(this.conditionChoicesEnableIfRunner=new lt(this.choicesEnableIf)),this.conditionChoicesEnableIfRunner.expression=this.choicesEnableIf):this.conditionChoicesEnableIfRunner=null}canSurveyChangeItemVisibility(){return!!this.survey&&this.survey.canChangeChoiceItemsVisibility()}changeItemVisibility(){return this.canSurveyChangeItemVisibility()?(e,t)=>this.survey.getChoiceItemVisibility(this,e,t):null}runConditionsForItems(e,t){this.filteredChoicesValue=[];const s=this.changeItemVisibility();return ii.runConditionsForItems(this.activeChoices,this.getFilteredChoices(),this.areInvisibleElementsShowing?null:this.conditionChoicesVisibleIfRunner,e,t,!this.survey||!this.survey.areInvisibleElementsShowing,((e,t)=>s?s(e,t):t))}getHasOther(e){return this.getIsItemValue(e,this.otherItem)}getIsItemValue(e,t){return e===t.value}get validatedValue(){return this.rendredValueToDataCore(this.value)}createRestful(){return new ui}setNewRestfulProperty(){this.setPropertyValue("choicesByUrl",this.createRestful()),this.choicesByUrl.owner=this,this.choicesByUrl.loadingOwner=this}get autoOtherMode(){return this.getPropertyValue("autoOtherMode")}set autoOtherMode(e){this.setPropertyValue("autoOtherMode",e)}getQuestionComment(){return this.showCommentArea?super.getQuestionComment():this.otherValueCore?this.otherValueCore:this.hasComment||this.getStoreOthersAsComment()?super.getQuestionComment():this.otherValueCore}selectOtherValueFromComment(e){e&&(this.prevIsOtherSelected=!0),this.value=e?this.otherItem.value:void 0}setQuestionComment(e){this.updatePrevOtherErrorValue(e),this.showCommentArea?super.setQuestionComment(e):(this.onUpdateCommentOnAutoOtherMode(e),this.getStoreOthersAsComment()?super.setQuestionComment(e):this.setOtherValueInternally(e),this.updateChoicesDependedQuestions())}onUpdateCommentOnAutoOtherMode(e){if(!this.autoOtherMode)return;this.prevOtherValue=void 0;const t=this.isOtherSelected;(!t&&e||t&&!e)&&this.selectOtherValueFromComment(!!e)}setOtherValueInternally(e){this.isSettingComment||e==this.otherValueCore||(this.isSettingComment=!0,this.otherValueCore=e,this.isOtherSelected&&!this.isRenderedValueSetting&&(this.value=this.getValueOnSettingOther(e)),this.isSettingComment=!1)}getValueOnSettingOther(e){const t=this.rendredValueToData(this.renderedValue);if(this.showCommentArea||this.getStoreOthersAsComment())return t;const s=ii.getItemByValue(this.visibleChoices,e);if(!s||s===this.otherItem)return t;if(this.otherValueCore="",!Array.isArray(t))return e;const i=t.indexOf(this.otherItem.value);return i>-1&&t.splice(i,1),t.indexOf(e)<0&&t.push(e),t}clearValue(e){super.clearValue(e),this.prevOtherValue=void 0,this.selectedItemValues=void 0}updateCommentFromSurvey(e){super.updateCommentFromSurvey(e),this.prevOtherValue=void 0}get renderedValue(){return this.getPropertyValue("renderedValue",null)}set renderedValue(e){if(!this.isReadOnlyAttr){this.setPropertyValue("renderedValue",e);e=this.rendredValueToData(e);this.isTwoValueEquals(e,this.value)||(this.value=e)}}setQuestionValue(e,t=!0,s=!0){if(!this.isLoadingFromJson&&!this.isTwoValueEquals(this.value,e)&&(super.setQuestionValue(e,t),this.setPropertyValue("renderedValue",this.rendredValueFromData(e)),this.updateChoicesDependedQuestions(),!this.hasComment&&s)){var i=this.isOtherSelected;if(i&&this.prevOtherValue){var r=this.prevOtherValue;this.prevOtherValue=void 0,this.otherValue=r}!i&&this.otherValue&&(this.getStoreOthersAsComment()&&!this.autoOtherMode&&(this.prevOtherValue=this.otherValue),this.makeCommentEmpty=!0,this.otherValueCore="",this.setPropertyValue("comment",""))}}setValueCore(e){super.setValueCore(e),this.makeCommentEmpty&&(this.setCommentIntoData(""),this.makeCommentEmpty=!1)}setNewValue(e){e=this.valueFromData(e),(this.choicesByUrl.isRunning||this.choicesByUrl.isWaitingForParameters)&&this.isValueEmpty(e)||(this.cachedValueForUrlRequests=e),super.setNewValue(e)}valueFromData(e){let t=ii.getItemByValue(this.activeChoices,e);return t?t.value:super.valueFromData(e)}rendredValueFromData(e){return this.getStoreOthersAsComment()?e:this.renderedValueFromDataCore(e)}rendredValueToData(e){return this.getStoreOthersAsComment()?e:this.rendredValueToDataCore(e)}renderedValueFromDataCore(e){return this.hasUnknownValue(e,!0,!1)?(this.otherValue=e,this.otherItem.value):this.valueFromData(e)}rendredValueToDataCore(e){return e==this.otherItem.value&&this.needConvertRenderedOtherToDataValue()&&(e=this.otherValue),e}needConvertRenderedOtherToDataValue(){let e=this.otherValue;return!!e&&(e=e.trim(),!!e&&this.hasUnknownValue(e,!0,!1))}getIsQuestionReady(){return super.getIsQuestionReady()&&!this.waitingChoicesByURL&&!this.waitingGetChoiceDisplayValueResponse}updateSelectedItemValues(){if(this.waitingGetChoiceDisplayValueResponse||!this.survey||this.isEmpty())return;const e=this.value,t=Array.isArray(e)?e:[e];t.some((e=>!ii.getItemByValue(this.choices,e)))&&(this.choicesLazyLoadEnabled||this.hasChoicesUrl)&&(this.waitingGetChoiceDisplayValueResponse=!0,this.updateIsReady(),this.survey.getChoiceDisplayValue({question:this,values:t,setItems:(s,...i)=>{if(this.waitingGetChoiceDisplayValueResponse=!1,!s||!s.length)return void this.updateIsReady();const r=s.map(((e,s)=>this.createItemValue(t[s],e)));this.setCustomValuesIntoItems(r,i),Array.isArray(e)?this.selectedItemValues=r:this.selectedItemValues=r[0],this.updateIsReady()}}))}setCustomValuesIntoItems(e,t){Array.isArray(t)&&0!==t.length&&t.forEach((t=>{const s=t.values,i=t.propertyName;if(Array.isArray(s))for(let t=0;te.index===t.index?0:e.index{this.updateVisibleChoices()}))),this.newItemValue.isVisible&&!this.isUsingCarryForward&&this.canShowOptionItem(this.newItemValue,t,!1)&&(this.footItemsCount=1,e.push(this.newItemValue)))}addNonChoicesItems(e,t){this.supportNone()&&this.addNonChoiceItem(e,this.noneItem,t,this.showNoneItem,Ps.specialChoicesOrder.noneItem),this.supportRefuse()&&this.addNonChoiceItem(e,this.refuseItem,t,this.showRefuseItem,Ps.specialChoicesOrder.refuseItem),this.supportDontKnow()&&this.addNonChoiceItem(e,this.dontKnowItem,t,this.showDontKnowItem,Ps.specialChoicesOrder.dontKnowItem),this.supportOther()&&this.addNonChoiceItem(e,this.otherItem,t,this.hasOther,Ps.specialChoicesOrder.otherItem)}addNonChoiceItem(e,t,s,i,r){this.canShowOptionItem(t,s,i)&&r.forEach((s=>e.push({index:s,item:t})))}canShowOptionItem(e,t,s){let i=t&&(!this.canShowOptionItemCallback||this.canShowOptionItemCallback(e))||s;if(this.canSurveyChangeItemVisibility()){return this.changeItemVisibility()(e,i)}return i}isItemInList(e){return e===this.otherItem?this.hasOther:e===this.noneItem?this.showNoneItem:e===this.refuseItem?this.showRefuseItem:e===this.dontKnowItem?this.showDontKnowItem:e!==this.newItemValue}get isAddDefaultItems(){return Ps.showDefaultItemsInCreator&&this.isInDesignMode&&!this.customWidget}getPlainData(e={includeEmpty:!0,includeQuestionTypes:!1}){var t=super.getPlainData(e);if(t){var s=Array.isArray(this.value)?this.value:[this.value];t.isNode=!0,t.data=(t.data||[]).concat(s.map(((t,s)=>{var i=ii.getItemByValue(this.visibleChoices,t),r={name:s,title:this.getLocalizationString("choices_Choice"),value:t,displayValue:this.getChoicesDisplayValue(this.visibleChoices,t),getString:e=>"object"==typeof e?JSON.stringify(e):e,isNode:!1};return i&&(e.calculations||[]).forEach((e=>{r[e.propertyName]=i[e.propertyName]})),this.isOtherSelected&&this.otherItemValue===i&&(r.isOther=!0,r.displayValue=this.otherValue),r})))}return t}getDisplayValueCore(e,t){return this.useDisplayValuesInDynamicTexts?this.getChoicesDisplayValue(this.visibleChoices,t):t}getDisplayValueEmpty(){return ii.getTextOrHtmlByValue(this.visibleChoices,void 0)}getChoicesDisplayValue(e,t){if(t==this.otherItemValue.value)return this.otherValue?this.otherValue:this.locOtherText.textOrHtml;const s=this.getSingleSelectedItem();if(s&&this.isTwoValueEquals(s.value,t))return s.locText.textOrHtml;var i=ii.getTextOrHtmlByValue(e,t);return""==i&&t?t:i}getDisplayArrayValue(e,t,s){var i=this.visibleChoices,r=[];const n=[];for(var a=0;ar.push(this.getItemDisplayValue(e,n[t])))),0===r.length)for(a=0;a0?t[0]:void 0}getChoicesFromSelectQuestion(e){if(this.isInDesignMode)return[];const t=[];var s="selected"==this.choicesFromQuestionMode||"unselected"!=this.choicesFromQuestionMode&&void 0;const i=e.visibleChoices;for(var r=0;r-1}getNoneItems(){return[this.noneItem,this.refuseItem,this.dontKnowItem]}getChoices(){return this.choices}supportOther(){return this.isSupportProperty("showOtherItem")}supportNone(){return this.isSupportProperty("showNoneItem")}supportRefuse(){return this.isSupportProperty("showRefuseItem")}supportDontKnow(){return this.isSupportProperty("showDontKnowItem")}isSupportProperty(e){return!this.isDesignMode||this.getPropertyByName(e).visible}onCheckForErrors(e,t,s){if(super.onCheckForErrors(e,t,s),!this.hasOther||!this.isOtherSelected||this.otherValue||t&&!this.prevOtherErrorValue)return;const i=new As(this.otherErrorText,this);i.onUpdateErrorTextCallback=e=>{e.text=this.otherErrorText},e.push(i)}setSurveyImpl(e,t){this.isRunningChoices=!0,super.setSurveyImpl(e,t),this.isRunningChoices=!1,this.runChoicesByUrl(),this.isAddDefaultItems&&this.updateVisibleChoices()}setSurveyCore(e){super.setSurveyCore(e),e&&this.choicesFromQuestion&&this.onVisibleChoicesChanged()}getStoreOthersAsComment(){return!this.isSettingDefaultValue&&(!this.showCommentArea&&(!0===this.storeOthersAsComment||"default"==this.storeOthersAsComment&&(null==this.survey||this.survey.storeOthersAsComment)||this.hasChoicesUrl&&!this.choicesFromUrl))}onSurveyLoad(){this.runChoicesByUrl(),this.onVisibleChoicesChanged(),super.onSurveyLoad()}onAnyValueChanged(e,t){super.onAnyValueChanged(e,t),e!=this.getValueName()&&this.runChoicesByUrl();const s=this.choicesFromQuestion;e&&s&&(e===s||t===s)&&(this.onVisibleChoicesChanged(),this.clearIncorrectValues())}updateValueFromSurvey(e,t){var s="";this.hasOther&&!this.isRunningChoices&&!this.choicesByUrl.isRunning&&this.getStoreOthersAsComment()&&(this.hasUnknownValue(e)&&!this.getHasOther(e)?(s=this.getCommentFromValue(e),e=this.setOtherValueIntoValue(e)):this.data&&(s=this.data.getComment(this.getValueName()))),super.updateValueFromSurvey(e,t),!this.isRunningChoices&&!this.choicesByUrl.isRunning||this.isEmpty()||(this.cachedValueForUrlRequests=this.value),s&&this.setNewComment(s)}getCommentFromValue(e){return e}setOtherValueIntoValue(e){return this.otherItem.value}onOtherValueInput(e){this.isInputTextUpdate?e.target&&(this.otherValue=e.target.value):this.updateCommentElements()}onOtherValueChange(e){this.otherValue=e.target.value,this.otherValue!==e.target.value&&(e.target.value=this.otherValue)}runChoicesByUrl(){if(this.updateIsUsingRestful(),this.choicesByUrl&&!this.isLoadingFromJson&&!this.isRunningChoices&&!this.isInDesignMode){var e=this.surveyImpl?this.surveyImpl.getTextProcessor():this.textProcessor;e||(e=this.survey),e&&(this.updateIsReady(),this.isRunningChoices=!0,this.choicesByUrl.run(e),this.isRunningChoices=!1)}}onBeforeSendRequest(){!0!==Ps.web.disableQuestionWhileLoadingChoices||this.isReadOnly||(this.enableOnLoadingChoices=!0,this.readOnly=!0)}onLoadChoicesFromUrl(e){this.enableOnLoadingChoices&&(this.readOnly=!1);const t=[];this.isReadOnly||this.choicesByUrl&&this.choicesByUrl.error&&t.push(this.choicesByUrl.error);var s=null,i=!0;this.isFirstLoadChoicesFromUrl&&!this.cachedValueForUrlRequests&&this.defaultValue&&(this.cachedValueForUrlRequests=this.defaultValue,i=!1),this.isValueEmpty(this.cachedValueForUrlRequests)&&(this.cachedValueForUrlRequests=this.value);var r=this.createCachedValueForUrlRequests(this.cachedValueForUrlRequests,i);if(e&&(e.length>0||this.choicesByUrl.allowEmptyResponse)&&(s=new Array,ii.setData(s,e)),s)for(var n=0;n0}sortArrayByChoicesOrder(e){const t=e.slice();if(this.isInDesignMode)return t;const s=this.choicesOrder.toLowerCase();return"asc"==s?this.sortArray(t,1):"desc"==s?this.sortArray(t,-1):"random"==s?this.randomizeArray(t):t}sortArray(e,t){return e.sort((function(e,s){return ue.compareStrings(e.calculatedText,s.calculatedText)*t}))}randomizeArray(e){return ue.randomizeArray(e)}get hasChoicesUrl(){return this.choicesByUrl&&!!this.choicesByUrl.url}clearIncorrectValues(){this.hasValueToClearIncorrectValues()&&this.canClearIncorrectValues()&&(this.clearIncorrectValuesCallback?this.clearIncorrectValuesCallback():this.clearIncorrectValuesCore())}canClearIncorrectValues(){return!(this.carryForwardQuestion&&!this.carryForwardQuestion.isReady)&&(!(this.survey&&this.survey.questionsByValueName(this.getValueName()).length>1)&&!(this.hasChoicesUrl&&(!this.choicesFromUrl||0==this.choicesFromUrl.length)))}hasValueToClearIncorrectValues(){return(!this.survey||!this.survey.keepIncorrectValues)&&(!this.keepIncorrectValues&&!this.isEmpty())}clearValueIfInvisibleCore(e){super.clearValueIfInvisibleCore(e),this.clearIncorrectValues()}isItemSelected(e){return e===this.otherItem?this.isOtherSelected:this.isItemSelectedCore(e)}isItemSelectedCore(e){return e.value===this.value}clearDisabledValues(){this.survey&&this.survey.clearDisabledChoices&&this.clearDisabledValuesCore()}clearIncorrectValuesCore(){var e=this.value;this.canClearValueAnUnknown(e)&&this.clearValue(!0)}canClearValueAnUnknown(e){return!(!this.getStoreOthersAsComment()&&this.isOtherSelected)&&this.hasUnknownValue(e,!0,!0,!0)}clearDisabledValuesCore(){this.isValueDisabled(this.value)&&this.clearValue(!0)}clearUnusedValues(){super.clearUnusedValues(),this.isOtherSelected||(this.otherValue=""),this.showCommentArea||this.getStoreOthersAsComment()||this.isOtherSelected||(this.comment="")}getColumnClass(){return(new Ct).append(this.cssClasses.column).append("sv-q-column-"+this.colCount,this.hasColumns).toString()}getItemIndex(e){return this.visibleChoices.indexOf(e)}getItemClass(e){const t={item:e};var s=this.getItemClassCore(e,t);return t.css=s,this.survey&&this.survey.updateChoiceItemCss(this,t),t.css}getCurrentColCount(){return this.colCount}getItemClassCore(e,t){const s=(new Ct).append(this.cssClasses.item).append(this.cssClasses.itemInline,!this.hasColumns&&0===this.colCount).append("sv-q-col-"+this.getCurrentColCount(),!this.hasColumns&&0!==this.colCount).append(this.cssClasses.itemOnError,this.hasCssError()),i=this.getIsDisableAndReadOnlyStyles(!e.isEnabled),r=i[0],n=i[1],a=this.isItemSelected(e)||this.isOtherSelected&&this.otherItem.value===e.value,o=!(n||a||this.survey&&this.survey.isDesignMode),l=e===this.noneItem;return t.isDisabled=n||r,t.isChecked=a,t.isNone=l,s.append(this.cssClasses.itemDisabled,n).append(this.cssClasses.itemReadOnly,r).append(this.cssClasses.itemPreview,this.isPreviewStyle).append(this.cssClasses.itemChecked,a).append(this.cssClasses.itemHover,o).append(this.cssClasses.itemNone,l).toString()}getLabelClass(e){return(new Ct).append(this.cssClasses.label).append(this.cssClasses.labelChecked,this.isItemSelected(e)).toString()}getControlLabelClass(e){return(new Ct).append(this.cssClasses.controlLabel).append(this.cssClasses.controlLabelChecked,this.isItemSelected(e)).toString()||void 0}updateRenderedChoices(){this.renderedChoices=this.onGetRenderedChoicesCallback?this.onGetRenderedChoicesCallback(this.visibleChoices):this.visibleChoices}getRenderedChoicesAnimationOptions(){return{isAnimationEnabled:()=>this.animationAllowed,getRerenderEvent:()=>this.onElementRerendered,getKey:e=>e!=this.newItemValue?e.value:this.newItemValue,getLeaveOptions:e=>{let t=this.cssClasses.itemLeave;if(this.hasColumns){const s=this.bodyItems.indexOf(e);-1!==s&&s!==this.bodyItems.length-1&&(t="")}return{cssClass:t,onBeforeRunAnimation:xs,onAfterRunAnimation:Vs}},getAnimatedElement:e=>e.getRootElement(),getEnterOptions:e=>{let t=this.cssClasses.itemEnter;if(this.hasColumns){const s=this.bodyItems.indexOf(e);-1!==s&&s!==this.bodyItems.length-1&&(t="")}return{cssClass:t,onBeforeRunAnimation:t=>{if(0==this.getCurrentColCount()&&this.bodyItems.indexOf(e)>=0){const e=t.parentElement.firstElementChild.offsetLeft;t.offsetLeft>e&&ws(t,{moveAnimationDuration:"0s",fadeAnimationDelay:"0s"},"--")}xs(t)},onAfterRunAnimation:Vs}}}}get renderedChoices(){return this._renderedChoices}set renderedChoices(e){this.renderedChoicesAnimation.sync(e)}get headItems(){const e=this.separateSpecialChoices||this.isInDesignMode?this.headItemsCount:0,t=[];for(let s=0;s!this.isBuiltInChoice(e)))}get bodyItems(){return this.hasHeadItems||this.hasFootItems?this.dataChoices:this.renderedChoices}get hasHeadItems(){return this.headItems.length>0}get hasFootItems(){return this.footItems.length>0}get itemFlowDirection(){return Ps.itemFlowDirection}get columns(){if(!this.hasColumns||0===this.renderedChoices.length)return[];const e=this.getCurrentColCount();let t=this.separateSpecialChoices||this.isInDesignMode?this.dataChoices:this.renderedChoices;return"column"===this.itemFlowDirection?this.getColumnsWithColumnItemFlow(t,e):this.getColumnsWithRowItemFlow(t,e)}getColumnsWithColumnItemFlow(e,t){const s=[];let i=Math.floor(e.length/t);e.length%t&&(i+=1);let r=e.length,n=t,a=0;for(let o=0;oe.value||"")).join("")}get hasColumns(){return!this.isMobile&&this.getCurrentColCount()>1}get rowLayout(){return 0==this.getCurrentColCount()&&!(this.hasFootItems||this.hasHeadItems)}get blockedRow(){return 0==this.getCurrentColCount()&&(this.hasFootItems||this.hasHeadItems)}choicesLoaded(){this.isChoicesLoaded=!0,this.updateIsReady(),this.survey&&this.survey.loadedChoicesFromServer(this),this.loadedChoicesFromServerCallback&&this.loadedChoicesFromServerCallback()}getItemValueWrapperComponentName(e){const t=this.survey;return t?t.getItemValueWrapperComponentName(e,this):mr.TemplateRendererComponentName}getItemValueWrapperComponentData(e){const t=this.survey;return t?t.getItemValueWrapperComponentData(e,this):e}ariaItemChecked(e){return this.renderedValue===e.value?"true":"false"}isOtherItem(e){return this.hasOther&&e.value==this.otherItem.value}get itemSvgIcon(){return this.isPreviewStyle&&this.cssClasses.itemPreviewSvgIconId?this.cssClasses.itemPreviewSvgIconId:this.cssClasses.itemSvgIconId}getSelectBaseRootCss(){return(new Ct).append(this.getQuestionRootCss()).append(this.cssClasses.rootRow,this.rowLayout).toString()}allowMobileInDesignMode(){return!0}getAriaItemLabel(e){return e.locText.renderedHtml}getItemId(e){return this.inputId+"_"+this.getItemIndex(e)}get questionName(){return this.name+"_"+this.id}getItemEnabled(e){return!this.isDisabledAttr&&e.isEnabled}focusOtherComment(){var e;Jt.FocusElement(this.otherId,!1,null===(e=this.survey)||void 0===e?void 0:e.rootElement)}onValueChanged(){super.onValueChanged(),this.isDesignMode||this.prevIsOtherSelected||!this.isOtherSelected||this.focusOtherComment(),this.prevIsOtherSelected=this.isOtherSelected}getDefaultItemComponent(){return""}get itemComponent(){return this.getPropertyValue("itemComponent",this.getDefaultItemComponent())}set itemComponent(e){this.setPropertyValue("itemComponent",e)}}ft([ge()],vr.prototype,"_renderedChoices",void 0);class fr extends vr{constructor(e){super(e)}get colCount(){return this.getPropertyValue("colCount",this.isFlowLayout?0:void 0)}set colCount(e){e<0||e>5||this.isFlowLayout||(this.setPropertyValue("colCount",e),this.fireCallback(this.colCountChangedCallback))}onParentChanged(){super.onParentChanged(),this.isFlowLayout&&this.setPropertyValue("colCount",null)}onParentQuestionChanged(){this.onVisibleChoicesChanged()}getSearchableItemValueKeys(e){e.push("choices")}}function br(e,t){var s;if(!e)return!1;if(e.templateQuestion){const t=null===(s=e.colOwner)||void 0===s?void 0:s.data;if(!(e=e.templateQuestion).getCarryForwardQuestion(t))return!1}return e.carryForwardQuestionType===t}Ie.addClass("selectbase",[{name:"showCommentArea:switch",layout:"row",visible:!0,category:"general"},"choicesFromQuestion:question_carryforward",{name:"choices:itemvalue[]",uniqueProperty:"value",baseValue:function(){return he("choices_Item")},dependsOn:"choicesFromQuestion",visibleIf:e=>!e.choicesFromQuestion},{name:"choicesFromQuestionMode",default:"all",choices:["all","selected","unselected"],dependsOn:"choicesFromQuestion",visibleIf:e=>br(e,"select")},{name:"choiceValuesFromQuestion",dependsOn:"choicesFromQuestion",visibleIf:e=>br(e,"array")},{name:"choiceTextsFromQuestion",dependsOn:"choicesFromQuestion",visibleIf:e=>br(e,"array")},{name:"choicesOrder",default:"none",choices:["none","asc","desc","random"],dependsOn:"choicesFromQuestion",visibleIf:e=>!e.choicesFromQuestion},{name:"choicesByUrl:restfull",className:"choicesByUrl",onGetValue:function(e){return e.choicesByUrl.getData()},onSetValue:function(e,t){e.choicesByUrl.setData(t)}},"hideIfChoicesEmpty:boolean","choicesVisibleIf:condition",{name:"choicesEnableIf:condition",dependsOn:"choicesFromQuestion",visibleIf:e=>!e.choicesFromQuestion},{name:"defaultValue:value",visibleIf:e=>!e.choicesFromQuestion,dependsOn:"choicesFromQuestion"},{name:"correctAnswer:value",visibleIf:e=>!e.choicesFromQuestion,dependsOn:"choicesFromQuestion"},{name:"separateSpecialChoices:boolean",visible:!1},{name:"showOtherItem:boolean",alternativeName:"hasOther"},{name:"showNoneItem:boolean",alternativeName:"hasNone"},{name:"showRefuseItem:boolean",visible:!1,version:"1.9.128"},{name:"showDontKnowItem:boolean",visible:!1,version:"1.9.128"},{name:"otherPlaceholder",alternativeName:"otherPlaceHolder",serializationProperty:"locOtherPlaceholder",dependsOn:"showOtherItem",visibleIf:function(e){return e.hasOther}},{name:"noneText",serializationProperty:"locNoneText",dependsOn:"showNoneItem",visibleIf:function(e){return e.showNoneItem}},{name:"refuseText",serializationProperty:"locRefuseText",dependsOn:"showRefuseItem",visibleIf:function(e){return e.showRefuseItem}},{name:"dontKnowText",serializationProperty:"locDontKnowText",dependsOn:"showDontKnowItem",visibleIf:function(e){return e.showDontKnowItem}},{name:"otherText",serializationProperty:"locOtherText",dependsOn:"showOtherItem",visibleIf:function(e){return e.hasOther}},{name:"otherErrorText",serializationProperty:"locOtherErrorText",dependsOn:"showOtherItem",visibleIf:function(e){return e.hasOther}},{name:"storeOthersAsComment",default:"default",choices:["default",!0,!1],visible:!1}],null,"question"),Ie.addClass("checkboxbase",[{name:"colCount:number",default:1,choices:[0,1,2,3,4,5],layout:"row"}],null,"selectbase");class yr extends pt{get focusFirstInputSelector(){return this.getFocusFirstInputSelector()}getFocusFirstInputSelector(){return Dt?this.isValueEmpty(this.question.value)?this.itemSelector:this.selectedItemSelector:!this.listModel.showFilter&&this.question.value?this.selectedItemSelector:""}resetItemsSettings(){this.itemsSettings.skip=0,this.itemsSettings.take=Math.max(this.minPageSize,this.question.choicesLazyLoadPageSize),this.itemsSettings.totalCount=0,this.itemsSettings.items=[]}setItems(e,t){this.itemsSettings.items=[].concat(this.itemsSettings.items,e),this.itemsSettings.totalCount=t,this.listModel.isAllDataLoaded=this.question.choicesLazyLoadEnabled&&this.itemsSettings.items.length==this.itemsSettings.totalCount,this.question.choices=this.itemsSettings.items}loadQuestionChoices(e){this.question.survey.loadQuestionChoices({question:this.question,filter:this.filterString,skip:this.itemsSettings.skip,take:this.itemsSettings.take,setItems:(t,s)=>{this.setItems(t||[],s||0),this.popupRecalculatePosition(this.itemsSettings.skip===this.itemsSettings.take),e&&e()}}),this.itemsSettings.skip+=this.itemsSettings.take}updateQuestionChoices(e){const t=this.itemsSettings.skip+10?this.timer=setTimeout((()=>{this.loadQuestionChoices(e)}),Ps.dropdownSearchDelay):this.loadQuestionChoices(e))}resetTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}updatePopupFocusFirstInputSelector(){this._popupModel.focusFirstInputSelector=this.focusFirstInputSelector}getDropdownMenuOptions(){const e=ae.getInnerWidth(),t=ae.getInnerHeight(),s=Lt(e,t);let i="dropdown",r="desktop";return Dt&&(i=s?"popup":"overlay",r=s?"tablet":"mobile"),{menuType:i,deviceType:r,hasTouchScreen:Dt,screenHeight:t,screenWidth:e}}createPopup(){this._popupModel=new At("sv-list",{model:this.listModel},{verticalPosition:"bottom",horizontalPosition:"center",showPointer:!1}),this._popupModel.displayMode=Dt?"overlay":"popup",this._popupModel.positionMode="fixed",this._popupModel.isFocusedContainer=!1,this._popupModel.isFocusedContent=Dt,this._popupModel.setWidthByTarget=!Dt,this._popupModel.locale=this.question.getLocale(),this.updatePopupFocusFirstInputSelector(),this.listModel.registerPropertyChangedHandlers(["showFilter"],(()=>{this.updatePopupFocusFirstInputSelector()})),this._popupModel.onVisibilityChanged.add(((e,t)=>{if(t.isVisible&&(this.listModel.renderElements=!0),t.isVisible&&this.question.choicesLazyLoadEnabled&&(this.listModel.actions=[],this.resetItemsSettings(),this.updateQuestionChoices()),t.isVisible){this.updatePopupFocusFirstInputSelector();const e=this.getDropdownMenuOptions(),t=e.menuType;this.question.processOpenDropdownMenu(e),t!==e.menuType&&(this._popupModel.updateDisplayMode(e.menuType),this.listModel.setSearchEnabled(this.searchEnabled&&"dropdown"!==e.menuType)),this.question.onOpenedCallBack&&this.question.onOpenedCallBack()}t.isVisible||(this.onHidePopup(),this.question.choicesLazyLoadEnabled&&this.resetItemsSettings()),this.question.ariaExpanded=t.isVisible?"true":"false",this.question.processPopupVisiblilityChanged(this.popupModel,t.isVisible)}))}setFilterStringToListModel(e){if(this.listModel.filterString=e,this.listModel.resetFocusedItem(),this.question.selectedItem&&this.question.selectedItem.text.indexOf(e)>=0)return this.listModel.focusedItem=this.getAvailableItems().filter((e=>e.id==this.question.selectedItem.value))[0],void(this.listModel.filterString&&this.listModel.actions.map((e=>e.selectedValue=!1)));this.listModel.focusedItem&&this.listModel.isItemVisible(this.listModel.focusedItem)||this.listModel.focusFirstVisibleItem()}setTextWrapEnabled(e){this.listModel.textWrapEnabled=e}popupRecalculatePosition(e){setTimeout((()=>{this.popupModel.recalculatePosition(e)}),1)}onHidePopup(){this.resetFilterString(),this.question.suggestedItem=null}getAvailableItems(){return this.question.visibleChoices}setOnTextSearchCallbackForListModel(e){e.setOnTextSearchCallback(((e,t)=>{if(this.filteredItems)return this.filteredItems.indexOf(e)>=0;let s=e.text.toLocaleLowerCase();s=Ps.comparator.normalizeTextCallback(s,"filter");const i=s.indexOf(t.toLocaleLowerCase());return"startsWith"==this.question.searchMode?0==i:i>-1}))}createListModel(){const e=this.getAvailableItems();let t=this.onSelectionChanged;t||(t=e=>{this.question.value=e.id,this.question.searchEnabled&&this.applyInputString(e),this.popupModel.hide()});const s={items:e,onSelectionChanged:t,allowSelection:!1,locOwner:this.question,elementId:this.listElementId},i=new Et(s);return this.setOnTextSearchCallbackForListModel(i),i.renderElements=!1,i.forceShowFilter=!0,i.areSameItemsCallback=(e,t)=>e===t,i}updateAfterListModelCreated(e){e.isItemSelected=e=>!!e.selected,e.onPropertyChanged.add(((e,t)=>{"hasVerticalScroller"==t.name&&(this.hasScroll=t.newValue)})),e.isAllDataLoaded=!this.question.choicesLazyLoadEnabled,e.actions.forEach((e=>e.disableTabStop=!0))}getPopupCssClasses(){return"sv-single-select-list"}updateCssClasses(e,t){this.popupModel.cssClass=(new Ct).append(e).append(this.getPopupCssClasses()).toString(),this.listModel.cssClasses=t}resetFilterString(){this.filterString&&(this.filterString=void 0)}clear(){this.inputString=null,this.hintString="",this.resetFilterString()}onSetFilterString(){if(this.filteredItems=void 0,!this.filterString&&!this.popupModel.isVisible)return;const e={question:this.question,choices:this.getAvailableItems(),filter:this.filterString,filteredChoices:void 0};this.question.survey.onChoicesSearch.fire(this.question.survey,e),this.filteredItems=e.filteredChoices,this.filterString&&!this.popupModel.isVisible&&this.popupModel.show();const t=()=>{this.setFilterStringToListModel(this.filterString),this.filterString&&this.applyHintString(),this.popupRecalculatePosition(!0)};this.question.choicesLazyLoadEnabled?(this.resetItemsSettings(),this.updateQuestionChoices(t)):t()}get isAllDataLoaded(){return!!this.itemsSettings.totalCount&&this.itemsSettings.items.length==this.itemsSettings.totalCount}get canShowSelectedItem(){return!this.focused||this._markdownMode||!this.searchEnabled}applyInputString(e){(null==e?void 0:e.locText.hasHtml)||this.question.inputFieldComponentName?(this._markdownMode=!0,this.inputString=this.cleanHtml(null==e?void 0:e.locText.getHtmlValue()),this.hintString=""):(this.inputString=null==e?void 0:e.title,this.hintString=null==e?void 0:e.title)}cleanHtml(e){return this.htmlCleanerElement?(this.htmlCleanerElement.innerHTML=e,this.htmlCleanerElement.textContent):""}fixInputCase(){const e=this.hintStringMiddle;e&&this.inputString!=e&&(this.inputString=e)}applyHintString(){const e=this.listModel.focusedItem||this.question.selectedItem;(null==e?void 0:e.locText.hasHtml)||this.question.inputFieldComponentName?(this._markdownMode=!0,this.hintString=""):this.hintString=null==e?void 0:e.title}get inputStringRendered(){return this.inputString||""}set inputStringRendered(e){this.inputString=e,this.filterString=e,e||(this.hintString="")}get placeholderRendered(){return this.hintString?"":this.question.readOnlyText}get listElementId(){return this.question.inputId+"_list"}get hintStringLC(){var e;return(null===(e=this.hintString)||void 0===e?void 0:e.toLowerCase())||""}get inputStringLC(){var e;return(null===(e=this.inputString)||void 0===e?void 0:e.toLowerCase())||""}get showHintPrefix(){return!!this.inputString&&this.hintStringLC.indexOf(this.inputStringLC)>0}get hintStringPrefix(){return this.inputString?this.hintString.substring(0,this.hintStringLC.indexOf(this.inputStringLC)):null}get showHintString(){return!!this.question.searchEnabled&&!(!this.hintStringLC&&!this.inputStringLC)||!this.question.searchEnabled&&this.hintStringLC&&this.question.isEmpty()}get hintStringSuffix(){return this.hintStringLC.indexOf(this.inputStringLC)>=0?this.hintString.substring(this.hintStringLC.indexOf(this.inputStringLC)+this.inputStringLC.length):""}get hintStringMiddle(){const e=this.hintStringLC.indexOf(this.inputStringLC);return-1==e?null:this.hintString.substring(e,e+this.inputStringLC.length)}constructor(e,t){super(),this.question=e,this.onSelectionChanged=t,this.minPageSize=25,this.loadingItemHeight=40,this.timer=void 0,this._markdownMode=!1,this.filteredItems=void 0,this.selectedItemSelector=".sv-list__item--selected",this.itemSelector=".sv-list__item",this.itemsSettings={skip:0,take:0,totalCount:0,items:[]},this.listModelFilterStringChanged=e=>{this.filterString!==e&&(this.filterString=e)},this.questionPropertyChangedHandler=(e,t)=>{this.onPropertyChangedHandler(e,t)},this.htmlCleanerElement=oe.createElement("div"),e.onPropertyChanged.add(this.questionPropertyChangedHandler),this.showInputFieldComponent=this.question.showInputFieldComponent,this.listModel=this.createListModel(),this.updateAfterListModelCreated(this.listModel),this.setChoicesLazyLoadEnabled(this.question.choicesLazyLoadEnabled),this.setSearchEnabled(this.question.searchEnabled),this.setTextWrapEnabled(this.question.textWrapEnabled),this.createPopup(),this.resetItemsSettings();const s=e.cssClasses;this.updateCssClasses(s.popup,s.list)}get popupModel(){return this._popupModel}get noTabIndex(){return this.question.isInputReadOnly||this.searchEnabled}get filterReadOnly(){return this.question.isInputReadOnly||!this.searchEnabled||!this.focused}get filterStringEnabled(){return!this.question.isInputReadOnly&&this.searchEnabled}get inputMode(){return Dt?"none":"text"}setSearchEnabled(e){this.listModel.setSearchEnabled(Dt&&e),this.searchEnabled=e}setChoicesLazyLoadEnabled(e){this.listModel.setOnFilterStringChangedCallback(e?this.listModelFilterStringChanged:void 0)}updateItems(){this.listModel.setItems(this.getAvailableItems())}onClick(e){this.question.readOnly||this.question.isDesignMode||this.question.isPreviewStyle||this.question.isReadOnlyAttr||(this._popupModel.toggleVisibility(),this.focusItemOnClickAndPopup(),this.question.focusInputElement(!1))}chevronPointerDown(e){this._popupModel.isVisible&&e.preventDefault()}onPropertyChangedHandler(e,t){"value"==t.name&&(this.showInputFieldComponent=this.question.showInputFieldComponent),"textWrapEnabled"==t.name&&this.setTextWrapEnabled(t.newValue)}focusItemOnClickAndPopup(){this._popupModel.isVisible&&this.question.value&&this.changeSelectionWithKeyboard(!1)}onClear(e){this.question.clearValue(!0),this._popupModel.hide(),e&&(e.preventDefault(),e.stopPropagation())}getSelectedAction(){return this.question.selectedItem||null}changeSelectionWithKeyboard(e){var t;let s=this.listModel.focusedItem;!s&&this.question.selectedItem?ii.getItemByValue(this.question.visibleChoices,this.question.value)&&(this.listModel.focusedItem=this.question.selectedItem):e?this.listModel.focusPrevVisibleItem():this.listModel.focusNextVisibleItem(),this.beforeScrollToFocusedItem(s),this.scrollToFocusedItem(),this.afterScrollToFocusedItem(),this.ariaActivedescendant=null===(t=this.listModel.focusedItem)||void 0===t?void 0:t.elementId}beforeScrollToFocusedItem(e){this.question.value&&e&&(e.selectedValue=!1,this.listModel.focusedItem.selectedValue=!this.listModel.filterString,this.question.suggestedItem=this.listModel.focusedItem)}afterScrollToFocusedItem(){var e;this.question.value&&!this.listModel.filterString&&this.question.searchEnabled?this.applyInputString(this.listModel.focusedItem||this.question.selectedItem):this.applyHintString(),this.fixInputCase(),this.ariaActivedescendant=null===(e=this.listModel.focusedItem)||void 0===e?void 0:e.elementId}keyHandler(e){const t=e.which||e.keyCode;if(this.popupModel.isVisible&&38===e.keyCode?(this.changeSelectionWithKeyboard(!0),e.preventDefault(),e.stopPropagation()):40===e.keyCode&&(this.popupModel.show(),this.changeSelectionWithKeyboard(!1),e.preventDefault(),e.stopPropagation()),9===e.keyCode)this.popupModel.hide();else if(this.popupModel.isVisible||13!==e.keyCode&&32!==e.keyCode)if(!this.popupModel.isVisible||13!==e.keyCode&&(32!==e.keyCode||this.question.searchEnabled&&this.inputString))if(46===t||8===t)this.searchEnabled||this.onClear(e);else if(27===e.keyCode)this._popupModel.hide(),this.hintString="",this.onEscape();else{if((38===e.keyCode||40===e.keyCode||32===e.keyCode&&!this.question.searchEnabled)&&(e.preventDefault(),e.stopPropagation()),32===e.keyCode&&this.question.searchEnabled)return;ps(e,{processEsc:!1,disableTabStop:this.question.isInputReadOnly})}else 13===e.keyCode&&this.question.searchEnabled&&!this.inputString&&this.question instanceof Cr&&!this._markdownMode&&this.question.value?(this._popupModel.hide(),this.onClear(e)):(this.listModel.selectFocusedItem(),this.onFocus(e)),e.preventDefault(),e.stopPropagation();else 32===e.keyCode&&(this.popupModel.show(),this.changeSelectionWithKeyboard(!1)),13===e.keyCode&&this.question.survey.questionEditFinishCallback(this.question,e),e.preventDefault(),e.stopPropagation()}onEscape(){this.question.searchEnabled&&this.applyInputString(this.question.selectedItem)}onScroll(e){const t=e.target;t.scrollHeight-(t.scrollTop+t.offsetHeight)<=this.loadingItemHeight&&this.updateQuestionChoices()}onBlur(e){this.focused=!1,this.popupModel.isVisible&&"overlay"==this.popupModel.displayMode||(cs(e),this._popupModel.hide(),this.resetFilterString(),this.inputString=null,this.hintString="",e.stopPropagation())}onFocus(e){this.focused=!0,this.setInputStringFromSelectedItem(this.question.selectedItem)}setInputStringFromSelectedItem(e){this.focused&&(this.question.searchEnabled&&e?this.applyInputString(e):this.inputString=null)}dispose(){super.dispose(),this.question&&this.question.onPropertyChanged.remove(this.questionPropertyChangedHandler),this.questionPropertyChangedHandler=void 0,this.listModel&&this.listModel.dispose(),this.popupModel&&this.popupModel.dispose(),this.htmlCleanerElement=void 0}scrollToFocusedItem(){this.listModel.scrollToFocusedItem()}}ft([pe({defaultValue:!1})],yr.prototype,"focused",void 0),ft([pe({defaultValue:!0})],yr.prototype,"searchEnabled",void 0),ft([pe({defaultValue:"",onSet:(e,t)=>{t.onSetFilterString()}})],yr.prototype,"filterString",void 0),ft([pe({defaultValue:"",onSet:(e,t)=>{t.question.inputHasValue=!!e}})],yr.prototype,"inputString",void 0),ft([pe({})],yr.prototype,"showInputFieldComponent",void 0),ft([pe()],yr.prototype,"ariaActivedescendant",void 0),ft([pe({defaultValue:!1,onSet:(e,t)=>{e?t.listModel.addScrollEventListener((e=>{t.onScroll(e)})):t.listModel.removeScrollEventListener()}})],yr.prototype,"hasScroll",void 0),ft([pe({defaultValue:""})],yr.prototype,"hintString",void 0);class Cr extends vr{constructor(e){super(e),this.lastSelectedItemValue=null,this.minMaxChoices=[],this.onOpened=this.addEvent(),this.ariaExpanded="false",this.createLocalizableString("placeholder",this,!1,!0),this.createLocalizableString("clearCaption",this,!1,!0),this.registerPropertyChangedHandlers(["choicesMin","choicesMax","choicesStep"],(()=>{this.onVisibleChoicesChanged()})),this.registerPropertyChangedHandlers(["value","renderAs","showOtherItem","otherText","placeholder","choices","visibleChoices"],(()=>{this.getSingleSelectedItem(),this.resetReadOnlyText()}))}locStrsChanged(){super.locStrsChanged(),this.resetReadOnlyText()}get showOptionsCaption(){return this.allowClear}set showOptionsCaption(e){this.allowClear=e}get showClearButton(){return this.allowClear&&!this.isEmpty()}get optionsCaption(){return this.placeholder}set optionsCaption(e){this.placeholder=e}get placeholder(){return this.getLocalizableStringText("placeholder")}set placeholder(e){this.setLocalizableStringText("placeholder",e)}get locPlaceholder(){return this.getLocalizableString("placeholder")}get clearCaption(){return this.getLocalizableStringText("clearCaption")}set clearCaption(e){this.setLocalizableStringText("clearCaption",e)}get locClearCaption(){return this.getLocalizableString("clearCaption")}getType(){return"dropdown"}get ariaRole(){return"combobox"}get selectedItem(){return this.getSingleSelectedItem()}onGetSingleSelectedItem(e){e&&(this.lastSelectedItemValue=e)}supportAutoAdvance(){return!this.isOtherSelected}getChoices(){var e=super.getChoices();if(this.choicesMax<=this.choicesMin)return e;for(var t=[],s=0;sthis.calculateReadOnlyText()))}calculateReadOnlyText(){if("select"==this.renderAs){if(this.isOtherSelected)return this.otherText;if(this.isNoneSelected)return this.noneText;if(this.selectedItem)return this.selectedItemText}return this.selectedItem?"":this.placeholder}resetReadOnlyText(){this.resetPropertyValue("readOnlyText")}getControlClass(){return(new Ct).append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.controlDisabled,this.isDisabledStyle).append(this.cssClasses.controlReadOnly,this.isReadOnlyStyle).append(this.cssClasses.controlPreview,this.isPreviewStyle).append(this.cssClasses.controlInputFieldComponent,!!this.inputFieldComponentName).toString()}updateCssClasses(e,t){super.updateCssClasses(e,t),this.useDropdownList&&Cs(e,t)}calcCssClasses(e){const t=super.calcCssClasses(e);return this.dropdownListModelValue&&this.dropdownListModel.updateCssClasses(t.popup,t.list),t}get selectedItemLocText(){const e=this.suggestedItem||this.selectedItem;return null==e?void 0:e.locText}get inputFieldComponentName(){return this.inputFieldComponent||this.itemComponent}get showSelectedItemLocText(){return!this.inputHasValue&&!this.inputFieldComponentName&&!!this.selectedItemLocText&&this.dropdownListModel.canShowSelectedItem}get showInputFieldComponent(){return!this.inputHasValue&&!!this.inputFieldComponentName&&!this.isEmpty()}get selectedItemText(){const e=this.selectedItem;return e?e.text:""}get useDropdownList(){return"select"!==this.renderAs}get dropdownListModel(){return this.useDropdownList&&!this.dropdownListModelValue&&(this.dropdownListModelValue=new yr(this)),this.dropdownListModelValue}set dropdownListModel(e){this.dropdownListModelValue=e}get popupModel(){return this.dropdownListModel.popupModel}onOpenedCallBack(){this.onOpened.fire(this,{question:this,choices:this.choices})}onSelectedItemValuesChangedHandler(e){var t;null===(t=this.dropdownListModelValue)||void 0===t||t.setInputStringFromSelectedItem(e),super.onSelectedItemValuesChangedHandler(e)}hasUnknownValue(e,t,s,i){return!this.choicesLazyLoadEnabled&&super.hasUnknownValue(e,t,s,i)}needConvertRenderedOtherToDataValue(){var e;const t=null===(e=this.otherValue)||void 0===e?void 0:e.trim();return!!t&&super.hasUnknownValue(t,!0,!1)}getItemIfChoicesNotContainThisValue(e,t){return this.choicesLazyLoadEnabled?this.createItemValue(e,t):super.getItemIfChoicesNotContainThisValue(e,t)}onVisibleChoicesChanged(){super.onVisibleChoicesChanged(),this.dropdownListModelValue&&this.dropdownListModel.updateItems()}getFirstInputElementId(){return this.inputId+(this.searchEnabled?"_0":"")}getInputId(){return this.inputId+"_0"}clearValue(e){var t;super.clearValue(e),this.lastSelectedItemValue=null,null===(t=this.dropdownListModelValue)||void 0===t||t.clear()}afterRenderCore(e){super.afterRenderCore(e),this.dropdownListModelValue&&this.dropdownListModelValue.clear()}onClick(e){this.onOpenedCallBack&&this.onOpenedCallBack()}onKeyUp(e){46===(e.which||e.keyCode)&&(this.clearValue(!0),e.preventDefault(),e.stopPropagation())}supportEmptyValidation(){return!0}onBlurCore(e){this.dropdownListModel.onBlur(e),super.onBlurCore(e)}onFocusCore(e){this.dropdownListModel.onFocus(e),super.onFocusCore(e)}dispose(){super.dispose(),this.dropdownListModelValue&&(this.dropdownListModelValue.dispose(),this.dropdownListModelValue=void 0)}}ft([pe()],Cr.prototype,"allowClear",void 0),ft([pe({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setSearchEnabled(e)}})],Cr.prototype,"searchEnabled",void 0),ft([pe()],Cr.prototype,"searchMode",void 0),ft([pe()],Cr.prototype,"textWrapEnabled",void 0),ft([pe({defaultValue:!1})],Cr.prototype,"inputHasValue",void 0),ft([pe({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setChoicesLazyLoadEnabled(e)}})],Cr.prototype,"choicesLazyLoadEnabled",void 0),ft([pe()],Cr.prototype,"choicesLazyLoadPageSize",void 0),ft([pe()],Cr.prototype,"suggestedItem",void 0),Ie.addClass("dropdown",[{name:"placeholder",alternativeName:"optionsCaption",serializationProperty:"locPlaceholder"},{name:"allowClear:boolean",alternativeName:"showOptionsCaption",default:!0},{name:"choicesMin:number",default:0},{name:"choicesMax:number",default:0},{name:"choicesStep:number",default:1,minValue:1},{name:"autocomplete",alternativeName:"autoComplete",choices:Ps.questions.dataList},{name:"textWrapEnabled:boolean",default:!0},{name:"renderAs",default:"default",visible:!1},{name:"searchEnabled:boolean",default:!0,visible:!1},{name:"searchMode",default:"contains",choices:["contains","startsWith"]},{name:"choicesLazyLoadEnabled:boolean",default:!1,visible:!1},{name:"choicesLazyLoadPageSize:number",default:25,visible:!1},{name:"inputFieldComponent",visible:!1},{name:"itemComponent",visible:!1,default:""}],(function(){return new Cr("")}),"selectbase"),wi.Instance.registerQuestion("dropdown",(e=>{var t=new Cr(e);return t.choices=wi.DefaultChoices,t}));class wr extends pt{constructor(e,t,s,i){super(),this.item=e,this.fullName=t,this.data=s,this.setValueDirectly(i),this.cellClick=e=>{this.value=e.value},this.registerPropertyChangedHandlers(["value"],(()=>{this.data&&this.data.onMatrixRowChanged(this)})),this.data&&this.data.hasErrorInRow(this)&&(this.hasError=!0)}get name(){return this.item.value}get text(){return this.item.text}get locText(){return this.item.locText}get value(){return this.getPropertyValue("value")}set value(e){this.isReadOnly||this.setValueDirectly(this.data.getCorrectedRowValue(e))}setValueDirectly(e){this.setPropertyValue("value",e)}get isReadOnly(){return!this.item.enabled||this.data.isInputReadOnly}get isReadOnlyAttr(){return this.data.isReadOnlyAttr}get isDisabledAttr(){return!this.item.enabled||this.data.isDisabledAttr}get rowTextClasses(){return(new Ct).append(this.data.cssClasses.rowTextCell).toString()}get hasError(){return this.getPropertyValue("hasError",!1)}set hasError(e){this.setPropertyValue("hasError",e)}get rowClasses(){const e=this.data.cssClasses;return(new Ct).append(e.row).append(e.rowError,this.hasError).append(e.rowReadOnly,this.isReadOnly).append(e.rowDisabled,this.data.isDisabledStyle).toString()}}class xr extends pt{constructor(e){super(),this.cellsOwner=e,this.values={},this.locs={}}getType(){return"cells"}get isEmpty(){return 0==Object.keys(this.values).length}valuesChanged(){!this.locNotification&&this.onValuesChanged&&this.onValuesChanged()}getDefaultCellLocText(e){return this.getCellLocCore(this.defaultRowValue,e)}getCellDisplayLocText(e,t){return this.getCellLocCore(e,t)}getCellLocCore(e,t){if(e=this.getCellRowColumnValue(e,this.rows),t=this.getCellRowColumnValue(t,this.columns),ue.isValueEmpty(e)||ue.isValueEmpty(t))return null;this.locs[e]||(this.locs[e]={});let s=this.locs[e][t];return s||(s=this.createString(),s.setJson(this.getCellLocData(e,t)),s.onGetTextCallback=e=>{if(!e){const e=ii.getItemByValue(this.columns,t);if(e)return e.locText.getJson()||e.value}return e},s.onStrChanged=(s,i)=>{this.updateValues(e,t,i)},this.locs[e][t]=s),s}get defaultRowValue(){return Ps.matrix.defaultRowName}getCellLocData(e,t){let s=this.getCellLocDataFromValue(e,t);return s||this.getCellLocDataFromValue(this.defaultRowValue,t)}getCellLocDataFromValue(e,t){return this.values[e]&&this.values[e][t]?this.values[e][t]:null}getCellText(e,t){var s=this.getCellLocCore(e,t);return s?s.calculatedText:null}setCellText(e,t,s){const i=this.getCellLocCore(e,t);i&&(i.text=s)}updateValues(e,t,s){s?(this.values[e]||(this.values[e]={}),this.values[e][t]=s,this.valuesChanged()):this.values[e]&&this.values[e][t]&&(delete this.values[e][t],0==Object.keys(this.values[e]).length&&delete this.values[e],this.valuesChanged())}getDefaultCellText(e){var t=this.getCellLocCore(this.defaultRowValue,e);return t?t.calculatedText:null}setDefaultCellText(e,t){this.setCellText(this.defaultRowValue,e,t)}getCellDisplayText(e,t){var s=this.getCellDisplayLocText(e,t);return s?s.calculatedText:null}get rows(){return this.cellsOwner?this.cellsOwner.getRows():[]}get columns(){return this.cellsOwner?this.cellsOwner.getColumns():[]}getCellRowColumnValue(e,t){if(null==e)return null;if("number"==typeof e){if(e<0||e>=t.length)return null;e=t[e].value}return e.value?e.value:e}getJson(){if(this.isEmpty)return null;const e=this.values[this.defaultRowValue],t={};for(let s in this.values){const i={},r=this.values[s];for(let t in r)if(s===this.defaultRowValue||!e||e[t]!==r[t]){const e=this.getCellLocCore(s,t);i[t]=e?e.getJson():r[t]}t[s]=i}return t}setJson(e,t){if(this.values={},e)for(var s in e)if("pos"!=s){var i=e[s];for(var r in this.values[s]={},i)"pos"!=r&&(this.values[s][r]=i[r])}this.locNotification=!0,this.runFuncOnLocs(((e,t,s)=>s.setJson(this.getCellLocData(e,t)))),this.locNotification=!1,this.valuesChanged()}locStrsChanged(){this.runFuncOnLocs(((e,t,s)=>s.strChanged()))}runFuncOnLocs(e){for(let t in this.locs){const s=this.locs[t];for(let i in s)e(t,i,s[i])}}createString(){return new Xt(this.cellsOwner,!0)}}class Vr extends di{constructor(e){super(e),this.isRowChanging=!1,this.emptyLocalizableString=new Xt(this),this.cellsValue=new xr(this),this.cellsValue.onValuesChanged=()=>{this.updateHasCellText(),this.propertyValueChanged("cells",this.cells,this.cells)},this.registerPropertyChangedHandlers(["columns"],(()=>{this.onColumnsChanged()})),this.registerPropertyChangedHandlers(["rows"],(()=>{this.runCondition(this.getDataFilteredValues(),this.getDataFilteredProperties()),this.onRowsChanged()})),this.registerPropertyChangedHandlers(["hideIfRowsEmpty"],(()=>{this.updateVisibilityBasedOnRows()}))}getType(){return"matrix"}get cellComponent(){return this.getPropertyValue("cellComponent")}set itemComponent(e){this.setPropertyValue("cellComponent",e)}get hasSingleInput(){return!1}get eachRowRequired(){return this.getPropertyValue("eachRowRequired")}set eachRowRequired(e){this.setPropertyValue("eachRowRequired",e)}get isAllRowRequired(){return this.eachRowRequired}set isAllRowRequired(e){this.eachRowRequired=e}get eachRowUnique(){return this.getPropertyValue("eachRowUnique")}set eachRowUnique(e){this.setPropertyValue("eachRowUnique",e)}get hasRows(){return this.rows.length>0}get rowOrder(){return this.getPropertyValue("rowOrder")}set rowOrder(e){(e=e.toLowerCase())!=this.rowOrder&&(this.setPropertyValue("rowOrder",e),this.onRowsChanged())}get rowsOrder(){return this.rowOrder}set rowsOrder(e){this.rowOrder=e}get hideIfRowsEmpty(){return this.getPropertyValue("hideIfRowsEmpty")}set hideIfRowsEmpty(e){this.setPropertyValue("hideIfRowsEmpty",e)}getRows(){return this.rows}getColumns(){return this.visibleColumns}addColumn(e,t){var s=new ii(e,t);return this.columns.push(s),s}getItemClass(e,t){const s=e.value==t.value,i=this.isReadOnly,r=!s&&!i,n=this.hasCellText,a=this.cssClasses;return(new Ct).append(a.cell,n).append(n?a.cellText:a.label).append(a.itemOnError,!n&&(this.eachRowRequired||this.eachRowUnique?e.hasError:this.hasCssError())).append(n?a.cellTextSelected:a.itemChecked,s).append(n?a.cellTextDisabled:a.itemDisabled,this.isDisabledStyle).append(n?a.cellTextReadOnly:a.itemReadOnly,this.isReadOnlyStyle).append(n?a.cellTextPreview:a.itemPreview,this.isPreviewStyle).append(a.itemHover,r&&!n).toString()}get itemSvgIcon(){return this.isPreviewStyle&&this.cssClasses.itemPreviewSvgIconId?this.cssClasses.itemPreviewSvgIconId:this.cssClasses.itemSvgIconId}locStrsChanged(){super.locStrsChanged(),this.cells.locStrsChanged()}getQuizQuestionCount(){for(var e=0,t=0;t{e.hasError=this.hasErrorInRow(e)}))}addErrorIntoRow(e){this.errorsInRow||(this.errorsInRow={}),this.errorsInRow[e.name]=!0,e.hasError=!0}refreshRowsErrors(){this.errorsInRow&&this.checkErrorsAllRows(!0,{noValue:!1,isNotUnique:!1})}getIsAnswered(){return super.getIsAnswered()&&this.hasValuesInAllRows()}createMatrixRow(e,t,s){var i=new wr(e,t,this,s);return this.onMatrixRowCreated(i),i}onMatrixRowCreated(e){}setQuestionValue(e,t=!0){if(super.setQuestionValue(e,this.isRowChanging||t),this.generatedVisibleRows&&0!=this.generatedVisibleRows.length){this.isRowChanging=!0;var s=this.value;if(s||(s={}),0==this.rows.length)this.generatedVisibleRows[0].setValueDirectly(s);else for(var i=0;i{var i=this.rows.filter((e=>e.value===t))[0],r={name:t,title:i?i.text:"row",value:s[t],displayValue:ii.getTextOrHtmlByValue(this.visibleColumns,s[t]),getString:e=>"object"==typeof e?JSON.stringify(e):e,isNode:!1},n=ii.getItemByValue(this.visibleColumns,s[t]);return n&&(e.calculations||[]).forEach((e=>{r[e.propertyName]=n[e.propertyName]})),r}))}return t}addConditionObjectsByContext(e,t){for(var s=0;s0&&this.visibleColumns.length>0?this.inputId+"_"+e[0].name+"_0":super.getFirstInputElementId()}onMatrixRowChanged(e){if(!this.isRowChanging){if(this.isRowChanging=!0,this.hasRows){var t=this.value;t||(t={}),t[e.name]=e.value,this.setNewValue(t)}else this.setNewValue(e.value);this.isRowChanging=!1}}getCorrectedRowValue(e){for(var t=0;t{var t=new Vr(e);return t.rows=wi.DefaultRows,t.columns=wi.DefaultColums,t}));class _r extends pt{updateRemainingCharacterCounter(e,t){this.remainingCharacterCounter=ue.getRemainingCharacterCounterText(e,t)}}ft([pe()],_r.prototype,"remainingCharacterCounter",void 0);class Er extends ti{constructor(e){super(e),this.characterCounter=new _r}isTextValue(){return!0}get maxLength(){return this.getPropertyValue("maxLength")}set maxLength(e){this.setPropertyValue("maxLength",e),this.updateRemainingCharacterCounter(this.value)}getMaxLength(){return ue.getMaxLength(this.maxLength,this.survey?this.survey.maxTextLength:-1)}updateRemainingCharacterCounter(e){this.characterCounter.updateRemainingCharacterCounter(e,this.getMaxLength())}get placeHolder(){return this.placeholder}set placeHolder(e){this.placeholder=e}get locPlaceHolder(){return this.locPlaceholder}getType(){return"textbase"}isEmpty(){return super.isEmpty()||""===this.value}get textUpdateMode(){return this.getPropertyValue("textUpdateMode")}set textUpdateMode(e){this.setPropertyValue("textUpdateMode",e)}getIsInputTextUpdate(){return"default"==this.textUpdateMode?super.getIsInputTextUpdate():"onTyping"==this.textUpdateMode}get renderedPlaceholder(){return this.getPropertyValue("renderedPlaceholder",void 0,(()=>this.hasPlaceholder()?this.placeHolder:void 0))}onReadOnlyChanged(){super.onReadOnlyChanged(),this.resetRenderedPlaceholder()}localeChanged(){super.localeChanged(),this.resetRenderedPlaceholder()}supportEmptyValidation(){return!0}resetRenderedPlaceholder(){this.resetPropertyValue("renderedPlaceholder")}hasPlaceholder(){return!this.isReadOnly}setNewValue(e){super.setNewValue(e),this.updateRemainingCharacterCounter(e)}setQuestionValue(e,t=!0){super.setQuestionValue(e,t),this.updateRemainingCharacterCounter(e)}convertToCorrectValue(e){return Array.isArray(e)?e.join(this.getValueSeparator()):e}getValueSeparator(){return", "}getControlCssClassBuilder(){return(new Ct).append(this.cssClasses.root).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.controlDisabled,this.isDisabledStyle).append(this.cssClasses.controlReadOnly,this.isReadOnlyStyle).append(this.cssClasses.controlPreview,this.isPreviewStyle)}getControlClass(){return this.getControlCssClassBuilder().toString()}get isNewA11yStructure(){return!0}}ft([pe({localizable:!0,onSet:(e,t)=>t.resetRenderedPlaceholder()})],Er.prototype,"placeholder",void 0),Ie.addClass("textbase",[],(function(){return new Er("")}),"question");class Pr{setInputValue(e){this.inputElement.maxLength>=0&&this.inputElement.maxLength{if("saveMaskedValue"!==t.name){const e=this.inputMaskInstance.getMaskedValue(this.prevUnmaskedValue);this.setInputValue(e)}},this.clickHandler=e=>{this.inputElement.value==this.inputMaskInstance.getMaskedValue("")&&this.inputElement.setSelectionRange(0,0)},this.beforeInputHandler=e=>{const t=this.createArgs(e),s=this.inputMaskInstance.processInput(t);this.setInputValue(s.value),this.inputElement.setSelectionRange(s.caretPosition,s.caretPosition),s.cancelPreventDefault||e.preventDefault()},this.changeHandler=e=>{const t=this.inputMaskInstance.processInput({prevValue:"",insertedChars:e.target.value,selectionStart:0,selectionEnd:0});this.setInputValue(t.value)};let i=s;null==i&&(i=""),this.setInputValue(e.getMaskedValue(i)),this.prevUnmaskedValue=i,e.onPropertyChanged.add(this.inputMaskInstancePropertyChangedHandler),this.addInputEventListener()}createArgs(e){const t={insertedChars:e.data,selectionStart:e.target.selectionStart,selectionEnd:e.target.selectionEnd,prevValue:e.target.value,inputDirection:"forward"};return"deleteContentBackward"===e.inputType&&(t.inputDirection="backward",t.selectionStart===t.selectionEnd&&(t.selectionStart=Math.max(t.selectionStart-1,0))),"deleteContentForward"===e.inputType&&t.selectionStart===t.selectionEnd&&(t.selectionEnd+=1),t}addInputEventListener(){this.inputElement&&(this.inputElement.addEventListener("beforeinput",this.beforeInputHandler),this.inputElement.addEventListener("click",this.clickHandler),this.inputElement.addEventListener("focus",this.clickHandler),this.inputElement.addEventListener("change",this.changeHandler))}removeInputEventListener(){this.inputElement&&(this.inputElement.removeEventListener("beforeinput",this.beforeInputHandler),this.inputElement.removeEventListener("click",this.clickHandler),this.inputElement.removeEventListener("focus",this.clickHandler),this.inputElement.removeEventListener("change",this.changeHandler))}dispose(){this.removeInputEventListener(),this.inputElement=void 0,this.inputMaskInstance.onPropertyChanged.remove(this.inputMaskInstancePropertyChangedHandler)}}var Sr=/[0-9]/;function Ir(){const e=(Ie.getChildrenClasses("masksettings")||[]).map((e=>{let t=e.name;return-1!==e.name.indexOf("mask")&&(t=t.slice(0,t.indexOf("mask"))),t}));return e.unshift("none"),e}class Tr extends Er{createMaskAdapter(){this.input&&!this.maskTypeIsEmpty&&(this.maskInputAdapter=new Pr(this.maskInstance,this.input,this.value))}deleteMaskAdapter(){this.maskInputAdapter&&(this.maskInputAdapter.dispose(),this.maskInputAdapter=void 0)}updateMaskAdapter(){this.deleteMaskAdapter(),this.createMaskAdapter()}onSetMaskType(e){this.setNewMaskSettingsProperty(),this.updateMaskAdapter()}get maskTypeIsEmpty(){switch(this.inputType){case"tel":case"text":return"none"===this.maskType;default:return!0}}get maskSettings(){return this.getPropertyValue("maskSettings")}set maskSettings(e){e&&(this.setNewMaskSettingsProperty(),this.maskSettings.fromJSON(e.toJSON()),this.updateMaskAdapter())}setNewMaskSettingsProperty(){this.setPropertyValue("maskSettings",this.createMaskSettings())}createMaskSettings(){let e=this.maskType&&"none"!==this.maskType?this.maskType+"mask":"masksettings";Ie.findClass(e)||(e="masksettings");const t=Ie.createClass(e);return t.owner=this.survey,t}constructor(e){super(e),this._isWaitingForEnter=!1,this.onCompositionUpdate=e=>{this.isInputTextUpdate&&setTimeout((()=>{this.updateValueOnEvent(e)}),1),this.updateRemainingCharacterCounter(e.target.value)},this.onKeyUp=e=>{this.updateDateValidationMessage(e),this.isInputTextUpdate?this._isWaitingForEnter&&13!==e.keyCode||(this.updateValueOnEvent(e),this._isWaitingForEnter=!1):13===e.keyCode&&this.updateValueOnEvent(e),this.updateRemainingCharacterCounter(e.target.value)},this.onKeyDown=e=>{this.onKeyDownPreprocess&&this.onKeyDownPreprocess(e),this.isInputTextUpdate&&(this._isWaitingForEnter=229===e.keyCode),this.onTextKeyDownHandler(e)},this.onChange=e=>{this.updateDateValidationMessage(e);e.target===Ps.environment.root.activeElement?this.isInputTextUpdate&&this.updateValueOnEvent(e):this.updateValueOnEvent(e),this.updateRemainingCharacterCounter(e.target.value)},this.createLocalizableString("minErrorText",this,!0,"minError"),this.createLocalizableString("maxErrorText",this,!0,"maxError"),this.setNewMaskSettingsProperty(),this.locDataListValue=new Yt(this),this.locDataListValue.onValueChanged=(e,t)=>{this.propertyValueChanged("dataList",e,t)},this.registerPropertyChangedHandlers(["min","max","inputType","minValueExpression","maxValueExpression"],(()=>{this.setRenderedMinMax()})),this.registerPropertyChangedHandlers(["inputType","inputSize"],(()=>{this.resetInputSize(),this.resetRenderedPlaceholder()}))}isTextValue(){return this.isDateInputType||["text","number","password"].indexOf(this.inputType)>-1}getType(){return"text"}onSurveyLoad(){super.onSurveyLoad(),this.setRenderedMinMax()}get inputType(){return this.getPropertyValue("inputType")}set inputType(e){"datetime_local"!==(e=e.toLowerCase())&&"datetime"!==e||(e="datetime-local"),this.setPropertyValue("inputType",e.toLowerCase()),this.isLoadingFromJson||(this.min=void 0,this.max=void 0,this.step=void 0),this.updateMaskAdapter()}getMaxLength(){return this.isTextInput?super.getMaxLength():null}runConditionCore(e,t){super.runConditionCore(e,t),(this.minValueExpression||this.maxValueExpression)&&this.setRenderedMinMax(e,t)}getDisplayValueCore(e,t){return this.maskTypeIsEmpty||ue.isValueEmpty(t)?super.getDisplayValueCore(e,t):this.maskInstance.getMaskedValue(t)}isLayoutTypeSupported(e){return!0}get inputSize(){return this.getPropertyValue("inputSize")}set inputSize(e){this.setPropertyValue("inputSize",e)}get size(){return this.inputSize}set size(e){this.inputSize=e}get isTextInput(){return["text","search","tel","url","email","password"].indexOf(this.inputType)>-1}get renderedInputSize(){return this.getPropertyValue("renderedInputSize",void 0,(()=>{const e=this.calInputSize();return e>0?e:void 0}))}get inputWidth(){return this.getPropertyValue("inputWidth",void 0,(()=>this.calInputSize()>0?"auto":""))}calInputSize(){if(!this.isTextInput)return 0;let e=this.inputSize>0?this.inputSize:0;return e<1&&this.parent&&this.parent.inputSize&&(e=this.parent.inputSize),e}resetInputSize(){this.resetPropertyValue("renderedInputSize"),this.resetPropertyValue("inputWidth")}get autocomplete(){return this.getPropertyValue("autocomplete",null)}set autocomplete(e){this.setPropertyValue("autocomplete",e)}get min(){return this.getPropertyValue("min")}set min(e){this.isValueExpression(e)?this.minValueExpression=e.substring(1):this.setPropertyValue("min",e)}get max(){return this.getPropertyValue("max")}set max(e){this.isValueExpression(e)?this.maxValueExpression=e.substring(1):this.setPropertyValue("max",e)}get minValueExpression(){return this.getPropertyValue("minValueExpression","")}set minValueExpression(e){this.setPropertyValue("minValueExpression",e)}get maxValueExpression(){return this.getPropertyValue("maxValueExpression","")}set maxValueExpression(e){this.setPropertyValue("maxValueExpression",e)}get renderedMin(){return this.getPropertyValue("renderedMin")}get renderedMax(){return this.getPropertyValue("renderedMax")}get minErrorText(){return this.getLocalizableStringText("minErrorText")}set minErrorText(e){this.setLocalizableStringText("minErrorText",e)}get locMinErrorText(){return this.getLocalizableString("minErrorText")}get maxErrorText(){return this.getLocalizableStringText("maxErrorText")}set maxErrorText(e){this.setLocalizableStringText("maxErrorText",e)}get locMaxErrorText(){return this.getLocalizableString("maxErrorText")}get isMinMaxType(){return kr(this)}get maskInstance(){return this.maskSettings}get inputValue(){return this._inputValue||this.maskTypeIsEmpty?this._inputValue:this.maskInstance.getMaskedValue("")}set inputValue(e){let t=e;this._inputValue=e,this.maskTypeIsEmpty||(t=this.maskInstance.getUnmaskedValue(e),this._inputValue=this.maskInstance.getMaskedValue(t),t&&this.maskSettings.saveMaskedValue&&(t=this.maskInstance.getMaskedValue(t))),this.value=t}onChangeQuestionValue(e){super.onChangeQuestionValue(e),this.updateInputValue()}updateInputValue(){this.maskTypeIsEmpty?this._inputValue=this.value:this.maskSettings.saveMaskedValue?this._inputValue=this.value?this.value:this.maskInstance.getMaskedValue(""):this._inputValue=this.maskInstance.getMaskedValue(this.value)}hasToConvertToUTC(e){return Ps.storeUtcDates&&this.isDateTimeLocaleType()&&!!e}createDate(e){return le("question-text",e)}valueForSurveyCore(e){return this.hasToConvertToUTC(e)&&(e=this.createDate(e).toISOString()),super.valueForSurveyCore(e)}valueFromDataCore(e){if(this.hasToConvertToUTC(e)){const t=this.createDate(e);let s=this.createDate(t.getTime()-60*t.getTimezoneOffset()*1e3).toISOString();e=s.substring(0,s.length-2)}return super.valueFromDataCore(e)}onCheckForErrors(e,t,s){if(super.onCheckForErrors(e,t,s),t)return;if(this.isValueLessMin){const t=new Fs(this.getMinMaxErrorText(this.minErrorText,this.getCalculatedMinMax(this.renderedMin)),this);t.onUpdateErrorTextCallback=e=>{e.text=this.getMinMaxErrorText(this.minErrorText,this.getCalculatedMinMax(this.renderedMin))},e.push(t)}if(this.isValueGreaterMax){const t=new Fs(this.getMinMaxErrorText(this.maxErrorText,this.getCalculatedMinMax(this.renderedMax)),this);t.onUpdateErrorTextCallback=e=>{e.text=this.getMinMaxErrorText(this.maxErrorText,this.getCalculatedMinMax(this.renderedMax))},e.push(t)}this.dateValidationMessage&&e.push(new Fs(this.dateValidationMessage,this));const i=this.getValidatorTitle(),r=new Zs;if(r.errorOwner=this,"email"===this.inputType&&!this.validators.some((e=>"emailvalidator"===e.getType()))){const t=r.validate(this.value,i);t&&t.error&&e.push(t.error)}}canSetValueToSurvey(){if(!this.isMinMaxType)return!0;const e=!this.isValueLessMin&&!this.isValueGreaterMax;return(!e||this.errors.length>0)&&this.survey&&(this.survey.isValidateOnValueChanging||this.survey.isValidateOnValueChanged)&&this.hasErrors(),e}convertFuncValuetoQuestionValue(e){let t=this.maskTypeIsEmpty?this.inputType:this.maskSettings.getTypeForExpressions();return ue.convertValToQuestionVal(e,t)}getMinMaxErrorText(e,t){if(ue.isValueEmpty(t))return e;let s=t.toString();return"date"===this.inputType&&t.toDateString&&(s=t.toDateString()),e.replace("{0}",s)}get isValueLessMin(){return!this.isValueEmpty(this.renderedMin)&&!this.isEmpty()&&this.getCalculatedMinMax(this.value)this.getCalculatedMinMax(this.renderedMax)}get isDateInputType(){return"date"===this.inputType||this.isDateTimeLocaleType()}isDateTimeLocaleType(){return"datetime-local"===this.inputType}getCalculatedMinMax(e){return this.isValueEmpty(e)?e:this.isDateInputType?this.createDate(e):e}setRenderedMinMax(e=null,t=null){this.minValueRunner=this.getDefaultRunner(this.minValueRunner,this.minValueExpression),this.setValueAndRunExpression(this.minValueRunner,this.min,(e=>{!e&&this.isDateInputType&&Ps.minDate&&(e=Ps.minDate),this.setPropertyValue("renderedMin",e)}),e,t),this.maxValueRunner=this.getDefaultRunner(this.maxValueRunner,this.maxValueExpression),this.setValueAndRunExpression(this.maxValueRunner,this.max,(e=>{!e&&this.isDateInputType&&(e=Ps.maxDate?Ps.maxDate:"2999-12-31"),this.setPropertyValue("renderedMax",e)}),e,t)}get step(){return this.getPropertyValue("step")}set step(e){this.setPropertyValue("step",e)}get renderedStep(){return this.isValueEmpty(this.step)?"number"!==this.inputType?void 0:"any":this.step}getIsInputTextUpdate(){return!!this.maskTypeIsEmpty&&super.getIsInputTextUpdate()}supportAutoAdvance(){return!this.getIsInputTextUpdate()&&!this.isDateInputType}supportGoNextPageError(){return!this.isDateInputType}get dataList(){return this.locDataList.value}set dataList(e){this.locDataList.value=e}get locDataList(){return this.locDataListValue}get dataListId(){return this.locDataList.hasValue()?this.id+"_datalist":void 0}setNewValue(e){(e=this.correctValueType(e))&&(this.dateValidationMessage=void 0),super.setNewValue(e)}correctValueType(e){if(!e)return e;if("number"===this.inputType||"range"===this.inputType)return ue.isNumber(e)?ue.getNumber(e):"";if("month"===this.inputType){const t=this.createDate(e),s=0==t.toISOString().indexOf(e)&&-1==e.indexOf("T"),i=(s?t.getUTCMonth():t.getMonth())+1;return(s?t.getUTCFullYear():t.getFullYear())+"-"+(i<10?"0":"")+i}return e}hasPlaceholder(){return!this.isReadOnly&&"range"!==this.inputType}getControlCssClassBuilder(){const e=this.getMaxLength();return super.getControlCssClassBuilder().append(this.cssClasses.constrolWithCharacterCounter,!!e).append(this.cssClasses.characterCounterBig,e>99)}isReadOnlyRenderDiv(){return this.isReadOnly&&"div"===Ps.readOnly.textRenderMode}get inputStyle(){var e={};return e.width=this.inputWidth,this.updateTextAlign(e),e}updateTextAlign(e){"auto"!==this.inputTextAlignment?e.textAlign=this.inputTextAlignment:this.maskTypeIsEmpty||"auto"===this.maskSettings.getTextAlignment()||(e.textAlign=this.maskSettings.getTextAlignment())}updateValueOnEvent(e){const t=e.target.value;this.isTwoValueEquals(this.value,t)||(this.inputValue=t)}updateDateValidationMessage(e){this.dateValidationMessage=this.isDateInputType&&e.target?e.target.validationMessage:void 0}onBlurCore(e){this.updateDateValidationMessage(e),this.updateValueOnEvent(e),this.updateRemainingCharacterCounter(e.target.value),super.onBlurCore(e)}onFocusCore(e){this.updateRemainingCharacterCounter(e.target.value),super.onFocusCore(e)}afterRenderQuestionElement(e){e&&(this.input=e instanceof HTMLInputElement?e:e.querySelector("input"),this.createMaskAdapter()),super.afterRenderQuestionElement(e)}beforeDestroyQuestionElement(e){this.deleteMaskAdapter(),this.input=void 0}}ft([pe({onSet:(e,t)=>{t.onSetMaskType(e)}})],Tr.prototype,"maskType",void 0),ft([pe()],Tr.prototype,"inputTextAlignment",void 0),ft([pe()],Tr.prototype,"_inputValue",void 0);const Rr=["number","range","date","datetime-local","month","time","week"];function kr(e){const t=e?e.inputType:"";return!!t&&Rr.indexOf(t)>-1}function Dr(e,t){const s=e.split(t);return 2!==s.length?-1:ue.isNumber(s[0])&&ue.isNumber(s[1])?60*parseFloat(s[0])+parseFloat(s[1]):-1}function Lr(e,t,s,i){let r=i?s:t;if(!kr(e))return r;if(ue.isValueEmpty(t)||ue.isValueEmpty(s))return r;if(0===e.inputType.indexOf("date")||"month"===e.inputType){const n="month"===e.inputType,a="question-text-minmax",o=le(a,n?t+"-01":t),l=le(a,n?s+"-01":s);if(!o||!l)return r;if(o>l)return i?t:s}if("week"===e.inputType||"time"===e.inputType){return function(e,t,s){const i=Dr(e,s),r=Dr(t,s);return!(i<0||r<0)&&i>r}(t,s,"week"===e.inputType?"-W":":")?i?t:s:r}if("number"===e.inputType){if(!ue.isNumber(t)||!ue.isNumber(s))return r;if(ue.getNumber(t)>ue.getNumber(s))return i?t:s}return"string"==typeof t||"string"==typeof s?r:t>s?i?t:s:r}function Ar(e,t){e&&e.inputType&&(t.inputType="range"!==e.inputType?e.inputType:"number",t.textUpdateMode="onBlur")}Ie.addClass("text",[{name:"inputType",default:"text",choices:Ps.questions.inputTypes},{name:"inputSize:number",alternativeName:"size",minValue:0,dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"textUpdateMode",default:"default",choices:["default","onBlur","onTyping"],dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"autocomplete",alternativeName:"autoComplete",choices:Ps.questions.dataList},{name:"min",dependsOn:"inputType",visibleIf:function(e){return kr(e)},onPropertyEditorUpdate:function(e,t){Ar(e,t)},onSettingValue:(e,t)=>Lr(e,t,e.max,!1)},{name:"max",dependsOn:"inputType",nextToProperty:"*min",visibleIf:function(e){return kr(e)},onSettingValue:(e,t)=>Lr(e,e.min,t,!0),onPropertyEditorUpdate:function(e,t){Ar(e,t)}},{name:"minValueExpression:expression",category:"logic",dependsOn:"inputType",visibleIf:function(e){return kr(e)}},{name:"maxValueExpression:expression",category:"logic",dependsOn:"inputType",visibleIf:function(e){return kr(e)}},{name:"minErrorText",serializationProperty:"locMinErrorText",dependsOn:"inputType",visibleIf:function(e){return kr(e)}},{name:"maxErrorText",serializationProperty:"locMaxErrorText",dependsOn:"inputType",visibleIf:function(e){return kr(e)}},{name:"inputTextAlignment",default:"auto",choices:["left","right","auto"]},{name:"maskType",default:"none",visibleIndex:0,dependsOn:"inputType",visibleIf:e=>"text"===e.inputType||"tel"===e.inputType,choices:e=>Ir()},{name:"maskSettings:masksettings",className:"masksettings",visibleIndex:1,dependsOn:["inputType","maskType"],visibleIf:e=>"text"===e.inputType||"tel"===e.inputType,onGetValue:function(e){return e.maskSettings.getData()},onSetValue:function(e,t){e.maskSettings.setData(t)}},{name:"step:number",dependsOn:"inputType",visibleIf:function(e){return!!e&&("number"===e.inputType||"range"===e.inputType)}},{name:"maxLength:number",default:-1,dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"placeholder",alternativeName:"placeHolder",serializationProperty:"locPlaceholder",dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"dataList:string[]",serializationProperty:"locDataList",dependsOn:"inputType",visibleIf:function(e){return!!e&&"text"===e.inputType}}],(function(){return new Tr("")}),"textbase"),wi.Instance.registerQuestion("text",(e=>new Tr(e)));class jr extends Tr{get a11y_input_ariaLabel(){return this.locTitle.renderedHtml}get a11y_input_ariaLabelledBy(){return null}get a11y_input_ariaDescribedBy(){return null}}class Or extends pt{constructor(e=null,t=null){super(),this.focusIn=()=>{this.editor.focusIn()},this.editorValue=this.createEditor(e),this.maskSettings=this.editorValue.maskSettings,this.editor.questionTitleTemplateCallback=function(){return""},this.editor.titleLocation="left",t&&(this.title=t),this.editor.onPropertyChanged.add(((e,t)=>{this.onPropertyChanged.fire(this,t)}))}getType(){return"multipletextitem"}get id(){return this.editor.id}getOriginalObj(){return this.editor}get name(){return this.editor.name}set name(e){this.editor.name=e}get question(){return this.data}get editor(){return this.editorValue}createEditor(e){return new jr(e)}addUsedLocales(e){super.addUsedLocales(e),this.editor.addUsedLocales(e)}localeChanged(){super.localeChanged(),this.editor.localeChanged()}locStrsChanged(){super.locStrsChanged(),this.editor.locStrsChanged()}setData(e){this.data=e,e&&(this.editor.defaultValue=e.getItemDefaultValue(this.name),this.editor.setSurveyImpl(this),this.editor.parent=e,this.editor.setParentQuestion(e))}get isRequired(){return this.editor.isRequired}set isRequired(e){this.editor.isRequired=e}get inputType(){return this.editor.inputType}set inputType(e){this.editor.inputType=e}get title(){return this.editor.title}set title(e){this.editor.title=e}get locTitle(){return this.editor.locTitle}get fullTitle(){return this.editor.fullTitle}get maxLength(){return this.editor.maxLength}set maxLength(e){this.editor.maxLength=e}getMaxLength(){var e=this.getSurvey();return ue.getMaxLength(this.maxLength,e?e.maxTextLength:-1)}get placeholder(){return this.editor.placeholder}set placeholder(e){this.editor.placeholder=e}get locPlaceholder(){return this.editor.locPlaceholder}get placeHolder(){return this.placeholder}set placeHolder(e){this.placeholder=e}get locPlaceHolder(){return this.locPlaceholder}get requiredErrorText(){return this.editor.requiredErrorText}set requiredErrorText(e){this.editor.requiredErrorText=e}get locRequiredErrorText(){return this.editor.locRequiredErrorText}get inputSize(){return this.editor.inputSize}set inputSize(e){this.editor.inputSize=e}get size(){return this.inputSize}set size(e){this.inputSize=e}get defaultValueExpression(){return this.editor.defaultValueExpression}set defaultValueExpression(e){this.editor.defaultValueExpression=e}get minValueExpression(){return this.editor.minValueExpression}set minValueExpression(e){this.editor.minValueExpression=e}get maxValueExpression(){return this.editor.maxValueExpression}set maxValueExpression(e){this.editor.maxValueExpression=e}get validators(){return this.editor.validators}set validators(e){this.editor.validators=e}getValidators(){return this.validators}get maskType(){return this.editor.maskType}set maskType(e){this.editor.maskType=e,this.maskSettings=this.editor.maskSettings}get maskSettings(){return this.getPropertyValue("maskSettings")}set maskSettings(e){this.setPropertyValue("maskSettings",e),this.editor.maskSettings!==e&&(this.editor.maskSettings=e)}get inputTextAlignment(){return this.editor.inputTextAlignment}set inputTextAlignment(e){this.editor.inputTextAlignment=e}get value(){return this.data?this.data.getMultipleTextValue(this.name):null}set value(e){null!=this.data&&this.data.setMultipleTextValue(this.name,e)}isEmpty(){return this.editor.isEmpty()}onValueChanged(e){this.valueChangedCallback&&this.valueChangedCallback(e)}getSurveyData(){return this}getSurvey(){return this.data?this.data.getSurvey():null}getTextProcessor(){return this.data?this.data.getTextProcessor():null}getValue(e){return this.data?this.data.getMultipleTextValue(e):null}setValue(e,t){this.data&&this.data.setMultipleTextValue(e,t)}getVariable(e){}setVariable(e,t){}getComment(e){return null}setComment(e,t){}getAllValues(){return this.data?this.data.getAllValues():this.value}getFilteredValues(){return this.getAllValues()}getFilteredProperties(){return{survey:this.getSurvey()}}findQuestionByName(e){const t=this.getSurvey();return t?t.getQuestionByName(e):null}getEditingSurveyElement(){}getValidatorTitle(){return this.title}get validatedValue(){return this.value}set validatedValue(e){this.value=e}getDataFilteredValues(){return this.getFilteredValues()}getDataFilteredProperties(){return this.getFilteredProperties()}}class qr extends ti{static addDefaultItems(e){for(var t=wi.DefaultMutlipleTextItems,s=0;s{e.setData(this),this.survey&&this.survey.multipleTextItemAdded(this,e)})),this.registerPropertyChangedHandlers(["items","colCount","itemErrorLocation"],(()=>{this.calcVisibleRows()})),this.registerPropertyChangedHandlers(["inputSize"],(()=>{this.resetItemsSize()}))}getType(){return"multipletext"}setSurveyImpl(e,t){super.setSurveyImpl(e,t);for(var s=0;st.editor.id=e+"_"+s)),this.setPropertyValue("id",e)}onSurveyLoad(){this.editorsOnSurveyLoad(),super.onSurveyLoad(),ue.isValueEmpty(this.rows)||this.calcVisibleRows()}setQuestionValue(e,t=!0){super.setQuestionValue(e,t),this.performForEveryEditor((e=>{e.editor.updateValueFromSurvey(e.value)})),this.updateIsAnswered()}onSurveyValueChanged(e){super.onSurveyValueChanged(e),this.performForEveryEditor((e=>{e.editor.onSurveyValueChanged(e.value)}))}resetItemsSize(){this.performForEveryEditor((e=>{e.editor.resetInputSize()}))}editorsOnSurveyLoad(){this.performForEveryEditor((e=>{e.editor.onSurveyLoad()}))}performForEveryEditor(e){for(var t=0;ts.editor.collectNestedQuestions(e,t)))}getConditionJson(e=null,t=null){if(!t)return super.getConditionJson(e);var s=this.getItemByName(t);if(!s)return null;var i=(new Se).toJsonObject(s);return i.type="text",i}locStrsChanged(){super.locStrsChanged();for(var e=0;e5||this.setPropertyValue("colCount",e)}get inputSize(){return this.getPropertyValue("inputSize")}set inputSize(e){this.setPropertyValue("inputSize",e)}get itemSize(){return this.inputSize}set itemSize(e){this.inputSize=e}get itemTitleWidth(){return this.getPropertyValue("itemTitleWidth")||""}set itemTitleWidth(e){this.setPropertyValue("itemTitleWidth",e)}onRowCreated(e){return e}calcVisibleRows(){const e=this.colCount,t=this.items;let s,i,r=0,n=[];for(var a=0;a=e||a==t.length-1)&&(r=0,i.onAfterCreated());this.rows=n}getRows(){return ue.isValueEmpty(this.rows)&&this.calcVisibleRows(),this.rows}onValueChanged(){super.onValueChanged(),this.onItemValueChanged()}createTextItem(e,t){return new Or(e,t)}onItemValueChanged(){if(!this.isMultipleItemValueChanging)for(var e=0;es.editor.runCondition(e,t)))}getIsRunningValidators(){if(super.getIsRunningValidators())return!0;for(var e=0;e{this.raiseOnCompletedAsyncValidators()},t&&!0===t.isOnValueChanged&&this.items[i].editor.isEmpty()||(s=this.items[i].editor.hasErrors(e,t)||s);return super.hasErrors(e)||s}getAllErrors(){for(var e=super.getAllErrors(),t=0;t0&&(e=e.concat(s))}return e}clearErrors(){super.clearErrors();for(var e=0;e0).append(this.cssClasses.itemWithCharacterCounter,!!e.getMaxLength()).toString()}getItemCss(){return(new Ct).append(this.cssClasses.item).toString()}getItemTitleCss(){return(new Ct).append(this.cssClasses.itemTitle).toString()}}ft([ge()],qr.prototype,"rows",void 0);class Nr extends pt{constructor(){super(...arguments),this.isVisible=!0,this.cells=[]}}ft([pe()],Nr.prototype,"isVisible",void 0),ft([ge()],Nr.prototype,"cells",void 0);class Mr extends Nr{onAfterCreated(){const e=()=>{this.isVisible=this.cells.some((e=>{var t,s;return(null===(t=e.item)||void 0===t?void 0:t.editor)&&(null===(s=e.item)||void 0===s?void 0:s.editor.hasVisibleErrors)}))};this.cells.forEach((t=>{var s,i;(null===(s=t.item)||void 0===s?void 0:s.editor)&&(null===(i=t.item)||void 0===i||i.editor.registerFunctionOnPropertyValueChanged("hasVisibleErrors",e))})),e()}}class Fr{constructor(e,t){this.item=e,this.question=t,this.isErrorsCell=!1}getClassName(){return(new Ct).append(this.question.cssClasses.cell).toString()}get className(){return this.getClassName()}}class Br extends Fr{constructor(){super(...arguments),this.isErrorsCell=!0}getClassName(){return(new Ct).append(super.getClassName()).append(this.question.cssClasses.cellError).append(this.question.cssClasses.cellErrorTop,this.question.showItemErrorOnTop).append(this.question.cssClasses.cellErrorBottom,this.question.showItemErrorOnBottom).toString()}}Ie.addClass("multipletextitem",[{name:"!name",isUnique:!0},"isRequired:boolean",{name:"placeholder",alternativeName:"placeHolder",serializationProperty:"locPlaceholder"},{name:"inputType",default:"text",choices:Ps.questions.inputTypes},{name:"maskType",default:"none",visibleIndex:0,dependsOn:"inputType",visibleIf:e=>"text"===e.inputType,choices:e=>Ir()},{name:"maskSettings:masksettings",className:"masksettings",visibleIndex:1,dependsOn:"inputType",visibleIf:e=>"text"===e.inputType,onGetValue:function(e){return e.maskSettings.getData()},onSetValue:function(e,t){e.maskSettings.setData(t)}},{name:"inputTextAlignment",default:"auto",choices:["left","right","auto"]},{name:"title",serializationProperty:"locTitle"},{name:"maxLength:number",default:-1},{name:"inputSize:number",alternativeName:"size",minValue:0},{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},{name:"defaultValueExpression:expression",visible:!1},{name:"minValueExpression:expression",category:"logic",dependsOn:"inputType",visibleIf:function(e){return kr(e)}},{name:"maxValueExpression:expression",category:"logic",dependsOn:"inputType",visibleIf:function(e){return kr(e)}},{name:"validators:validators",baseClassName:"surveyvalidator",classNamePart:"validator"}],(function(){return new Or("")})),Ie.addClass("multipletext",[{name:"!items:textitems",className:"multipletextitem",isArray:!0},{name:"inputSize:number",minValue:0,visible:!1,alternativeName:"itemSize"},{name:"colCount:number",default:1,choices:[1,2,3,4,5]},{name:"itemErrorLocation",default:"default",choices:["default","top","bottom"],visible:!1},{name:"itemTitleWidth",category:"layout"}],(function(){return new qr("")}),"question"),wi.Instance.registerQuestion("multipletext",(e=>{var t=new qr(e);return qr.addDefaultItems(t),t}));class zr extends ar{constructor(e=""){super(e),this.createLocalizableString("content",this,!0),this.registerPropertyChangedHandlers(["content"],(()=>{this.onContentChanged()}))}getType(){return"flowpanel"}getChildrenLayoutType(){return"flow"}onSurveyLoad(){super.onSurveyLoad(),this.onContentChanged()}get content(){return this.getLocalizableStringText("content")}set content(e){this.setLocalizableStringText("content",e)}get locContent(){return this.getLocalizableString("content")}get html(){return this.getPropertyValue("html","")}set html(e){this.setPropertyValue("html",e)}onContentChanged(){var e="";e=this.onCustomHtmlProducing?this.onCustomHtmlProducing():this.produceHtml(),this.html=e,this.contentChangedCallback&&this.contentChangedCallback()}produceHtml(){for(var e=[],t=/{(.*?(element:)[^$].*?)}/g,s=this.content,i=0,r=null;null!==(r=t.exec(s));){r.index>i&&(e.push(s.substring(i,r.index)),i=r.index);var n=this.getQuestionFromText(r[0]);n?e.push(this.getHtmlForQuestion(n)):e.push(s.substring(i,r.index+r[0].length)),i=r.index+r[0].length}return i","g"),"
")}getQuestionFromText(e){return e=(e=e.substring(1,e.length-1)).replace(zr.contentElementNamePrefix,"").trim(),this.getQuestionByName(e)}getHtmlForQuestion(e){return this.onGetHtmlForQuestion?this.onGetHtmlForQuestion(e):""}getQuestionHtmlId(e){return this.name+"_"+e.id}onAddElement(e,t){super.onAddElement(e,t),this.addElementToContent(e),e.renderWidth=""}onRemoveElement(e){var t=this.getElementContentText(e);this.content=this.content.replace(t,""),super.onRemoveElement(e)}dragDropMoveElement(e,t,s){}addElementToContent(e){if(!this.isLoadingFromJson){var t=this.getElementContentText(e);this.insertTextAtCursor(t)||(this.content=this.content+t)}}insertTextAtCursor(e,t=null){if(!this.isDesignMode||!ae.isAvailable())return!1;let s=ae.getSelection();if(s.getRangeAt&&s.rangeCount){let r=s.getRangeAt(0);r.deleteContents();const n=new Text(e);r.insertNode(n);if(this.getContent){var i=this.getContent(t);this.content=i}return!0}return!1}getElementContentText(e){return"{"+zr.contentElementNamePrefix+e.name+"}"}}zr.contentElementNamePrefix="element:",Ie.addClass("flowpanel",[{name:"content:html",serializationProperty:"locContent"}],(function(){return new zr}),"panel");class Hr extends ti{constructor(e){super(e)}getType(){return"nonvalue"}get hasInput(){return!1}get hasTitle(){return!1}getTitleLocation(){return""}get hasComment(){return!1}hasErrors(e=!0,t=null){return!1}getAllErrors(){return[]}supportAutoAdvance(){return!1}addConditionObjectsByContext(e,t){}getConditionJson(e=null,t=null){return null}get ariaRole(){return null}get ariaRequired(){return null}}Ie.addClass("nonvalue",[{name:"title",visible:!1},{name:"description",visible:!1},{name:"valueName",visible:!1},{name:"enableIf",visible:!1},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1},{name:"clearIfInvisible",visible:!1},{name:"isRequired",visible:!1,isSerializable:!1},{name:"requiredErrorText",visible:!1},{name:"readOnly",visible:!1},{name:"requiredIf",visible:!1},{name:"validators",visible:!1},{name:"titleLocation",visible:!1},{name:"showCommentArea",visible:!1},{name:"useDisplayValuesInDynamicTexts",alternativeName:"useDisplayValuesInTitle",visible:!1}],(function(){return new Hr("")}),"question");class Qr extends ti{constructor(e){super(e)}getType(){return"empty"}}Ie.addClass("empty",[],(function(){return new Qr("")}),"question");class Wr extends fr{constructor(e){super(e),this.invisibleOldValues={},this.isChangingValueOnClearIncorrect=!1,this.selectAllItemValue=new ii(""),this.selectAllItemValue.id="selectall",this.selectAllItemText=this.createLocalizableString("selectAllText",this.selectAllItem,!0,"selectAllItemText"),this.selectAllItem.locOwner=this,this.selectAllItem.setLocText(this.selectAllItemText),this.registerPropertyChangedHandlers(["showSelectAllItem","selectAllText"],(()=>{this.onVisibleChoicesChanged()}))}getDefaultItemComponent(){return"survey-checkbox-item"}getType(){return"checkbox"}onCreating(){super.onCreating(),this.createNewArray("renderedValue"),this.createNewArray("value")}getFirstInputElementId(){return this.inputId+"_0"}get valuePropertyName(){return this.getPropertyValue("valuePropertyName")}set valuePropertyName(e){this.setPropertyValue("valuePropertyName",e)}getQuestionFromArray(e,t){if(e&&e===this.valuePropertyName){const e=this.value;if(Array.isArray(e)&&t-1&&s.splice(i,1),this.renderedValue=s}}isItemSelectedCore(e){if(e===this.selectAllItem)return this.isAllSelected;var t=this.renderedValue;if(!t||!Array.isArray(t))return!1;for(var s=0;s0){const t=[];e.forEach((e=>{const s="object"==typeof e;let i=s?e:{};s||(i[this.valuePropertyName]=e),t.push(i)})),e=t}return super.convertDefaultValue(e)}getRealValue(e){return e&&this.valuePropertyName?e[this.valuePropertyName]:e}get isValueArray(){return!0}get maxSelectedChoices(){return this.getPropertyValue("maxSelectedChoices")}set maxSelectedChoices(e){e<0&&(e=0),this.setPropertyValue("maxSelectedChoices",e),this.filterItems()}get minSelectedChoices(){return this.getPropertyValue("minSelectedChoices")}set minSelectedChoices(e){e<0&&(e=0),this.setPropertyValue("minSelectedChoices",e)}get selectedChoices(){const e=this.renderedValue,t=this.visibleChoices,s=this.selectedItemValues;if(this.isEmpty())return[];const i=this.defaultSelectedItemValues?[].concat(this.defaultSelectedItemValues,t):t,r=e.map((e=>ii.getItemByValue(i,e))).filter((e=>!!e));r.length||s||this.updateSelectedItemValues();return this.validateItemValues(r)}get selectedItems(){return this.selectedChoices}get hasFilteredValue(){return!!this.valuePropertyName}getFilteredName(){let e=super.getFilteredName();return this.hasFilteredValue&&(e+="-unwrapped"),e}getFilteredValue(){return this.hasFilteredValue?this.renderedValue:super.getFilteredValue()}getMultipleSelectedItems(){return this.selectedChoices}validateItemValues(e){if(e.length)return e;const t=this.selectedItemValues;if(t&&t.length)return this.defaultSelectedItemValues=[].concat(t),t;return this.renderedValue.map((e=>this.createItemValue(e)))}getAnswerCorrectIgnoreOrder(){return!0}onCheckForErrors(e,t,s){if(super.onCheckForErrors(e,t,s),!t&&this.minSelectedChoices>0&&this.checkMinSelectedChoicesUnreached()){const t=new Fs(this.getLocalizationFormatString("minSelectError",this.minSelectedChoices),this);e.push(t)}}onVisibleChoicesChanged(){super.onVisibleChoicesChanged(),this.updateSelectAllItemProps()}onEnableItemCallBack(e){return!this.shouldCheckMaxSelectedChoices()||this.isItemSelected(e)}onAfterRunItemsEnableCondition(){this.updateSelectAllItemProps(),this.maxSelectedChoices<1?this.otherItem.setIsEnabled(!0):this.hasOther&&this.otherItem.setIsEnabled(!this.shouldCheckMaxSelectedChoices()||this.isOtherSelected)}updateSelectAllItemProps(){this.hasSelectAll&&this.selectAllItem.setIsEnabled(this.getSelectAllEnabled())}getSelectAllEnabled(){if(!this.hasSelectAll)return!0;let e=this.getVisibleEnableItems().length;const t=this.maxSelectedChoices;return!(t>0&&t0}getVisibleEnableItems(){const e=new Array,t=this.visibleChoices;for(let s=0;s=this.maxSelectedChoices}checkMinSelectedChoicesUnreached(){if(this.minSelectedChoices<1)return!1;var e=this.value;return(Array.isArray(e)?e.length:0)0){const i=this.noneIndexInArray(e,s),r=this.noneIndexInArray(t,s);if(i.index>-1)if(i.val===r.val)t.length>0&&t.splice(r.index,1);else{const e=this.noneIndexInArray(t,[i.val]);e.index>-1&&e.index-1&&t.length>1){const e=this.convertValueToObject([r.val])[0];t.splice(0,t.length,e)}}}noneIndexInArray(e,t){if(!Array.isArray(e))return{index:-1,val:void 0};for(var s=e.length-1;s>=0;s--){const i=t.indexOf(this.getRealValue(e[s]));if(i>-1)return{index:s,val:t[i]}}return{index:-1,val:void 0}}supportSelectAll(){return this.isSupportProperty("showSelectAllItem")}addNonChoicesItems(e,t){super.addNonChoicesItems(e,t),this.supportSelectAll()&&this.addNonChoiceItem(e,this.selectAllItem,t,this.hasSelectAll,Ps.specialChoicesOrder.selectAllItem)}isBuiltInChoice(e){return e===this.selectAllItem||super.isBuiltInChoice(e)}isItemInList(e){return e==this.selectAllItem?this.hasSelectAll:super.isItemInList(e)}getDisplayValueEmpty(){return ii.getTextOrHtmlByValue(this.visibleChoices.filter((e=>e!=this.selectAllItemValue)),void 0)}getDisplayValueCore(e,t){if(!Array.isArray(t))return super.getDisplayValueCore(e,t);const s=this.valuePropertyName;return this.getDisplayArrayValue(e,t,(e=>{let i=t[e];return s&&i[s]&&(i=i[s]),i}))}clearIncorrectValuesCore(){this.clearIncorrectAndDisabledValues(!1)}clearDisabledValuesCore(){this.clearIncorrectAndDisabledValues(!0)}clearIncorrectAndDisabledValues(e){var t=this.value,s=!1,i=this.restoreValuesFromInvisible();if(t||0!=i.length){if(!Array.isArray(t)||0==t.length){if(this.isChangingValueOnClearIncorrect=!0,e||(this.hasComment?this.value=null:this.clearValue(!0)),this.isChangingValueOnClearIncorrect=!1,0==i.length)return;t=[]}for(var r=[],n=0;n=0}valueFromData(e){if(!e)return e;if(!Array.isArray(e))return[super.valueFromData(e)];let t=[];for(let s=0;s1&&(t=this.data.getValue(this.getValueName())),ue.convertArrayValueToObject(e,this.valuePropertyName,t)}renderedValueFromDataCore(e){if(e&&Array.isArray(e)||(e=[]),!this.hasActiveChoices)return e;for(var t=0;t{if(t<=0)return 0;const s=e.minSelectedChoices;return s>0&&t{if(t<=0)return 0;const s=e.maxSelectedChoices;return s>0&&t>s?s:t}},{name:"selectAllText",serializationProperty:"locSelectAllText",dependsOn:"showSelectAllItem",visibleIf:function(e){return e.hasSelectAll}},{name:"valuePropertyName",category:"data"},{name:"itemComponent",visible:!1,default:"survey-checkbox-item"}],(function(){return new Wr("")}),"checkboxbase"),wi.Instance.registerQuestion("checkbox",(e=>{var t=new Wr(e);return t.choices=wi.DefaultChoices,t}));class Ur extends Et{updateItemState(){this.actions.forEach((e=>{const t=this.isItemSelected(e);e.visible=!this.hideSelectedItems||!t}))}constructor(e){super(e),this.onItemClick=e=>{this.isItemDisabled(e)||(this.isExpanded=!1,this.isItemSelected(e)?(this.selectedItems.splice(this.selectedItems.indexOf(e),1)[0],this.onSelectionChanged&&this.onSelectionChanged(e,"removed")):(this.selectedItems.push(e),this.onSelectionChanged&&this.onSelectionChanged(e,"added")))},this.isItemDisabled=e=>void 0!==e.enabled&&!e.enabled,this.isItemSelected=e=>!!this.allowSelection&&this.selectedItems.filter((t=>this.areSameItems(t,e))).length>0,this.setSelectedItems(e.selectedItems||[])}updateState(){this.updateItemState(),this.isEmpty=0===this.renderedActions.filter((e=>this.isItemVisible(e))).length}setSelectedItems(e){this.selectedItems=e,this.updateState()}selectFocusedItem(){super.selectFocusedItem(),this.hideSelectedItems&&this.focusNextVisibleItem()}}ft([pe()],Ur.prototype,"hideSelectedItems",void 0);class Gr extends yr{locStrsChanged(){super.locStrsChanged(),this.syncFilterStringPlaceholder()}updateListState(){this.listModel.updateState(),this.syncFilterStringPlaceholder()}syncFilterStringPlaceholder(){this.getSelectedActions().length||this.question.selectedItems.length||this.listModel.focusedItem?this.filterStringPlaceholder=void 0:this.filterStringPlaceholder=this.question.placeholder}getSelectedActions(){return this.listModel.actions.filter((e=>e.selected))}getFocusFirstInputSelector(){return this.listModel.hideSelectedItems&&Dt&&!this.isValueEmpty(this.question.value)?this.itemSelector:super.getFocusFirstInputSelector()}getPopupCssClasses(){return"sv-multi-select-list"}createListModel(){const e=this.getAvailableItems();let t=this.onSelectionChanged;t||(t=(e,t)=>{this.resetFilterString(),"selectall"===e.id?this.selectAllItems():"added"===t&&e.value===Ps.noneItemValue?this.selectNoneItem():"added"===t?this.selectItem(e.value):"removed"===t&&this.deselectItem(e.value),this.popupRecalculatePosition(!1),this.closeOnSelect&&(this.popupModel.isVisible=!1)});const s={items:e,onSelectionChanged:t,allowSelection:!1,locOwner:this.question,elementId:this.listElementId},i=new Ur(s);return this.setOnTextSearchCallbackForListModel(i),i.forceShowFilter=!0,i}resetFilterString(){super.resetFilterString(),this.inputString=null,this.hintString=""}get shouldResetAfterCancel(){return Dt&&!this.closeOnSelect}createPopup(){super.createPopup(),this.popupModel.onFooterActionsCreated.add(((e,t)=>{this.shouldResetAfterCancel&&t.actions.push({id:"sv-dropdown-done-button",title:this.doneButtonCaption,innerCss:"sv-popup__button--done",needSpace:!0,action:()=>{this.popupModel.isVisible=!1},enabled:new ct((()=>!this.isTwoValueEquals(this.question.renderedValue,this.previousValue)))})})),this.popupModel.onVisibilityChanged.add(((e,t)=>{this.shouldResetAfterCancel&&t.isVisible&&(this.previousValue=[].concat(this.question.renderedValue||[]))})),this.popupModel.onCancel=()=>{this.shouldResetAfterCancel&&(this.question.renderedValue=this.previousValue,this.updateListState())}}selectAllItems(){this.question.toggleSelectAll(),this.question.isAllSelected&&this.question.hideSelectedItems&&this.popupModel.hide(),this.updateListState()}selectNoneItem(){this.question.renderedValue=[Ps.noneItemValue],this.updateListState()}selectItem(e){let t=[].concat(this.question.renderedValue||[]);t.push(e),this.question.renderedValue=t,this.updateListState()}deselectItem(e){let t=[].concat(this.question.renderedValue||[]);t.splice(t.indexOf(e),1),this.question.renderedValue=t,this.applyHintString(),this.updateListState()}clear(){super.clear(),this.syncFilterStringPlaceholder()}onClear(e){super.onClear(e),this.updateListState()}setHideSelectedItems(e){this.listModel.hideSelectedItems=e,this.updateListState()}removeLastSelectedItem(){this.deselectItem(this.question.renderedValue[this.question.renderedValue.length-1]),this.popupRecalculatePosition(!1)}constructor(e,t){super(e,t),this.setHideSelectedItems(e.hideSelectedItems),this.syncFilterStringPlaceholder(),this.closeOnSelect=e.closeOnSelect}inputKeyHandler(e){8!==e.keyCode||this.filterString||(this.removeLastSelectedItem(),e.preventDefault(),e.stopPropagation())}setInputStringFromSelectedItem(e){this.question.searchEnabled&&(this.inputString=null)}focusItemOnClickAndPopup(){}onEscape(){}beforeScrollToFocusedItem(e){}afterScrollToFocusedItem(){var e;(null===(e=this.listModel.focusedItem)||void 0===e?void 0:e.selected)?this.hintString="":this.applyHintString(),this.syncFilterStringPlaceholder()}onPropertyChangedHandler(e,t){super.onPropertyChangedHandler(e,t),"value"!==t.name&&"renderedValue"!==t.name&&"placeholder"!==t.name||this.syncFilterStringPlaceholder()}}ft([pe({defaultValue:""})],Gr.prototype,"filterStringPlaceholder",void 0),ft([pe({defaultValue:!0})],Gr.prototype,"closeOnSelect",void 0),ft([pe()],Gr.prototype,"previousValue",void 0),ft([pe({localizable:{defaultStr:"tagboxDoneButtonCaption"}})],Gr.prototype,"doneButtonCaption",void 0);class Zr extends Wr{constructor(e){super(e),this.itemDisplayNameMap={},this.onOpened=this.addEvent(),this.ariaExpanded="false",this.createLocalizableString("placeholder",this,!1,!0),this.createLocalizableString("clearCaption",this,!1,!0),this.createLocalizableString("readOnlyText",this,!0),this.deselectAllItemText=this.createLocalizableString("deselectAllText",this.selectAllItem,!0,"deselectAllItemText"),this.registerPropertyChangedHandlers(["value","renderAs","showOtherItem","otherText","placeholder","choices","visibleChoices"],(()=>{this.updateReadOnlyText()})),this.updateReadOnlyText()}locStrsChanged(){var e;super.locStrsChanged(),this.updateReadOnlyText(),null===(e=this.dropdownListModelValue)||void 0===e||e.locStrsChanged()}updateReadOnlyText(){this.readOnlyText=this.displayValue||this.placeholder}getDefaultItemComponent(){return""}get dropdownListModel(){return this.dropdownListModelValue||(this.dropdownListModelValue=new Gr(this)),this.dropdownListModelValue}set dropdownListModel(e){this.dropdownListModelValue=e}get placeholder(){return this.getLocalizableStringText("placeholder")}set placeholder(e){this.setLocalizableStringText("placeholder",e)}get locPlaceholder(){return this.getLocalizableString("placeholder")}get clearCaption(){return this.getLocalizableStringText("clearCaption")}set clearCaption(e){this.setLocalizableStringText("clearCaption",e)}get locClearCaption(){return this.getLocalizableString("clearCaption")}get readOnlyText(){return this.getLocalizableStringText("readOnlyText")}set readOnlyText(e){this.setLocalizableStringText("readOnlyText",e)}get locReadOnlyText(){return this.getLocalizableString("readOnlyText")}getType(){return"tagbox"}get ariaRole(){return"combobox"}get popupModel(){return this.dropdownListModel.popupModel}getControlClass(){return(new Ct).append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.controlEditable,!this.isDisabledStyle&&!this.isReadOnlyStyle&&!this.isPreviewStyle).append(this.cssClasses.controlDisabled,this.isDisabledStyle).append(this.cssClasses.controlReadOnly,this.isReadOnlyStyle).append(this.cssClasses.controlPreview,this.isPreviewStyle).toString()}updateCssClasses(e,t){super.updateCssClasses(e,t),Cs(e,t)}calcCssClasses(e){const t=super.calcCssClasses(e);return this.dropdownListModelValue&&this.dropdownListModel.updateCssClasses(t.popup,t.list),t}onOpenedCallBack(){this.onOpened.fire(this,{question:this,choices:this.choices})}hasUnknownValue(e,t=!1,s=!0,i=!1){return!this.choicesLazyLoadEnabled&&super.hasUnknownValue(e,t,s,i)}needConvertRenderedOtherToDataValue(){var e;const t=null===(e=this.otherValue)||void 0===e?void 0:e.trim();return!!t&&super.hasUnknownValue(t,!0,!1)}onVisibleChoicesChanged(){super.onVisibleChoicesChanged(),this.dropdownListModelValue&&this.dropdownListModel.updateItems()}getItemIfChoicesNotContainThisValue(e,t){return this.choicesLazyLoadEnabled?this.createItemValue(e,t):super.getItemIfChoicesNotContainThisValue(e,t)}validateItemValues(e){this.updateItemDisplayNameMap();const t=this.renderedValue;if(e.length&&e.length===t.length)return e;const s=this.selectedItemValues;if(!e.length&&s&&s.length)return this.defaultSelectedItemValues=[].concat(s),s;const i=e.map((e=>e.value));return t.filter((e=>-1===i.indexOf(e))).forEach((t=>{const s=this.getItemIfChoicesNotContainThisValue(t,this.itemDisplayNameMap[t]);s&&e.push(s)})),e.sort(((e,s)=>t.indexOf(e.value)-t.indexOf(s.value))),e}updateItemDisplayNameMap(){const e=e=>{this.itemDisplayNameMap[e.value]=e.text};(this.defaultSelectedItemValues||[]).forEach(e),(this.selectedItemValues||[]).forEach(e),this.visibleChoices.forEach(e)}getFirstInputElementId(){return this.inputId+(this.searchEnabled?"_0":"")}getInputId(){return this.inputId+"_0"}supportEmptyValidation(){return!0}onBlurCore(e){this.dropdownListModel.onBlur(e),super.onBlurCore(e)}onFocusCore(e){this.dropdownListModel.onFocus(e),super.onFocusCore(e)}allElementsSelected(){const e=super.allElementsSelected();return this.updateSelectAllItemText(e),e}updateSelectAllItemText(e){this.selectAllItem.setLocText(e?this.deselectAllItemText:this.selectAllItemText)}dispose(){super.dispose(),this.dropdownListModelValue&&(this.dropdownListModelValue.dispose(),this.dropdownListModelValue=void 0)}clearValue(e){var t;super.clearValue(e),null===(t=this.dropdownListModelValue)||void 0===t||t.clear()}get showClearButton(){return this.allowClear&&!this.isEmpty()}get isNewA11yStructure(){return!1}}ft([pe()],Zr.prototype,"searchMode",void 0),ft([pe()],Zr.prototype,"allowClear",void 0),ft([pe({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setSearchEnabled(e)}})],Zr.prototype,"searchEnabled",void 0),ft([pe({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setHideSelectedItems(e)}})],Zr.prototype,"hideSelectedItems",void 0),ft([pe({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setChoicesLazyLoadEnabled(e)}})],Zr.prototype,"choicesLazyLoadEnabled",void 0),ft([pe()],Zr.prototype,"choicesLazyLoadPageSize",void 0),ft([pe({getDefaultValue:()=>Ps.tagboxCloseOnSelect})],Zr.prototype,"closeOnSelect",void 0),ft([pe()],Zr.prototype,"textWrapEnabled",void 0),Ie.addClass("tagbox",[{name:"placeholder",serializationProperty:"locPlaceholder"},{name:"allowClear:boolean",default:!0},{name:"searchEnabled:boolean",default:!0},{name:"textWrapEnabled:boolean",default:!0},{name:"choicesLazyLoadEnabled:boolean",default:!1,visible:!1},{name:"choicesLazyLoadPageSize:number",default:25,visible:!1},{name:"hideSelectedItems:boolean",default:!1},{name:"closeOnSelect:boolean"},{name:"itemComponent",visible:!1,default:""},{name:"searchMode",default:"contains",choices:["contains","startsWith"]}],(function(){return new Zr("")}),"checkbox"),wi.Instance.registerQuestion("tagbox",(e=>{const t=new Zr(e);return t.choices=wi.DefaultChoices,t}));class Jr extends Bi{constructor(){super(...arguments),this.doDragOver=()=>{if("imagepicker"===this.parentElement.getType())return;this.domAdapter.draggedElementShortcut.querySelector(".svc-item-value-controls__button").style.cursor="grabbing"},this.doBanDropHere=()=>{if("imagepicker"===this.parentElement.getType())return;this.domAdapter.draggedElementShortcut.querySelector(".svc-item-value-controls__button").style.cursor="not-allowed"}}get draggedElementType(){return"item-value"}createDraggedElementShortcut(e,t,s){if("imagepicker"===this.parentElement.getType())return this.createImagePickerShortcut(this.draggedElement,e,t,s);const i=oe.createElement("div");if(!i)return;i.className="sv-drag-drop-choices-shortcut";const r=t.closest("[data-sv-drop-target-item-value]").cloneNode(!0);r.classList.add("sv-drag-drop-choices-shortcut__content");r.querySelector(".svc-item-value-controls__drag-icon").style.visibility="visible";r.querySelector(".svc-item-value-controls__remove").style.backgroundColor="transparent",r.classList.remove("svc-item-value--moveup"),r.classList.remove("svc-item-value--movedown"),this.draggedElement.isDragDropMoveDown=!1,this.draggedElement.isDragDropMoveUp=!1,i.appendChild(r);const n=t.getBoundingClientRect();return i.shortcutXOffset=s.clientX-n.x,i.shortcutYOffset=s.clientY-n.y,this.isBottom=null,"function"==typeof this.onShortcutCreated&&this.onShortcutCreated(i),i}createImagePickerShortcut(e,t,s,i){const r=oe.createElement("div");if(!r)return;r.classList.add("sv-drag-drop-image-picker-shortcut");const n=s.closest("[data-sv-drop-target-item-value]");this.imagepickerControlsNode=n.querySelector(".svc-image-item-value-controls");const a=n.querySelector(".sd-imagepicker__image-container");let o=n.querySelector(e.imageLink?"img":".sd-imagepicker__no-image").cloneNode(!0);return this.imagepickerControlsNode&&(this.imagepickerControlsNode.style.display="none"),a.style.width=o.width+"px",a.style.height=o.height+"px",o.style.objectFit="cover",o.style.borderRadius="4px",r.appendChild(o),r}getDropTargetByDataAttributeValue(e){let t;return t=this.parentElement.choices.filter((t=>""+t.value==e))[0],t}getChoices(){const e=this.parentElement;return"ranking"===e.getType()?e.selectToRankEnabled?e.unRankingChoices:e.rankingChoices:e.visibleChoices}isDropTargetValid(e,t){const s=this.getChoices();if("imagepicker"!==this.parentElement.getType()){const e=s.indexOf(this.dropTarget),t=s.indexOf(this.draggedElement);if(t>e&&this.dropTarget.isDragDropMoveUp)return this.dropTarget.isDragDropMoveUp=!1,!1;if(t=s.y+s.height/2}afterDragOver(e){const t=this.getChoices(),s=t.indexOf(this.dropTarget),i=t.indexOf(this.draggedElement);if(is&&!1===this.isBottom))return;t.splice(s,1),t.splice(i,0,this.dropTarget)}"imagepicker"!==this.parentElement.getType()&&(i!==s&&(e.classList.remove("svc-item-value--moveup"),e.classList.remove("svc-item-value--movedown"),this.dropTarget.isDragDropMoveDown=!1,this.dropTarget.isDragDropMoveUp=!1),i>s&&(this.dropTarget.isDragDropMoveDown=!0),i-1!==e.indexOf(t))),s=e.indexOf(this.draggedElement);let i=t.indexOf(this.draggedElement);return e.splice(s,1),e.splice(i,0,this.draggedElement),this.parentElement}clear(){this.parentElement&&this.updateVisibleChoices(this.parentElement),this.imagepickerControlsNode&&(this.imagepickerControlsNode.style.display="flex",this.imagepickerControlsNode=null),super.clear()}updateVisibleChoices(e){"ranking"===e.getType()?e.updateRankingChoices():e.updateVisibleChoices()}}class Kr extends Jr{constructor(){super(...arguments),this.isDragOverRootNode=!1,this.doDragOver=()=>{this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item").style.cursor="grabbing"},this.reorderRankedItem=(e,t,s)=>{if(t==s)return;const i=e.rankingChoices,r=i[t];e.isValueSetByUser=!0,i.splice(t,1),i.splice(s,0,r),this.updateDraggedElementShortcut(s+1)},this.doBanDropHere=()=>{if(this.isDragOverRootNode)return void(this.allowDropHere=!0);this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item").style.cursor="not-allowed",Dt&&this.parentElement.updateRankingChoices(!0)}}get draggedElementType(){return"ranking-item"}createDraggedElementShortcut(e,t,s){const i=oe.createElement("div");if(!i)return;i.className=this.shortcutClass+" sv-ranking-shortcut";const r=t.cloneNode(!0);i.appendChild(r);const n=t.getBoundingClientRect();i.style.left=n.x,i.style.top=n.y,this.domAdapter.rootElement.append(i);const a=i.offsetHeight;let o=s.clientY;return o>n.y+a&&(o=n.y+a-10),i.shortcutXOffset=s.clientX-n.x,i.shortcutYOffset=o-n.y,this.parentElement&&this.parentElement.useFullItemSizeForShortcut&&(i.style.width=t.offsetWidth+"px",i.style.height=t.offsetHeight+"px"),i}get shortcutClass(){return(new Ct).append(this.parentElement.cssClasses.root).append(this.parentElement.cssClasses.rootMobileMod,Tt).toString()}getDropTargetByDataAttributeValue(e){return this.parentElement.rankingChoices[e]}findDropTargetNodeByDragOverNode(e){return this.isDragOverRootNode=this.getIsDragOverRootNode(e),super.findDropTargetNodeByDragOverNode(e)}getIsDragOverRootNode(e){return"string"==typeof e.className&&-1!==e.className.indexOf("sv-ranking")}isDropTargetValid(e,t){return-1!==this.parentElement.rankingChoices.indexOf(e)}calculateIsBottom(e,t){return this.dropTarget instanceof ii&&this.draggedElement!==this.dropTarget&&super.calculateIsBottom(e,t)}getIndices(e,t,s){let i=t.indexOf(this.draggedElement),r=s.indexOf(this.dropTarget);if(i<0&&this.draggedElement&&(this.draggedElement=ii.getItemByValue(t,this.draggedElement.value)||this.draggedElement,i=t.indexOf(this.draggedElement)),-1===r){r=e.value.length}else t==s?(!this.isBottom&&ir&&r++):t!=s&&this.isBottom&&r++;return{fromIndex:i,toIndex:r}}afterDragOver(e){const{fromIndex:t,toIndex:s}=this.getIndices(this.parentElement,this.parentElement.rankingChoices,this.parentElement.rankingChoices);this.reorderRankedItem(this.parentElement,t,s)}updateDraggedElementShortcut(e){var t;if(null===(t=this.domAdapter)||void 0===t?void 0:t.draggedElementShortcut){const t=null!==e?e+"":"";this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item__index").innerText=t}}ghostPositionChanged(){this.parentElement.currentDropTarget=this.draggedElement,super.ghostPositionChanged()}doDrop(){return this.parentElement.setValue(),this.parentElement}clear(){this.parentElement&&(this.parentElement.dropTargetNodeMove=null,this.parentElement.updateRankingChoices(!0)),super.clear()}}class Xr extends Kr{constructor(){super(...arguments),this.selectToRank=(e,t,s)=>{const i=[].concat(e.rankingChoices),r=e.unRankingChoices[t];i.splice(s,0,r),this.updateChoices(e,i)},this.unselectFromRank=(e,t,s)=>{const i=[].concat(e.rankingChoices);i.splice(t,1),this.updateChoices(e,i)}}findDropTargetNodeByDragOverNode(e){if("from-container"===e.dataset.ranking||"to-container"===e.dataset.ranking)return e;let t=e.closest("[data-ranking='to-container']"),s=e.closest("[data-ranking='from-container']");return 0===this.parentElement.unRankingChoices.length&&s?s:0===this.parentElement.rankingChoices.length&&t?t:super.findDropTargetNodeByDragOverNode(e)}getDropTargetByDataAttributeValue(e){return this.parentElement.rankingChoices[e]||this.parentElement.unRankingChoices[e]}getDropTargetByNode(e,t){return"to-container"===e.dataset.ranking?"to-container":"from-container"===e.dataset.ranking||e.closest("[data-ranking='from-container']")?"from-container":super.getDropTargetByNode(e,t)}isDropTargetValid(e,t){return"to-container"===e||"from-container"===e||super.isDropTargetValid(e,t)}afterDragOver(e){const t=this.parentElement,s=t.rankingChoices,i=t.unRankingChoices;this.isDraggedElementUnranked&&this.isDropTargetRanked?this.doRankBetween(e,i,s,this.selectToRank):this.isDraggedElementRanked&&this.isDropTargetRanked?this.doRankBetween(e,s,s,this.reorderRankedItem):!this.isDraggedElementRanked||this.isDropTargetRanked||this.doRankBetween(e,s,i,this.unselectFromRank)}doRankBetween(e,t,s,i){const r=this.parentElement;let{fromIndex:n,toIndex:a}=this.getIndices(r,t,s);i(r,n,a,e)}get isDraggedElementRanked(){return-1!==this.parentElement.rankingChoices.indexOf(this.draggedElement)}get isDropTargetRanked(){return"to-container"===this.dropTarget||-1!==this.parentElement.rankingChoices.indexOf(this.dropTarget)}get isDraggedElementUnranked(){return!this.isDraggedElementRanked}updateChoices(e,t){e.isValueSetByUser=!0,e.rankingChoices=t,e.updateUnRankingChoices(t)}}class Yr extends Wr{constructor(e){super(e),this.domNode=null,this.onVisibleChoicesChanged=()=>{if(super.onVisibleChoicesChanged(),!this.carryForwardStartUnranked||this.isValueSetByUser||this.selectToRankEnabled||this.defaultValue||(this.value=[]),1===this.visibleChoices.length&&!this.selectToRankEnabled)return this.value=[],this.value.push(this.visibleChoices[0].value),void this.updateRankingChoices();this.isEmpty()||this.selectToRankEnabled||(this.visibleChoices.length>this.value.length&&this.addToValueByVisibleChoices(),this.visibleChoices.length{super.localeChanged(),this.updateRankingChoicesSync()},this._rankingChoicesAnimation=new Ut(this.getChoicesAnimationOptions(!0),(e=>{this._renderedRankingChoices=e}),(()=>this.renderedRankingChoices)),this._unRankingChoicesAnimation=new Ut(this.getChoicesAnimationOptions(!1),(e=>{this._renderedUnRankingChoices=e}),(()=>this.renderedUnRankingChoices)),this.rankingChoices=[],this.unRankingChoices=[],this._renderedRankingChoices=[],this._renderedUnRankingChoices=[],this.handlePointerDown=(e,t,s)=>{const i=e.target;this.isDragStartNodeValid(i)&&this.isAllowStartDrag(i,t)&&(this.draggedChoiceValue=t.value,this.draggedTargetNode=s,this.dragOrClickHelper.onPointerDown(e))},this.startDrag=e=>{const t=ii.getItemByValue(this.visibleChoices,this.draggedChoiceValue);this.dragDropRankingChoices.startDrag(e,t,this,this.draggedTargetNode)},this.handlePointerUp=(e,t,s)=>{if(!this.selectToRankEnabled)return;const i=e.target;this.isAllowStartDrag(i,t)&&this.handleKeydownSelectToRank(e,t," ",!1)},this.handleKeydown=(e,t)=>{if(!this.isReadOnlyAttr&&!this.isDesignMode){const s=e.key,i=this.rankingChoices.indexOf(t);if(this.selectToRankEnabled)return void this.handleKeydownSelectToRank(e,t);if("ArrowUp"===s&&i||"ArrowDown"===s&&i!==this.rankingChoices.length-1){const t="ArrowUp"==s?i-1:i+1;this.dragDropRankingChoices.reorderRankedItem(this,i,t),this.setValueAfterKeydown(t,"",!0,e)}}},this.focusItem=(e,t)=>{if(this.domNode)if(this.selectToRankEnabled&&t){const s="[data-ranking='"+t+"']";this.domNode.querySelectorAll(s+" ."+this.cssClasses.item)[e].focus()}else{this.domNode.querySelectorAll("."+this.cssClasses.item)[e].focus()}},this.isValueSetByUser=!1,this.setValue=()=>{const e=[];this.rankingChoices.forEach((t=>{e.push(t.value)})),this.value=e,this.isValueSetByUser=!0},this.registerFunctionOnPropertyValueChanged("selectToRankEnabled",(()=>{this.clearValue(!0),this.setDragDropRankingChoices(),this.updateRankingChoicesSync()})),this.dragOrClickHelper=new Hi(this.startDrag)}getType(){return"ranking"}getItemTabIndex(e){if(!this.isDesignMode&&!e.disabled)return 0}supportContainerQueries(){return this.selectToRankEnabled}get rootClass(){return(new Ct).append(this.cssClasses.root).append(this.cssClasses.rootMobileMod,this.isMobileMode()).append(this.cssClasses.rootDisabled,this.isDisabledStyle).append(this.cssClasses.rootReadOnly,this.isReadOnlyStyle).append(this.cssClasses.rootPreview,this.isPreviewStyle).append(this.cssClasses.rootDesignMode,!!this.isDesignMode).append(this.cssClasses.itemOnError,this.hasCssError()).append(this.cssClasses.rootDragHandleAreaIcon,"icon"===Ps.rankingDragHandleArea).append(this.cssClasses.rootSelectToRankMod,this.selectToRankEnabled).append(this.cssClasses.rootSelectToRankEmptyValueMod,this.isEmpty()).append(this.cssClasses.rootSelectToRankAlignHorizontal,this.selectToRankEnabled&&"horizontal"===this.renderedSelectToRankAreasLayout).append(this.cssClasses.rootSelectToRankAlignVertical,this.selectToRankEnabled&&"vertical"===this.renderedSelectToRankAreasLayout).append(this.cssClasses.rootSelectToRankSwapAreas,this.selectToRankEnabled&&"horizontal"===this.renderedSelectToRankAreasLayout&&this.selectToRankSwapAreas).toString()}isItemSelectedCore(e){return!this.selectToRankEnabled||super.isItemSelectedCore(e)}getItemClassCore(e,t){return(new Ct).append(super.getItemClassCore(e,t)).append(this.cssClasses.itemGhostMod,this.currentDropTarget===e).toString()}getContainerClasses(e){let t=!1;const s="to"===e,i="from"===e;return s?t=0===this.renderedRankingChoices.length:i&&(t=0===this.renderedUnRankingChoices.length),(new Ct).append(this.cssClasses.container).append(this.cssClasses.containerToMode,s).append(this.cssClasses.containerFromMode,i).append(this.cssClasses.containerEmptyMode,t).toString()}isItemCurrentDropTarget(e){return this.dragDropRankingChoices.dropTarget===e}get ghostPositionCssClass(){return"top"===this.ghostPosition?this.cssClasses.dragDropGhostPositionTop:"bottom"===this.ghostPosition?this.cssClasses.dragDropGhostPositionBottom:""}getItemIndexClasses(e){let t;return t=this.selectToRankEnabled?-1!==this.unRankingChoices.indexOf(e):this.isEmpty(),(new Ct).append(this.cssClasses.itemIndex).append(this.cssClasses.itemIndexEmptyMode,t).toString()}getNumberByIndex(e){return this.isEmpty()?"":e+1+""}updateRankingChoicesSync(){this.blockAnimations(),this.updateRankingChoices(),this.releaseAnimations()}setSurveyImpl(e,t){super.setSurveyImpl(e,t),this.setDragDropRankingChoices(),this.updateRankingChoicesSync()}isAnswerCorrect(){return ue.isArraysEqual(this.value,this.correctAnswer,!1)}get requireStrictCompare(){return!0}onSurveyValueChanged(e){super.onSurveyValueChanged(e),this.isLoadingFromJson||this.updateRankingChoices()}onSurveyLoad(){this.blockAnimations(),super.onSurveyLoad(),this.updateRankingChoices(),this.releaseAnimations()}updateValueFromSurvey(e,t){super.updateValueFromSurvey(e,t),e&&(this.isValueSetByUser=!0)}addToValueByVisibleChoices(){const e=this.value.slice();this.visibleChoices.forEach((t=>{-1===e.indexOf(t.value)&&e.push(t.value)})),this.value=e}removeFromValueByVisibleChoices(){const e=this.value.slice(),t=this.visibleChoices;for(let s=this.value.length-1;s>=0;s--)ii.getItemByValue(t,this.value[s])||e.splice(s,1);this.value=e}getChoicesAnimationOptions(e){return{getKey:e=>e.value,getRerenderEvent:()=>this.onElementRerendered,isAnimationEnabled:()=>this.animationAllowed&&!this.isDesignMode&&this.isVisible&&!!this.domNode,getReorderOptions:(e,t)=>{let s="";return e!==this.currentDropTarget&&(s=t?"sv-dragdrop-movedown":"sv-dragdrop-moveup"),{cssClass:s}},getLeaveOptions:t=>{const s=e?this.renderedRankingChoices:this.renderedUnRankingChoices;return"vertical"==this.renderedSelectToRankAreasLayout&&1==s.length&&s.indexOf(t)>=0?{cssClass:"sv-ranking-item--animate-item-removing-empty"}:{cssClass:"sv-ranking-item--animate-item-removing",onBeforeRunAnimation:e=>{e.style.setProperty("--animation-height",e.offsetHeight+"px")}}},getEnterOptions:t=>{const s=e?this.renderedRankingChoices:this.renderedUnRankingChoices;return"vertical"==this.renderedSelectToRankAreasLayout&&1==s.length&&s.indexOf(t)>=0?{cssClass:"sv-ranking-item--animate-item-adding-empty"}:{cssClass:"sv-ranking-item--animate-item-adding",onBeforeRunAnimation:e=>{e.style.setProperty("--animation-height",e.offsetHeight+"px")}}},getAnimatedElement:t=>{var s;const i=this.cssClasses;let r="";this.selectToRankEnabled&&(!e&&i.containerFromMode?r=vs(i.containerFromMode):e&&i.containerToMode&&(r=vs(i.containerToMode)));const n=e?this.renderedRankingChoices.indexOf(t):this.renderedUnRankingChoices.indexOf(t);return null===(s=this.domNode)||void 0===s?void 0:s.querySelector(`${r} [data-sv-drop-target-ranking-item='${n}']`)},allowSyncRemovalAddition:!0}}get rankingChoicesAnimation(){return this._rankingChoicesAnimation}get unRankingChoicesAnimation(){return this._unRankingChoicesAnimation}get renderedRankingChoices(){return this._renderedRankingChoices}set renderedRankingChoices(e){this.rankingChoicesAnimation.sync(e)}get renderedUnRankingChoices(){return this._renderedUnRankingChoices}set renderedUnRankingChoices(e){this.unRankingChoicesAnimation.sync(e)}updateRenderedRankingChoices(){this.renderedRankingChoices=this.rankingChoices}updateRenderedUnRankingChoices(){this.renderedUnRankingChoices=this.unRankingChoices}updateRankingChoices(e=!1){if(this.selectToRankEnabled)return void this.updateRankingChoicesSelectToRankMode(e);const t=[];e&&(this.rankingChoices=[]),this.isEmpty()?this.rankingChoices=this.visibleChoices:(this.value.forEach((e=>{this.visibleChoices.forEach((s=>{s.value===e&&t.push(s)}))})),this.rankingChoices=t)}updateUnRankingChoices(e){const t=[];this.visibleChoices.forEach((e=>{t.push(e)})),e.forEach((e=>{t.forEach(((s,i)=>{s.value===e.value&&t.splice(i,1)}))})),this.unRankingChoices=t}updateRankingChoicesSelectToRankMode(e){const t=[];this.isEmpty()||this.value.forEach((e=>{this.visibleChoices.forEach((s=>{s.value===e&&t.push(s)}))})),this.updateUnRankingChoices(t),this.rankingChoices=t}endLoadingFromJson(){super.endLoadingFromJson(),this.setDragDropRankingChoices()}setDragDropRankingChoices(){this.dragDropRankingChoices=this.createDragDropRankingChoices()}createDragDropRankingChoices(){return this.selectToRankEnabled?new Xr(this.survey,null,this.longTap):new Kr(this.survey,null,this.longTap)}isDragStartNodeValid(e){return"icon"!==Ps.rankingDragHandleArea||e.classList.contains(this.cssClasses.itemIconHoverMod)}isAllowStartDrag(e,t){return!this.isReadOnly&&!this.isDesignMode&&this.canStartDragDueMaxSelectedChoices(e)&&this.canStartDragDueItemEnabled(t)}canStartDragDueMaxSelectedChoices(e){if(!this.selectToRankEnabled)return!0;return!e.closest("[data-ranking='from-container']")||this.checkMaxSelectedChoicesUnreached()}canStartDragDueItemEnabled(e){return e.enabled}checkMaxSelectedChoicesUnreached(){if(this.maxSelectedChoices<1)return!0;var e=this.value;return(Array.isArray(e)?e.length:0)=a.length||(n.reorderRankedItem(this,l,u),this.setValueAfterKeydown(u,"to-container",i,e)))}setValueAfterKeydown(e,t,s=!0,i){this.setValue(),s&&setTimeout((()=>{this.focusItem(e,t)}),1),i&&i.preventDefault()}getIconHoverCss(){return(new Ct).append(this.cssClasses.itemIcon).append(this.cssClasses.itemIconHoverMod).toString()}getIconFocusCss(){return(new Ct).append(this.cssClasses.itemIcon).append(this.cssClasses.itemIconFocusMod).toString()}get longTap(){return this.getPropertyValue("longTap")}set longTap(e){this.setPropertyValue("longTap",e)}getDefaultItemComponent(){return"sv-ranking-item"}get selectToRankEnabled(){return this.getPropertyValue("selectToRankEnabled",!1)}set selectToRankEnabled(e){this.setPropertyValue("selectToRankEnabled",e)}get selectToRankSwapAreas(){return this.getPropertyValue("selectToRankSwapAreas",!1)}set selectToRankSwapAreas(e){this.setPropertyValue("selectToRankSwapAreas",e)}get selectToRankAreasLayout(){return this.getPropertyValue("selectToRankAreasLayout")}set selectToRankAreasLayout(e){this.setPropertyValue("selectToRankAreasLayout",e)}get renderedSelectToRankAreasLayout(){return this.isMobileMode()?"vertical":this.selectToRankAreasLayout}isMobileMode(){return Tt}get useFullItemSizeForShortcut(){return this.getPropertyValue("useFullItemSizeForShortcut")}set useFullItemSizeForShortcut(e){this.setPropertyValue("useFullItemSizeForShortcut",e)}get dragDropSvgIcon(){return this.cssClasses.dragDropSvgIconId||"#icon-drag-24x24"}get arrowsSvgIcon(){return this.cssClasses.arrowsSvgIconId||"#icon-reorder-24x24"}get dashSvgIcon(){return this.cssClasses.dashSvgIconId||"#icon-rankingundefined-16x16"}get isNewA11yStructure(){return!1}}ft([ge({onSet:(e,t)=>t.updateRenderedRankingChoices(),onRemove:(e,t,s)=>s.updateRenderedRankingChoices(),onPush:(e,t,s)=>s.updateRenderedRankingChoices()})],Yr.prototype,"rankingChoices",void 0),ft([ge({onSet:(e,t)=>t.updateRenderedUnRankingChoices(),onRemove:(e,t,s)=>s.updateRenderedUnRankingChoices(),onPush:(e,t,s)=>s.updateRenderedUnRankingChoices()})],Yr.prototype,"unRankingChoices",void 0),ft([ge()],Yr.prototype,"_renderedRankingChoices",void 0),ft([ge()],Yr.prototype,"_renderedUnRankingChoices",void 0),ft([pe({defaultValue:null})],Yr.prototype,"currentDropTarget",void 0),ft([pe({defaultValue:!0})],Yr.prototype,"carryForwardStartUnranked",void 0),ft([pe({localizable:{defaultStr:"selectToRankEmptyRankedAreaText"}})],Yr.prototype,"selectToRankEmptyRankedAreaText",void 0),ft([pe({localizable:{defaultStr:"selectToRankEmptyUnrankedAreaText"}})],Yr.prototype,"selectToRankEmptyUnrankedAreaText",void 0),Ie.addClass("ranking",[{name:"showOtherItem",visible:!1,isSerializable:!1},{name:"otherText",visible:!1,isSerializable:!1},{name:"otherErrorText",visible:!1,isSerializable:!1},{name:"storeOthersAsComment",visible:!1,isSerializable:!1},{name:"showNoneItem",visible:!1,isSerializable:!1},{name:"showRefuseItem",visible:!1,isSerializable:!1},{name:"showDontKnowItem",visible:!1,isSerializable:!1},{name:"noneText",visible:!1,isSerializable:!1},{name:"showSelectAllItem",visible:!1,isSerializable:!1},{name:"selectAllText",visible:!1,isSerializable:!1},{name:"colCount:number",visible:!1,isSerializable:!1},{name:"separateSpecialChoices",visible:!1,isSerializable:!1},{name:"longTap",default:!0,visible:!1,isSerializable:!1},{name:"selectToRankEnabled:switch",default:!1,visible:!0,isSerializable:!0},{name:"selectToRankSwapAreas:switch",default:!1,visible:!1,isSerializable:!0,dependsOn:"selectToRankEnabled"},{name:"selectToRankAreasLayout",default:"horizontal",choices:["horizontal","vertical"],dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled,visible:!0,isSerializable:!0},{name:"selectToRankEmptyRankedAreaText:text",serializationProperty:"locSelectToRankEmptyRankedAreaText",category:"general",dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled},{name:"selectToRankEmptyUnrankedAreaText:text",serializationProperty:"locSelectToRankEmptyUnrankedAreaText",category:"general",dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled},{name:"maxSelectedChoices:number",visible:!0,default:0,dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled,isSerializable:!0},{name:"minSelectedChoices:number",visible:!0,default:0,dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled,isSerializable:!0},{name:"itemComponent",visible:!1,default:"sv-ranking-item"}],(function(){return new Yr("")}),"checkbox"),wi.Instance.registerQuestion("ranking",(e=>{const t=new Yr(e);return t.choices=wi.DefaultChoices,t}));class $r extends Er{constructor(e){super(e)}get textAreaModel(){return this.textAreaModelValue||(this.textAreaModelValue=new $s(this.getTextAreaOptions())),this.textAreaModelValue}getTextAreaOptions(){const e=this;return{question:this,id:()=>this.inputId,propertyName:"value",className:()=>this.className,placeholder:()=>this.renderedPlaceholder,isDisabledAttr:()=>this.isDisabledAttr,isReadOnlyAttr:()=>this.isReadOnlyAttr,autoGrow:()=>this.renderedAutoGrow,maxLength:()=>this.getMaxLength(),rows:()=>this.rows,cols:()=>this.cols,ariaRequired:()=>this.a11y_input_ariaRequired,ariaLabel:()=>this.a11y_input_ariaLabel,ariaLabelledBy:()=>this.a11y_input_ariaLabelledBy,ariaDescribedBy:()=>this.a11y_input_ariaDescribedBy,ariaInvalid:()=>this.a11y_input_ariaInvalid,ariaErrormessage:()=>this.a11y_input_ariaErrormessage,getTextValue:()=>this.value,onTextAreaChange:t=>{var s;s=t.target.value,ue.isTwoValueEquals(e.value,s,!1,!0,!1)||(e.value=s)},onTextAreaInput:e=>{this.onInput(e)},onTextAreaKeyDown:e=>{this.onKeyDown(e)},onTextAreaFocus:e=>{this.onFocus(e)},onTextAreaBlur:e=>{this.onBlur(e)}}}get rows(){return this.getPropertyValue("rows")}set rows(e){this.setPropertyValue("rows",e)}get cols(){return this.getPropertyValue("cols")}set cols(e){this.setPropertyValue("cols",e)}get acceptCarriageReturn(){return this.getPropertyValue("acceptCarriageReturn")}set acceptCarriageReturn(e){this.setPropertyValue("acceptCarriageReturn",e)}get autoGrow(){return this.getPropertyValue("autoGrow")}set autoGrow(e){this.setPropertyValue("autoGrow",e)}get renderedAutoGrow(){const e=this.autoGrow;return void 0===e&&this.survey?this.survey.autoGrowComment:!!e}get allowResize(){return this.getPropertyValue("allowResize")}set allowResize(e){this.setPropertyValue("allowResize",e)}get renderedAllowResize(){const e=this.allowResize;return void 0===e&&this.survey?this.survey.allowResizeComment:!!e}get resizeStyle(){return this.renderedAllowResize?"both":"none"}getType(){return"comment"}afterRenderQuestionElement(e){const{root:t}=Ps.environment;this.element=t.getElementById(this.inputId)||e,super.afterRenderQuestionElement(e)}beforeDestroyQuestionElement(e){super.beforeDestroyQuestionElement(e),this.element=void 0}onInput(e){this.isInputTextUpdate&&(this.value=e.target.value),this.updateRemainingCharacterCounter(e.target.value)}onBlurCore(e){super.onBlurCore(e)}onKeyDown(e){this.onKeyDownPreprocess&&this.onKeyDownPreprocess(e),this.acceptCarriageReturn||"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),e.stopPropagation())}setNewValue(e){!this.acceptCarriageReturn&&e&&(e=e.replace(new RegExp("(\r\n|\n|\r)","gm"),"")),super.setNewValue(e)}getValueSeparator(){return"\n"}notifyStateChanged(e){super.notifyStateChanged(e),this.isCollapsed||this.textAreaModel.updateElement()}get className(){return(this.cssClasses?this.getControlClass():"panel-comment-root")||void 0}}Ie.addClass("comment",[{name:"maxLength:number",default:-1},{name:"cols:number",default:50,visible:!1,isSerializable:!1},{name:"rows:number",default:4},{name:"placeholder",alternativeName:"placeHolder",serializationProperty:"locPlaceholder"},{name:"textUpdateMode",default:"default",choices:["default","onBlur","onTyping"]},{name:"autoGrow:boolean",defaultFunc:()=>{}},{name:"allowResize:boolean",defaultFunc:()=>{}},{name:"acceptCarriageReturn:boolean",default:!0,visible:!1}],(function(){return new $r("")}),"textbase"),wi.Instance.registerQuestion("comment",(e=>new $r(e)));const en="environment",tn="user";class sn{constructor(){this.canFlipValue=void 0}static clear(){sn.cameraList=void 0,sn.cameraIndex=-1}static setCameraList(e){const t=function(e){const t=e.label.toLocaleLowerCase();return t.indexOf(tn)>-1?tn:t.indexOf(en)>-1?en:t.indexOf("front")>-1?tn:t.indexOf("back")>-1?en:""};sn.clear(),Array.isArray(e)&&e.length>0&&(sn.cameraIndex=-1,e.sort(((s,i)=>{if(s===i)return 0;if(s.label!==i.label){const e=t(s),r=t(i);if(e!==r){if(e===tn)return-1;if(r===tn)return 1;if(e===en)return-1;if(r===en)return 1}}return e.indexOf(s){this.setVideoInputs(t),this.hasCameraCallback(e)};sn.mediaDevicesCallback(t)}else"undefined"!=typeof navigator&&navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then((t=>{this.setVideoInputs(t),this.hasCameraCallback(e),this.updateCanFlipValue()})).catch((t=>{sn.cameraList=null,this.hasCameraCallback(e)})):(sn.cameraList=null,this.hasCameraCallback(e));else this.hasCameraCallback(e)}getMediaConstraints(e){const t=sn.cameraList;if(!Array.isArray(t)||t.length<1)return;sn.cameraIndex<0&&(sn.cameraIndex=0);const s=t[sn.cameraIndex],i={};return s&&s.deviceId?i.deviceId={exact:s.deviceId}:i.facingMode=sn.cameraFacingMode,e&&((null==e?void 0:e.height)&&(i.height={ideal:e.height}),(null==e?void 0:e.width)&&(i.width={ideal:e.width})),{video:i,audio:!1}}startVideo(e,t,s,i){if(!e)return void t(void 0);e.style.width="100%",e.style.height="auto",e.style.height="100%",e.style.objectFit="contain";const r=this.getMediaConstraints({width:s,height:i});navigator.mediaDevices.getUserMedia(r).then((s=>{var i;e.srcObject=s,!(null===(i=sn.cameraList[sn.cameraIndex])||void 0===i?void 0:i.deviceId)&&s.getTracks()[0].getCapabilities().facingMode&&(sn.canSwitchFacingMode=!0,this.updateCanFlipValue()),e.play(),t(s)})).catch((e=>{t(void 0)}))}getImageSize(e){return{width:e.videoWidth,height:e.videoHeight}}snap(e,t){if(!e)return!1;if(!oe.isAvailable())return!1;const s=oe.getDocument().createElement("canvas"),i=this.getImageSize(e);s.height=i.height,s.width=i.width;let r=s.getContext("2d");return r.clearRect(0,0,s.width,s.height),r.drawImage(e,0,0,s.width,s.height),s.toBlob(t,"image/png"),!0}updateCanFlipValue(){const e=sn.cameraList;this.canFlipValue=Array.isArray(e)&&e.length>1||sn.canSwitchFacingMode,this.onCanFlipChangedCallback&&this.onCanFlipChangedCallback(this.canFlipValue)}canFlip(e){return void 0===this.canFlipValue&&this.updateCanFlipValue(),e&&(this.onCanFlipChangedCallback=e),this.canFlipValue}flip(){this.canFlip()&&(sn.canSwitchFacingMode?sn.cameraFacingMode=sn.cameraFacingMode===tn?"environment":tn:sn.cameraIndex>=sn.cameraList.length-1?sn.cameraIndex=0:sn.cameraIndex++)}hasCameraCallback(e){e(Array.isArray(sn.cameraList))}setVideoInputs(e){const t=[];e.forEach((e=>{"videoinput"===e.kind&&t.push(e)})),sn.setCameraList(t.length>0?t:null)}}function rn(e,t,s){const i=atob(e.split(",")[1]),r=new Uint8Array(i.split("").map((e=>e.charCodeAt(0)))).buffer;return new File([r],t,{type:s})}sn.cameraIndex=-1,sn.cameraFacingMode=tn,sn.canSwitchFacingMode=!1;class nn extends ti{constructor(){super(...arguments),this.isUploading=!1,this.onUploadStateChanged=this.addEvent(),this.onStateChanged=this.addEvent()}stateChanged(e){this.currentState!=e&&("loading"===e&&(this.isUploading=!0),"loaded"===e&&(this.isUploading=!1),"error"===e&&(this.isUploading=!1),this.currentState=e,this.onStateChanged.fire(this,{state:e}),this.onUploadStateChanged.fire(this,{state:e}))}get showLoadingIndicator(){return this.isUploading&&this.isDefaultV2Theme}get storeDataAsText(){return this.getPropertyValue("storeDataAsText")}set storeDataAsText(e){this.setPropertyValue("storeDataAsText",e)}get waitForUpload(){return this.getPropertyValue("waitForUpload")}set waitForUpload(e){this.setPropertyValue("waitForUpload",e)}clearValue(e){this.clearOnDeletingContainer(),super.clearValue(e)}clearOnDeletingContainer(){this.survey&&this.survey.clearFiles(this,this.name,this.value,null,(()=>{}))}onCheckForErrors(e,t,s){super.onCheckForErrors(e,t,s),this.isUploading&&this.waitForUpload&&e.push(new js(this.getLocalizationString("uploadingFile"),this))}uploadFiles(e){this.survey&&(this.stateChanged("loading"),this.survey.uploadFiles(this,this.name,e,((e,t)=>{Array.isArray(e)&&(this.setValueFromResult(e),Array.isArray(t)&&(t.forEach((e=>this.errors.push(new js(e,this)))),this.stateChanged("error"))),"success"===e&&Array.isArray(t)&&this.setValueFromResult(t),"error"===e&&("string"==typeof t&&this.errors.push(new js(t,this)),Array.isArray(t)&&t.length>0&&t.forEach((e=>this.errors.push(new js(e,this)))),this.stateChanged("error")),this.stateChanged("loaded")})))}loadPreview(e){}onChangeQuestionValue(e){super.onChangeQuestionValue(e),this.stateChanged(this.isEmpty()?"empty":"loaded")}getIsQuestionReady(){return super.getIsQuestionReady()&&!this.isFileLoading}get isFileLoading(){return this.isFileLoadingValue}set isFileLoading(e){this.isFileLoadingValue=e,this.updateIsReady()}}ft([pe()],nn.prototype,"isUploading",void 0),ft([pe({defaultValue:"empty"})],nn.prototype,"currentState",void 0);class an extends pt{static getId(){return"sv_sfp_"+an.pageCounter++}constructor(e,t){super(),this.question=e,this.index=t,this.id=an.getId()}get css(){return this.question.cssClasses.page}}an.pageCounter=0,ft([ge({})],an.prototype,"items",void 0);class on extends nn{get supportFileNavigator(){return this.isDefaultV2Theme}get fileNavigatorVisible(){const e=this.isUploading,t=this.isPlayingVideo,s=this.containsMultiplyFiles,i=this.pageSize{this._renderedPages=e}),(()=>this.renderedPages)),this.calcAvailableItemsCount=(e,t,s)=>{let i=Math.floor(e/(t+s));return(i+1)*(t+s)-s<=e&&i++,i},this.dragCounter=0,this.onDragEnter=e=>{this.canDragDrop()&&(e.preventDefault(),this.isDragging=!0,this.dragCounter++)},this.onDragOver=e=>{if(!this.canDragDrop())return e.returnValue=!1,!1;e.dataTransfer.dropEffect="copy",e.preventDefault()},this.onDrop=e=>{if(this.canDragDrop()){this.isDragging=!1,this.dragCounter=0,e.preventDefault();let t=e.dataTransfer;this.onChange(t)}},this.onDragLeave=e=>{this.canDragDrop()&&(this.dragCounter--,0===this.dragCounter&&(this.isDragging=!1))},this.doChange=e=>{var t=e.target||e.srcElement;this.onChange(t)},this.doClean=()=>{this.needConfirmRemoveFile?$t({message:this.confirmRemoveAllMessage,funcOnYes:()=>{this.clearFilesCore()},locale:this.getLocale(),rootElement:this.survey.rootElement,cssClass:this.cssClasses.confirmDialog}):this.clearFilesCore()},this.doDownloadFileFromContainer=e=>{e.stopPropagation();const t=e.currentTarget;if(t&&t.getElementsByTagName){const e=t.getElementsByTagName("a")[0];null==e||e.click()}},this.doDownloadFile=(e,t)=>{e.stopPropagation(),es()&&(e.preventDefault(),function(e,t){try{const s=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(s.length),n=new Uint8Array(r);for(let e=0;e{this.navigationDirection="left",this.indexToShow=this.previewValue.length&&(this.indexToShow-1+this.pagesCount)%this.pagesCount||0,this.fileIndexAction.title=this.getFileIndexCaption()}}),this.nextFileAction=new Nt({id:"nextPage",iconSize:16,action:()=>{this.navigationDirection="right",this.indexToShow=this.previewValue.length&&(this.indexToShow+1)%this.pagesCount||0,this.fileIndexAction.title=this.getFileIndexCaption()}}),this.takePictureAction=new Nt({iconName:"icon-takepicture",id:"sv-file-take-picture",iconSize:"auto",innerCss:new ct((()=>(new Ct).append(this.cssClasses.contextButton).append(this.cssClasses.takePictureButton).toString())),locTitle:this.locTakePhotoCaption,showTitle:!1,action:()=>{this.snapPicture()}}),this.closeCameraAction=new Nt({iconName:"icon-closecamera",id:"sv-file-close-camera",iconSize:"auto",innerCss:new ct((()=>(new Ct).append(this.cssClasses.contextButton).append(this.cssClasses.closeCameraButton).toString())),action:()=>{this.stopVideo()}}),this.changeCameraAction=new Nt({iconName:"icon-changecamera",id:"sv-file-change-camera",iconSize:"auto",innerCss:new ct((()=>(new Ct).append(this.cssClasses.contextButton).append(this.cssClasses.changeCameraButton).toString())),visible:new ct((()=>this.canFlipCamera())),action:()=>{this.flipCamera()}}),this.chooseFileAction=new Nt({iconName:"icon-choosefile",id:"sv-file-choose-file",iconSize:"auto",data:{question:this},enabledIf:()=>!this.isInputReadOnly,component:"sv-file-choose-btn"}),this.startCameraAction=new Nt({iconName:"icon-takepicture_24x24",id:"sv-file-start-camera",iconSize:"auto",locTitle:this.locTakePhotoCaption,showTitle:new ct((()=>!this.isAnswered)),enabledIf:()=>!this.isInputReadOnly,action:()=>{this.startVideo()}}),this.cleanAction=new Nt({iconName:"icon-clear",id:"sv-file-clean",iconSize:"auto",locTitle:this.locClearButtonCaption,showTitle:!1,enabledIf:()=>!this.isInputReadOnly,innerCss:new ct((()=>this.cssClasses.removeButton)),action:()=>{this.doClean()}}),[this.closeCameraAction,this.changeCameraAction,this.takePictureAction].forEach((e=>{e.cssClasses={}})),this.registerFunctionOnPropertiesValueChanged(["sourceType","currentMode","isAnswered"],(()=>{this.updateActionsVisibility()})),this.actionsContainer.actions=[this.chooseFileAction,this.startCameraAction,this.cleanAction],this.fileNavigator.actions=[this.prevFileAction,this.fileIndexAction,this.nextFileAction]}get videoId(){return this.id+"_video"}get hasVideoUI(){return"file"!==this.currentMode}get hasFileUI(){return"camera"!==this.currentMode}startVideo(){"file"===this.currentMode||this.isDesignMode||this.isPlayingVideo||(this.setIsPlayingVideo(!0),setTimeout((()=>{this.startVideoInCamera()}),0))}get videoHtmlElement(){var e;return null===(e=this.rootElement)||void 0===e?void 0:e.querySelector(`#${this.videoId}`)}startVideoInCamera(){this.camera.startVideo(this.videoHtmlElement,(e=>{this.videoStream=e,e||this.stopVideo()}),us(this.imageWidth),us(this.imageHeight))}stopVideo(){this.setIsPlayingVideo(!1),this.closeVideoStream()}snapPicture(){if(!this.isPlayingVideo)return;this.camera.snap(this.videoHtmlElement,(e=>{if(e){const t=new File([e],"snap_picture.png",{type:"image/png"});this.loadFiles([t])}})),this.stopVideo()}canFlipCamera(){return void 0===this.canFlipCameraValue&&(this.canFlipCameraValue=this.camera.canFlip((e=>{this.canFlipCameraValue=e}))),this.canFlipCameraValue}flipCamera(){this.canFlipCamera()&&(this.closeVideoStream(),this.camera.flip(),this.startVideoInCamera())}closeVideoStream(){this.videoStream&&(this.videoStream.getTracks().forEach((e=>{e.stop()})),this.videoStream=void 0)}onHidingContent(){super.onHidingContent(),this.stopVideo()}updateElementCssCore(e){super.updateElementCssCore(e),this.prevFileAction.iconName=this.cssClasses.leftIconId,this.nextFileAction.iconName=this.cssClasses.rightIconId,this.updateCurrentMode()}getFileIndexCaption(){return this.getLocalizationFormatString("indexText",this.indexToShow+1,this.pagesCount)}updateFileNavigator(){this.updatePages(),this.navigationDirection=void 0,this.indexToShow=this.previewValue.length&&(this.indexToShow+this.pagesCount)%this.pagesCount||0,this.fileIndexAction.title=this.getFileIndexCaption()}updateRenderedPages(){this.pages&&this.pages[this.indexToShow]&&(this.renderedPages=[this.pages[this.indexToShow]])}updatePages(){let e;this.blockAnimations(),this.pages=[],this.renderedPages=[],this.previewValue.forEach(((t,s)=>{s%this.pageSize==0&&(e=new an(this,this.pages.length),this.pages.push(e)),e.items.push(t)})),this.releaseAnimations(),this.updateRenderedPages()}previewValueChanged(){this.navigationDirection=void 0,this.previewValue.length!==this.prevPreviewLength&&(this.previewValue.length>0?this.prevPreviewLength>this.previewValue.length?this.indexToShow>=this.pagesCount&&this.indexToShow>0&&(this.indexToShow=this.pagesCount-1,this.navigationDirection="left-delete"):this.indexToShow=Math.floor(this.prevPreviewLength/this.pageSize):this.indexToShow=0),this.updatePages(),this.fileIndexAction.title=this.getFileIndexCaption(),this.containsMultiplyFiles=this.previewValue.length>1,this.previewValue.length>0&&!this.calculatedGapBetweenItems&&!this.calculatedItemWidth&&setTimeout((()=>{this.processResponsiveness(0,this._width)}),1),this.prevPreviewLength=this.previewValue.length}getType(){return"file"}onChangeQuestionValue(e){super.onChangeQuestionValue(e),this.isLoadingFromJson||this.loadPreview(e)}get showPreview(){return this.getPropertyValue("showPreview")}set showPreview(e){this.setPropertyValue("showPreview",e)}get allowMultiple(){return this.getPropertyValue("allowMultiple")}set allowMultiple(e){this.setPropertyValue("allowMultiple",e)}get imageHeight(){return this.getPropertyValue("imageHeight")}set imageHeight(e){this.setPropertyValue("imageHeight",e)}get imageWidth(){return this.getPropertyValue("imageWidth")}set imageWidth(e){this.setPropertyValue("imageWidth",e)}get acceptedTypes(){return this.getPropertyValue("acceptedTypes")}set acceptedTypes(e){this.setPropertyValue("acceptedTypes",e)}get allowImagesPreview(){return this.getPropertyValue("allowImagesPreview")}set allowImagesPreview(e){this.setPropertyValue("allowImagesPreview",e)}get maxSize(){return this.getPropertyValue("maxSize")}set maxSize(e){this.setPropertyValue("maxSize",e)}chooseFile(e){if(!this.rootElement)return;const t=this.rootElement.querySelector(`#${this.inputId}`);t&&(e.preventDefault(),e.stopImmediatePropagation(),t&&(this.survey?this.survey.chooseFiles(t,(e=>this.loadFiles(e)),{element:this,elementType:this.getType(),propertyName:this.name}):t.click()))}get needConfirmRemoveFile(){return this.getPropertyValue("needConfirmRemoveFile")}set needConfirmRemoveFile(e){this.setPropertyValue("needConfirmRemoveFile",e)}getConfirmRemoveMessage(e){return this.confirmRemoveMessage.format(e)}get takePhotoCaption(){return this.getLocalizableStringText("takePhotoCaption")}set takePhotoCaption(e){this.setLocalizableStringText("takePhotoCaption",e)}get locTakePhotoCaption(){return this.getLocalizableString("takePhotoCaption")}get clearButtonCaption(){return this.getLocalizableStringText("clearCaption")}set clearButtonCaption(e){this.setLocalizableStringText("clearCaption",e)}get locClearButtonCaption(){return this.getLocalizableString("clearCaption")}get locRenderedPlaceholder(){return void 0===this.locRenderedPlaceholderValue&&(this.locRenderedPlaceholderValue=new ct((()=>{const e=this.isReadOnly,t=!this.isDesignMode&&this.hasFileUI||this.isDesignMode&&"camera"!=this.sourceType,s=!this.isDesignMode&&this.hasVideoUI||this.isDesignMode&&"file"!=this.sourceType;let i;return i=e?this.locNoFileChosenCaption:t&&s?this.locFileOrPhotoPlaceholder:t?this.locFilePlaceholder:this.locPhotoPlaceholder,i}))),this.locRenderedPlaceholderValue}get currentMode(){return this.getPropertyValue("currentMode",this.sourceType)}get isPlayingVideo(){return this.getPropertyValue("isPlayingVideo",!1)}setIsPlayingVideo(e){this.setPropertyValue("isPlayingVideo",e)}updateCurrentMode(){!this.isDesignMode&&this.survey&&("file"!==this.sourceType?this.camera.hasCamera((e=>{this.setPropertyValue("currentMode",e&&this.isDefaultV2Theme?this.sourceType:"file")})):this.setPropertyValue("currentMode",this.sourceType))}updateActionsVisibility(){const e=this.isDesignMode;this.chooseFileAction.visible=!e&&this.hasFileUI||e&&"camera"!==this.sourceType,this.startCameraAction.visible=!e&&this.hasVideoUI||e&&"file"!==this.sourceType,this.cleanAction.visible=!!this.isAnswered}get inputTitle(){return this.isUploading?this.loadingFileTitle:this.isEmpty()?this.chooseFileTitle:" "}get chooseButtonText(){return this.isEmpty()||this.allowMultiple?this.chooseButtonCaption:this.replaceButtonCaption}clear(e){this.survey&&(this.containsMultiplyFiles=!1,this.survey.clearFiles(this,this.name,this.value,null,((t,s)=>{"success"===t&&(this.value=void 0,this.errors=[],e&&e(),this.indexToShow=0,this.fileIndexAction.title=this.getFileIndexCaption())})))}get renderCapture(){return this.allowCameraAccess?"user":void 0}get multipleRendered(){return this.allowMultiple?"multiple":void 0}get showChooseButton(){return!this.isReadOnly&&!this.isDefaultV2Theme}get showFileDecorator(){const e=this.isPlayingVideo,t=this.showLoadingIndicator;return!e&&!t}get allowShowPreview(){const e=this.showLoadingIndicator,t=this.isPlayingVideo;return!e&&!t}get showPreviewContainer(){return this.previewValue&&this.previewValue.length>0}get showRemoveButtonCore(){const e=this.showLoadingIndicator,t=this.isReadOnly,s=this.isEmpty();return!(t||s||e||this.isDefaultV2Theme)}get showRemoveButton(){return this.showRemoveButtonCore&&this.cssClasses.removeButton}get showRemoveButtonBottom(){const e=(new Ct).append(this.cssClasses.removeButtonBottom).append(this.cssClasses.contextButton).toString();return this.showRemoveButtonCore&&e}defaultImage(e){return!this.canPreviewImage(e)&&!!this.cssClasses.defaultImage}removeFile(e){this.removeFileByContent(this.value.filter((t=>t.name===e))[0])}removeFileByContent(e){this.survey&&this.survey.clearFiles(this,this.name,this.value,e.name,((t,s)=>{if("success"===t){var i=this.value;Array.isArray(i)?this.value=i.filter((t=>!ue.isTwoValueEquals(t,e,!0,!1,!1))):this.value=void 0}}))}setValueFromResult(e){this.value=(this.value||[]).concat(e.map((e=>({name:e.file.name,type:e.file.type,content:e.content}))))}loadFiles(e){if(this.survey&&(this.errors=[],this.allFilesOk(e))){var t=()=>{this.stateChanged("loading");var t=[];this.storeDataAsText?e.forEach((s=>{let i=new FileReader;i.onload=r=>{(t=t.concat([{name:s.name,type:s.type,content:i.result}])).length===e.length&&(this.value=(this.value||[]).concat(t))},i.readAsDataURL(s)})):this.uploadFiles(e)};this.allowMultiple?t():this.clear(t)}}get camera(){return this.cameraValue||(this.cameraValue=new sn),this.cameraValue}canPreviewImage(e){return this.allowImagesPreview&&!!e&&this.isFileImage(e)}loadPreview(e){if((!this.showPreview||this.prevLoadedPreviewValue!==e)&&(this.previewValue.splice(0,this.previewValue.length),this.showPreview&&e)){this.prevLoadedPreviewValue=e;var t=Array.isArray(e)?e:e?[e]:[];this.storeDataAsText?(t.forEach((e=>{var t=e.content||e;this.previewValue.push({name:e.name,type:e.type,content:t})})),this.previewValueChanged()):(this._previewLoader&&this._previewLoader.dispose(),this.isFileLoading=!0,this._previewLoader=new ln(this,((e,t)=>{"error"!==e&&(t.forEach((e=>{this.previewValue.push(e)})),this.previewValueChanged()),this.isFileLoading=!1,this._previewLoader.dispose(),this._previewLoader=void 0})),this._previewLoader.load(t))}}allFilesOk(e){var t=this.errors?this.errors.length:0;return(e||[]).forEach((e=>{this.maxSize>0&&e.size>this.maxSize&&this.errors.push(new ks(this.maxSize,this))})),t===this.errors.length}isFileImage(e){if(!e||!e.content||!e.content.substring)return!1;const t="data:image";var s=e.content&&e.content.substring(0,10);return(s=s&&s.toLowerCase())===t||!!e.type&&0===e.type.toLowerCase().indexOf("image/")}getPlainData(e={includeEmpty:!0}){var t=super.getPlainData(e);if(t&&!this.isEmpty()){t.isNode=!1;var s=Array.isArray(this.value)?this.value:[this.value];t.data=s.map(((e,t)=>({name:t,title:"File",value:e.content&&e.content||e,displayValue:e.name&&e.name||e,getString:e=>"object"==typeof e?JSON.stringify(e):e,isNode:!1})))}return t}getImageWrapperCss(e){return(new Ct).append(this.cssClasses.imageWrapper).append(this.cssClasses.imageWrapperDefaultImage,this.defaultImage(e)).toString()}getActionsContainerCss(e){return(new Ct).append(e.actionsContainer).append(e.actionsContainerAnswered,this.isAnswered).toString()}getRemoveButtonCss(){return(new Ct).append(this.cssClasses.removeFileButton).append(this.cssClasses.contextButton).toString()}getChooseFileCss(){const e=this.isAnswered;return(new Ct).append(this.cssClasses.chooseFile).append(this.cssClasses.controlDisabled,this.isReadOnly).append(this.cssClasses.chooseFileAsText,!e).append(this.cssClasses.chooseFileAsTextDisabled,!e&&this.isInputReadOnly).append(this.cssClasses.contextButton,e).append(this.cssClasses.chooseFileAsIcon,e).toString()}getReadOnlyFileCss(){return(new Ct).append("form-control").append(this.cssClasses.placeholderInput).toString()}get fileRootCss(){return(new Ct).append(this.cssClasses.root).append(this.cssClasses.rootDisabled,this.isDisabledStyle).append(this.cssClasses.rootReadOnly,this.isReadOnlyStyle).append(this.cssClasses.rootPreview,this.isPreviewStyle).append(this.cssClasses.rootDragging,this.isDragging).append(this.cssClasses.rootAnswered,this.isAnswered).append(this.cssClasses.single,!this.allowMultiple).append(this.cssClasses.singleImage,!this.allowMultiple&&this.isAnswered&&this.canPreviewImage(this.value[0])).append(this.cssClasses.mobile,this.isMobile).toString()}getFileDecoratorCss(){return(new Ct).append(this.cssClasses.fileDecorator).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.fileDecoratorDrag,this.isDragging).toString()}onChange(e){if(!ae.isFileReaderAvailable())return;if(!e||!e.files||e.files.length<1)return;let t=[],s=this.allowMultiple?e.files.length:1;for(let i=0;i{const t=this.cssClasses.page;return{cssClass:t?(new Ct).append(`${t}--enter-from-left`,"left"==this.navigationDirection||"left-delete"==this.navigationDirection).append(`${t}--enter-from-right`,"right"==this.navigationDirection).toString():""}},getLeaveOptions:e=>{const t=this.cssClasses.page;return{cssClass:t?(new Ct).append(`${t}--leave-to-left`,"right"==this.navigationDirection).append(`${t}--leave-to-right`,"left"==this.navigationDirection).toString():""}},getAnimatedElement:e=>{var t;return null===(t=this.rootElement)||void 0===t?void 0:t.querySelector(`#${e.id}`)},isAnimationEnabled:()=>this.animationAllowed&&!!this.rootElement,getRerenderEvent:()=>this.onElementRerendered}}triggerResponsiveness(e){e&&(this.calculatedGapBetweenItems=void 0,this.calculatedItemWidth=void 0),super.triggerResponsiveness()}processResponsiveness(e,t){if(this._width=t,this.rootElement&&(!this.calculatedGapBetweenItems||!this.calculatedItemWidth)&&this.allowMultiple){const e=this.getFileListSelector()?this.rootElement.querySelector(this.getFileListSelector()):void 0;if(e){const t=e.querySelector(vs(this.cssClasses.page));if(t){const e=t.querySelector(vs(this.cssClasses.previewItem));this.calculatedGapBetweenItems=Math.ceil(Number.parseFloat(oe.getComputedStyle(t).gap)),e&&(this.calculatedItemWidth=Math.ceil(Number.parseFloat(oe.getComputedStyle(e).width)))}}}return!(!this.calculatedGapBetweenItems||!this.calculatedItemWidth)&&(this.pageSize=this.calcAvailableItemsCount(t,this.calculatedItemWidth,this.calculatedGapBetweenItems),!0)}canDragDrop(){return!this.isInputReadOnly&&"camera"!==this.currentMode&&!this.isPlayingVideo}afterRenderQuestionElement(e){this.rootElement=e}beforeDestroyQuestionElement(e){this.rootElement=void 0}clearFilesCore(){if(this.rootElement){const e=this.rootElement.querySelectorAll("input")[0];e&&(e.value="")}this.clear()}doRemoveFile(e,t){t.stopPropagation(),this.needConfirmRemoveFile?$t({message:this.getConfirmRemoveMessage(e.name),funcOnYes:()=>{this.removeFileCore(e)},locale:this.getLocale(),rootElement:this.survey.rootElement,cssClass:this.cssClasses.confirmDialog}):this.removeFileCore(e)}removeFileCore(e){const t=this.previewValue.indexOf(e);this.removeFileByContent(-1===t?e:this.value[t])}dispose(){this.cameraValue=void 0,this.closeVideoStream(),super.dispose()}}ft([pe()],on.prototype,"isDragging",void 0),ft([ge({})],on.prototype,"previewValue",void 0),ft([ge({})],on.prototype,"pages",void 0),ft([pe({defaultValue:0,onSet:(e,t)=>{t.updateRenderedPages()}})],on.prototype,"indexToShow",void 0),ft([pe({defaultValue:1,onSet:(e,t)=>{t.updateFileNavigator()}})],on.prototype,"pageSize",void 0),ft([pe({defaultValue:!1})],on.prototype,"containsMultiplyFiles",void 0),ft([pe()],on.prototype,"allowCameraAccess",void 0),ft([pe({onSet:(e,t)=>{t.isLoadingFromJson||t.updateCurrentMode()}})],on.prototype,"sourceType",void 0),ft([pe()],on.prototype,"canFlipCameraValue",void 0),ft([pe({localizable:{defaultStr:"confirmRemoveFile"}})],on.prototype,"confirmRemoveMessage",void 0),ft([pe({localizable:{defaultStr:"confirmRemoveAllFiles"}})],on.prototype,"confirmRemoveAllMessage",void 0),ft([pe({localizable:{defaultStr:"noFileChosen"}})],on.prototype,"noFileChosenCaption",void 0),ft([pe({localizable:{defaultStr:"chooseFileCaption"}})],on.prototype,"chooseButtonCaption",void 0),ft([pe({localizable:{defaultStr:"replaceFileCaption"}})],on.prototype,"replaceButtonCaption",void 0),ft([pe({localizable:{defaultStr:"removeFileCaption"}})],on.prototype,"removeFileCaption",void 0),ft([pe({localizable:{defaultStr:"loadingFile"}})],on.prototype,"loadingFileTitle",void 0),ft([pe({localizable:{defaultStr:"chooseFile"}})],on.prototype,"chooseFileTitle",void 0),ft([pe({localizable:{defaultStr:"fileOrPhotoPlaceholder"}})],on.prototype,"fileOrPhotoPlaceholder",void 0),ft([pe({localizable:{defaultStr:"photoPlaceholder"}})],on.prototype,"photoPlaceholder",void 0),ft([pe({localizable:{defaultStr:"filePlaceholder"}})],on.prototype,"filePlaceholder",void 0),ft([pe()],on.prototype,"locRenderedPlaceholderValue",void 0),ft([ge()],on.prototype,"_renderedPages",void 0),Ie.addClass("file",[{name:"showCommentArea:switch",layout:"row",visible:!0,category:"general"},{name:"showPreview:boolean",default:!0,visible:!1},"allowMultiple:boolean",{name:"allowImagesPreview:boolean",default:!0,dependsOn:"showPreview",visibleIf:e=>!!e.showPreview},"imageHeight","imageWidth","acceptedTypes",{name:"storeDataAsText:boolean",default:!0},{name:"waitForUpload:boolean",default:!1},{name:"maxSize:number",default:0},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1},{name:"validators",visible:!1},{name:"needConfirmRemoveFile:boolean"},{name:"sourceType",choices:["file","camera","file-camera"],default:"file",category:"general",visible:!0},{name:"fileOrPhotoPlaceholder:text",serializationProperty:"locFileOrPhotoPlaceholder",category:"general"},{name:"photoPlaceholder:text",serializationProperty:"locPhotoPlaceholder",category:"general"},{name:"filePlaceholder:text",serializationProperty:"locFilePlaceholder",category:"general"},{name:"allowCameraAccess:switch",category:"general",visible:!1}],(function(){return new on("")}),"question"),wi.Instance.registerQuestion("file",(e=>new on(e)));class ln{constructor(e,t){this.fileQuestion=e,this.callback=t,this.loaded=[]}load(e){let t=0;this.loaded=new Array(e.length),e.forEach(((s,i)=>{this.fileQuestion.survey&&this.fileQuestion.survey.downloadFile(this.fileQuestion,this.fileQuestion.name,s,((r,n)=>{this.fileQuestion&&this.callback&&("error"!==r?(this.loaded[i]={content:n,name:s.name,type:s.type},t++,t===e.length&&this.callback(r,this.loaded)):this.callback("error",this.loaded))}))}))}dispose(){this.fileQuestion=void 0,this.callback=void 0}}class un extends Hr{constructor(e){super(e),this.createLocalizableString("html",this).onGetTextCallback=e=>this.survey&&!this.ignoreHtmlProgressing?this.processHtml(e):e}getType(){return"html"}get isCompositeQuestion(){return!0}getProcessedText(e){return this.ignoreHtmlProgressing?e:super.getProcessedText(e)}get html(){return this.getLocalizableStringText("html","")}set html(e){this.setLocalizableStringText("html",e)}get locHtml(){return this.getLocalizableString("html")}get processedHtml(){return this.processHtml(this.html)}processHtml(e){return this.survey?this.survey.processHtml(e,"html-question"):this.html}get isNewA11yStructure(){return!0}get renderCssRoot(){return(new Ct).append(this.cssClasses.root).append(this.cssClasses.nested,this.getIsNested()).toString()||void 0}}Ie.addClass("html",[{name:"html:html",serializationProperty:"locHtml"},{name:"showNumber",visible:!1},{name:"state",visible:!1},{name:"titleLocation",visible:!1},{name:"descriptionLocation",visible:!1},{name:"errorLocation",visible:!1},{name:"indent",visible:!1},{name:"width",visible:!1}],(function(){return new un("")}),"nonvalue"),wi.Instance.registerQuestion("html",(e=>new un(e)));class dn extends fr{constructor(e){super(e)}getDefaultItemComponent(){return"survey-radiogroup-item"}getType(){return"radiogroup"}getFirstInputElementId(){return this.inputId+"_0"}get selectedItem(){return this.getSingleSelectedItem()}get allowClear(){return this.getPropertyValue("allowClear")}set allowClear(e){this.setPropertyValue("allowClear",e)}get showClearButton(){return this.allowClear}set showClearButton(e){this.allowClear=e}get canShowClearButton(){return this.allowClear&&!this.isReadOnly}get clearButtonCaption(){return this.getLocalizationString("clearCaption")}supportAutoAdvance(){return!0===this.isMouseDown&&!this.isOtherSelected}getConditionJson(e=null,t=null){const s=super.getConditionJson(e,t);return delete s.allowClear,delete s.showClearButton,s}setNewComment(e){this.isMouseDown=!0,super.setNewComment(e),this.isMouseDown=!1}get showClearButtonInContent(){return!this.isDefaultV2Theme&&this.canShowClearButton}clickItemHandler(e){this.isReadOnlyAttr||(this.renderedValue=e.value)}getDefaultTitleActions(){const e=[];if(this.isDefaultV2Theme&&!this.isDesignMode){const t=new Nt({locTitleName:"clearCaption",id:`sv-clr-btn-${this.id}`,action:()=>{this.clearValue(!0)},innerCss:this.cssClasses.clearButton,visible:new ct((()=>this.canShowClearButton))});e.push(t)}return e}get isNewA11yStructure(){return!0}get a11y_input_ariaRole(){return"radiogroup"}}Ie.addClass("radiogroup",[{name:"allowClear:boolean",alternativeName:"showClearButton"},{name:"separateSpecialChoices",visible:!0},{name:"itemComponent",visible:!1,default:"survey-radiogroup-item"}],(function(){return new dn("")}),"checkboxbase"),wi.Instance.registerQuestion("radiogroup",(e=>{var t=new dn(e);return t.choices=wi.DefaultChoices,t}));class hn extends pt{onStringChangedCallback(){this.text=this.itemValue.text}get value(){return this.itemValue.getPropertyValue("value")}get locText(){return this.locString||this.itemValue.locText}constructor(e,t=null){super(),this.itemValue=e,this.locString=t,this.locText.onStringChanged.add(this.onStringChangedCallback.bind(this)),this.onStringChangedCallback()}}ft([pe({defaultValue:""})],hn.prototype,"highlight",void 0),ft([pe({defaultValue:""})],hn.prototype,"text",void 0),ft([pe()],hn.prototype,"style",void 0);class cn extends ii{constructor(e,t,s){super(e,t),this.description=s}}class pn extends ti{constructor(e){super(e),this._syncPropertiesChanging=!1,this.iCounter=0,this.createItemValues("rateValues"),this.createLocalizableString("ratingOptionsCaption",this,!1,!0),this.registerFunctionOnPropertiesValueChanged(["rateMin","rateMax","minRateDescription","maxRateDescription","rateStep","displayRateDescriptionsAsExtremeItems"],(()=>this.resetRenderedItems())),this.registerFunctionOnPropertiesValueChanged(["rateType"],(()=>{this.setIconsToRateValues(),this.resetRenderedItems(),this.updateRateCount()})),this.registerFunctionOnPropertiesValueChanged(["rateValues"],(()=>{this.setIconsToRateValues(),this.resetRenderedItems()})),this.registerSychProperties(["rateValues"],(()=>{this.autoGenerate=0==this.rateValues.length,this.setIconsToRateValues(),this.resetRenderedItems()})),this.registerFunctionOnPropertiesValueChanged(["rateColorMode","scaleColorMode"],(()=>{this.updateColors(this.survey.themeVariables)})),this.registerFunctionOnPropertiesValueChanged(["displayMode"],(()=>{this.updateRenderAsBasedOnDisplayMode(!0)})),this.registerSychProperties(["autoGenerate"],(()=>{this.autoGenerate||0!==this.rateValues.length||this.setPropertyValue("rateValues",this.visibleRateValues),this.autoGenerate&&(this.rateValues.splice(0,this.rateValues.length),this.updateRateMax()),this.resetRenderedItems()})),this.createLocalizableString("minRateDescription",this,!0).onStringChanged.add(((e,t)=>{this.setPropertyValue("hasMinRateDescription",!e.isEmpty)})),this.createLocalizableString("maxRateDescription",this,!0).onStringChanged.add(((e,t)=>{this.setPropertyValue("hasMaxRateDescription",!e.isEmpty)})),this.initPropertyDependencies()}setIconsToRateValues(){"smileys"==this.rateType&&this.rateValues.map((e=>e.icon=this.getItemSmiley(e)))}endLoadingFromJson(){super.endLoadingFromJson(),void 0!==this.jsonObj.rateMin&&void 0!==this.jsonObj.rateCount&&void 0===this.jsonObj.rateMax&&this.updateRateMax(),void 0!==this.jsonObj.rateMax&&void 0!==this.jsonObj.rateCount&&void 0===this.jsonObj.rateMin&&this.updateRateMin(),void 0===this.jsonObj.autoGenerate&&void 0!==this.jsonObj.rateValues&&(this.autoGenerate=!this.jsonObj.rateValues.length),this.updateRateCount(),this.setIconsToRateValues()}registerSychProperties(e,t){this.registerFunctionOnPropertiesValueChanged(e,(()=>{this._syncPropertiesChanging||(this._syncPropertiesChanging=!0,t(),this._syncPropertiesChanging=!1)}))}useRateValues(){return!!this.rateValues.length&&!this.autoGenerate}updateRateMax(){this.rateMax=this.rateMin+this.rateStep*(this.rateCount-1)}updateRateMin(){this.rateMin=this.rateMax-this.rateStep*(this.rateCount-1)}updateRateCount(){let e=0;e=this.useRateValues()?this.rateValues.length:Math.trunc((this.rateMax-this.rateMin)/(this.rateStep||1))+1,e>10&&"smileys"==this.rateDisplayMode&&(e=10),this.rateCount=e,this.rateValues.length>e&&this.rateValues.splice(e,this.rateValues.length-e)}initPropertyDependencies(){this.registerSychProperties(["rateCount"],(()=>{if(this.useRateValues())if(this.rateCount=10&&"smileys"==this.rateDisplayMode)return;this.rateValues.splice(this.rateCount,this.rateValues.length-this.rateCount)}else for(let e=this.rateValues.length;e{this.updateRateCount()}))}get showSelectedItemLocText(){return!this.readOnly&&!this.inputHasValue&&!!this.selectedItemLocText}get selectedItemLocText(){var e;return!this.readOnly&&(null===(e=this.visibleRateValues.filter((e=>e.value==this.value))[0])||void 0===e?void 0:e.locText)}get rateValues(){return this.getPropertyValue("rateValues")}set rateValues(e){this.setPropertyValue("rateValues",e)}get rateMin(){return this.getPropertyValue("rateMin")}set rateMin(e){this.setPropertyValue("rateMin",e)}get rateMax(){return this.getPropertyValue("rateMax")}set rateMax(e){this.setPropertyValue("rateMax",e)}get rateStep(){return this.getPropertyValue("rateStep")}set rateStep(e){this.setPropertyValue("rateStep",e)}updateColors(e){function t(e){const t=getComputedStyle(oe.getDocumentElement());return t.getPropertyValue&&t.getPropertyValue(e)}function s(s,i){let r=!!e&&e[s];if(r||(r=t(i)),!r)return null;const n=oe.createElement("canvas");if(!n)return null;var a=n.getContext("2d");a.fillStyle=r,"#000000"==a.fillStyle&&(a.fillStyle=t(i));const o=a.fillStyle;if(o.startsWith("rgba"))return o.substring(5,o.length-1).split(",").map((e=>+e.trim()));var l=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);return l?[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16),1]:null}"monochrome"!==this.colorMode&&oe.isAvailable()&&(pn.colorsCalculated||(pn.badColor=s("--sjs-special-red","--sd-rating-bad-color"),pn.normalColor=s("--sjs-special-yellow","--sd-rating-normal-color"),pn.goodColor=s("--sjs-special-green","--sd-rating-good-color"),pn.badColorLight=s("--sjs-special-red-light","--sd-rating-bad-color-light"),pn.normalColorLight=s("--sjs-special-yellow-light","--sd-rating-normal-color-light"),pn.goodColorLight=s("--sjs-special-green-light","--sd-rating-good-color-light"),this.colorsCalculated=!0,this.resetRenderedItems()))}getDisplayValueCore(e,t){if(!this.useRateValues)return super.getDisplayValueCore(e,t);var s=ii.getTextOrHtmlByValue(this.visibleRateValues,t);return s||t}get visibleRateValues(){return this.renderedRateItems.map((e=>e.itemValue))}supportEmptyValidation(){return"dropdown"===this.renderAs}itemValuePropertyChanged(e,t,s,i){this.useRateValues()||void 0===i||(this.autoGenerate=!1),super.itemValuePropertyChanged(e,t,s,i)}runConditionCore(e,t){super.runConditionCore(e,t),this.runRateItesmCondition(e,t)}runRateItesmCondition(e,t){var s;if(!this.useRateValues())return;let i=!1;if((null===(s=this.survey)||void 0===s?void 0:s.areInvisibleElementsShowing)?this.rateValues.forEach((e=>{i=i||!e.isVisible,e.setIsVisible(e,!0)})):i=ii.runConditionsForItems(this.rateValues,void 0,void 0,e,t,!0),i&&(this.resetRenderedItems(),!this.isEmpty()&&!this.isReadOnly)){const e=ii.getItemByValue(this.rateValues,this.value);e&&!e.isVisible&&this.clearValue()}}getRateValuesCore(){if(!this.useRateValues())return this.createRateValues();const e=new Array;return this.rateValues.forEach((t=>{t.isVisible&&e.push(t)})),e}calculateRateValues(){let e=this.getRateValuesCore();return"smileys"==this.rateType&&e.length>10&&(e=e.slice(0,10)),e}calculateRenderedRateItems(){const e=this.calculateRateValues();return e.map(((t,s)=>{let i=null;return this.displayRateDescriptionsAsExtremeItems&&(0==s&&(i=new hn(t,this.minRateDescription&&this.locMinRateDescription||t.locText)),s==e.length-1&&(i=new hn(t,this.maxRateDescription&&this.locMaxRateDescription||t.locText))),i||(i=new hn(t)),i}))}calculateVisibleChoices(){return this.calculateRateValues().map(((e,t)=>this.getRatingItemValue(e,t)))}resetRenderedItems(){if(this.autoGenerate){const e=this.getRateValuesCore();this.rateMax=e[e.length-1].value}Array.isArray(this.getPropertyValueWithoutDefault("renderedRateItems"))&&this.setArrayPropertyDirectly("renderedRateItems",this.calculateRenderedRateItems()),Array.isArray(this.getPropertyValueWithoutDefault("visibleChoices"))&&this.setArrayPropertyDirectly("visibleChoices",this.calculateVisibleChoices)}get renderedRateItems(){return this.getPropertyValue("renderedRateItems",void 0,(()=>this.calculateRenderedRateItems()))}get visibleChoices(){return this.getPropertyValue("visibleChoices",void 0,(()=>this.calculateVisibleChoices()))}createRateValues(){for(var e=[],t=this.rateMin,s=this.rateStep;t<=this.rateMax&&e.length!!this.minRateDescription))}get hasMaxRateDescription(){return this.getPropertyValue("hasMaxRateDescription",void 0,(()=>!!this.maxRateDescription))}get hasMinLabel(){return!this.displayRateDescriptionsAsExtremeItems&&!!this.hasMinRateDescription}get hasMaxLabel(){return!this.displayRateDescriptionsAsExtremeItems&&!!this.hasMaxRateDescription}updateRenderAsBasedOnDisplayMode(e){this.isDesignMode?(e||"dropdown"===this.renderAs)&&(this.renderAs="default"):(e||"auto"!==this.displayMode)&&(this.renderAs="dropdown"===this.displayMode?"dropdown":"default")}onSurveyLoad(){super.onSurveyLoad(),"dropdown"===this.renderAs&&"auto"===this.displayMode?this.displayMode=this.renderAs:this.updateRenderAsBasedOnDisplayMode()}get rateDisplayMode(){return this.rateType}set rateDisplayMode(e){this.rateType=e}get isStar(){return"stars"==this.rateType}get isSmiley(){return"smileys"==this.rateType}getDefaultItemComponent(){return"dropdown"==this.renderAs?"sv-rating-dropdown-item":this.isStar?"sv-rating-item-star":this.isSmiley?"sv-rating-item-smiley":"sv-rating-item"}get itemComponent(){return this.getPropertyValue("itemComponent",this.getDefaultItemComponent())}set itemComponent(e){this.setPropertyValue("itemComponent",e)}valueToData(e){if(this.useRateValues()){var t=ii.getItemByValue(this.rateValues,e);return t?t.value:e}return isNaN(e)?e:parseFloat(e)}setValueFromClick(e){if(!this.isReadOnlyAttr){this.value===("string"==typeof this.value?e:parseFloat(e))?this.clearValue(!0):this.value=e;for(let e=0;ee.highlight="none"))}get itemSmallMode(){return this.inMatrixMode&&"small"==Ps.matrix.rateSize}get ratingRootCss(){const e=this.hasMaxLabel||this.hasMinLabel;return(new Ct).append(this.cssClasses.root).append(this.cssClasses.rootWrappable,"buttons"==this.displayMode||!!this.survey&&this.survey.isDesignMode||"auto"==this.displayMode&&!this.supportResponsiveness()).append(this.cssClasses.rootLabelsTop,e&&"top"==this.rateDescriptionLocation).append(this.cssClasses.rootLabelsBottom,e&&"bottom"==this.rateDescriptionLocation).append(this.cssClasses.rootLabelsDiagonal,e&&"topBottom"==this.rateDescriptionLocation).append(this.cssClasses.itemSmall,this.itemSmallMode&&"labels"!=this.rateType).toString()}get itemStarIcon(){return this.itemSmallMode?"icon-rating-star-small":"icon-rating-star"}get itemStarIconAlt(){return this.itemStarIcon+"-2"}getItemSmiley(e){const t=this.useRateValues()?this.rateValues.length:this.rateMax-this.rateMin+1,s=["very-good","not-good","normal","good","average","excellent","poor","perfect","very-poor","terrible"].slice(0,t),i=["terrible","very-poor","poor","not-good","average","normal","good","very-good","excellent","perfect"].filter((e=>-1!=s.indexOf(e)));return this.useRateValues()?i[this.rateValues.indexOf(e)]:i[e.value-this.rateMin]}getItemSmileyIconName(e){return"icon-"+this.getItemSmiley(e)}getItemClassByText(e,t){return this.getItemClass(e)}getRenderedItemColor(e,t){let s=t?pn.badColorLight:pn.badColor,i=t?pn.goodColorLight:pn.goodColor;const r=(this.rateCount-1)/2,n=t?pn.normalColorLight:pn.normalColor;if(ee.value==this.value))[0])>=this.rateValues.indexOf(e):this.value>=e.value);const i=!(this.isReadOnly||!e.isEnabled||this.value==e.value||this.survey&&this.survey.isDesignMode),r=this.renderedRateItems.filter((t=>t.itemValue==e))[0],n=this.isStar&&"highlighted"==(null==r?void 0:r.highlight),a=this.isStar&&"unhighlighted"==(null==r?void 0:r.highlight);let o=this.cssClasses.item,l=this.cssClasses.selected,u=this.cssClasses.itemDisabled,d=this.cssClasses.itemReadOnly,h=this.cssClasses.itemPreview,c=this.cssClasses.itemHover,p=this.cssClasses.itemOnError,m=null,g=null,v=null,f=null,b=null;this.isStar&&(o=this.cssClasses.itemStar,l=this.cssClasses.itemStarSelected,u=this.cssClasses.itemStarDisabled,d=this.cssClasses.itemStarReadOnly,h=this.cssClasses.itemStarPreview,c=this.cssClasses.itemStarHover,p=this.cssClasses.itemStarOnError,m=this.cssClasses.itemStarHighlighted,g=this.cssClasses.itemStarUnhighlighted,b=this.cssClasses.itemStarSmall),this.isSmiley&&(o=this.cssClasses.itemSmiley,l=this.cssClasses.itemSmileySelected,u=this.cssClasses.itemSmileyDisabled,d=this.cssClasses.itemSmileyReadOnly,h=this.cssClasses.itemSmileyPreview,c=this.cssClasses.itemSmileyHover,p=this.cssClasses.itemSmileyOnError,m=this.cssClasses.itemSmileyHighlighted,v=this.cssClasses.itemSmileyScaleColored,f=this.cssClasses.itemSmileyRateColored,b=this.cssClasses.itemSmileySmall);const y=!this.isStar&&!this.isSmiley&&(!this.displayRateDescriptionsAsExtremeItems||this.useRateValues()&&e!=this.rateValues[0]&&e!=this.rateValues[this.rateValues.length-1]||!this.useRateValues()&&e.value!=this.rateMin&&e.value!=this.rateMax)&&e.locText.calculatedText.length<=2&&Number.isInteger(Number(e.locText.calculatedText));return(new Ct).append(o).append(l,s).append(u,this.isDisabledStyle).append(d,this.isReadOnlyStyle).append(h,this.isPreviewStyle).append(c,i).append(m,n).append(v,"colored"==this.scaleColorMode).append(f,"scale"==this.rateColorMode&&s).append(g,a).append(p,this.hasCssError()).append(b,this.itemSmallMode).append(this.cssClasses.itemFixedSize,y).toString()}getControlClass(){return this.isEmpty(),(new Ct).append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.controlDisabled,this.isDisabledStyle).append(this.cssClasses.controlReadOnly,this.isReadOnlyStyle).append(this.cssClasses.controlPreview,this.isPreviewStyle).toString()}get placeholder(){return this.getLocalizableStringText("ratingOptionsCaption")}set placeholder(e){this.setLocalizableStringText("ratingOptionsCaption",e)}get locPlaceholder(){return this.getLocalizableString("ratingOptionsCaption")}get allowClear(){return!0}get searchEnabled(){return!1}get renderedValue(){return this.value}set renderedValue(e){this.value=e}isItemSelected(e){return e.value==this.value}get readOnlyText(){return this.readOnly?this.displayValue||this.placeholder:this.isEmpty()?this.placeholder:""}needResponsiveWidth(){this.getPropertyValue("rateValues");const e=this.getPropertyValue("rateStep"),t=this.getPropertyValue("rateMax"),s=this.getPropertyValue("rateMin");return"dropdown"!=this.displayMode&&!!(this.hasMinRateDescription||this.hasMaxRateDescription||e&&(t-s)/e>9)}supportResponsiveness(){return!this.inMatrixMode}onBeforeSetCompactRenderer(){this.dropdownListModelValue||(this.dropdownListModelValue=new yr(this),this.ariaExpanded="false")}getCompactRenderAs(){return"buttons"==this.displayMode?"default":"dropdown"}getDesktopRenderAs(){return"dropdown"==this.displayMode?"dropdown":"default"}set dropdownListModel(e){this.dropdownListModelValue=e,this.ariaExpanded=e?"false":void 0,this.updateElementCss()}get dropdownListModel(){return"dropdown"===this.renderAs&&this.onBeforeSetCompactRenderer(),this.dropdownListModelValue}onBlurCore(e){var t;null===(t=this.dropdownListModel)||void 0===t||t.onBlur(e),super.onBlurCore(e)}updateCssClasses(e,t){super.updateCssClasses(e,t),Cs(e,t)}calcCssClasses(e){const t=super.calcCssClasses(e);return this.dropdownListModelValue&&this.dropdownListModelValue.updateCssClasses(t.popup,t.list),t}themeChanged(e){this.colorsCalculated=!1,this.updateColors(e.cssVariables)}setSurveyImpl(e,t){super.setSurveyImpl(e,t),this.survey&&(this.updateColors(this.survey.themeVariables),this.updateRenderAsBasedOnDisplayMode())}dispose(){super.dispose(),this.dropdownListModelValue&&(this.dropdownListModelValue.dispose(),this.dropdownListModelValue=void 0)}}pn.colorsCalculated=!1,ft([pe({defaultValue:!1})],pn.prototype,"inputHasValue",void 0),ft([pe()],pn.prototype,"autoGenerate",void 0),ft([pe()],pn.prototype,"rateCount",void 0),ft([pe()],pn.prototype,"displayRateDescriptionsAsExtremeItems",void 0),ft([pe()],pn.prototype,"displayMode",void 0),ft([pe()],pn.prototype,"rateDescriptionLocation",void 0),ft([pe()],pn.prototype,"rateType",void 0),ft([pe()],pn.prototype,"scaleColorMode",void 0),ft([pe()],pn.prototype,"rateColorMode",void 0),Ie.addClass("rating",[{name:"showCommentArea:switch",layout:"row",visible:!0,category:"general"},{name:"rateType",alternativeName:"rateDisplayMode",default:"labels",category:"rateValues",choices:["labels","stars","smileys"],visibleIndex:1},{name:"scaleColorMode",category:"rateValues",default:"monochrome",choices:["monochrome","colored"],visibleIf:function(e){return"smileys"==e.rateDisplayMode},visibleIndex:2},{name:"rateColorMode",category:"rateValues",default:"scale",choices:["default","scale"],visibleIf:function(e){return"smileys"==e.rateDisplayMode&&"monochrome"==e.scaleColorMode},visibleIndex:3},{name:"autoGenerate",category:"rateValues",default:!0,choices:[!0,!1],visibleIndex:5},{name:"rateCount:number",default:5,category:"rateValues",visibleIndex:4,onSettingValue:(e,t)=>t<2?2:t>Ps.ratingMaximumRateValueCount&&t>e.rateValues.length?Ps.ratingMaximumRateValueCount:t>10&&"smileys"==e.rateDisplayMode?10:t},{name:"rateValues:itemvalue[]",baseValue:function(){return he("choices_Item")},category:"rateValues",visibleIf:function(e){return!e.autoGenerate},visibleIndex:6},{name:"rateMin:number",default:1,onSettingValue:(e,t)=>t>e.rateMax-e.rateStep?e.rateMax-e.rateStep:t,visibleIf:function(e){return!!e.autoGenerate},visibleIndex:7},{name:"rateMax:number",default:5,onSettingValue:(e,t)=>t(t<=0&&(t=1),t>e.rateMax-e.rateMin&&(t=e.rateMax-e.rateMin),t),visibleIf:function(e){return!!e.autoGenerate},visibleIndex:9},{name:"minRateDescription",alternativeName:"mininumRateDescription",serializationProperty:"locMinRateDescription",visibleIndex:18},{name:"maxRateDescription",alternativeName:"maximumRateDescription",serializationProperty:"locMaxRateDescription",visibleIndex:19},{name:"displayRateDescriptionsAsExtremeItems:boolean",default:!1,visibleIndex:21,visibleIf:function(e){return"labels"==e.rateType}},{name:"rateDescriptionLocation",default:"leftRight",choices:["leftRight","top","bottom","topBottom"],visibleIndex:20},{name:"displayMode",default:"auto",choices:["auto","buttons","dropdown"],visibleIndex:0},{name:"itemComponent",visible:!1,defaultFunc:e=>e?(e.getOriginalObj&&(e=e.getOriginalObj()),e.getDefaultItemComponent()):"sv-rating-item"}],(function(){return new pn("")}),"question"),wi.Instance.registerQuestion("rating",(e=>new pn(e)));class mn extends ti{constructor(e){super(e),this.createLocalizableString("labelFalse",this,!0,"booleanUncheckedLabel"),this.createLocalizableString("labelTrue",this,!0,"booleanCheckedLabel")}getType(){return"boolean"}isLayoutTypeSupported(e){return!0}supportAutoAdvance(){return"checkbox"!==this.renderAs}get isIndeterminate(){return this.isEmpty()}get hasTitle(){return!0}get booleanValue(){return this.isEmpty()?null:this.value==this.getValueTrue()}set booleanValue(e){this.isReadOnly||this.isDesignMode||this.setBooleanValue(e)}get checkedValue(){return this.booleanValue}set checkedValue(e){this.booleanValue=e}setBooleanValue(e){this.isValueEmpty(e)?(this.value=void 0,this.booleanValueRendered=void 0):(this.value=1==e?this.getValueTrue():this.getValueFalse(),this.booleanValueRendered=e)}get defaultValue(){return this.getPropertyValue("defaultValue")}set defaultValue(e){!0===e&&(e="true"),!1===e&&(e="false"),this.setPropertyValue("defaultValue",e),this.updateValueWithDefaults()}getDefaultValue(){const e=this.defaultValue;if("indeterminate"!==e&&null!=e)return"true"==e?this.getValueTrue():this.getValueFalse()}get locTitle(){const e=this.getLocalizableString("title");return(this.isLabelRendered&&!this.showTitle||this.isValueEmpty(e.text))&&!this.isValueEmpty(this.locLabel.text)?this.locLabel:e}get labelRenderedAriaID(){return this.isLabelRendered?this.ariaTitleId:null}beforeDestroyQuestionElement(e){super.beforeDestroyQuestionElement(e),this.leftAnswerElement=void 0}get isLabelRendered(){return"hidden"===this.titleLocation&&this.useTitleAsLabel}get canRenderLabelDescription(){return this.isLabelRendered&&this.hasDescription&&(this.hasDescriptionUnderTitle||this.hasDescriptionUnderInput)}get labelTrue(){return this.getLocalizableStringText("labelTrue")}set labelTrue(e){this.setLocalizableStringText("labelTrue",e)}get locLabelTrue(){return this.getLocalizableString("labelTrue")}get isDeterminated(){return null!==this.booleanValue&&void 0!==this.booleanValue}get locLabelLeft(){return this.swapOrder?this.getLocalizableString("labelTrue"):this.getLocalizableString("labelFalse")}get locLabelRight(){return this.swapOrder?this.getLocalizableString("labelFalse"):this.getLocalizableString("labelTrue")}get labelFalse(){return this.getLocalizableStringText("labelFalse")}set labelFalse(e){this.setLocalizableStringText("labelFalse",e)}get locLabelFalse(){return this.getLocalizableString("labelFalse")}getValueTrue(){return void 0===this.valueTrue||this.valueTrue}getValueFalse(){return void 0!==this.valueFalse&&this.valueFalse}setDefaultValue(){this.isDefaultValueSet("true",this.valueTrue)&&this.setBooleanValue(!0),this.isDefaultValueSet("false",this.valueFalse)&&this.setBooleanValue(!1);const e=this.defaultValue;"indeterminate"!==e&&null!=e||this.setBooleanValue(void 0)}isDefaultValueSet(e,t){return this.defaultValue==e||void 0!==t&&this.defaultValue===t}getDisplayValueCore(e,t){return t==this.getValueTrue()?this.locLabelTrue.textOrHtml:this.locLabelFalse.textOrHtml}getItemCssValue(e){return(new Ct).append(e.item).append(e.itemOnError,this.hasCssError()).append(e.itemDisabled,this.isDisabledStyle).append(e.itemReadOnly,this.isReadOnlyStyle).append(e.itemPreview,this.isPreviewStyle).append(e.itemHover,!this.isDesignMode).append(e.itemChecked,!!this.booleanValue).append(e.itemExchanged,!!this.swapOrder).append(e.itemIndeterminate,!this.isDeterminated).toString()}getItemCss(){return this.getItemCssValue(this.cssClasses)}getCheckboxItemCss(){return this.getItemCssValue({item:this.cssClasses.checkboxItem,itemOnError:this.cssClasses.checkboxItemOnError,itemDisabled:this.cssClasses.checkboxItemDisabled,itemDisable:this.cssClasses.checkboxItemDisabled,itemReadOnly:this.cssClasses.checkboxItemReadOnly,itemPreview:this.cssClasses.checkboxItemPreview,itemChecked:this.cssClasses.checkboxItemChecked,itemIndeterminate:this.cssClasses.checkboxItemIndeterminate})}getLabelCss(e){return(new Ct).append(this.cssClasses.label).append(this.cssClasses.disabledLabel,this.booleanValue===!e||this.isDisabledStyle).append(this.cssClasses.labelReadOnly,this.isReadOnlyStyle).append(this.cssClasses.labelPreview,this.isPreviewStyle).append(this.cssClasses.labelTrue,!this.isIndeterminate&&e===!this.swapOrder).append(this.cssClasses.labelFalse,!this.isIndeterminate&&e===this.swapOrder).toString()}updateValueFromSurvey(e,t=!1){super.updateValueFromSurvey(e,t)}onValueChanged(){super.onValueChanged()}get svgIcon(){return this.booleanValue&&this.cssClasses.svgIconCheckedId?this.cssClasses.svgIconCheckedId:!this.isDeterminated&&this.cssClasses.svgIconIndId?this.cssClasses.svgIconIndId:!this.booleanValue&&this.cssClasses.svgIconUncheckedId?this.cssClasses.svgIconUncheckedId:this.cssClasses.svgIconId}get itemSvgIcon(){return this.isPreviewStyle&&this.cssClasses.itemPreviewSvgIconId?this.cssClasses.itemPreviewSvgIconId:this.cssClasses.itemSvgIconId}get allowClick(){return this.isIndeterminate&&!this.isInputReadOnly}getCheckedLabel(){return!0===this.booleanValue?this.locLabelTrue:!1===this.booleanValue?this.locLabelFalse:void 0}setQuestionValue(e,t=!0){"true"===e&&"true"!==this.valueTrue&&(e=!0),"false"===e&&"false"!==this.valueFalse&&(e=!1),"indeterminate"!==e&&null!==e||(e=void 0),super.setQuestionValue(e,t)}onLabelClick(e,t){return this.allowClick&&(gs(e),this.booleanValue=t),!0}calculateBooleanValueByEvent(e,t){let s=!1;oe.isAvailable()&&(s="rtl"==oe.getComputedStyle(e.target).direction),this.booleanValue=s?!t:t}onSwitchClickModel(e){if(!this.allowClick)return!0;gs(e);var t=e.offsetX/e.target.offsetWidth>.5;this.calculateBooleanValueByEvent(e,t)}onKeyDownCore(e){return"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(e.stopPropagation(),this.calculateBooleanValueByEvent(e,"ArrowRight"===e.key)),!0}getRadioItemClass(e,t){let s;return e.radioItem&&(s=e.radioItem),e.radioItemChecked&&t===this.booleanValue&&(s=(s?s+" ":"")+e.radioItemChecked),this.isDisabledStyle&&(s+=" "+e.radioItemDisabled),this.isReadOnlyStyle&&(s+=" "+e.radioItemReadOnly),this.isPreviewStyle&&(s+=" "+e.radioItemPreview),s}supportResponsiveness(){return!0}getCompactRenderAs(){return"radio"}createActionContainer(e){return super.createActionContainer("checkbox"!==this.renderAs)}get isNewA11yStructure(){return!0}get a11y_input_ariaRole(){return"switch"}}ft([pe()],mn.prototype,"booleanValueRendered",void 0),ft([pe()],mn.prototype,"showTitle",void 0),ft([pe({localizable:!0})],mn.prototype,"label",void 0),ft([pe({defaultValue:!0})],mn.prototype,"useTitleAsLabel",void 0),ft([pe({defaultValue:!1})],mn.prototype,"swapOrder",void 0),ft([pe()],mn.prototype,"valueTrue",void 0),ft([pe()],mn.prototype,"valueFalse",void 0),Ie.addClass("boolean",[{name:"showCommentArea:switch",layout:"row",visible:!0,category:"general"},{name:"label:text",serializationProperty:"locLabel",isSerializable:!1,visible:!1},{name:"labelTrue:text",serializationProperty:"locLabelTrue"},{name:"labelFalse:text",serializationProperty:"locLabelFalse"},"valueTrue","valueFalse",{name:"swapOrder:boolean",category:"general"},{name:"renderAs",default:"default",visible:!1}],(function(){return new mn("")}),"question"),wi.Instance.registerQuestion("boolean",(e=>new mn(e)));class gn extends ii{constructor(e,t=null,s="imageitemvalue"){super(e,t,s),this.typeName=s,this.createLocalizableString("imageLink",this,!1)}getType(){return this.typeName?this.typeName:"itemvalue"}get imageLink(){return this.getLocalizableStringText("imageLink")}set imageLink(e){this.setLocalizableStringText("imageLink",e),this.imageNotLoaded=!1,this.videoNotLoaded=!1}get locImageLink(){return this.getLocalizableString("imageLink")}getLocale(){return this.locOwner?this.locOwner.getLocale():""}getMarkdownHtml(e,t,s){return this.locOwner?this.locOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.locOwner?this.locOwner.getRenderer(e):null}getRendererContext(e){return this.locOwner?this.locOwner.getRendererContext(e):e}getProcessedText(e){return this.locOwner?this.locOwner.getProcessedText(e):e}onErrorHandler(){this.contentNotLoaded=!0}set contentNotLoaded(e){this.locOwner instanceof vn&&"video"==this.locOwner.contentMode?this.videoNotLoaded=e:this.imageNotLoaded=e}get contentNotLoaded(){return this.locOwner instanceof vn&&"video"==this.locOwner.contentMode?this.videoNotLoaded:this.imageNotLoaded}}ft([pe({defaultValue:!1})],gn.prototype,"videoNotLoaded",void 0),ft([pe({defaultValue:!1})],gn.prototype,"imageNotLoaded",void 0);class vn extends fr{constructor(e){super(e),this.isResponsiveValue=!1,this.onContentLoaded=(e,t)=>{e.contentNotLoaded=!1;const s=t.target;"video"==this.contentMode?e.aspectRatio=s.videoWidth/s.videoHeight:e.aspectRatio=s.naturalWidth/s.naturalHeight,this._width&&this.processResponsiveness(0,this._width)},this.gridColCount=void 0,this.colCount=0,this.registerPropertyChangedHandlers(["minImageWidth","maxImageWidth","minImageHeight","maxImageHeight","visibleChoices","colCount","isResponsiveValue"],(()=>{this._width&&this.processResponsiveness(0,this._width)})),this.registerPropertyChangedHandlers(["imageWidth","imageHeight"],(()=>{this.calcIsResponsive()})),this.calcIsResponsive()}getType(){return"imagepicker"}supportAutoAdvance(){return!this.multiSelect}get hasSingleInput(){return!1}getItemValueType(){return"imageitemvalue"}get isCompositeQuestion(){return!0}get itemFlowDirection(){return"row"}supportOther(){return!1}supportNone(){return!1}supportRefuse(){return!1}supportDontKnow(){return!1}isAnswerCorrect(){return this.multiSelect?ue.isArrayContainsEqual(this.value,this.correctAnswer):super.isAnswerCorrect()}get multiSelect(){return this.getPropertyValue("multiSelect")}set multiSelect(e){this.setPropertyValue("multiSelect",e)}isItemSelected(e){var t=this.value;const s=e;if(this.isValueEmpty(t))return!1;if(!s.imageLink||s.contentNotLoaded)return!1;if(!this.multiSelect)return this.isTwoValueEquals(t,e.value);if(!Array.isArray(t))return!1;for(var i=0;ivoid 0!==this[e]&&null!==this[e]))}calcIsResponsive(){this.isResponsiveValue=this.exactSizesAreEmpty}getObservedElementSelector(){return vs(this.cssClasses.root)}supportResponsiveness(){return!0}needResponsiveness(){return this.supportResponsiveness()&&this.isDefaultV2Theme}needResponsiveWidth(){return this.colCount>2}getCurrentColCount(){return void 0===this.responsiveColCount||0===this.colCount?this.colCount:this.responsiveColCount}getContainerStyle(){return this.isResponsive?{gridAutoFlow:this.gridColCount?null:"column",gridTemplateColumns:this.gridColCount?`repeat(${this.gridColCount}, 1fr)`:null}:{}}processResponsiveness(e,t){this._width=t=Math.floor(t);if(this.isResponsive){const e=this.choices.length+(this.isDesignMode?1:0),s=(this.gapBetweenItems||0)*this.imageScale,i=this.minImageWidth*this.imageScale,r=this.maxImageWidth*this.imageScale,n=this.maxImageHeight*this.imageScale,a=this.minImageHeight*this.imageScale;let o,l=this.colCount;const u=((e,t,s)=>{let i=Math.floor(e/(t+s));return(i+1)*(t+s)-s<=e&&i++,i})(t,i,s);0===l?(o=(s+i)*e-s>t?Math.floor((t-s*(u-1))/u):Math.floor((t-s*(e-1))/e),this.gridColCount=Math.max(Math.min(e,u),1)):(u{const t=o/e.aspectRatio;d=t>d?t:d})),d>n?d=n:d{this.gapBetweenItems=Math.ceil(Number.parseFloat(oe.getComputedStyle(s).gap))||16},this.reCalcGapBetweenItemsCallback())}}ft([pe({})],vn.prototype,"responsiveImageHeight",void 0),ft([pe({})],vn.prototype,"responsiveImageWidth",void 0),ft([pe({})],vn.prototype,"isResponsiveValue",void 0),ft([pe({})],vn.prototype,"maxImageWidth",void 0),ft([pe({})],vn.prototype,"minImageWidth",void 0),ft([pe({})],vn.prototype,"maxImageHeight",void 0),ft([pe({})],vn.prototype,"minImageHeight",void 0),ft([pe({})],vn.prototype,"responsiveColCount",void 0),ft([pe()],vn.prototype,"gridColCount",void 0),Ie.addClass("imageitemvalue",[{name:"imageLink:file",serializationProperty:"locImageLink"}],(e=>new gn(e)),"itemvalue"),Ie.addClass("responsiveImageSize",[],void 0,"number"),Ie.addClass("imagepicker",[{name:"showOtherItem",visible:!1},{name:"otherText",visible:!1},{name:"showNoneItem",visible:!1},{name:"showRefuseItem",visible:!1},{name:"showDontKnowItem",visible:!1},{name:"noneText",visible:!1},{name:"optionsCaption",visible:!1},{name:"otherErrorText",visible:!1},{name:"storeOthersAsComment",visible:!1},{name:"contentMode",default:"image",choices:["image","video"]},{name:"imageFit",default:"contain",choices:["none","contain","cover","fill"]},{name:"imageHeight:number",minValue:0},{name:"imageWidth:number",minValue:0},{name:"minImageWidth:responsiveImageSize",default:200,minValue:0},{name:"minImageHeight:responsiveImageSize",default:133,minValue:0},{name:"maxImageWidth:responsiveImageSize",default:3e3,minValue:0},{name:"maxImageHeight:responsiveImageSize",default:3e3,minValue:0}],(function(){return new vn("")}),"checkboxbase"),Ie.addProperty("imagepicker",{name:"showLabel:boolean",default:!1}),Ie.addProperty("imagepicker",{name:"colCount:number",default:0,choices:[0,1,2,3,4,5]}),Ie.addProperty("imagepicker",{name:"multiSelect:boolean",default:!1}),Ie.addProperty("imagepicker",{name:"choices:imageitemvalue[]"}),wi.Instance.registerQuestion("imagepicker",(e=>new vn(e)));const fn=[".mp4",".mov",".wmv",".flv",".avi",".mkv"],bn="https://www.youtube.com/",yn="embed";class Cn extends Hr{constructor(e){super(e);this.createLocalizableString("imageLink",this,!1).onGetTextCallback=e=>function(e,t){if(!e||!ue.isUrlYoutubeVideo(e))return t?"":e;if(e.toLocaleLowerCase().indexOf(yn)>-1)return e;let s="";for(var i=e.length-1;i>=0&&("="!==e[i]&&"/"!==e[i]);i--)s=e[i]+s;return bn+yn+"/"+s}(e,"youtube"==this.contentMode),this.createLocalizableString("altText",this,!1),this.registerPropertyChangedHandlers(["contentMode","imageLink"],(()=>this.calculateRenderedMode()))}getType(){return"image"}get isCompositeQuestion(){return!1}onSurveyLoad(){super.onSurveyLoad(),this.calculateRenderedMode()}get imageLink(){return this.getLocalizableStringText("imageLink")}set imageLink(e){this.setLocalizableStringText("imageLink",e)}get locImageLink(){return this.getLocalizableString("imageLink")}get altText(){return this.getLocalizableStringText("altText")}set altText(e){this.setLocalizableStringText("altText",e)}get locAltText(){return this.getLocalizableString("altText")}get imageHeight(){return this.getPropertyValue("imageHeight")}set imageHeight(e){this.setPropertyValue("imageHeight",e)}get renderedStyleHeight(){return this.imageHeight?ds(this.imageHeight):void 0}get renderedHeight(){return this.imageHeight?us(this.imageHeight):void 0}get imageWidth(){return this.getPropertyValue("imageWidth")}set imageWidth(e){this.setPropertyValue("imageWidth",e)}get renderedStyleWidth(){return this.imageWidth?ds(this.imageWidth):void 0}get renderedWidth(){return this.imageWidth?us(this.imageWidth):void 0}get imageFit(){return this.getPropertyValue("imageFit")}set imageFit(e){this.setPropertyValue("imageFit",e)}get contentMode(){return this.getPropertyValue("contentMode")}set contentMode(e){this.setPropertyValue("contentMode",e),"video"===e&&(this.showLabel=!0)}get renderedMode(){return this.getPropertyValue("renderedMode","image")}getImageCss(){const e=this.getPropertyByName("imageHeight"),t=this.getPropertyByName("imageWidth"),s=e.isDefaultValue(this.imageHeight)&&t.isDefaultValue(this.imageWidth);return(new Ct).append(this.cssClasses.image).append(this.cssClasses.adaptive,s).toString()}onLoadHandler(){this.contentNotLoaded=!1}onErrorHandler(){this.contentNotLoaded=!0}setRenderedMode(e){this.setPropertyValue("renderedMode",e)}calculateRenderedMode(){"auto"!==this.contentMode?this.setRenderedMode(this.contentMode):this.isYoutubeVideo()?this.setRenderedMode("youtube"):this.isVideo()?this.setRenderedMode("video"):this.setRenderedMode("image")}isYoutubeVideo(){return ue.isUrlYoutubeVideo(this.imageLink)}isVideo(){let e=this.imageLink;if(!e)return!1;e=e.toLowerCase();for(let t=0;tnew Cn(e))); /*! * Signature Pad v4.2.0 | https://github.com/szimek/signature_pad * (c) 2024 Szymon Nowak | Released under the MIT license */ class wn{constructor(e,t,s,i){if(isNaN(e)||isNaN(t))throw new Error(`Point is invalid: (${e}, ${t})`);this.x=+e,this.y=+t,this.pressure=s||0,this.time=i||Date.now()}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}equals(e){return this.x===e.x&&this.y===e.y&&this.pressure===e.pressure&&this.time===e.time}velocityFrom(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0}}class xn{static fromPoints(e,t){const s=this.calculateControlPoints(e[0],e[1],e[2]).c2,i=this.calculateControlPoints(e[1],e[2],e[3]).c1;return new xn(e[1],s,i,e[2],t.start,t.end)}static calculateControlPoints(e,t,s){const i=e.x-t.x,r=e.y-t.y,n=t.x-s.x,a=t.y-s.y,o=(e.x+t.x)/2,l=(e.y+t.y)/2,u=(t.x+s.x)/2,d=(t.y+s.y)/2,h=Math.sqrt(i*i+r*r),c=Math.sqrt(n*n+a*a),p=c/(h+c),m=u+(o-u)*p,g=d+(l-d)*p,v=t.x-m,f=t.y-g;return{c1:new wn(o+v,l+f),c2:new wn(u+v,d+f)}}constructor(e,t,s,i,r,n){this.startPoint=e,this.control2=t,this.control1=s,this.endPoint=i,this.startWidth=r,this.endWidth=n}length(){let e,t,s=0;for(let i=0;i<=10;i+=1){const r=i/10,n=this.point(r,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this.point(r,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){const i=n-e,r=a-t;s+=Math.sqrt(i*i+r*r)}e=n,t=a}return s}point(e,t,s,i,r){return t*(1-e)*(1-e)*(1-e)+3*s*(1-e)*(1-e)*e+3*i*(1-e)*e*e+r*e*e*e}}class Vn{constructor(){try{this._et=new EventTarget}catch(e){this._et=document}}addEventListener(e,t,s){this._et.addEventListener(e,t,s)}dispatchEvent(e){return this._et.dispatchEvent(e)}removeEventListener(e,t,s){this._et.removeEventListener(e,t,s)}}class _n extends Vn{constructor(e,t={}){super(),this.canvas=e,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=e=>{1===e.buttons&&this._strokeBegin(e)},this._handleMouseMove=e=>{this._strokeMoveUpdate(e)},this._handleMouseUp=e=>{1===e.buttons&&this._strokeEnd(e)},this._handleTouchStart=e=>{if(e.cancelable&&e.preventDefault(),1===e.targetTouches.length){const t=e.changedTouches[0];this._strokeBegin(t)}},this._handleTouchMove=e=>{e.cancelable&&e.preventDefault();const t=e.targetTouches[0];this._strokeMoveUpdate(t)},this._handleTouchEnd=e=>{if(e.target===this.canvas){e.cancelable&&e.preventDefault();const t=e.changedTouches[0];this._strokeEnd(t)}},this._handlePointerStart=e=>{e.preventDefault(),this._strokeBegin(e)},this._handlePointerMove=e=>{this._strokeMoveUpdate(e)},this._handlePointerEnd=e=>{this._drawingStroke&&(e.preventDefault(),this._strokeEnd(e))},this.velocityFilterWeight=t.velocityFilterWeight||.7,this.minWidth=t.minWidth||.5,this.maxWidth=t.maxWidth||2.5,this.throttle="throttle"in t?t.throttle:16,this.minDistance="minDistance"in t?t.minDistance:5,this.dotSize=t.dotSize||0,this.penColor=t.penColor||"black",this.backgroundColor=t.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=t.compositeOperation||"source-over",this.canvasContextOptions="canvasContextOptions"in t?t.canvasContextOptions:{},this._strokeMoveUpdate=this.throttle?function(e,t=250){let s,i,r,n=0,a=null;const o=()=>{n=Date.now(),a=null,s=e.apply(i,r),a||(i=null,r=[])};return function(...l){const u=Date.now(),d=t-(u-n);return i=this,r=l,d<=0||d>t?(a&&(clearTimeout(a),a=null),n=u,s=e.apply(i,r),a||(i=null,r=[])):a||(a=window.setTimeout(o,d)),s}}(_n.prototype._strokeUpdate,this.throttle):_n.prototype._strokeUpdate,this._ctx=e.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:e,canvas:t}=this;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0}fromDataURL(e,t={}){return new Promise(((s,i)=>{const r=new Image,n=t.ratio||window.devicePixelRatio||1,a=t.width||this.canvas.width/n,o=t.height||this.canvas.height/n,l=t.xOffset||0,u=t.yOffset||0;this._reset(this._getPointGroupOptions()),r.onload=()=>{this._ctx.drawImage(r,l,u,a,o),s()},r.onerror=e=>{i(e)},r.crossOrigin="anonymous",r.src=e,this._isEmpty=!1}))}toDataURL(e="image/png",t){return"image/svg+xml"===e?("object"!=typeof t&&(t=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(t))}`):("number"!=typeof t&&(t=void 0),this.canvas.toDataURL(e,t))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const e=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!e?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerStart),this.canvas.removeEventListener("pointermove",this._handlePointerMove),this.canvas.ownerDocument.removeEventListener("pointerup",this._handlePointerEnd),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("mousemove",this._handleMouseMove),this.canvas.ownerDocument.removeEventListener("mouseup",this._handleMouseUp),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this.canvas.removeEventListener("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(e,{clear:t=!0}={}){t&&this.clear(),this._fromData(e,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(e)}toData(){return this._data}_getPointGroupOptions(e){return{penColor:e&&"penColor"in e?e.penColor:this.penColor,dotSize:e&&"dotSize"in e?e.dotSize:this.dotSize,minWidth:e&&"minWidth"in e?e.minWidth:this.minWidth,maxWidth:e&&"maxWidth"in e?e.maxWidth:this.maxWidth,velocityFilterWeight:e&&"velocityFilterWeight"in e?e.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:e&&"compositeOperation"in e?e.compositeOperation:this.compositeOperation}}_strokeBegin(e){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:e,cancelable:!0})))return;this._drawingStroke=!0;const t=this._getPointGroupOptions(),s=Object.assign(Object.assign({},t),{points:[]});this._data.push(s),this._reset(t),this._strokeUpdate(e)}_strokeUpdate(e){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(e);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:e}));const t=e.clientX,s=e.clientY,i=void 0!==e.pressure?e.pressure:void 0!==e.force?e.force:0,r=this._createPoint(t,s,i),n=this._data[this._data.length-1],a=n.points,o=a.length>0&&a[a.length-1],l=!!o&&r.distanceTo(o)<=this.minDistance,u=this._getPointGroupOptions(n);if(!o||!o||!l){const e=this._addPoint(r,u);o?e&&this._drawCurve(e,u):this._drawDot(r,u),a.push({time:r.time,x:r.x,y:r.y,pressure:r.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:e}))}_strokeEnd(e){this._drawingStroke&&(this._strokeUpdate(e),this._drawingStroke=!1,this.dispatchEvent(new CustomEvent("endStroke",{detail:e})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerStart),this.canvas.addEventListener("pointermove",this._handlePointerMove),this.canvas.ownerDocument.addEventListener("pointerup",this._handlePointerEnd)}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown),this.canvas.addEventListener("mousemove",this._handleMouseMove),this.canvas.ownerDocument.addEventListener("mouseup",this._handleMouseUp)}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart),this.canvas.addEventListener("touchmove",this._handleTouchMove),this.canvas.addEventListener("touchend",this._handleTouchEnd)}_reset(e){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(e.minWidth+e.maxWidth)/2,this._ctx.fillStyle=e.penColor,this._ctx.globalCompositeOperation=e.compositeOperation}_createPoint(e,t,s){const i=this.canvas.getBoundingClientRect();return new wn(e-i.left,t-i.top,s,(new Date).getTime())}_addPoint(e,t){const{_lastPoints:s}=this;if(s.push(e),s.length>2){3===s.length&&s.unshift(s[0]);const e=this._calculateCurveWidths(s[1],s[2],t),i=xn.fromPoints(s,e);return s.shift(),i}return null}_calculateCurveWidths(e,t,s){const i=s.velocityFilterWeight*t.velocityFrom(e)+(1-s.velocityFilterWeight)*this._lastVelocity,r=this._strokeWidth(i,s),n={end:r,start:this._lastWidth};return this._lastVelocity=i,this._lastWidth=r,n}_strokeWidth(e,t){return Math.max(t.maxWidth/(e+1),t.minWidth)}_drawCurveSegment(e,t,s){const i=this._ctx;i.moveTo(e,t),i.arc(e,t,s,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(e,t){const s=this._ctx,i=e.endWidth-e.startWidth,r=2*Math.ceil(e.length());s.beginPath(),s.fillStyle=t.penColor;for(let s=0;s0?t.dotSize:(t.minWidth+t.maxWidth)/2;s.beginPath(),this._drawCurveSegment(e.x,e.y,i),s.closePath(),s.fillStyle=t.penColor,s.fill()}_fromData(e,t,s){for(const i of e){const{points:e}=i,r=this._getPointGroupOptions(i);if(e.length>1)for(let s=0;s{const s=document.createElement("path");if(!(isNaN(e.control1.x)||isNaN(e.control1.y)||isNaN(e.control2.x)||isNaN(e.control2.y))){const i=`M ${e.startPoint.x.toFixed(3)},${e.startPoint.y.toFixed(3)} C ${e.control1.x.toFixed(3)},${e.control1.y.toFixed(3)} ${e.control2.x.toFixed(3)},${e.control2.y.toFixed(3)} ${e.endPoint.x.toFixed(3)},${e.endPoint.y.toFixed(3)}`;s.setAttribute("d",i),s.setAttribute("stroke-width",(2.25*e.endWidth).toFixed(3)),s.setAttribute("stroke",t),s.setAttribute("fill","none"),s.setAttribute("stroke-linecap","round"),n.appendChild(s)}}),((e,{penColor:t,dotSize:s,minWidth:i,maxWidth:r})=>{const a=document.createElement("circle"),o=s>0?s:(i+r)/2;a.setAttribute("r",o.toString()),a.setAttribute("cx",e.x.toString()),a.setAttribute("cy",e.y.toString()),a.setAttribute("fill",t),n.appendChild(a)})),n.outerHTML}}class En extends nn{getPenColorFromTheme(){const e=this.survey;return!!e&&!!e.themeVariables&&e.themeVariables["--sjs-primary-backcolor"]}updateColors(e){const t=this.getPenColorFromTheme(),s=this.getPropertyByName("penColor");e.penColor=this.penColor||t||s.defaultValue||"#1ab394";const i=this.getPropertyByName("backgroundColor"),r=t?"transparent":void 0,n=this.backgroundImage?"transparent":this.backgroundColor;e.backgroundColor=n||r||i.defaultValue||"#ffffff"}getCssRoot(e){return(new Ct).append(super.getCssRoot(e)).append(e.small,"300"===this.signatureWidth.toString()).toString()}getFormat(){return"jpeg"===this.dataFormat?"image/jpeg":"svg"===this.dataFormat?"image/svg+xml":""}updateValue(){if(this.signaturePad){var e=this.signaturePad.toDataURL(this.getFormat());this.valueIsUpdatingInternally=!0,this.value=e,this.valueIsUpdatingInternally=!1}}constructor(e){super(e),this.valueIsUpdatingInternally=!1,this._loadedData=void 0,this.updateValueHandler=()=>{this._loadedData=void 0,this.scaleCanvas(!0,!0)}}getType(){return"signaturepad"}afterRenderQuestionElement(e){e&&(this.isDesignMode||this.initSignaturePad(e),this.element=e),super.afterRenderQuestionElement(e)}beforeDestroyQuestionElement(e){e&&this.destroySignaturePad(e)}themeChanged(e){this.signaturePad&&this.updateColors(this.signaturePad)}resizeCanvas(){this.canvas.width=this.containerWidth,this.canvas.height=this.containerHeight}scaleCanvas(e=!0,t=!1){const s=this.canvas,i=s.offsetWidth/this.containerWidth;(this.scale!=i||t)&&(this.scale=i,s.style.width=this.renderedCanvasWidth,this.resizeCanvas(),this.signaturePad.minWidth=this.penMinWidth*i,this.signaturePad.maxWidth=this.penMaxWidth*i,s.getContext("2d").scale(1/i,1/i),e&&this.loadPreview(this.value))}fromUrl(e){if(this.isFileLoading=!0,function(e){return"string"==typeof e?/^data:((?:\w+\/(?:(?!;).)+)?)((?:;[^;]+?)*),(.+)$/.test(e):null}(e))this.fromDataUrl(e),this.isFileLoading=!1;else{const t=new Image;t.crossOrigin="anonymous",t.src=e,t.onload=()=>{if(this.canvas){const s=oe.createElement("canvas");s.width=this.containerWidth,s.height=this.containerHeight;s.getContext("2d").drawImage(t,0,0);var e=s.toDataURL(this.getFormat());this.fromDataUrl(e)}this.isFileLoading=!1},t.onerror=()=>{this.isFileLoading=!1}}}fromDataUrl(e){if(this._loadedData=e,this.signaturePad){const t=ae.getDevicePixelRatio(),s="svg"===this.dataFormat&&t?t:1,i={width:this.canvas.width*this.scale/s,height:this.canvas.height*this.scale/s};this.signaturePad.fromDataURL(e,i)}}get loadedData(){return this._loadedData}loadPreview(e){if(!e)return this.signaturePad&&this.canvas&&(this.canvas.getContext("2d").clearRect(0,0,this.canvas.width*this.scale,this.canvas.height*this.scale),this.signaturePad.clear()),void(this.valueWasChangedFromLastUpload=!1);if(this.storeDataAsText)this.fromDataUrl(e);else if(this.loadedData)this.fromDataUrl(this.loadedData);else{var t=e?[e]:[];this._previewLoader&&this._previewLoader.dispose(),this.isFileLoading=!0,this._previewLoader=new ln(this,((t,s)=>{"success"===t&&s&&s.length>0&&s[0].content?(this.fromDataUrl(s[0].content),this.isFileLoading=!1):"skipped"===t&&this.fromUrl(e),this._previewLoader.dispose(),this._previewLoader=void 0})),this._previewLoader.load(t)}}onChangeQuestionValue(e){super.onChangeQuestionValue(e),this.isLoadingFromJson||(this._loadedData=void 0,this.loadPreview(e))}onSurveyLoad(){super.onSurveyLoad(),this.loadPreview(this.value)}initSignaturePad(e){var t=e.getElementsByTagName("canvas")[0];this.canvas=t,this.resizeCanvas();var s=new _n(t,{backgroundColor:"#ffffff"});this.signaturePad=s,this.isInputReadOnly&&s.off(),this.readOnlyChangedCallback=()=>{this.isInputReadOnly?s.off():s.on()},this.updateColors(s),s.addEventListener("beginStroke",(()=>{this.scaleCanvas(),this.isDrawingValue=!0,t.focus()}),{once:!1}),s.addEventListener("endStroke",(()=>{this.isDrawingValue=!1,this.storeDataAsText?this.updateValue():this.valueWasChangedFromLastUpload=!0}),{once:!1}),this.updateValueHandler(),this.readOnlyChangedCallback();var i=(e,t)=>{"signatureWidth"!==t.name&&"signatureHeight"!==t.name||this.valueIsUpdatingInternally||this.updateValueHandler()};this.onPropertyChanged.add(i),this.signaturePad.propertyChangedHandler=i}destroySignaturePad(e){this.signaturePad&&(this.onPropertyChanged.remove(this.signaturePad.propertyChangedHandler),this.signaturePad.off()),this.readOnlyChangedCallback=null,this.signaturePad=null}get dataFormat(){return this.getPropertyValue("dataFormat")}set dataFormat(e){this.setPropertyValue("dataFormat",Pn(e))}get signatureWidth(){return this.getPropertyValue("signatureWidth")}set signatureWidth(e){this.setPropertyValue("signatureWidth",e)}get signatureHeight(){return this.getPropertyValue("signatureHeight")}set signatureHeight(e){this.setPropertyValue("signatureHeight",e)}get containerHeight(){return this.signatureHeight||200}get containerWidth(){return this.signatureWidth||300}get renderedCanvasWidth(){return this.signatureAutoScaleEnabled?"100%":this.containerWidth+"px"}get height(){return this.getPropertyValue("height")}set height(e){this.setPropertyValue("height",e)}get allowClear(){return this.getPropertyValue("allowClear")}set allowClear(e){this.setPropertyValue("allowClear",e)}get canShowClearButton(){const e=!this.nothingIsDrawn(),t=this.isUploading;return!this.isInputReadOnly&&this.allowClear&&e&&!t}get penColor(){return this.getPropertyValue("penColor")}set penColor(e){this.setPropertyValue("penColor",e),this.signaturePad&&this.updateColors(this.signaturePad)}get backgroundColor(){return this.getPropertyValue("backgroundColor")}set backgroundColor(e){this.setPropertyValue("backgroundColor",e),this.signaturePad&&this.updateColors(this.signaturePad)}get backgroundImage(){return this.getPropertyValue("backgroundImage")}set backgroundImage(e){this.setPropertyValue("backgroundImage",e),this.signaturePad&&this.updateColors(this.signaturePad)}get clearButtonCaption(){return this.getLocalizationString("clearCaption")}get locRenderedPlaceholder(){return this.isReadOnly?this.locPlaceholderReadOnly:this.locPlaceholder}nothingIsDrawn(){const e=this.isDrawingValue,t=this.isEmpty(),s=this.isUploading,i=this.valueWasChangedFromLastUpload;return!e&&t&&!s&&!i}needShowPlaceholder(){return this.showPlaceholder&&this.nothingIsDrawn()}onBlurCore(e){if(super.onBlurCore(e),!this.storeDataAsText&&!this.element.contains(e.relatedTarget)){if(!this.valueWasChangedFromLastUpload)return;this.uploadFiles([rn(this.signaturePad.toDataURL(this.getFormat()),this.name+"."+Pn(this.dataFormat),this.getFormat())]),this.valueWasChangedFromLastUpload=!1}}uploadResultItemToValue(e){return e.content}setValueFromResult(e){this.valueIsUpdatingInternally=!0,this.value=(null==e?void 0:e.length)?e.map((e=>e.content))[0]:void 0,this.valueIsUpdatingInternally=!1}clearValue(e){this.valueWasChangedFromLastUpload=!1,super.clearValue(e),this._loadedData=void 0,this.loadPreview(this.value)}endLoadingFromJson(){super.endLoadingFromJson(),300===this.signatureWidth&&this.width&&"number"==typeof this.width&&this.width&&(ke.warn("Use signatureWidth property to set width for the signature pad"),this.signatureWidth=this.width,this.width=void 0),200===this.signatureHeight&&this.height&&(ke.warn("Use signatureHeight property to set width for the signature pad"),this.signatureHeight=this.height,this.height=void 0)}}function Pn(e){return e||(e="png"),"jpeg"!==(e=e.replace("image/","").replace("+xml",""))&&"svg"!==e&&(e="png"),e}ft([pe({defaultValue:!1})],En.prototype,"isDrawingValue",void 0),ft([pe({defaultValue:!1})],En.prototype,"isReadyForUpload",void 0),ft([pe({defaultValue:!1})],En.prototype,"valueWasChangedFromLastUpload",void 0),ft([pe()],En.prototype,"signatureAutoScaleEnabled",void 0),ft([pe()],En.prototype,"penMinWidth",void 0),ft([pe()],En.prototype,"penMaxWidth",void 0),ft([pe({})],En.prototype,"showPlaceholder",void 0),ft([pe({localizable:{defaultStr:"signaturePlaceHolder"}})],En.prototype,"placeholder",void 0),ft([pe({localizable:{defaultStr:"signaturePlaceHolderReadOnly"}})],En.prototype,"placeholderReadOnly",void 0),Ie.addClass("signaturepad",[{name:"signatureWidth:number",category:"general",default:300},{name:"signatureHeight:number",category:"general",default:200},{name:"signatureAutoScaleEnabled:boolean",category:"general",default:!1},{name:"penMinWidth:number",category:"general",default:.5},{name:"penMaxWidth:number",category:"general",default:2.5},{name:"height:number",category:"general",visible:!1},{name:"allowClear:boolean",category:"general",default:!0},{name:"showPlaceholder:boolean",category:"general",default:!0},{name:"placeholder:text",serializationProperty:"locPlaceholder",category:"general",dependsOn:"showPlaceholder",visibleIf:e=>e.showPlaceholder},{name:"placeholderReadOnly:text",serializationProperty:"locPlaceholderReadOnly",category:"general",dependsOn:"showPlaceholder",visibleIf:e=>e.showPlaceholder},{name:"backgroundImage:file",category:"general"},{name:"penColor:color",category:"general"},{name:"backgroundColor:color",category:"general"},{name:"dataFormat",category:"general",default:"png",choices:[{value:"png",text:"PNG"},{value:"jpeg",text:"JPEG"},{value:"svg",text:"SVG"}],onSettingValue:(e,t)=>Pn(t)},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1},{name:"storeDataAsText:boolean",default:!0},{name:"waitForUpload:boolean",default:!1}],(function(){return new En("")}),"question"),wi.Instance.registerQuestion("signaturepad",(e=>new En(e)));class Sn extends mi{constructor(e,t,s){super(s),this.data=e,this.panelItem=t,this.variableName=s,this.sharedQuestions={}}get survey(){return this.panelItem.getSurvey()}get panel(){return this.panelItem.panel}get panelIndex(){return this.data?this.data.getItemIndex(this.panelItem):-1}get visiblePanelIndex(){return this.data?this.data.getVisibleItemIndex(this.panelItem):-1}getValues(){return this.panelItem.getAllValues()}getQuestionByName(e){var t=super.getQuestionByName(e);if(t)return t;var s=this.panelIndex;const i=(t=s>-1?this.data.getSharedQuestionFromArray(e,s):void 0)?t.name:e;return this.sharedQuestions[i]=e,t}getQuestionDisplayText(e){const t=this.sharedQuestions[e.name];if(!t)return super.getQuestionDisplayText(e);const s=this.panelItem.getValue(t);return e.getDisplayValue(!0,s)}onCustomProcessText(e){var t;if(e.name==Tn.IndexVariableName&&(t=this.panelIndex)>-1)return e.isExists=!0,e.value=t+1,!0;if(e.name==Tn.VisibleIndexVariableName&&(t=this.visiblePanelIndex)>-1)return e.isExists=!0,e.value=t+1,!0;if(0==e.name.toLowerCase().indexOf(Tn.ParentItemVariableName+".")){var s=this.data;if(s&&s.parentQuestion&&s.parent&&s.parent.data){var i=new Sn(s.parentQuestion,s.parent.data,Tn.ItemVariableName),r=Tn.ItemVariableName+e.name.substring(Tn.ParentItemVariableName.length),n=i.processValue(r,e.returnDisplayValue);e.isExists=n.isExists,e.value=n.value}return!0}return!1}}class In extends Nt{constructor(e){super(e)}}class Tn{constructor(e,t){this.data=e,this.panelValue=t,this.textPreProcessor=new Sn(e,this,Tn.ItemVariableName),this.setSurveyImpl()}get panel(){return this.panelValue}setSurveyImpl(){this.panel.setSurveyImpl(this)}getValue(e){return this.getAllValues()[e]}setValue(e,t){const s=this.data.getPanelItemData(this),i=s?s[e]:void 0;if(ue.isTwoValueEquals(t,i,!1,!0,!1))return;this.data.setPanelItemData(this,e,ue.getUnbindValue(t));const r=this.panel.questions;for(var n=0;n{this.onPanelAdded(e)}),(e=>{this.onPanelRemoved(e)})),this.createNewArray("visiblePanels"),this.templateValue=this.createAndSetupNewPanelObject(),this.template.renderWidth="100%",this.template.selectedElementInDesign=this,this.template.addElementCallback=e=>{this.addOnPropertyChangedCallback(e),this.rebuildPanels()},this.template.removeElementCallback=()=>{this.rebuildPanels()},this.createLocalizableString("confirmDeleteText",this,!1,"confirmDelete"),this.createLocalizableString("keyDuplicationError",this,!1,!0),this.createLocalizableString("addPanelText",this,!1,"addPanel"),this.createLocalizableString("removePanelText",this,!1,"removePanel"),this.createLocalizableString("prevPanelText",this,!1,"pagePrevText"),this.createLocalizableString("nextPanelText",this,!1,"pageNextText"),this.createLocalizableString("noEntriesText",this,!1,"noEntriesText"),this.createLocalizableString("templateTabTitle",this,!0,"panelDynamicTabTextFormat"),this.createLocalizableString("tabTitlePlaceholder",this,!0,"tabTitlePlaceholder"),this.registerPropertyChangedHandlers(["panelsState"],(()=>{this.setPanelsState()})),this.registerPropertyChangedHandlers(["newPanelPosition","displayMode","showProgressBar"],(()=>{this.updateFooterActions()})),this.registerPropertyChangedHandlers(["allowAddPanel"],(()=>{this.updateNoEntriesTextDefaultLoc()})),this.registerPropertyChangedHandlers(["minPanelCount"],(()=>{this.onMinPanelCountChanged()})),this.registerPropertyChangedHandlers(["maxPanelCount"],(()=>{this.onMaxPanelCountChanged()}))}get isCompositeQuestion(){return!0}get hasSingleInput(){return!1}get isContainer(){return!0}getFirstQuestionToFocus(e){for(var t=0;t0)?this:null}getFirstInputElementId(){return this.showAddPanelButton?this.addButtonId:super.getFirstInputElementId()}setSurveyImpl(e,t){super.setSurveyImpl(e,t),this.setTemplatePanelSurveyImpl(),this.setPanelsSurveyImpl()}assignOnPropertyChangedToTemplate(){for(var e=this.template.elements,t=0;t{this.onTemplateElementPropertyChanged(e,t)})),e.isPanel&&(e.addElementCallback=e=>{this.addOnPropertyChangedCallback(e)})}onTemplateElementPropertyChanged(e,t){if(!this.isLoadingFromJson&&!this.useTemplatePanel&&0!=this.panelsCore.length&&Ie.findProperty(e.getType(),t.name))for(var s=this.panelsCore,i=0;i{e.clearOnDeletingContainer()}))}get isAllowTitleLeft(){return!1}removeElement(e){return this.template.removeElement(e)}get template(){return this.templateValue}getPanel(){return this.template}get templateElements(){return this.template.elements}get templateTitle(){return this.template.title}set templateTitle(e){this.template.title=e}get locTemplateTitle(){return this.template.locTitle}get templateTabTitle(){return this.locTemplateTabTitle.text}set templateTabTitle(e){this.locTemplateTabTitle.text=e}get locTemplateTabTitle(){return this.getLocalizableString("templateTabTitle")}get tabTitlePlaceholder(){return this.locTabTitlePlaceholder.text}set tabTitlePlaceholder(e){this.locTabTitlePlaceholder.text=e}get locTabTitlePlaceholder(){return this.getLocalizableString("tabTitlePlaceholder")}get templateDescription(){return this.template.description}set templateDescription(e){this.template.description=e}get locTemplateDescription(){return this.template.locDescription}get templateVisibleIf(){return this.getPropertyValue("templateVisibleIf")}set templateVisibleIf(e){this.setPropertyValue("templateVisibleIf",e),this.template.visibleIf=e}get items(){for(var e=[],t=0;t=e.length&&(t=e.length-1),this.currentPanel=t>=0?e[t]:null}this.updateRenderedPanels()}onPanelRemovedCore(e){const t=this.visiblePanelsCore;let s=t.indexOf(e);return s>-1&&(t.splice(s,1),this.removeTabFromToolbar(e)),s}get currentIndex(){return this.isRenderModeList?-1:this.useTemplatePanel?0:this.visiblePanelsCore.indexOf(this.currentPanel)}set currentIndex(e){e<0||this.visiblePanelCount<1||(e>=this.visiblePanelCount&&(e=this.visiblePanelCount-1),this.currentPanel=this.visiblePanelsCore[e])}get currentPanel(){if(this.isDesignMode)return this.template;if(this.isRenderModeList||this.useTemplatePanel)return null;let e=this.getPropertyValue("currentPanel",null);return!e&&this.visiblePanelCount>0&&(e=this.visiblePanelsCore[0],this.currentPanel=e),e}set currentPanel(e){if(this.isRenderModeList||this.useTemplatePanel)return;const t=this.getPropertyValue("currentPanel"),s=e?this.visiblePanelsCore.indexOf(e):-1;if(!(e&&s<0||e===t)&&(t&&t.onHidingContent(),this.setPropertyValue("currentPanel",e),this.updateRenderedPanels(),this.updateFooterActions(),this.updateTabToolbarItemsPressedState(),this.fireCallback(this.currentIndexChangedCallback),s>-1&&this.survey)){const t={panel:e,visiblePanelIndex:s};this.survey.dynamicPanelCurrentIndexChanged(this,t)}}updateRenderedPanels(){this.isRenderModeList?this.renderedPanels=[].concat(this.visiblePanels):this.currentPanel?this.renderedPanels=[this.currentPanel]:this.renderedPanels=[]}set renderedPanels(e){0==this.renderedPanels.length||0==e.length?(this.blockAnimations(),this.panelsAnimation.sync(e),this.releaseAnimations()):(this.isPanelsAnimationRunning=!0,this.panelsAnimation.sync(e))}get renderedPanels(){return this._renderedPanels}getPanelsAnimationOptions(){const e=()=>{if(this.isRenderModeList)return"";let e=new Ct,t=!1;const s=this.renderedPanels.filter((e=>e!==this.currentPanel))[0];let i=this.visiblePanels.indexOf(s);return i<0&&(t=!0,i=this.removedPanelIndex),e.append("sv-pd-animation-adding",!!this.focusNewPanelCallback).append("sv-pd-animation-removing",t).append("sv-pd-animation-left",i<=this.currentIndex).append("sv-pd-animation-right",i>this.currentIndex).toString()};return{getRerenderEvent:()=>this.onElementRerendered,getAnimatedElement:e=>{var t,s;if(e&&this.cssContent){const i=vs(this.cssContent);return null===(s=null===(t=this.getWrapperElement())||void 0===t?void 0:t.querySelector(`:scope ${i} #${e.id}`))||void 0===s?void 0:s.parentElement}},getEnterOptions:()=>({onBeforeRunAnimation:e=>{if(this.focusNewPanelCallback){const t=this.isRenderModeList?e:e.parentElement;Jt.ScrollElementToViewCore(t,!1,!1,{behavior:"smooth"})}!this.isRenderModeList&&e.parentElement?ws(e.parentElement,{heightTo:e.offsetHeight+"px"}):xs(e)},onAfterRunAnimation:e=>{Vs(e),e.parentElement&&Vs(e.parentElement)},cssClass:(new Ct).append(this.cssClasses.panelWrapperEnter).append(e()).toString()}),getLeaveOptions:()=>({onBeforeRunAnimation:e=>{!this.isRenderModeList&&e.parentElement?ws(e.parentElement,{heightFrom:e.offsetHeight+"px"}):xs(e)},onAfterRunAnimation:e=>{Vs(e),e.parentElement&&Vs(e.parentElement)},cssClass:(new Ct).append(this.cssClasses.panelWrapperLeave).append(e()).toString()}),isAnimationEnabled:()=>this.animationAllowed&&!!this.getWrapperElement()}}disablePanelsAnimations(){this.panelsCore.forEach((e=>{e.blockAnimations()}))}enablePanelsAnimations(){this.panelsCore.forEach((e=>{e.releaseAnimations()}))}updatePanelsAnimation(){this._panelsAnimations=new(this.isRenderModeList?Ut:Gt)(this.getPanelsAnimationOptions(),((e,t)=>{this._renderedPanels=e,t||(this.isPanelsAnimationRunning=!1,this.focusNewPanel())}),(()=>this._renderedPanels))}get panelsAnimation(){return this._panelsAnimations||this.updatePanelsAnimation(),this._panelsAnimations}onHidingContent(){super.onHidingContent(),this.currentPanel?this.currentPanel.onHidingContent():this.visiblePanelsCore.forEach((e=>e.onHidingContent()))}get confirmDelete(){return this.getPropertyValue("confirmDelete")}set confirmDelete(e){this.setPropertyValue("confirmDelete",e)}get keyName(){return this.getPropertyValue("keyName","")}set keyName(e){this.setPropertyValue("keyName",e)}get confirmDeleteText(){return this.getLocalizableStringText("confirmDeleteText")}set confirmDeleteText(e){this.setLocalizableStringText("confirmDeleteText",e)}get locConfirmDeleteText(){return this.getLocalizableString("confirmDeleteText")}get keyDuplicationError(){return this.getLocalizableStringText("keyDuplicationError")}set keyDuplicationError(e){this.setLocalizableStringText("keyDuplicationError",e)}get locKeyDuplicationError(){return this.getLocalizableString("keyDuplicationError")}get prevPanelText(){return this.getLocalizableStringText("prevPanelText")}set prevPanelText(e){this.setLocalizableStringText("prevPanelText",e)}get locPrevPanelText(){return this.getLocalizableString("prevPanelText")}get panelPrevText(){return this.prevPanelText}set panelPrevText(e){this.prevPanelText=e}get locPanelPrevText(){return this.locPrevPanelText}get nextPanelText(){return this.getLocalizableStringText("nextPanelText")}set nextPanelText(e){this.setLocalizableStringText("nextPanelText",e)}get locNextPanelText(){return this.getLocalizableString("nextPanelText")}get panelNextText(){return this.nextPanelText}set panelNextText(e){this.nextPanelText=e}get locPanelNextText(){return this.locNextPanelText}get addPanelText(){return this.getLocalizableStringText("addPanelText")}set addPanelText(e){this.setLocalizableStringText("addPanelText",e)}get locAddPanelText(){return this.getLocalizableString("addPanelText")}get panelAddText(){return this.addPanelText}set panelAddText(e){this.addPanelText=e}get locPanelAddText(){return this.locAddPanelText}get removePanelText(){return this.getLocalizableStringText("removePanelText")}set removePanelText(e){this.setLocalizableStringText("removePanelText",e)}get locRemovePanelText(){return this.getLocalizableString("removePanelText")}get panelRemoveText(){return this.removePanelText}set panelRemoveText(e){this.removePanelText=e}get locPanelRemoveText(){return this.locRemovePanelText}get isProgressTopShowing(){return"carousel"==this.displayMode&&("top"===this.progressBarLocation||"topBottom"===this.progressBarLocation)}get isProgressBottomShowing(){return"carousel"==this.displayMode&&("bottom"===this.progressBarLocation||"topBottom"===this.progressBarLocation)}get isPrevButtonVisible(){return this.currentIndex>0}get isPrevButtonShowing(){return this.isPrevButtonVisible}get isNextButtonVisible(){return this.currentIndex>=0&&this.currentIndex=0&&this.visiblePanelCount>1}getElementsInDesign(e=!1){return e?[this.template]:this.templateElements}prepareValueForPanelCreating(){this.addingNewPanelsValue=this.value,this.isAddingNewPanels=!0,this.isNewPanelsValueChanged=!1}setValueAfterPanelsCreating(){this.isAddingNewPanels=!1,this.isNewPanelsValueChanged&&(this.isValueChangingInternally=!0,this.value=this.addingNewPanelsValue,this.isValueChangingInternally=!1)}getValueCore(){return this.isAddingNewPanels?this.addingNewPanelsValue:super.getValueCore()}setValueCore(e){this.isAddingNewPanels?(this.isNewPanelsValueChanged=!0,this.addingNewPanelsValue=e):super.setValueCore(e)}setIsMobile(e){super.setIsMobile(e),(this.panelsCore||[]).forEach((t=>t.getQuestions(!0).forEach((t=>{t.setIsMobile(e)}))))}themeChanged(e){super.themeChanged(e),(this.panelsCore||[]).forEach((t=>t.getQuestions(!0).forEach((t=>{t.themeChanged(e)}))))}get panelCount(){return!this.canBuildPanels||this.wasNotRenderedInSurvey?this.getPropertyValue("panelCount"):this.panelsCore.length}set panelCount(e){if(!(e<0))if(this.canBuildPanels&&!this.wasNotRenderedInSurvey){if(e!=this.panelsCore.length&&!this.useTemplatePanel){this.updateBindings("panelCount",e),this.prepareValueForPanelCreating();for(let t=this.panelCount;tthis.panelCount&&e.splice(this.panelCount,e.length-this.panelCount),this.isValueChangingInternally=!0,this.value=e,this.isValueChangingInternally=!1}}get minPanelCount(){return this.getPropertyValue("minPanelCount")}set minPanelCount(e){e<0&&(e=0),this.setPropertyValue("minPanelCount",e)}onMinPanelCountChanged(){const e=this.minPanelCount;e>this.maxPanelCount&&(this.maxPanelCount=e),this.panelCountPs.panel.maxPanelCount&&(e=Ps.panel.maxPanelCount),this.setPropertyValue("maxPanelCount",e),this.updateFooterActions())}onMaxPanelCountChanged(){const e=this.maxPanelCount;ee&&(this.panelCount=e),this.updateFooterActions()}get allowAddPanel(){return this.getPropertyValue("allowAddPanel")}set allowAddPanel(e){this.setPropertyValue("allowAddPanel",e)}get addButtonId(){return this.id+"addPanel"}get newPanelPosition(){return this.getPropertyValue("newPanelPosition")}set newPanelPosition(e){this.setPropertyValue("newPanelPosition",e)}get allowRemovePanel(){return this.getPropertyValue("allowRemovePanel")}set allowRemovePanel(e){this.setPropertyValue("allowRemovePanel",e)}get templateQuestionTitleLocation(){return this.getPropertyValue("templateQuestionTitleLocation")}set templateQuestionTitleLocation(e){this.setPropertyValue("templateQuestionTitleLocation",e)}get templateTitleLocation(){return this.templateQuestionTitleLocation}set templateTitleLocation(e){this.templateQuestionTitleLocation=e}get templateErrorLocation(){return this.getPropertyValue("templateErrorLocation")}set templateErrorLocation(e){this.setPropertyValue("templateErrorLocation",e.toLowerCase())}get showQuestionNumbers(){return this.getPropertyValue("showQuestionNumbers")}set showQuestionNumbers(e){this.setPropertyValue("showQuestionNumbers",e),!this.isLoadingFromJson&&this.survey&&this.survey.questionVisibilityChanged(this,this.visible,!0)}notifySurveyOnChildrenVisibilityChanged(){return"onSurvey"===this.showQuestionNumbers}get removePanelButtonLocation(){return this.getPropertyValue("removePanelButtonLocation")}set removePanelButtonLocation(e){this.setPropertyValue("removePanelButtonLocation",e)}get panelRemoveButtonLocation(){return this.removePanelButtonLocation}set panelRemoveButtonLocation(e){this.removePanelButtonLocation=e}get showRangeInProgress(){return this.showProgressBar}set showRangeInProgress(e){this.showProgressBar=e}get renderMode(){let e=this.displayMode;if("carousel"==e){const e=this.progressBarLocation;if("top"==e)return"progressTop";if("bottom"==e)return"progressBottom";if("topBottom"==e)return"progressTopBottom"}return e}set renderMode(e){(e||"").startsWith("progress")?("progressTop"==e?this.progressBarLocation="top":"progressBottom"==e?this.progressBarLocation="bottom":"progressTopBottom"==e&&(this.progressBarLocation="topBottom"),this.displayMode="carousel"):this.displayMode=e}updatePanelView(){this.blockAnimations(),this.updateRenderedPanels(),this.releaseAnimations(),this.updatePanelsAnimation()}get tabAlign(){return this.getPropertyValue("tabAlign")}set tabAlign(e){this.setPropertyValue("tabAlign",e),this.isRenderModeTab&&(this.tabbedMenu.containerCss=this.getTabbedMenuCss())}get isRenderModeList(){return"list"===this.displayMode}get isRenderModeTab(){return"tab"===this.displayMode}setVisibleIndex(e){if(!this.isVisible)return 0;const t="onSurvey"===this.showQuestionNumbers;let s=t?e:0;const i=this.isDesignMode?[this.template]:this.visiblePanelsCore;for(let e=0;ethis.minPanelCount)}rebuildPanels(){if(!this.isLoadingFromJson){this.prepareValueForPanelCreating();var e=[];if(this.useTemplatePanel)new Tn(this,this.template),e.push(this.template);else for(var t=0;t{i.focusFirstQuestion()},this.isPanelsAnimationRunning||this.focusNewPanel()),i}addPanelCore(e){const t=this.currentIndex;return void 0===e&&(e=t<0?this.panelCount:t+1),(e<0||e>this.panelCount)&&(e=this.panelCount),this.updateValueOnAddingPanel(t<0?this.panelCount-1:t,e),this.isRenderModeList||(this.currentIndex=e),this.notifyOnPanelAddedRemoved(!0,e),this.panelsCore[e]}focusNewPanel(){this.focusNewPanelCallback&&(this.focusNewPanelCallback(),this.focusNewPanelCallback=void 0)}updateValueOnAddingPanel(e,t){this.panelCount++;let s=this.value;if(!Array.isArray(s)||s.length!==this.panelCount)return;let i=!1;const r=this.panelCount-1;if(t1){const n=e>-1&&e<=r?e:r;i=!0,this.copyValue(s[t],s[n])}i&&(this.value=s)}canLeaveCurrentPanel(){return!("list"!==this.displayMode&&this.currentPanel&&this.currentPanel.hasErrors(!0,!0))}copyValue(e,t){for(var s in t)e[s]=t[s]}getPanelRemoveButtonId(e){return e.id+"_remove_button"}isRequireConfirmOnDelete(e){if(!this.confirmDelete)return!1;const t=this.getVisualPanelIndex(e);if(t<0||t>=this.visiblePanelCount)return!1;const s=this.visiblePanelsCore[t].getValue();return!this.isValueEmpty(s)&&(this.isValueEmpty(this.defaultPanelValue)||!this.isTwoValueEquals(s,this.defaultPanelValue))}goToNextPanel(){return!(this.currentIndex<0)&&(!!this.canLeaveCurrentPanel()&&(this.currentIndex++,!0))}goToPrevPanel(){this.currentIndex<0||this.currentIndex--}removePanelUI(e){this.removePanel(e,this.isRequireConfirmOnDelete(e))}removePanel(e,t){const s=this.getVisualPanelIndex(e);if(s<0||s>=this.visiblePanelCount)return;if(void 0!==t){if(!this.canRemovePanel)return;const e=()=>{var e;this.removePanelCore(s);const t=this.visiblePanelCount,i=s>=t?t-1:s;let r=0===t?this.addButtonId:i>-1?this.getPanelRemoveButtonId(this.visiblePanels[i]):"";r&&Jt.FocusElement(r,!0,null===(e=this.survey)||void 0===e?void 0:e.rootElement)};t?$t({message:this.confirmDeleteText,funcOnYes:()=>{e()},locale:this.getLocale(),rootElement:this.survey.rootElement,cssClass:this.cssClasses.confirmDialog}):e()}else this.removePanelCore(s)}removePanelCore(e){this.removedPanelIndex=e;const t=this.visiblePanelsCore[e],s=this.panelsCore.indexOf(t);if(!(s<0)&&(!this.survey||this.survey.dynamicPanelRemoving(this,s,t))){this.panelsCore.splice(s,1),this.updateBindings("panelCount",this.panelCount);var i=this.value;!i||!Array.isArray(i)||s>=i.length||(this.isValueChangingInternally=!0,i.splice(s,1),this.value=i,this.updateFooterActions(),this.fireCallback(this.panelCountChangedCallback),this.notifyOnPanelAddedRemoved(!1,s,t),this.isValueChangingInternally=!1)}}notifyOnPanelAddedRemoved(e,t,s){if(s||(s=this.panelsCore[t]),this.survey){const i="onSurvey"===this.showQuestionNumbers;e?this.survey.dynamicPanelAdded(this,t,s,i):this.survey.dynamicPanelRemoved(this,t,s,i)}e&&s&&"onPanel"===this.showQuestionNumbers&&s.setVisibleIndex(0)}getVisualPanelIndex(e){if(ue.isNumber(e))return e;const t=this.visiblePanelsCore;for(var s=0;s=this.panelsCore.length?null:this.panelsCore[t].getQuestionByName(e)}clearIncorrectValuesInPanel(e){var t=this.panelsCore[e];t.clearIncorrectValues();var s=this.value,i=s&&e-1),r=new Array,n=this.template.questions;for(var a=0;a{s.questions.forEach((s=>s.collectNestedQuestions(e,t)))}))}getConditionJson(e=null,t=null){if(!t)return super.getConditionJson(e);var s=t,i=t.indexOf(".");i>-1&&(s=t.substring(0,i),t=t.substring(i+1));var r=this.template.getQuestionByName(s);return r?r.getConditionJson(e,t):null}onReadOnlyChanged(){var e=this.isReadOnly;this.template.readOnly=e;for(var t=0;tthis.maxPanelCount&&(this.panelCount=this.maxPanelCount),this.buildPanelsFirstTime(),super.onSurveyLoad()}buildPanelsFirstTime(e=!1){if(!this.hasPanelBuildFirstTime&&(e||!this.wasNotRenderedInSurvey)){if(this.blockAnimations(),this.hasPanelBuildFirstTime=!0,this.isBuildingPanelsFirstTime=!0,this.getPropertyValue("panelCount")>0&&(this.panelCount=this.getPropertyValue("panelCount")),this.useTemplatePanel&&this.rebuildPanels(),this.setPanelsSurveyImpl(),this.setPanelsState(),this.assignOnPropertyChangedToTemplate(),this.survey)for(var t=0;t{i.questions.forEach((i=>i.runTriggers(e,t,s)))}))}reRunCondition(){this.data&&this.runCondition(this.getDataFilteredValues(),this.getDataFilteredProperties())}runPanelsCondition(e,t,s){var i={};t&&t instanceof Object&&(i=JSON.parse(JSON.stringify(t))),this.parentQuestion&&this.parent&&(i[Tn.ParentItemVariableName]=this.parent.getValue()),this.isValueChangingInternally=!0;for(var r=0;r0&&(e=e.concat(n))}return e}getDisplayValueCore(e,t){var s=this.getUnbindValue(t);if(!s||!Array.isArray(s))return s;for(var i=0;i{this.raiseOnCompletedAsyncValidators()}}isValueDuplicated(e,t,s,i){if(!this.keyName)return!1;var r=e.getQuestionByValueName(this.keyName);if(!r||r.isEmpty())return!1;var n=r.value;this.changingValueQuestion&&r!=this.changingValueQuestion&&r.hasErrors(i,s);for(var a=0;a[this.canRenderRemovePanel(e,"bottom")].every((e=>!0===e)))),data:{question:this,panel:e}})),this.survey&&(t=this.survey.getUpdatedPanelFooterActions(e,t,this)),t}canRenderRemovePanelOnRight(e){return this.canRenderRemovePanel(e,"right")}canRenderRemovePanel(e,t){const s=this.canRemovePanel,i="collapsed"!==e.state;return this.removePanelButtonLocation===t&&s&&i}createNewPanel(){var e=this.createAndSetupNewPanelObject(),t=this.template.toJSON();(new Se).toObject(t,e),e.renderWidth="100%",e.updateCustomWidgets(),new Tn(this,e),this.isDesignMode||this.isReadOnly||this.isValueEmpty(e.getValue())||this.runPanelsCondition([e],this.getDataFilteredValues(),this.getDataFilteredProperties());for(var s=e.questions,i=0;ithis.getPanelActions(e),e.onGetFooterToolbarCssCallback=()=>this.cssClasses.panelFooter,e.registerPropertyChangedHandlers(["visible"],(()=>{e.visible?this.onPanelAdded(e):this.onPanelRemoved(e),this.updateFooterActions()})),e}createAndSetupNewPanelObject(){var e=this.createNewPanelObject();return e.isInteractiveDesignElement=!1,e.setParentQuestion(this),e.onGetQuestionTitleLocation=()=>this.getTemplateQuestionTitleLocation(),e}getTemplateQuestionTitleLocation(){return"default"!=this.templateQuestionTitleLocation?this.templateQuestionTitleLocation:this.getTitleLocationCore()}getChildErrorLocation(e){return"default"!==this.templateErrorLocation?this.templateErrorLocation:super.getChildErrorLocation(e)}createNewPanelObject(){return Ie.createClass("panel")}setPanelCountBasedOnValue(){if(!this.isValueChangingInternally&&!this.useTemplatePanel){var e=this.value,t=e&&Array.isArray(e)?e.length:0;0==t&&this.getPropertyValue("panelCount")>0&&(t=this.getPropertyValue("panelCount")),this.settingPanelCountBasedOnValue=!0,this.panelCount=t,this.settingPanelCountBasedOnValue=!1}}setQuestionValue(e){if(!this.settingPanelCountBasedOnValue){super.setQuestionValue(e,!1),this.setPanelCountBasedOnValue();for(var t=0;t-1?t:this.items.length}getVisibleItemIndex(e){const t=this.visiblePanelsCore;for(var s=0;st.length&&(s=t.length),s<0||!i||!Array.isArray(i)||i.length<=s?{}:i[s]}setPanelItemData(e,t,s){if(this.isSetPanelItemData[t]>this.maxCheckCount)return;this.isSetPanelItemData[t]||(this.isSetPanelItemData[t]=0),this.isSetPanelItemData[t]++;var i=this.items,r=i.indexOf(e);r<0&&(r=i.length);var n=this.getUnbindValue(this.value);if(n&&Array.isArray(n)||(n=[]),n.length<=r)for(var a=n.length;a<=r;a++)n.push({});n[r]||(n[r]={});const o=n[r][t];this.isValueEmpty(s)?delete n[r][t]:n[r][t]=s,r>=0&&r{var i={name:t.name||s,title:t.title||"Panel",value:t.getValue(),displayValue:t.getValue(),getString:e=>"object"==typeof e?JSON.stringify(e):e,isNode:!0,data:t.questions.map((t=>t.getPlainData(e))).filter((e=>!!e))};return(e.calculations||[]).forEach((e=>{i[e.propertyName]=t[e.propertyName]})),i})),t.data=t.data.concat(s)}return t}updateElementCss(e){super.updateElementCss(e);for(var t=0;t0}get tabbedMenu(){return this.isRenderModeTab?(this.tabbedMenuValue||(this.tabbedMenuValue=new Ft,this.tabbedMenuValue.dotsItem.popupModel.showPointer=!1,this.tabbedMenuValue.dotsItem.popupModel.verticalPosition="bottom",this.tabbedMenuValue.dotsItem.popupModel.horizontalPosition="center",this.updateElementCss(!1)),this.tabbedMenuValue):null}get footerToolbar(){return this.footerToolbarValue||this.initFooterToolbar(),this.footerToolbarValue}updateFooterActions(){this.updateFooterActionsCallback&&this.updateFooterActionsCallback()}initFooterToolbar(){this.footerToolbarValue=this.createActionContainer();const e=[],t=new Nt({id:"sv-pd-prev-btn",title:this.prevPanelText,action:()=>{this.goToPrevPanel()}}),s=new Nt({id:"sv-pd-next-btn",title:this.nextPanelText,action:()=>{this.goToNextPanel()}}),i=new Nt({id:"sv-pd-add-btn",component:"sv-paneldynamic-add-btn",data:{question:this}}),r=new Nt({id:"sv-prev-btn-icon",component:"sv-paneldynamic-prev-btn",data:{question:this}}),n=new Nt({id:"sv-pd-progress-text",component:"sv-paneldynamic-progress-text",data:{question:this}}),a=new Nt({id:"sv-pd-next-btn-icon",component:"sv-paneldynamic-next-btn",data:{question:this}});e.push(t,s,i,r,n,a),this.updateFooterActionsCallback=()=>{const e=this.legacyNavigation,o=this.isRenderModeList,l=this.isMobile,u=!e&&!o;t.visible=u&&this.currentIndex>0,s.visible=u&&this.currentIndex{if(s||(s=this.locTabTitlePlaceholder.renderedHtml),!this.survey)return s;const i={title:s,panel:e,visiblePanelIndex:t};return this.survey.dynamicPanelGetTabTitle(this,i),i.title},s.sharedData=this.locTemplateTabTitle;const i=e.id,r=this.getPanelVisibleIndexById(i)===this.currentIndex;return new In({id:`${this.id}_tab_${i}`,panelId:i,pressed:r,locTitle:s,disableHide:r,action:()=>{this.currentIndex=this.getPanelVisibleIndexById(i)}})}getTabbedMenuCss(e){const t=null!=e?e:this.cssClasses;return(new Ct).append(t.tabsRoot).append(t.tabsLeft,"left"===this.tabAlign).append(t.tabsRight,"right"===this.tabAlign).append(t.tabsCenter,"center"===this.tabAlign).toString()}updateTabToolbarItemsPressedState(){if(!this.isRenderModeTab)return;if(this.currentIndex<0||this.currentIndex>=this.visiblePanelCount)return;const e=this.visiblePanelsCore[this.currentIndex];this.tabbedMenu.renderedActions.forEach((t=>{const s=t.panelId===e.id;t.pressed=s,t.disableHide=s,"popup"===t.mode&&t.disableHide&&t.raiseUpdate()}))}updateTabToolbar(){if(!this.isRenderModeTab)return;const e=[],t=this.visiblePanelsCore;for(let s=0;se.push(this.createTabByPanel(t[s],s))));this.tabbedMenu.setItems(e)}addTabFromToolbar(e,t){if(!this.isRenderModeTab)return;const s=this.createTabByPanel(e,t);this.tabbedMenu.actions.splice(t,0,s),this.updateTabToolbarItemsPressedState()}removeTabFromToolbar(e){if(!this.isRenderModeTab)return;const t=this.tabbedMenu.actions.find((t=>t.panelId==e.id));t&&(this.tabbedMenu.actions.splice(this.tabbedMenu.actions.indexOf(t),1),this.updateTabToolbarItemsPressedState())}get showLegacyNavigation(){return!this.isDefaultV2Theme}get showNavigation(){return(!this.isReadOnly||1!=this.visiblePanelCount)&&(this.visiblePanelCount>0&&!this.showLegacyNavigation&&!!this.cssClasses.footer)}showSeparator(e){return this.isRenderModeList&&e{t.fireCallback(t.renderModeChangedCallback),t.updatePanelView()}})],kn.prototype,"displayMode",void 0),ft([pe({onSet:(e,t)=>{t.fireCallback(t.currentIndexChangedCallback)}})],kn.prototype,"showProgressBar",void 0),ft([pe({onSet:(e,t)=>{}})],kn.prototype,"progressBarLocation",void 0),ft([pe({defaultValue:!1,onSet:(e,t)=>{t.updateFooterActions()}})],kn.prototype,"legacyNavigation",void 0),Ie.addClass("paneldynamic",[{name:"showCommentArea:switch",layout:"row",visible:!0,category:"general"},{name:"templateElements",alternativeName:"questions",baseClassName:"question",visible:!1,isLightSerializable:!1},{name:"templateTitle:text",serializationProperty:"locTemplateTitle"},{name:"templateTabTitle",serializationProperty:"locTemplateTabTitle",visibleIf:e=>"tab"===e.displayMode},{name:"tabTitlePlaceholder",serializationProperty:"locTabTitlePlaceholder",visibleIf:e=>"tab"===e.displayMode},{name:"templateDescription:text",serializationProperty:"locTemplateDescription"},{name:"minWidth",defaultFunc:()=>"auto"},{name:"noEntriesText:text",serializationProperty:"locNoEntriesText"},{name:"allowAddPanel:boolean",default:!0},{name:"allowRemovePanel:boolean",default:!0},{name:"newPanelPosition",choices:["next","last"],default:"last",category:"layout"},{name:"panelCount:number",isBindable:!0,default:0,choices:[0,1,2,3,4,5,6,7,8,9,10]},{name:"minPanelCount:number",default:0,minValue:0},{name:"maxPanelCount:number",defaultFunc:()=>Ps.panel.maxPanelCount},"defaultPanelValue:panelvalue",{name:"copyDefaultValueFromLastEntry:boolean",alternativeName:"defaultValueFromLastPanel"},{name:"panelsState",default:"default",choices:["default","collapsed","expanded","firstExpanded"],visibleIf:e=>"list"===e.displayMode},{name:"keyName"},{name:"keyDuplicationError",serializationProperty:"locKeyDuplicationError"},{name:"confirmDelete:boolean"},{name:"confirmDeleteText",serializationProperty:"locConfirmDeleteText",visibleIf:e=>e.confirmDelete},{name:"addPanelText",alternativeName:"panelAddText",serializationProperty:"locAddPanelText",visibleIf:e=>e.allowAddPanel},{name:"removePanelText",alternativeName:"panelRemoveText",serializationProperty:"locRemovePanelText",visibleIf:e=>e.allowRemovePanel},{name:"prevPanelText",alternativeName:"panelPrevText",serializationProperty:"locPrevPanelText",visibleIf:e=>"list"!==e.displayMode},{name:"nextPanelText",alternativeName:"panelNextText",serializationProperty:"locNextPanelText",visibleIf:e=>"list"!==e.displayMode},{name:"showQuestionNumbers",default:"off",choices:["off","onPanel","onSurvey"]},{name:"renderMode",visible:!1,isSerializable:!1},{name:"displayMode",default:"list",choices:["list","carousel","tab"]},{name:"showProgressBar:boolean",alternativeName:"showRangeInProgress",default:!0,visibleIf:e=>"carousel"===e.displayMode},{name:"progressBarLocation",default:"top",choices:["top","bottom","topBottom"],visibleIf:e=>e.showProgressBar&&"carousel"===e.displayMode},{name:"tabAlign",default:"center",choices:["left","center","right"],visibleIf:e=>"tab"===e.displayMode},{name:"templateQuestionTitleLocation",alternativeName:"questionTitleLocation",default:"default",choices:["default","top","bottom","left"]},{name:"templateErrorLocation",default:"default",choices:["default","top","bottom"]},{name:"templateVisibleIf:expression",category:"logic"},{name:"removePanelButtonLocation",alternativeName:"panelRemoveButtonLocation",default:"bottom",choices:["bottom","right"],visibleIf:e=>e.allowRemovePanel}],(function(){return new kn("")}),"question"),wi.Instance.registerQuestion("paneldynamic",(e=>new kn(e)));class Dn{static getProgressTextInBarCss(e){return(new Ct).append(e.progressText).append(e.progressTextInBar).toString()}static getProgressTextUnderBarCss(e){return(new Ct).append(e.progressText).append(e.progressTextUnderBar).toString()}}class Ln extends pt{static get operators(){return null!=Ln.operatorsValue||(Ln.operatorsValue={empty:function(e,t){return!e},notempty:function(e,t){return!!e},equal:function(e,t){return e==t},notequal:function(e,t){return e!=t},contains:function(e,t){return e&&e.indexOf&&e.indexOf(t)>-1},notcontains:function(e,t){return!e||!e.indexOf||-1==e.indexOf(t)},greater:function(e,t){return e>t},less:function(e,t){return e=t},lessorequal:function(e,t){return e<=t}}),Ln.operatorsValue}constructor(){super(),this.idValue=Ln.idCounter++,this.registerPropertyChangedHandlers(["operator","value","name"],(()=>{this.oldPropertiesChanged()})),this.registerPropertyChangedHandlers(["expression"],(()=>{this.onExpressionChanged()}))}get id(){return this.idValue}getType(){return"triggerbase"}toString(){var e=this.getType().replace("trigger",""),t=this.expression?this.expression:this.buildExpression();return t&&(e+=", "+t),e}get isInternal(){return!0===this.isGhost}get operator(){return this.getPropertyValue("operator","equal")}set operator(e){e&&(e=e.toLowerCase(),Ln.operators[e]&&this.setPropertyValue("operator",e))}get value(){return this.getPropertyValue("value",null)}set value(e){this.setPropertyValue("value",e)}get name(){return this.getPropertyValue("name","")}set name(e){this.setPropertyValue("name",e)}get expression(){return this.getPropertyValue("expression","")}set expression(e){this.setPropertyValue("expression",e)}canBeExecuted(e){return!0}canBeExecutedOnComplete(){return!1}checkExpression(e){this.isExecutingOnNextPage=e.isOnNextPage,this.isExecutingOnNavigation=e.isOnNavigation||e.isOnNextPage,this.canBeExecuted(e.isOnNextPage)&&(e.isOnComplete&&!this.canBeExecutedOnComplete()||this.isCheckRequired(e.keys)&&(this.conditionRunner?this.perform(e.values,e.properties||null):this.canSuccessOnEmptyExpression()&&this.triggerResult(!0,e.values,e.properties||null)))}canSuccessOnEmptyExpression(){return!1}check(e){Ln.operators[this.operator](e,this.value)?this.onSuccess({},null):this.onFailure()}get requireValidQuestion(){return!1}perform(e,t){this.conditionRunner.onRunComplete=s=>{this.triggerResult(s,e,t)},this.conditionRunner.run(e,t)}triggerResult(e,t,s){e?(this.onSuccess(t,s),this.onSuccessExecuted()):this.onFailure()}onSuccess(e,t){}onFailure(){}onSuccessExecuted(){}endLoadingFromJson(){super.endLoadingFromJson(),this.oldPropertiesChanged()}oldPropertiesChanged(){this.onExpressionChanged()}onExpressionChanged(){this.conditionRunner=null}buildExpression(){return this.name?this.isValueEmpty(this.value)&&this.isRequireValue?"":"{"+this.name+"} "+this.operator+" "+et.toOperandString(this.value):""}isCheckRequired(e){return!!e&&(this.createConditionRunner(),!(!this.conditionRunner||!0!==this.conditionRunner.hasFunction())||(new Re).isAnyKeyChanged(e,this.getUsedVariables()))}getUsedVariables(){if(!this.conditionRunner)return[];const e=this.conditionRunner.getVariables();if(Array.isArray(e)){const t="-unwrapped";for(let s=e.length-1;s>=0;s--){const i=e[s];i.endsWith(t)&&e.push(i.substring(0,i.length-t.length))}}return e}createConditionRunner(){if(!this.conditionRunner){var e=this.expression;e||(e=this.buildExpression()),e&&(this.conditionRunner=new lt(e))}}get isRequireValue(){return"empty"!==this.operator&&"notempty"!=this.operator}}Ln.idCounter=1,Ln.operatorsValue=null;class An extends Ln{constructor(){super(),this.ownerValue=null}get owner(){return this.ownerValue}setOwner(e){this.ownerValue=e}getSurvey(e=!1){return this.owner&&this.owner.getSurvey?this.owner.getSurvey():null}isRealExecution(){return!0}onSuccessExecuted(){this.owner&&this.isRealExecution()&&this.owner.triggerExecuted(this)}}class jn extends An{constructor(){super(),this.pages=[],this.questions=[]}getType(){return"visibletrigger"}onSuccess(e,t){this.onTrigger(this.onItemSuccess)}onFailure(){this.onTrigger(this.onItemFailure)}onTrigger(e){if(this.owner)for(var t=this.owner.getObjects(this.pages,this.questions),s=0;s{this.onCompleteRunExpression(e)},s.run(e,t))}}onCompleteRunExpression(e){this.setToName&&void 0!==e&&this.owner.setTriggerValue(this.setToName,ue.convertValToQuestionVal(e),!1)}}class Fn extends An{constructor(){super()}canBeExecuted(e){return!e&&!!this.setToName&&!!this.fromName}get setToName(){return this.getPropertyValue("setToName","")}set setToName(e){this.setPropertyValue("setToName",e)}get fromName(){return this.getPropertyValue("fromName","")}set fromName(e){this.setPropertyValue("fromName",e)}get copyDisplayValue(){return this.getPropertyValue("copyDisplayValue")}set copyDisplayValue(e){this.setPropertyValue("copyDisplayValue",e)}getType(){return"copyvaluetrigger"}onSuccess(e,t){this.setToName&&this.owner&&this.owner.copyTriggerValue(this.setToName,this.fromName,this.copyDisplayValue)}canSuccessOnEmptyExpression(){return!0}getUsedVariables(){const e=super.getUsedVariables();return 0===e.length&&this.fromName&&e.push(this.fromName),e}}Ie.addClass("trigger",[{name:"operator",default:"equal",visible:!1},{name:"value",visible:!1},"expression:condition"]),Ie.addClass("surveytrigger",[{name:"name",visible:!1}],null,"trigger"),Ie.addClass("visibletrigger",["pages:pages","questions:questions"],(function(){return new jn}),"surveytrigger"),Ie.addClass("completetrigger",[],(function(){return new On}),"surveytrigger"),Ie.addClass("setvaluetrigger",[{name:"!setToName:questionvalue"},{name:"setValue:triggervalue",dependsOn:"setToName",visibleIf:function(e){return!!e&&!!e.setToName}},{name:"isVariable:boolean",visible:!1}],(function(){return new qn}),"surveytrigger"),Ie.addClass("copyvaluetrigger",[{name:"!fromName:questionvalue"},{name:"!setToName:questionvalue"},{name:"copyDisplayValue:boolean",visible:!1}],(function(){return new Fn}),"surveytrigger"),Ie.addClass("skiptrigger",[{name:"!gotoName:question"}],(function(){return new Nn}),"surveytrigger"),Ie.addClass("runexpressiontrigger",[{name:"setToName:questionvalue"},"runExpression:expression"],(function(){return new Mn}),"surveytrigger");ft([pe()],class extends pt{constructor(e,t=null){super(),this.closeOnCompleteTimeout=0,this.surveyValue=t||this.createSurvey(e),this.surveyValue.fitToContainer=!0,this.windowElement=oe.createElement("div"),this.survey.onComplete.add(((e,t)=>{this.onSurveyComplete()})),this.registerPropertyChangedHandlers(["isShowing"],(()=>{this.showingChangedCallback&&this.showingChangedCallback()})),this.registerPropertyChangedHandlers(["isExpanded"],(()=>{this.onExpandedChanged()})),this.width=new ct((()=>this.survey.width)),this.width=this.survey.width,this.updateCss(),this.onCreating()}onCreating(){}getType(){return"popupsurvey"}get survey(){return this.surveyValue}get isShowing(){return this.getPropertyValue("isShowing",!1)}set isShowing(e){this.setPropertyValue("isShowing",e)}get isFullScreen(){return this.getPropertyValue("isFullScreen",!1)}set isFullScreen(e){!this.isExpanded&&e&&(this.isExpanded=!0),this.setPropertyValue("isFullScreen",e),this.setCssRoot()}show(){this.isShowing=!0}hide(){this.isShowing=!1}toggleFullScreen(){this.isFullScreen=!this.isFullScreen}get isExpanded(){return this.getPropertyValue("isExpanded",!1)}set isExpanded(e){this.isFullScreen&&!e&&(this.isFullScreen=!1),this.setPropertyValue("isExpanded",e)}get isCollapsed(){return!this.isExpanded}onExpandedChanged(){this.expandedChangedCallback&&this.expandedChangedCallback(),this.updateCssButton()}get title(){return this.survey.title}set title(e){this.survey.title=e}get locTitle(){return this.survey.locTitle.isEmpty?null:this.survey.locTitle}get locDescription(){return this.survey.locTitle.isEmpty?null:this.survey.locDescription}expand(){this.isExpanded=!0}collapse(){this.isExpanded=!1}changeExpandCollapse(){this.isExpanded=!this.isExpanded}get allowClose(){return this.getPropertyValue("allowClose",!1)}set allowClose(e){this.setPropertyValue("allowClose",e)}get allowFullScreen(){return this.getPropertyValue("allowFullScreen",!1)}set allowFullScreen(e){this.setPropertyValue("allowFullScreen",e)}get css(){return this.survey.css}get cssButton(){return this.getPropertyValue("cssButton","")}get cssRoot(){let e=this.getPropertyValue("cssRoot","");return this.isCollapsed&&(e+=" "+this.getPropertyValue("cssRootCollapsedMod","")),e}get cssRootCollapsedMod(){return this.getPropertyValue("cssRootCollapsedMod")}get cssRootContent(){return this.getPropertyValue("cssRootContent")}get cssBody(){return this.getPropertyValue("cssBody","")}get cssHeaderRoot(){return this.getPropertyValue("cssHeaderRoot","")}get cssHeaderTitleCollapsed(){return this.getPropertyValue("cssHeaderTitleCollapsed","")}get cssHeaderButtonsContainer(){return this.getPropertyValue("cssHeaderButtonsContainer","")}get cssHeaderCollapseButton(){return this.getPropertyValue("cssHeaderCollapseButton","")}get cssHeaderCloseButton(){return this.getPropertyValue("cssHeaderCloseButton","")}get cssHeaderFullScreenButton(){return this.getPropertyValue("cssHeaderFullScreenButton","")}get renderedWidth(){let e=this.getPropertyValue("width","60%");return e&&!isNaN(e)&&(e+="px"),e}updateCss(){if(!this.css||!this.css.window)return;const e=this.css.window;this.setCssRoot(),this.setPropertyValue("cssRootCollapsedMod",e.rootCollapsedMod),this.setPropertyValue("cssRootContent",e.rootContent),this.setPropertyValue("cssBody",e.body);const t=e.header;t&&(this.setPropertyValue("cssHeaderRoot",t.root),this.setPropertyValue("cssHeaderTitleCollapsed",t.titleCollapsed),this.setPropertyValue("cssHeaderButtonsContainer",t.buttonsContainer),this.setPropertyValue("cssHeaderCollapseButton",t.collapseButton),this.setPropertyValue("cssHeaderCloseButton",t.closeButton),this.setPropertyValue("cssHeaderFullScreenButton",t.fullScreenButton),this.updateCssButton())}setCssRoot(){const e=this.css.window;this.isFullScreen?this.setPropertyValue("cssRoot",e.root+" "+e.rootFullScreenMode):this.setPropertyValue("cssRoot",e.root)}updateCssButton(){const e=this.css.window?this.css.window.header:null;e&&this.setCssButton(this.isExpanded?e.buttonExpanded:e.buttonCollapsed)}setCssButton(e){e&&this.setPropertyValue("cssButton",e)}createSurvey(e){return new mr(e)}onSurveyComplete(){if(!(this.closeOnCompleteTimeout<0))if(0==this.closeOnCompleteTimeout)this.hide();else{var e=this,t=null;t=setInterval((function(){e.hide(),clearInterval(t)}),1e3*this.closeOnCompleteTimeout)}}onScroll(){this.survey.onScroll()}}.prototype,"width",void 0);class Bn{constructor(){this._lockScroll=!1}setRootElement(e){this._containerElementValue=null==e?void 0:e.querySelector(".sv-scroll__scroller"),this._scrollbarElement=null==e?void 0:e.querySelector(".sv-scroll__scrollbar"),this._scrollbarSizerElement=null==e?void 0:e.querySelector(".sv-scroll__scrollbar-sizer"),this._containerBodyElement=null==e?void 0:e.querySelector(".sv-scroll__container"),e&&(this._containerBodyResizeObserver=new ResizeObserver((e=>{for(let t of e){const e=t.contentBoxSize?t.contentBoxSize[0].blockSize:t.contentRect.width;this._scrollbarSizerElement.style.height=e+"px"}})),this._containerBodyResizeObserver.observe(this._containerBodyElement))}onScrollContainer(){this._lockScroll=!0,this._scrollbarElement.scrollTop=this._containerElementValue.scrollTop}onScrollScrollbar(){this._lockScroll?this._lockScroll=!1:this._containerElementValue.scrollTop=this._scrollbarElement.scrollTop}unsubscribeRootElement(){this._containerBodyResizeObserver&&(this._containerBodyResizeObserver.disconnect(),this._containerBodyResizeObserver=void 0)}}const zn='input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled):not([readonly]),textarea:not(:disabled):not([readonly]), button:not(:disabled):not([readonly]), [tabindex]:not([tabindex^="-"])';class Hn extends pt{updateIsVisible(e){this._isVisible=e,this.onVisibilityChanged.fire(this,{isVisible:e})}updateBeforeShowing(){this.model.onShow()}updateAfterHiding(){this.model.onHiding()}getLeaveOptions(){return{cssClass:"sv-popup--leave",onBeforeRunAnimation:e=>{e.setAttribute("inert","")},onAfterRunAnimation:e=>e.removeAttribute("inert")}}getEnterOptions(){return{cssClass:"sv-popup--enter"}}getAnimatedElement(){return this.getAnimationContainer()}isAnimationEnabled(){return"overlay"!==this.model.displayMode&&Ps.animationEnabled}getRerenderEvent(){return this.onElementRerendered}getAnimationContainer(){var e;return null===(e=this.container)||void 0===e?void 0:e.querySelector(this.fixedPopupContainer)}get isVisible(){return this._isVisible}set isVisible(e){this.visibilityAnimation.sync(e)}get container(){return this.containerElement||this.createdContainer}getLocale(){return this.locale?this.locale:super.getLocale()}hidePopup(){this.model.isVisible=!1}getStyleClass(){return(new Ct).append(this.model.cssClass)}getShowFooter(){return this.isOverlay}getShowHeader(){return!1}getPopupHeaderTemplate(){}createFooterActionBar(){this.footerToolbarValue=new xt}resetDimensionsAndPositionStyleProperties(){this.top="",this.left="",this.height="",this.width="",this.minWidth=""}onModelChanging(e){}setupModel(e){this.model&&this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback),this.onModelChanging(e),this._model=e,e.onVisibilityChanged.add(this.onModelIsVisibleChangedCallback),this.onModelIsVisibleChangedCallback()}get model(){return this._model}set model(e){this.setupModel(e)}constructor(e){super(),this.popupSelector=".sv-popup",this.fixedPopupContainer=".sv-popup",this.containerSelector=".sv-popup__container",this.scrollingContentSelector=".sv-popup__scrolling-content",this.visibilityAnimation=new Wt(this,(e=>{this._isVisible!==e&&(e?(this.updateBeforeShowing(),this.updateIsVisible(e)):(this.updateOnHiding(),this.updateIsVisible(e),this.updateAfterHiding(),this._isPositionSetValue=!1))}),(()=>this._isVisible)),this.onVisibilityChanged=new vt,this.onModelIsVisibleChangedCallback=()=>{this.isVisible=this.model.isVisible},this._isPositionSetValue=!1,this.model=e,this.locale=this.model.locale}get title(){return this.model.title}get contentComponentName(){return this.model.contentComponentName}get contentComponentData(){return this.model.contentComponentData}get isModal(){return this.model.isModal}get isFocusedContent(){return this.model.isFocusedContent}get isFocusedContainer(){return this.model.isFocusedContainer}get showFooter(){return this.getShowFooter()}get showHeader(){return this.getShowHeader()}get popupHeaderTemplate(){return this.getPopupHeaderTemplate()}get isOverlay(){return"overlay"===this.model.displayMode}get styleClass(){return this.getStyleClass().toString()}get cancelButtonText(){return this.getLocalizationString("modalCancelButtonText")}get footerToolbar(){return this.footerToolbarValue||this.createFooterActionBar(),this.footerToolbarValue}onKeyDown(e){"Tab"===e.key||9===e.keyCode?this.trapFocus(e):"Escape"!==e.key&&27!==e.keyCode||this.hidePopup()}trapFocus(e){const t=this.container.querySelectorAll(zn),s=t[0],i=t[t.length-1];e.shiftKey?Ps.environment.root.activeElement===s&&(i.focus(),e.preventDefault()):Ps.environment.root.activeElement===i&&(s.focus(),e.preventDefault())}switchFocus(){this.isFocusedContent?this.focusFirstInput():this.isFocusedContainer&&this.focusContainer()}get isPositionSet(){return this._isPositionSetValue}updateOnShowing(){this.prevActiveElement=Ps.environment.root.activeElement,this.isOverlay&&this.resetDimensionsAndPositionStyleProperties(),this.switchFocus(),this._isPositionSetValue=!0}updateOnHiding(){this.isFocusedContent&&this.prevActiveElement&&this.prevActiveElement.focus({preventScroll:!0})}focusContainer(){if(!this.container)return;const e=this.container.querySelector(this.popupSelector);null==e||e.focus()}focusFirstInput(){setTimeout((()=>{if(this.container){var e=this.container.querySelector(this.model.focusFirstInputSelector||zn);e?e.focus():this.focusContainer()}}),100)}clickOutside(e){this.hidePopup(),null==e||e.stopPropagation()}cancel(){this.model.onCancel(),this.hidePopup()}dispose(){super.dispose(),this.model&&this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback),this.createdContainer&&(this.createdContainer.remove(),this.createdContainer=void 0),this.footerToolbarValue&&this.footerToolbarValue.dispose(),this.resetComponentElement()}initializePopupContainer(){if(!this.container){const e=oe.createElement("div");this.createdContainer=e,(e=>{const{root:t}=Ps.environment;return"string"==typeof e?t.getElementById(e):e})(Ps.environment.popupMountContainer).appendChild(e)}}setComponentElement(e){e&&(this.containerElement=e)}resetComponentElement(){this.containerElement=void 0,this.prevActiveElement=void 0}preventScrollOuside(e,t){let s=e.target;for(;s!==this.container;){if("auto"===oe.getComputedStyle(s).overflowY&&s.scrollHeight!==s.offsetHeight){const{scrollHeight:e,scrollTop:i,clientHeight:r}=s;if(!(t>0&&Math.abs(e-r-i)<1||t<0&&i<=0))return}s=s.parentElement}e.cancelable&&e.preventDefault()}}ft([pe({defaultValue:"0px"})],Hn.prototype,"top",void 0),ft([pe({defaultValue:"0px"})],Hn.prototype,"left",void 0),ft([pe({defaultValue:"auto"})],Hn.prototype,"height",void 0),ft([pe({defaultValue:"auto"})],Hn.prototype,"width",void 0),ft([pe({defaultValue:"auto"})],Hn.prototype,"minWidth",void 0),ft([pe({defaultValue:!1})],Hn.prototype,"_isVisible",void 0),ft([pe()],Hn.prototype,"locale",void 0);class Qn{constructor(e,t,s,i){this.x=e,this.y=t,this.width=s,this.height=i}get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}}class Wn{static calculatePosition(e,t,s,i,r,n="flex"){let a=e.left,o=e.top;return"flex"===n&&(a="center"==r?(e.left+e.right-s)/2:"left"==r?e.left-s:e.right),o="middle"==i?(e.top+e.bottom-t)/2:"top"==i?e.top-t:e.bottom,"center"!=r&&"middle"!=i&&("top"==i?o+=e.height:o-=e.height),{left:Math.round(a),top:Math.round(o)}}static getCorrectedVerticalDimensions(e,t,s,i,r=!0,n={top:0,bottom:0}){let a;const o=s-Wn.bottomIndent;if("top"===i&&(a={height:t,top:e}),e<-n.top)a={height:r?t+e:t,top:-n.top};else if(t+e>s){let s=Math.min(t,o-e);a={height:r?s:t,top:r?e:e-(t-s)}}return a&&(a.height=Math.min(a.height,o),a.top=Math.max(a.top,-n.top)),a}static updateHorizontalDimensions(e,t,s,i,r="flex",n={left:0,right:0}){t+=n.left+n.right;let a,o=e;return"center"===i&&("fixed"===r?(e+t>s&&(a=s-e),o-=n.left):e<0?(o=n.left,a=Math.min(t,s)):t+e>s&&(o=s-t,o=Math.max(o,n.left),a=Math.min(t,s))),"left"===i&&e<0&&(o=n.left,a=Math.min(t,s)),"right"===i&&t+e>s&&(a=s-e),{width:a-n.left-n.right,left:o}}static updateVerticalPosition(e,t,s,i,r){if("middle"===i)return i;let n=t-(e.top+("center"!==s?e.height:0)),a=t+e.bottom-("center"!==s?e.height:0)-r;return n>0&&a<=0&&"top"==i?i="bottom":a>0&&n<=0&&"bottom"==i?i="top":a>0&&n>0&&(i=n0&&n<=0&&"left"==s?s="right":n>0&&r<=0&&"right"==s?s="left":n>0&&r>0&&(s=r{this.footerToolbarValue.actions.forEach((e=>e.cssClasses={item:"sd-action sv-menu-popup__button"}))},this.footerToolbar.containerCss="sv-menu-footer-action-bar";let e=[{id:"cancel",visibleIndex:10,title:this.cancelButtonText,innerCss:"sv-popup__button--cancel",action:()=>{this.cancel()}}];e=this.model.updateFooterActions(e),this.footerToolbarValue.setItems(e)}getAvailableAreaRect(){const e=this.model.getAreaCallback?this.model.getAreaCallback(this.container):void 0;if(e){const t=e.getBoundingClientRect();return new Qn(t.x,t.y,t.width,t.height)}return new Qn(0,0,ae.getInnerWidth(),ae.getInnerHeight())}getTargetElementRect(e){const t=this.container;let s=this.model.getTargetCallback?this.model.getTargetCallback(t):void 0;if(t&&t.parentElement&&!this.isModal&&!s&&(s=t.parentElement),!s)return null;const i=s.getBoundingClientRect();return new Qn(i.left-e.left,i.top-e.top,i.width,i.height)}_updatePosition(){var e,t,s;const i=this.getAvailableAreaRect(),r=this.getTargetElementRect(i);if(!r)return;const n=null===(e=this.container)||void 0===e?void 0:e.querySelector(this.containerSelector);if(!n)return;const a=null===(t=this.container)||void 0===t?void 0:t.querySelector(this.fixedPopupContainer),o=n.querySelector(this.scrollingContentSelector),l=oe.getComputedStyle(n),u=parseFloat(l.marginLeft)||0,d=parseFloat(l.marginRight)||0,h=parseFloat(l.marginTop)||0,c=parseFloat(l.marginBottom)||0;let p=n.offsetHeight-o.offsetHeight+o.scrollHeight;const m=n.getBoundingClientRect().width;this.model.setWidthByTarget&&(this.minWidth=r.width+"px");let g=this.model.verticalPosition,v=this.getActualHorizontalPosition();if(ae.isAvailable()){const e=[p,.9*ae.getInnerHeight(),null===(s=ae.getVisualViewport())||void 0===s?void 0:s.height];p=Math.ceil(Math.min(...e.filter((e=>"number"==typeof e)))),g=Wn.updateVerticalPosition(r,p,this.model.horizontalPosition,this.model.verticalPosition,i.height),v=Wn.updateHorizontalPosition(r,m,v,i.width)}this.popupDirection=Wn.calculatePopupDirection(g,v);const f=Wn.calculatePosition(r,p,m+u+d,g,v,this.model.positionMode);if(ae.isAvailable()){const e=Wn.getCorrectedVerticalDimensions(f.top,p,i.height,g,this.model.canShrink,{top:h,bottom:c});if(e&&(this.height=e.height+"px",f.top=e.top),this.model.setWidthByTarget)this.width=r.width+"px",f.left=r.left;else{const e=Wn.updateHorizontalDimensions(f.left,m,ae.getInnerWidth(),v,this.model.positionMode,{left:u,right:d});e&&(this.width=e.width?e.width+"px":void 0,f.left=e.left)}}if(a){const e=a.getBoundingClientRect();f.top-=e.top,f.left-=e.left}this.showHeader&&(this.pointerTarget=Wn.calculatePointerTarget(r,f.top,f.left,g,v,u,d),this.pointerTarget.top+="px",this.pointerTarget.left+="px"),f.left+=i.left,f.top+=i.top,this.left=f.left+"px",this.top=f.top+"px"}getActualHorizontalPosition(){let e=this.model.horizontalPosition;if(oe.isAvailable()){"rtl"==oe.getComputedStyle(oe.getBody()).direction&&("left"===this.model.horizontalPosition?e="right":"right"===this.model.horizontalPosition&&(e="left"))}return e}getStyleClass(){const e=this.model.getDisplayMode();return super.getStyleClass().append("sv-popup--menu-phone","menu-overlay"===e).append("sv-popup--menu-tablet","menu-popup-overlay"===e).append("sv-popup--menu-popup","menu-popup"===e).append("sv-popup--show-pointer","menu-popup"===e&&this.showHeader).append(`sv-popup--${this.popupDirection}`,"menu-popup"===e&&(this.showHeader||"top"==this.popupDirection||"bottom"==this.popupDirection))}getShowHeader(){return this.model.showPointer&&!this.isOverlay}getPopupHeaderTemplate(){return"popup-pointer"}constructor(e){super(e),this.scrollEventCallBack=e=>{if(this.isOverlay&&Dt)return e.stopPropagation(),void e.preventDefault();this.hidePopup()},this.resizeEventCallback=()=>{if(!ae.isAvailable())return;const e=ae.getVisualViewport(),t=oe.getDocumentElement();t&&e&&t.style.setProperty("--sv-popup-overlay-height",e.height*e.scale+"px")},this.resizeWindowCallback=()=>{this.isOverlay||this.updatePosition(!0,"vue"===mr.platform||"vue3"===mr.platform||"react"==mr.platform||"js-ui"==mr.platform)},this.clientY=0,this.touchStartEventCallback=e=>{this.clientY=e.touches[0].clientY},this.touchMoveEventCallback=e=>{this.preventScrollOuside(e,this.clientY-e.changedTouches[0].clientY)},this.model.onRecalculatePosition.add(this.recalculatePositionHandler)}setComponentElement(e){super.setComponentElement(e)}resetComponentElement(){super.resetComponentElement()}updateOnShowing(){const{root:e}=Ps.environment;this.prevActiveElement=e.activeElement,this.isOverlay?this.resetDimensionsAndPositionStyleProperties():this.updatePosition(!0,!1),this.switchFocus(),ae.addEventListener("resize",this.resizeWindowCallback),this.shouldCreateResizeCallback&&(ae.getVisualViewport().addEventListener("resize",this.resizeEventCallback),this.container&&(this.container.addEventListener("touchstart",this.touchStartEventCallback),this.container.addEventListener("touchmove",this.touchMoveEventCallback)),this.resizeEventCallback()),ae.addEventListener("scroll",this.scrollEventCallBack),this._isPositionSetValue=!0}get shouldCreateResizeCallback(){return!!ae.getVisualViewport()&&this.isOverlay&&Dt}updatePosition(e,t=!0){e&&(this.height="auto"),t?setTimeout((()=>{this._updatePosition()}),1):this._updatePosition()}updateOnHiding(){super.updateOnHiding(),ae.removeEventListener("resize",this.resizeWindowCallback),this.shouldCreateResizeCallback&&(ae.getVisualViewport().removeEventListener("resize",this.resizeEventCallback),this.container&&(this.container.removeEventListener("touchstart",this.touchStartEventCallback),this.container.removeEventListener("touchmove",this.touchMoveEventCallback))),ae.removeEventListener("scroll",this.scrollEventCallBack),this.isDisposed||(this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.minWidth=void 0)}onModelChanging(e){this.model&&this.model.onRecalculatePosition.remove(this.recalculatePositionHandler),this.recalculatePositionHandler||(this.recalculatePositionHandler=(e,t)=>{this.isOverlay||this.updatePosition(t.isResetHeight)}),super.onModelChanging(e),e.onRecalculatePosition.add(this.recalculatePositionHandler)}dispose(){super.dispose(),this.updateOnHiding(),this.model&&(this.model.onRecalculatePosition.remove(this.recalculatePositionHandler),this.recalculatePositionHandler=void 0),this.resetComponentElement()}}Un.tabletSizeBreakpoint=600,ft([pe({defaultValue:"left"})],Un.prototype,"popupDirection",void 0),ft([pe({defaultValue:{left:"0px",top:"0px"}})],Un.prototype,"pointerTarget",void 0);class Gn extends Hn{getStyleClass(){const e=this.model.getDisplayMode();return super.getStyleClass().append("sv-popup--modal-popup","modal-popup"===e).append("sv-popup--modal-overlay","modal-overlay"===e)}getShowFooter(){return!0}createFooterActionBar(){super.createFooterActionBar(),this.footerToolbar.updateCallback=e=>{this.footerToolbarValue.actions.forEach((e=>e.cssClasses={item:"sv-popup__body-footer-item sv-popup__button sv-modal-popup__button sd-btn sd-btn--small"}))},this.footerToolbar.containerCss="sv-modal-footer-action-bar";let e=[{id:"cancel",visibleIndex:10,title:this.cancelButtonText,innerCss:"sv-popup__button--cancel",action:()=>{this.cancel()}},{id:"apply",visibleIndex:20,title:this.applyButtonText,innerCss:"sv-popup__button--apply sd-btn--action",action:()=>{this.apply()}}];e=this.model.updateFooterActions(e),this.footerToolbarValue.setItems(e)}constructor(e){super(e),this.onScrollOutsideCallback=e=>{this.preventScrollOuside(e,e.deltaY)}}get applyButtonText(){return this.getLocalizationString("modalApplyButtonText")}apply(){this.model.onApply&&!this.model.onApply()||this.hidePopup()}clickOutside(){}onKeyDown(e){"Escape"!==e.key&&27!==e.keyCode||this.model.onCancel(),super.onKeyDown(e)}updateOnShowing(){this.container&&this.container.addEventListener("wheel",this.onScrollOutsideCallback,{passive:!1}),super.updateOnShowing()}updateOnHiding(){this.container&&this.container.removeEventListener("wheel",this.onScrollOutsideCallback),super.updateOnHiding()}}class Zn extends ii{constructor(e,t=null,s="buttongroupitemvalue"){super(e,t,s),this.typeName=s}getType(){return this.typeName?this.typeName:"buttongroupitemvalue"}}ft([pe()],Zn.prototype,"iconName",void 0),ft([pe()],Zn.prototype,"iconSize",void 0),ft([pe()],Zn.prototype,"showCaption",void 0);class Jn extends fr{constructor(e){super(e)}getType(){return"buttongroup"}getItemValueType(){return"buttongroupitemvalue"}supportOther(){return!1}}Ie.addClass("buttongroup",[{name:"choices:buttongroupitemvalue[]"}],(function(){return new Jn("")}),"checkboxbase"),Ie.addClass("buttongroupitemvalue",[{name:"showCaption:boolean",default:!0},{name:"iconName:text"},{name:"iconSize:number"}],(e=>new Zn(e)),"itemvalue");class Kn extends pt{getSurvey(e=!1){return this.owner}getType(){return"masksettings"}setData(e){Ie.getProperties(this.getType()).forEach((t=>{const s=e[t.name];this[t.name]=void 0!==s?s:t.getDefaultValue(this)}))}getData(){const e={};return Ie.getProperties(this.getType()).forEach((t=>{const s=this[t.name];t.isDefaultValue(s)||(e[t.name]=s)})),e}processInput(e){return{value:e.prevValue,caretPosition:e.selectionEnd,cancelPreventDefault:!1}}getUnmaskedValue(e){return e}getMaskedValue(e){return e}getTextAlignment(){return"auto"}getTypeForExpressions(){return"text"}}function Xn(e){const t=[];let s=!1;const i=Object.keys(Ps.maskSettings.patternDefinitions);for(let r=0;r-s;t-=s)i.push(e.substring(t,t+s));i=i.reverse()}else for(let t=0;t=s&&r<=i)return!0;if(!t){if(e.hasDecimalSeparator||0==r){const t=Math.pow(.1,(e.fractionalPart||"").length);if(r>=0)return r+t>s&&r<=i;if(r<0)return r>=s&&r-t0){if(r+1>s&&r<=i)return!0;for(;e=10*e+9,t*=10,!(t>i);)if(e>s)return!0;return!1}if(r<0){if(r>=s&&r-1=0&&r<=i||r<0&&r>=s}return!1}return!0}parseNumber(e){const t={integralPart:"",fractionalPart:"",hasDecimalSeparator:!1,isNegative:!1},s=null==e?"":e.toString();let i=0;for(let e=0;e0&&(t.hasDecimalSeparator=!0);break;case this.thousandsSeparator:break;default:r.match(Sr)&&(t.hasDecimalSeparator?t.fractionalPart+=r:t.integralPart+=r)}}return t.isNegative=i%2!=0,t.integralPart.length>1&&"0"===t.integralPart[0]&&(t.integralPart=t.integralPart.slice(1)),t}getNumberMaskedValue(e,t=!1){const s=this.parseNumber(e);if(!this.validateNumber(s,t))return null;return this.displayNumber(s,!0,t)}getNumberUnmaskedValue(e){const t=this.parseNumber(e);if(!this.numericalCompositionIsEmpty(t))return this.convertNumber(t)}getTextAlignment(){return"right"}getMaskedValue(e){let t=null==e?"":e.toString();return t=t.replace(".",this.decimalSeparator),this.getNumberMaskedValue(t,!0)}getUnmaskedValue(e){return this.getNumberUnmaskedValue(e)}processInput(e){const t={value:e.prevValue,caretPosition:e.selectionEnd,cancelPreventDefault:!1},s=e.prevValue.slice(0,e.selectionStart)+(e.insertedChars||""),i=s+e.prevValue.slice(e.selectionEnd),r=this.parseNumber(i);if(!this.validateNumber(r,!1))return t;const n=this.getNumberMaskedValue(i),a=this.calccaretPosition(s,e,n);return t.value=n,t.caretPosition=a,t}getType(){return"numericmask"}isValueUndefined(e){return""===e||super.isValueUndefined(e)}}function sa(e,t){switch(e){case"hour":case"minute":case"second":case"day":case"month":return 2;case"timeMarker":case"year":return t;default:return 1}}ft([pe()],ta.prototype,"allowNegativeValues",void 0),ft([pe()],ta.prototype,"decimalSeparator",void 0),ft([pe()],ta.prototype,"precision",void 0),ft([pe()],ta.prototype,"thousandsSeparator",void 0),ft([pe()],ta.prototype,"min",void 0),ft([pe()],ta.prototype,"max",void 0),Ie.addClass("numericmask",[{name:"allowNegativeValues:boolean",default:!0},{name:"decimalSeparator",default:".",maxLength:1},{name:"thousandsSeparator",default:",",maxLength:1},{name:"precision:number",default:2,minValue:0},{name:"min:number"},{name:"max:number"}],(function(){return new ta}),"masksettings");class ia extends ea{constructor(){super(...arguments),this.defaultDate="1970-01-01T",this.turnOfTheCentury=68,this.twelve=12,this.lexems=[],this.inputDateTimeData=[],this.validBeginningOfNumbers={hour:1,hourU:2,minute:5,second:5,day:3,month:1}}get hasDatePart(){return this.lexems.some((e=>"day"===e.type||"month"===e.type||"year"===e.type))}get hasTimePart(){return this.lexems.some((e=>"hour"===e.type||"minute"===e.type||"second"===e.type))}get is12Hours(){return this.lexems.filter((e=>"hour"===e.type&&!e.upperCase)).length>0}getType(){return"datetimemask"}getTypeForExpressions(){return this.hasTimePart?"datetime-local":"datetime"}updateLiterals(){this.lexems=function(e){const t=[];let s;const i=(e,i,r=!1)=>{if(s&&s===e){t[t.length-1].count++;const s=sa(e,t[t.length-1].count);t[t.length-1].maxCount=s}else{const s=sa(e,1);t.push({type:e,value:i,count:1,maxCount:s,upperCase:r})}};for(let r=0;r{let i=this.inputDateTimeData[s];switch(i.isCompleted=!0,e.type){case"hour":this.is12Hours?i.value=((t.getHours()-1)%this.twelve+1).toString():i.value=t.getHours().toString();break;case"minute":i.value=t.getMinutes().toString();break;case"second":i.value=t.getSeconds().toString();break;case"timeMarker":{const s=t.getHours()>=this.twelve?"pm":"am";i.value=e.upperCase?s.toUpperCase():s;break}case"day":i.value=t.getDate().toString();break;case"month":i.value=(t.getMonth()+1).toString();break;case"year":{let s=t.getFullYear();2==e.count&&(s%=100),i.value=s.toString();break}}})),this.getFormatedString(!0)}initInputDateTimeData(){this.inputDateTimeData=[],this.lexems.forEach((e=>{this.inputDateTimeData.push({lexem:e,isCompleted:!1,value:void 0})}))}getISO_8601Format(e){const t=[],s=[];if(void 0!==e.year){const s=this.getPlaceholder(4,e.year.toString(),"0")+e.year;t.push(s)}if(void 0!==e.month&&void 0!==e.year){const s=this.getPlaceholder(2,e.month.toString(),"0")+e.month;t.push(s)}if(void 0!==e.day&&void 0!==e.month&&void 0!==e.year){const s=this.getPlaceholder(2,e.day.toString(),"0")+e.day;t.push(s)}if(void 0!==e.hour){const t=this.getPlaceholder(2,e.hour.toString(),"0")+e.hour;s.push(t)}if(void 0!==e.minute&&void 0!==e.hour){const t=this.getPlaceholder(2,e.minute.toString(),"0")+e.minute;s.push(t)}if(void 0!==e.second&&void 0!==e.minute&&void 0!==e.hour){const t=this.getPlaceholder(2,e.second.toString(),"0")+e.second;s.push(t)}const i=[];return t.length>0&&i.push(t.join("-")),s.length>1&&i.push(s.join(":")),i.join("T")}isYearValid(e){if(void 0===e.min&&void 0===e.max)return!1;const t=e.year.toString(),s=e.min.toISOString().slice(0,t.length),i=e.max.toISOString().slice(0,t.length);return e.year>=parseInt(s)&&e.year<=parseInt(i)}createIDateTimeCompositionWithDefaults(e,t){const s=29==e.day&&2==e.month;let i=e.min.getFullYear(),r=e.max.getFullYear();s&&(i=4*Math.ceil(i/4),r=4*Math.floor(r/4),i>r&&(i=void 0,r=void 0));const n=void 0!==e.year?e.year:t?r:i,a=void 0!==e.month?e.month:t&&this.hasDatePart?12:1;return{year:n,month:a,day:void 0!==e.day?e.day:t&&this.hasDatePart?this.getMaxDateForMonth(n,a):1,hour:void 0!==e.hour?e.hour:t?23:0,minute:void 0!==e.minute?e.minute:t?59:0,second:void 0!==e.second?e.second:t?59:0}}getMaxDateForMonth(e,t){return 2==t?e%4==0&&e%100!=0||e%400?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][t-1]}isDateValid(e){const t=new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(e,!1))),s=new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(e,!0)));return!isNaN(t)&&(t.getDate()===e.day||void 0===e.day)&&(t.getMonth()===e.month-1||void 0===e.month)&&(t.getFullYear()===e.year||void 0===e.year)&&s>=e.min&&t<=e.max}getPlaceholder(e,t,s){const i=e-(t||"").length;return i>0?s.repeat(i):""}isDateValid12(e){return this.is12Hours?!(this.is12Hours&&e.hour>this.twelve)&&(e.timeMarker?"p"===e.timeMarker[0].toLowerCase()?(e.hour!==this.twelve&&(e.hour+=this.twelve),this.isDateValid(e)):(e.hour===this.twelve&&(e.hour=0),this.isDateValid(e)):!!this.isDateValid(e)||(e.hour+=this.twelve,this.isDateValid(e))):this.isDateValid(e)}updateTimeMarkerInputDateTimeData(e,t){let s=e.value;if(!s)return;const i="timeMarker",r=Object.assign({},t);r[i]=s,this.isDateValid12(r)?e.isCompleted=!0:s=s.slice(0,s.length-1),e.value=s||void 0,t[i]=s||void 0}updateInputDateTimeData(e,t){let s=e.value;if(!s)return;const i=e.lexem.type,r=Object.assign({},t);if(r[i]=parseInt(this.parseTwoDigitYear(e)),s.length===e.lexem.maxCount){if(this.isDateValid12(r))return e.isCompleted=!0,e.value=s||void 0,void(t[i]=parseInt(s)>0?parseInt(s):void 0);s=s.slice(0,s.length-1)}r[i]=parseInt(s);const n=parseInt(s[0]),a=this.validBeginningOfNumbers[i+(e.lexem.upperCase?"U":"")];"year"!==i||this.isYearValid(r)?void 0!==a&&n>a?this.isDateValid12(r)?e.isCompleted=!0:s=s.slice(0,s.length-1):void 0!==a&&0!==n&&n<=a&&(this.checkValidationDateTimePart(r,i,e),e.isCompleted&&!this.isDateValid12(r)&&(s=s.slice(0,s.length-1))):(s=s.slice(0,s.length-1),e.isCompleted=!1),e.value=s||void 0,t[i]=parseInt(s)>0?parseInt(s):void 0}checkValidationDateTimePart(e,t,s){const i=e[t];let r=10*i,n=10;"month"===t&&(n=3),"hour"===t&&(n=this.is12Hours?3:5),s.isCompleted=!0;for(let i=0;i2)return t;this.max&&this.max.length>=4&&(this.turnOfTheCentury=parseInt(this.max.slice(2,4)));return(parseInt(t)>this.turnOfTheCentury?"19":"20")+t}getFormatedString(e){let t="",s="",i=!1,r=this.inputDateTimeData.length-1;if(!e){const e=this.inputDateTimeData.filter((e=>!!e.value));r=this.inputDateTimeData.indexOf(e[e.length-1])}for(let n=0;nn;t+=s+this.getCorrectDatePartFormat(a,o),i=a.isCompleted}break;case"separator":s=a.lexem.value}}return t}cleanTimeMarker(e,t){let s="";e=e.toUpperCase();for(let t=0;t{if(e.length>0&&t{"timeMarker"===e.lexem.type?this.updateTimeMarkerInputDateTimeData(e,r):this.updateInputDateTimeData(e,r)}));return this.getFormatedString(t)}getParts(e){const t=[],s=this.lexems.filter((e=>"separator"!==e.type)),i=this.lexems.filter((e=>"separator"===e.type)).map((e=>e.value));let r="",n=!1,a=!1;for(let o=0;o=s.length){n=!1;break}}return(""!=r||n)&&t.push(r),t}getUnmaskedValue(e){var t;let s=null==e?"":e.toString();const i=this.getParts(s);this.setInputDateTimeData(i);const r=null===(t=this.inputDateTimeData.filter((e=>"timeMarker"===e.lexem.type))[0])||void 0===t?void 0:t.value.toLowerCase()[0],n=this.createIDateTimeComposition();let a=!1;return this.inputDateTimeData.forEach((e=>{let t=e.value;if("timeMarker"==e.lexem.type||"separator"==e.lexem.type)return;if(!t||t.length!!e.pattern},{name:"max",type:"datetime",enableIf:e=>!!e.pattern}],(function(){return new ia}),"patternmask");class ra extends ta{getType(){return"currencymask"}wrapText(e){const t=this.prefix||"",s=this.suffix||"";let i=e;return i?(-1===i.indexOf(t)&&(i=t+i),-1===i.indexOf(s)&&(i+=s),i):i}unwrapInputArgs(e){let t=e.prevValue;if(t){if(this.prefix&&-1!==t.indexOf(this.prefix)){t=t.slice(t.indexOf(this.prefix)+this.prefix.length);const s=(this.prefix||"").length;e.selectionStart=Math.max(e.selectionStart-s,0),e.selectionEnd-=s}this.suffix&&-1!==t.indexOf(this.suffix)&&(t=t.slice(0,t.indexOf(this.suffix))),e.prevValue=t}}processInput(e){this.unwrapInputArgs(e);const t=super.processInput(e),s=(this.prefix||"").length;return t.value&&(t.caretPosition+=s),t.value=this.wrapText(t.value),t}getMaskedValue(e){const t=super.getMaskedValue(e);return this.wrapText(t)}}var na;ft([pe()],ra.prototype,"prefix",void 0),ft([pe()],ra.prototype,"suffix",void 0),Ie.addClass("currencymask",[{name:"prefix"},{name:"suffix"}],(()=>new ra),"numericmask"),na="2.0.3",Ps.version=na;const aa=new class{constructor(){this.icons={},this.iconPrefix="icon-",this.onIconsChanged=new vt}processId(e,t){return 0==e.indexOf(t)&&(e=e.substring(t.length)),e=as[e]||e}registerIconFromSymbol(e,t){this.icons[e]=t}registerIconFromSvgViaElement(e,t,s=this.iconPrefix){if(!oe.isAvailable())return;e=this.processId(e,s);let i=oe.createElement("div");i.innerHTML=t;let r=oe.createElement("symbol"),n=i.querySelector("svg");r.innerHTML=n.innerHTML;for(var a=0;a"),!0)}registerIconsFromFolder(e){e.keys().forEach((t=>{this.registerIconFromSvg(t.substring(2,t.length-4).toLowerCase(),e(t))}))}registerIcons(e){for(const t in e)this.registerIconFromSvg(t,e[t]);this.updateMarkup()}registerIcon(e,t,s="v2"){this.registerIconFromSvg(e,t),la(s,{[e]:t})}iconsRenderedHtml(){return Object.keys(this.icons).map((e=>this.icons[e])).join("")}updateMarkup(){this.onIconsChanged.fire(this,{})}},oa={};function la(e,t){oa[e]||(oa[e]={});const s=oa[e];for(const e in t)s[e]=t[e]} /*! * surveyjs - Survey JavaScript library v2.0.3 * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */class ua{constructor(){this.creatorHash={}}registerElement(e,t){this.creatorHash[e]=t}getAllTypes(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()}isElementRegistered(e){return!!this.creatorHash[e]}createElement(e,t){var s=this.creatorHash[e];return null==s?null:s(t)}}ua.Instance=new ua;class da{static wrapRow(e,t,s){const i=e.getRowWrapperComponentName(s),r=e.getRowWrapperComponentData(s);return ua.Instance.createElement(i,{element:t,row:s,componentData:r})}static wrapElement(e,t,s){const i=e.getElementWrapperComponentName(s),r=e.getElementWrapperComponentData(s);return ua.Instance.createElement(i,{element:t,question:s,componentData:r})}static wrapQuestionContent(e,t,s){const i=e.getQuestionContentWrapperComponentName(s),r=e.getElementWrapperComponentData(s);return ua.Instance.createElement(i,{element:t,question:s,componentData:r})}static wrapItemValue(e,t,s,i){const r=e.getItemValueWrapperComponentName(i,s),n=e.getItemValueWrapperComponentData(i,s);return ua.Instance.createElement(r,{key:null==t?void 0:t.key,element:t,question:s,item:i,componentData:n})}static wrapMatrixCell(e,t,s,i="cell"){const r=e.getElementWrapperComponentName(s,i),n=e.getElementWrapperComponentData(s,i);return ua.Instance.createElement(r,{element:t,cell:s,componentData:n})}}mr.platform="react";class ha extends n.Component{static renderLocString(e,t=null,s){return ua.Instance.createElement(e.renderAs,{locStr:e.renderAsData,style:t,key:s})}static renderQuestionDescription(e){var t=ha.renderLocString(e.locDescription);return n.createElement("div",{style:e.hasDescription?void 0:{display:"none"},id:e.ariaDescriptionId,className:e.cssDescription},t)}constructor(e){super(e),this._allowComponentUpdate=!0,this.prevStateElements=[],this.propertyValueChangedHandler=(e,t,s)=>{if(e[t]!==s){if(e[t]=s,!this.canUsePropInState(t))return;if(this.isRendering)return;this.changedStatePropNameValue=t,this.setState((e=>{var i={};return i[t]=s,i}))}}}componentDidMount(){this.makeBaseElementsReact()}componentWillUnmount(){this.unMakeBaseElementsReact(),this.disableStateElementsRerenderEvent(this.getStateElements())}componentDidUpdate(e,t){var s;this.makeBaseElementsReact();const i=this.getStateElements();this.disableStateElementsRerenderEvent((null!==(s=this.prevStateElements)&&void 0!==s?s:[]).filter((e=>!i.find((t=>t==e))))),this.prevStateElements=[],this.getStateElements().forEach((e=>{e.afterRerender()}))}allowComponentUpdate(){this._allowComponentUpdate=!0,this.forceUpdate()}denyComponentUpdate(){this._allowComponentUpdate=!1}shouldComponentUpdate(e,t){return this._allowComponentUpdate&&(this.unMakeBaseElementsReact(),this.prevStateElements=this.getStateElements()),this._allowComponentUpdate}render(){if(!this.canRender())return null;this.startEndRendering(1);var e=this.renderElement();return this.startEndRendering(-1),e&&(e=this.wrapElement(e)),this.changedStatePropNameValue=void 0,e}wrapElement(e){return e}get isRendering(){var e=this.getRenderedElements();for(let t of e)if(t.reactRendering>0)return!0;return!1}getRenderedElements(){return this.getStateElements()}startEndRendering(e){var t=this.getRenderedElements();for(let s of t)s.reactRendering||(s.reactRendering=0),s.reactRendering+=e}canRender(){return!0}renderElement(){return null}get changedStatePropName(){return this.changedStatePropNameValue}makeBaseElementsReact(){for(var e=this.getStateElements(),t=0;t{e.disableOnElementRerenderedEvent()}))}getStateElements(){var e=this.getStateElement();return e?[e]:[]}getStateElement(){return null}get isDisplayMode(){return this.props.isDisplayMode||!1}renderLocString(e,t=null,s){return ha.renderLocString(e,t,s)}canMakeReact(e){return!!e&&!!e.iteratePropertiesHash}isCurrentStateElement(e){return!!e&&!!e.setPropertyValueCoreHandler&&e.setPropertyValueCoreHandler===this.propertyValueChangedHandler}makeBaseElementReact(e){this.canMakeReact(e)&&(e.iteratePropertiesHash(((e,t)=>{if(this.canUsePropInState(t)){var s=e[t];if(Array.isArray(s))(s=s).onArrayChanged=e=>{this.isRendering||(this.changedStatePropNameValue=t,this.setState((e=>{var i={};return i[t]=s,i})))}}})),e.setPropertyValueCoreHandler=this.propertyValueChangedHandler)}canUsePropInState(e){return!0}unMakeBaseElementReact(e){this.canMakeReact(e)&&(this.isCurrentStateElement(e),e.setPropertyValueCoreHandler=void 0,e.iteratePropertiesHash(((e,t)=>{var s=e[t];Array.isArray(s)&&((s=s).onArrayChanged=()=>{})})))}}class ca extends ha{constructor(e){super(e)}get cssClasses(){return this.props.cssClasses}}class pa extends ha{constructor(e){super(e)}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.updateDomElement()}componentDidMount(){super.componentDidMount(),this.updateDomElement()}componentWillUnmount(){if(super.componentWillUnmount(),this.questionBase){const e=this.content||this.control;this.questionBase.beforeDestroyQuestionElement(e),e&&e.removeAttribute("data-rendered")}}updateDomElement(){const e=this.content||this.control;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.questionBase.afterRenderQuestionElement(e))}get questionBase(){return this.props.question}getRenderedElements(){return[this.questionBase]}get creator(){return this.props.creator}canRender(){return!!this.questionBase&&!!this.creator}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&!(this.questionBase.customWidget&&!this.questionBase.customWidgetData.isNeedRender&&!this.questionBase.customWidget.widgetJson.isDefaultRender&&!this.questionBase.customWidget.widgetJson.render)}get isDisplayMode(){return this.props.isDisplayMode||!!this.questionBase&&this.questionBase.isInputReadOnly||!1}wrapCell(e,t,s){if(!s)return t;const i=this.questionBase.survey;let r=null;return i&&(r=da.wrapMatrixCell(i,t,e,s)),null!=r?r:t}setControl(e){e&&(this.control=e)}setContent(e){e&&(this.content=e)}}class ma extends pa{constructor(e){super(e),this.updateValueOnEvent=e=>{ue.isTwoValueEquals(this.questionBase.value,e.target.value,!1,!0,!1)||this.setValueCore(e.target.value)},this.updateValueOnEvent=this.updateValueOnEvent.bind(this)}get question(){return this.questionBase}setValueCore(e){this.questionBase.value=e}getValueCore(){return this.questionBase.value}updateDomElement(){if(this.control){const e=this.control,t=this.getValueCore();ue.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.getValue(t))}super.updateDomElement()}getValue(e){return ue.isValueEmpty(e)?"":e}}class ga extends ha{constructor(e){super(e),this.element.cssClasses,this.rootRef=n.createRef()}getStateElement(){return this.element}get element(){return this.props.element}get index(){return this.props.index}get row(){return this.props.row}get survey(){return this.props.survey}get creator(){return this.props.creator}get css(){return this.props.css}componentDidMount(){super.componentDidMount(),this.rootRef.current&&this.element.setWrapperElement(this.rootRef.current)}componentWillUnmount(){super.componentWillUnmount(),this.element.setWrapperElement(void 0)}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(e.element!==this.element&&(e.element&&e.element.setWrapperElement(this.rootRef.current),this.element&&this.element.setWrapperElement(void 0)),this.element.cssClasses,!0)}renderElement(){const e=this.element,t=this.createElement(e,this.index),s=e.cssClassesValue;return n.createElement("div",{className:s.questionWrapper,style:e.rootStyle,"data-key":e.name+this.index,onFocus:()=>{const t=e;t&&t.isQuestion&&t.focusIn()},ref:this.rootRef},t)}createElement(e,t){if(!this.row.isNeedRender)return ua.Instance.createElement(e.skeletonComponentName,{element:e,css:this.css});let s=e.getTemplate();return ua.Instance.isElementRegistered(s)||(s="question"),ua.Instance.createElement(s,{element:e,creator:this.creator,survey:this.survey,css:this.css})}}class va extends ha{constructor(e){super(e),this.rootRef=n.createRef(),this.recalculateCss()}recalculateCss(){this.row.visibleElements.map((e=>e.cssClasses))}getStateElement(){return this.row}get row(){return this.props.row}get survey(){return this.props.survey}get creator(){return this.props.creator}get css(){return this.props.css}canRender(){return!!this.row&&!!this.survey&&!!this.creator}renderElementContent(){const e=this.row.visibleElements.map(((e,t)=>n.createElement(ga,{element:e,index:t,row:this.row,survey:this.survey,creator:this.creator,css:this.css,key:e.id})));return n.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},e)}renderElement(){const e=this.survey,t=this.renderElementContent();return da.wrapRow(e,t,this.row)||t}componentDidMount(){super.componentDidMount();var e=this.rootRef.current;if(this.rootRef.current&&this.row.setRootElement(this.rootRef.current),e&&!this.row.isNeedRender){var t=e;setTimeout((()=>{this.row.startLazyRendering(t)}),10)}}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(e.row!==this.row&&(e.row.isNeedRender=this.row.isNeedRender,e.row.setRootElement(this.rootRef.current),this.row.setRootElement(void 0),this.stopLazyRendering()),this.recalculateCss(),!0)}stopLazyRendering(){this.row.stopLazyRendering(),this.row.isNeedRender=!this.row.isLazyRendering()}componentWillUnmount(){super.componentWillUnmount(),this.isCurrentStateElement(this.getStateElement())&&(this.row.setRootElement(void 0),this.stopLazyRendering())}createElement(e,t){const s=t?"-"+t:0;var i=e.getType();return ua.Instance.isElementRegistered(i)||(i="question"),ua.Instance.createElement(i,{key:e.name+s,element:e,creator:this.creator,survey:this.survey,css:this.css})}}class fa extends ha{constructor(e){super(e),this.rootRef=n.createRef()}getStateElement(){return this.panelBase}canUsePropInState(e){return"elements"!==e&&super.canUsePropInState(e)}get survey(){return this.getSurvey()}get creator(){return this.props.creator}get css(){return this.getCss()}get panelBase(){return this.getPanelBase()}getPanelBase(){return this.props.element||this.props.question}getSurvey(){return this.props.survey||(this.panelBase?this.panelBase.survey:null)}getCss(){return this.props.css}componentDidMount(){super.componentDidMount(),this.doAfterRender()}componentWillUnmount(){super.componentWillUnmount();var e=this.rootRef.current;e&&e.removeAttribute("data-rendered")}componentDidUpdate(e,t){super.componentDidUpdate(e,t),e.page&&this.survey&&this.survey.activePage&&e.page.id===this.survey.activePage.id||this.doAfterRender()}doAfterRender(){var e=this.rootRef.current;e&&this.survey&&(this.panelBase.isPanel?this.panelBase.afterRender(e):this.survey.afterRenderPage(e))}getIsVisible(){return this.panelBase.isVisible}canRender(){return super.canRender()&&!!this.survey&&!!this.panelBase&&!!this.panelBase.survey&&this.getIsVisible()}renderRows(e){return this.panelBase.visibleRows.map((t=>this.createRow(t,e)))}createRow(e,t){return n.createElement(va,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})}}class ba extends n.Component{constructor(e){super(e),this.svgIconRef=n.createRef()}updateSvg(){this.props.iconName&&function(e,t,s,i,r,n){if(!r)return;"auto"!==e&&(r.style.width=(e||t||16)+"px",r.style.height=(e||s||16)+"px");const a=r.childNodes[0],o=os(i);a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+o);let l=r.getElementsByTagName("title")[0];n?(l||(l=oe.getDocument().createElementNS("http://www.w3.org/2000/svg","title"),r.appendChild(l)),l.textContent=n):l&&r.removeChild(l)}(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current,this.props.title)}componentDidUpdate(){this.updateSvg()}render(){let e="sv-svg-icon";return this.props.className&&(e+=" "+this.props.className),this.props.iconName?n.createElement("svg",{className:e,style:this.props.style,onClick:this.props.onClick,ref:this.svgIconRef,role:"presentation"},n.createElement("use",null)):null}componentDidMount(){this.updateSvg()}}ua.Instance.registerElement("sv-svg-icon",(e=>n.createElement(ba,e)));class ya extends n.Component{constructor(e){super(e)}render(){var e=`sv-action-bar-separator ${this.props.cssClasses}`;return n.createElement("div",{className:e})}}ua.Instance.registerElement("sv-action-bar-separator",(e=>n.createElement(ya,e)));class Ca extends ha{constructor(e){super(e),this.ref=n.createRef()}get item(){return this.props.item}getStateElement(){return this.item}renderElement(){const e=this.item.getActionRootCss(),t=this.item.needSeparator?n.createElement(ya,null):null,s=ua.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return n.createElement("div",{className:e,id:this.item.id,ref:this.ref},n.createElement("div",{className:"sv-action__content"},t,s))}componentWillUnmount(){super.componentWillUnmount(),this.item.updateModeCallback=void 0}componentDidMount(){super.componentDidMount(),this.item.updateModeCallback=(e,t)=>{queueMicrotask((()=>{o.flushSync?o.flushSync((()=>{this.item.mode=e})):this.item.mode=e,queueMicrotask((()=>{t(e,this.ref.current)}))}))},this.item.afterRender()}}class wa extends ha{get item(){return this.props.item}getStateElement(){return this.item}renderElement(){return n.createElement(n.Fragment,null,this.renderInnerButton())}renderText(){if(!this.item.hasTitle)return null;const e=this.item.getActionBarItemTitleCss();return n.createElement("span",{className:e},this.item.title)}renderButtonContent(){const e=this.renderText(),t=this.item.iconName?n.createElement(ba,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName,title:this.item.tooltip||this.item.title}):null;return n.createElement(n.Fragment,null,t,e)}renderInnerButton(){const e=this.item.getActionBarItemCss(),t=this.item.tooltip||this.item.title,s=this.renderButtonContent(),i=this.item.disableTabStop?-1:void 0;return $a(n.createElement("button",{className:e,type:"button",disabled:this.item.disabled,onMouseDown:e=>this.item.doMouseDown(e),onFocus:e=>this.item.doFocus(e),onClick:e=>this.item.doAction(e),title:t,tabIndex:i,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},s),this.item,{processEsc:!1})}}ua.Instance.registerElement("sv-action-bar-item",(e=>n.createElement(wa,e)));class xa extends ha{constructor(e){super(e),this.containerRef=n.createRef(),this.createModel()}get model(){return this.props.model}getStateElement(){return this.model}createModel(){var e;this.popup=(e=this.props.model).isModal?new Gn(e):new Un(e)}setTargetElement(){const e=this.containerRef.current;this.popup.setComponentElement(e)}componentDidMount(){super.componentDidMount(),this.setTargetElement()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.setTargetElement()}componentWillUnmount(){super.componentWillUnmount(),this.popup.resetComponentElement()}shouldComponentUpdate(e,t){var s;if(!super.shouldComponentUpdate(e,t))return!1;const i=e.model!==this.popup.model;return i&&(null===(s=this.popup)||void 0===s||s.dispose(),this.createModel()),i}render(){let e;return this.popup.model=this.model,e=this.model.isModal?n.createElement(Va,{model:this.popup}):n.createElement(_a,{model:this.popup}),n.createElement("div",{ref:this.containerRef},e)}}ua.Instance.registerElement("sv-popup",(e=>n.createElement(xa,e)));class Va extends ha{constructor(e){super(e),this.handleKeydown=e=>{this.model.onKeyDown(e)},this.clickInside=e=>{e.stopPropagation()}}get model(){return this.props.model}getStateElement(){return this.model}componentDidUpdate(e,t){super.componentDidUpdate(e,t),!this.model.isPositionSet&&this.model.isVisible&&this.model.updateOnShowing()}renderContainer(e){const t=e.showHeader?this.renderHeaderPopup(e):null,s=e.title?this.renderHeaderContent():null,i=this.renderContent(),r=e.showFooter?this.renderFooter(this.model):null;return n.createElement("div",{className:"sv-popup__container",style:{left:e.left,top:e.top,height:e.height,width:e.width,minWidth:e.minWidth},onClick:e=>{this.clickInside(e)}},t,n.createElement("div",{className:"sv-popup__body-content"},s,n.createElement("div",{className:"sv-popup__scrolling-content"},i),r))}renderHeaderContent(){return n.createElement("div",{className:"sv-popup__body-header"},this.model.title)}renderContent(){const e=ua.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return n.createElement("div",{className:"sv-popup__content"},e)}renderHeaderPopup(e){return null}renderFooter(e){return n.createElement("div",{className:"sv-popup__body-footer"},n.createElement(Pa,{model:e.footerToolbar}))}render(){const e=this.renderContainer(this.model),t=(new Ct).append("sv-popup").append(this.model.styleClass).toString(),s={display:this.model.isVisible?"":"none"};return n.createElement("div",{tabIndex:-1,className:t,style:s,onClick:e=>{this.model.clickOutside(e)},onKeyDown:this.handleKeydown},e)}componentDidMount(){super.componentDidMount(),this.model.isVisible&&this.model.updateOnShowing()}}class _a extends Va{renderHeaderPopup(e){const t=e;return t?n.createElement("span",{style:{left:t.pointerTarget.left,top:t.pointerTarget.top},className:"sv-popup__pointer"}):null}}class Ea extends wa{constructor(e){super(e)}renderInnerButton(){const e=super.renderInnerButton();return n.createElement(n.Fragment,null,e,n.createElement(xa,{model:this.item.popupModel}))}componentDidMount(){this.viewModel=new Mt(this.item)}componentWillUnmount(){super.componentWillUnmount(),this.viewModel.dispose()}}ua.Instance.registerElement("sv-action-bar-item-dropdown",(e=>n.createElement(Ea,e)));class Pa extends ha{constructor(e){super(e),this.rootRef=n.createRef()}get handleClick(){return void 0===this.props.handleClick||this.props.handleClick}get model(){return this.props.model}componentDidMount(){if(super.componentDidMount(),!this.model.hasActions)return;const e=this.rootRef.current;e&&this.model.initResponsivityManager(e,(e=>{setTimeout(e,100)}))}componentWillUnmount(){super.componentWillUnmount(),this.model.resetResponsivityManager()}componentDidUpdate(e,t){if(super.componentDidUpdate(e,t),e.model!=this.props.model&&e.model.resetResponsivityManager(),this.model.hasActions){const e=this.rootRef.current;e&&this.model.initResponsivityManager(e,(e=>{setTimeout(e,100)}))}}getStateElement(){return this.model}renderElement(){if(!this.model.hasActions)return null;const e=this.renderItems();return n.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),onClick:this.handleClick?function(e){e.stopPropagation()}:void 0},e)}renderItems(){return this.model.renderedActions.concat([]).map(((e,t)=>n.createElement(Ca,{item:e,key:e.renderedId})))}}ua.Instance.registerElement("sv-action-bar",(e=>n.createElement(Pa,e)));class Sa extends n.Component{constructor(e){super(e)}get cssClasses(){return this.props.cssClasses}get element(){return this.props.element}render(){if(this.element.isTitleRenderedAsString)return ha.renderLocString(this.element.locTitle);var e=this.renderTitleSpans(this.element.getTitleOwner(),this.cssClasses);return n.createElement(n.Fragment,null,e)}renderTitleSpans(e,t){var s=e=>n.createElement("span",{"data-key":e,key:e}," "),i=[];e.isRequireTextOnStart&&(i.push(this.renderRequireText(e)),i.push(s("req-sp")));var r=e.no;return r&&(i.push(n.createElement("span",{"data-key":"q_num",key:"q_num",className:e.cssTitleNumber,style:{position:"static"},"aria-hidden":!0},r)),i.push(s("num-sp"))),e.isRequireTextBeforeTitle&&(i.push(this.renderRequireText(e)),i.push(s("req-sp"))),i.push(ha.renderLocString(e.locTitle,null,"q_title")),e.isRequireTextAfterTitle&&(i.push(s("req-sp")),i.push(this.renderRequireText(e))),i}renderRequireText(e){return n.createElement("span",{"data-key":"req-text",key:"req-text",className:e.cssRequiredMark,"aria-hidden":!0},e.requiredMark)}}class Ia extends n.Component{get cssClasses(){return this.props.cssClasses}get element(){return this.props.element}render(){const e=n.createElement(Sa,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?n.createElement("div",{className:"sv-title-actions"},n.createElement("span",{className:"sv-title-actions__title"},e),n.createElement(Pa,{model:this.element.getTitleToolbar()})):e}}Ys.Instance.registerRenderer("element","title-actions","sv-title-actions"),ua.Instance.registerElement("sv-title-actions",(e=>n.createElement(Ia,e)));class Ta extends n.Component{constructor(e){super(e)}get element(){return this.props.element}renderTitleExpandableSvg(){if(!this.element.getCssTitleExpandableSvg())return null;let e=this.element.isExpanded?"icon-collapse-16x16":"icon-expand-16x16";return n.createElement(ba,{className:this.element.getCssTitleExpandableSvg(),iconName:e,size:"auto"})}render(){const e=this.element;if(!e||!e.hasTitle)return null;const t=e.titleAriaLabel||void 0,s=this.renderTitleExpandableSvg(),i=n.createElement(Ia,{element:e,cssClasses:e.cssClasses});let r,a;e.hasTitleEvents&&(a=e=>{ps(e.nativeEvent)});const o=e.titleTagName;return n.createElement(o,{className:e.cssTitle,id:e.ariaTitleId,"aria-label":t,tabIndex:e.titleTabIndex,"aria-expanded":e.titleAriaExpanded,role:e.titleAriaRole,onClick:r,onKeyUp:a},s,i)}}class Ra{constructor(){this.creatorHash={}}registerQuestion(e,t){this.creatorHash[e]=t}getAllTypes(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()}createQuestion(e,t){var s=this.creatorHash[e];return null==s?null:s(t)}}Ra.Instance=new Ra;class ka extends ha{getStateElement(){return this.props.counter}renderElement(){return n.createElement("div",{className:this.props.remainingCharacterCounter},this.props.counter.remainingCharacterCounter)}}ua.Instance.registerElement("sv-character-counter",(e=>n.createElement(ka,e)));class Da extends ha{constructor(e){super(e),this.initialValue=this.viewModel.getTextValue()||"",this.textareaRef=n.createRef()}get viewModel(){return this.props.viewModel}canRender(){return!!this.viewModel.question}componentDidMount(){super.componentDidMount();let e=this.textareaRef.current;e&&this.viewModel.setElement(e)}componentWillUnmount(){super.componentWillUnmount(),this.viewModel.resetElement()}renderElement(){return n.createElement("textarea",{id:this.viewModel.id,className:this.viewModel.className,ref:this.textareaRef,disabled:this.viewModel.isDisabledAttr,readOnly:this.viewModel.isReadOnlyAttr,rows:this.viewModel.rows,cols:this.viewModel.cols,placeholder:this.viewModel.placeholder,maxLength:this.viewModel.maxLength,defaultValue:this.initialValue,onChange:e=>{this.viewModel.onTextAreaInput(e)},onFocus:e=>{this.viewModel.onTextAreaFocus(e)},onBlur:e=>{this.viewModel.onTextAreaBlur(e)},onKeyDown:e=>{this.viewModel.onTextAreaKeyDown(e)},"aria-required":this.viewModel.ariaRequired,"aria-label":this.viewModel.ariaLabel,"aria-labelledby":this.viewModel.ariaLabelledBy,"aria-describedby":this.viewModel.ariaDescribedBy,"aria-invalid":this.viewModel.ariaInvalid,"aria-errormessage":this.viewModel.ariaErrormessage,style:{resize:this.viewModel.question.resizeStyle}})}}ua.Instance.registerElement("sv-text-area",(e=>n.createElement(Da,e)));class La extends ma{renderCharacterCounter(){let e=null;return this.question.getMaxLength()&&(e=n.createElement(ka,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter})),e}constructor(e){super(e)}renderElement(){if(this.question.isReadOnlyRenderDiv())return n.createElement("div",null,this.question.value);const e=this.renderCharacterCounter(),t=this.props.question.textAreaModel;return n.createElement(n.Fragment,null,n.createElement(Da,{viewModel:t}),e)}}class Aa extends ca{constructor(e){super(e),this.textAreaModel=this.getTextAreaModel()}canRender(){return!!this.props.question}getTextAreaModel(){return this.props.question.commentTextAreaModel}renderElement(){if(this.props.question.isReadOnlyRenderDiv()){const e=this.textAreaModel.getTextValue()||"";return n.createElement("div",null,e)}return n.createElement(Da,{viewModel:this.textAreaModel})}}class ja extends Aa{getTextAreaModel(){return this.props.question.otherTextAreaModel}}Ra.Instance.registerQuestion("comment",(e=>n.createElement(La,e)));class Oa extends pa{constructor(e){super(e),this.widgetRef=n.createRef()}_afterRender(){if(this.questionBase.customWidget){let e=this.widgetRef.current;e&&(this.questionBase.customWidget.afterRender(this.questionBase,e),this.questionBase.customWidgetData.isNeedRender=!1)}}componentDidMount(){super.componentDidMount(),this.questionBase&&this._afterRender()}componentDidUpdate(e,t){super.componentDidUpdate(e,t);var s=!!this.questionBase.customWidget&&this.questionBase.customWidget.isDefaultRender;this.questionBase&&!s&&this._afterRender()}componentWillUnmount(){if(super.componentWillUnmount(),this.questionBase.customWidget){let e=this.widgetRef.current;e&&this.questionBase.customWidget.willUnmount(this.questionBase,e)}}canRender(){return super.canRender()&&this.questionBase.visible}renderElement(){let e=this.questionBase.customWidget;if(e.isDefaultRender)return n.createElement("div",{ref:this.widgetRef},this.creator.createQuestionElement(this.questionBase));let t=null;if(e.widgetJson.render)t=e.widgetJson.render(this.questionBase);else if(e.htmlTemplate){let t={__html:e.htmlTemplate};return n.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:t})}return n.createElement("div",{ref:this.widgetRef},t)}}class qa extends ha{get element(){return this.props.element}getRenderedElements(){return[this.element]}renderElement(){const e=this.element,t=e.hasTitle?n.createElement(Ta,{element:e}):null,s=e.hasDescriptionUnderTitle?ha.renderQuestionDescription(this.element):null,i=e.hasAdditionalTitleToolbar?n.createElement(Pa,{model:e.additionalTitleToolbar}):null,r={width:void 0};return e instanceof ti&&(r.width=e.titleWidth),n.createElement("div",{className:e.cssHeader,onClick:t=>e.clickTitleFunction&&e.clickTitleFunction(t.nativeEvent),style:r},t,s,i)}}class Na extends ha{static renderQuestionBody(e,t){return t.customWidget?n.createElement(Oa,{creator:e,question:t}):e.createQuestionElement(t)}constructor(e){super(e),this.isNeedFocus=!1,this.rootRef=n.createRef()}getStateElement(){return this.question}get question(){return this.props.element}get creator(){return this.props.creator}componentDidMount(){super.componentDidMount(),this.question&&(this.question.react=this),this.doAfterRender()}componentWillUnmount(){super.componentWillUnmount(),this.question&&(this.question.react=null);const e=this.rootRef.current;e&&e.removeAttribute("data-rendered")}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.doAfterRender()}doAfterRender(){if(this.isNeedFocus&&(this.question.isCollapsed||this.question.clickTitleFunction(),this.isNeedFocus=!1),this.question){var e=this.rootRef.current;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.question.afterRender&&this.question.afterRender(e))}}canRender(){return super.canRender()&&!!this.question&&!!this.creator}renderQuestionContent(){let e=this.question;var t={display:this.question.renderedIsExpanded?"":"none"},s=e.cssClasses,i=this.renderQuestion(),r=this.question.showErrorOnTop?this.renderErrors(s,"top"):null,a=this.question.showErrorOnBottom?this.renderErrors(s,"bottom"):null,o=e&&e.hasComment?this.renderComment(s):null,l=e.hasDescriptionUnderInput?this.renderDescription():null;return n.createElement("div",{className:e.cssContent||void 0,style:t,role:"presentation"},r,i,o,a,l)}renderElement(){var e=this.question,t=e.cssClasses,s=this.renderHeader(e),i=e.hasTitleOnLeftTop?s:null,r=e.hasTitleOnBottom?s:null;const a=this.question.showErrorsAboveQuestion?this.renderErrors(t,""):null,o=this.question.showErrorsBelowQuestion?this.renderErrors(t,""):null;let l=e.getRootStyle(),u=this.wrapQuestionContent(this.renderQuestionContent());return n.createElement(n.Fragment,null,n.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:l,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-expanded":e.ariaExpanded,"data-name":e.name},a,i,u,r,o))}wrapElement(e){const t=this.question.survey;let s=null;return t&&(s=da.wrapElement(t,e,this.question)),null!=s?s:e}wrapQuestionContent(e){const t=this.question.survey;let s=null;return t&&(s=da.wrapQuestionContent(t,e,this.question)),null!=s?s:e}renderQuestion(){return Na.renderQuestionBody(this.creator,this.question)}renderDescription(){return ha.renderQuestionDescription(this.question)}renderComment(e){const t=ha.renderLocString(this.question.locCommentText);return n.createElement("div",{className:this.question.getCommentAreaCss()},n.createElement("div",null,t),n.createElement(Aa,{question:this.question,cssClasses:e,otherCss:e.other,isDisplayMode:this.question.isInputReadOnly}))}renderHeader(e){return n.createElement(qa,{element:e})}renderErrors(e,t){return n.createElement(Ma,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})}}ua.Instance.registerElement("question",(e=>n.createElement(Na,e)));class Ma extends ca{constructor(e){super(e),this.state=this.getState()}get id(){return this.props.element.id+"_errors"}get element(){return this.props.element}get creator(){return this.props.creator}get location(){return this.props.location}getState(e=null){return e?{error:e.error+1}:{error:0}}canRender(){return!!this.element&&this.element.hasVisibleErrors}componentWillUnmount(){}renderElement(){const e=[];for(let t=0;t{t.focusIn()}},this.wrapCell(this.props.cell,this.renderCellContent()))}getCellStyle(){return null}getHeaderText(){return""}wrapCell(e,t){if(!e)return t;const s=this.question.survey;let i=null;return s&&(i=da.wrapMatrixCell(s,t,e,this.props.reason)),null!=i?i:t}}class za extends n.Component{constructor(e){super(e),this.state={changed:0},this.question&&this.registerCallback(this.question)}get question(){return this.props.question}update(){this.setState({changed:this.state.changed+1})}getQuestionPropertiesToTrack(){return["errors"]}registerCallback(e){e.registerFunctionOnPropertiesValueChanged(this.getQuestionPropertiesToTrack(),(()=>{this.update()}),"__reactSubscription")}unRegisterCallback(e){e.unRegisterFunctionOnPropertiesValueChanged(this.getQuestionPropertiesToTrack(),"__reactSubscription")}componentDidUpdate(e){e.question&&e.question!==this.question&&this.unRegisterCallback(e.cell),this.question&&this.registerCallback(this.question)}componentWillUnmount(){this.question&&this.unRegisterCallback(this.question)}render(){return n.createElement(Ma,{element:this.question,creator:this.props.creator,cssClasses:this.question.cssClasses})}}class Ha extends fa{constructor(e){super(e)}getPanelBase(){return this.props.page}get page(){return this.panelBase}renderElement(){var e=this.renderTitle(),t=this.renderDescription(),s=this.renderRows(this.panelBase.cssClasses);const i=n.createElement(Ma,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator});return n.createElement("div",{ref:this.rootRef,className:this.page.cssRoot},e,t,i,s)}renderTitle(){return n.createElement(Ta,{element:this.page})}renderDescription(){if(!this.page._showDescription)return null;var e=ha.renderLocString(this.page.locDescription);return n.createElement("div",{className:this.panelBase.cssClasses.page.description},e)}}class Qa extends n.Component{constructor(e){super(e),this.state={changed:0},this.rootRef=n.createRef()}get survey(){return this.props.survey}get css(){return this.survey.css}componentDidMount(){const e=this;this.survey.afterRenderHeader(this.rootRef.current),this.survey.locLogo.onChanged=function(){e.setState({changed:e.state.changed+1})}}componentWillUnmount(){this.survey.locLogo.onChanged=function(){}}renderTitle(){if(!this.survey.renderedHasTitle)return null;const e=ha.renderLocString(this.survey.locDescription);return n.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},n.createElement(Ta,{element:this.survey}),this.survey.renderedHasDescription?n.createElement("div",{className:this.css.description},e):null)}renderLogoImage(e){if(!e)return null;const t=this.survey.getElementWrapperComponentName(this.survey,"logo-image"),s=this.survey.getElementWrapperComponentData(this.survey,"logo-image");return ua.Instance.createElement(t,{data:s})}render(){return this.survey.renderedHasHeader?n.createElement("div",{className:this.css.header,ref:this.rootRef},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),n.createElement("div",{className:this.css.headerClose})):null}}ua.Instance.registerElement("survey-header",(e=>n.createElement(Qa,e)));class Wa extends n.Component{render(){return n.createElement("div",{className:"sv-brand-info"},n.createElement("a",{className:"sv-brand-info__logo",href:"https://surveyjs.io/?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=landing_page"},n.createElement("img",{src:"https://surveyjs.io/Content/Images/poweredby.svg"})),n.createElement("div",{className:"sv-brand-info__text"},"Try and see how easy it is to ",n.createElement("a",{href:"https://surveyjs.io/create-survey?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=create_survey"},"create a survey")),n.createElement("div",{className:"sv-brand-info__terms"},n.createElement("a",{href:"https://surveyjs.io/TermsOfUse"},"Terms of Use & Privacy Statement")))}}class Ua extends ha{get notifier(){return this.props.notifier}getStateElement(){return this.notifier}renderElement(){if(!this.notifier.isDisplayed)return null;const e={visibility:this.notifier.active?"visible":"hidden"};return n.createElement("div",{className:this.notifier.css,style:e,role:"alert","aria-live":"polite"},n.createElement("span",null,this.notifier.message),n.createElement(Pa,{model:this.notifier.actionBar}))}}ua.Instance.registerElement("sv-notifier",(e=>n.createElement(Ua,e)));class Ga extends n.Component{render(){const e=this.props.survey.getContainerContent(this.props.container),t=!1!==this.props.needRenderWrapper;return 0==e.length?null:t?n.createElement("div",{className:"sv-components-column sv-components-container-"+this.props.container},e.map((e=>ua.Instance.createElement(e.component,{survey:this.props.survey,model:e.data,container:this.props.container,key:e.id})))):n.createElement(n.Fragment,null,e.map((e=>ua.Instance.createElement(e.component,{survey:this.props.survey,model:e.data,container:this.props.container,key:e.id}))))}}ua.Instance.registerElement("sv-components-container",(e=>n.createElement(Ga,e)));class Za extends n.Component{constructor(e){super(e),this.onIconsChanged=()=>{this.containerRef.current&&(this.containerRef.current.innerHTML=aa.iconsRenderedHtml())},this.containerRef=n.createRef()}componentDidMount(){this.onIconsChanged(),aa.onIconsChanged.add(this.onIconsChanged)}componentWillUnmount(){aa.onIconsChanged.remove(this.onIconsChanged)}render(){return n.createElement("svg",{style:{display:"none"},id:"sv-icon-holder-global-container",ref:this.containerRef})}}class Ja extends ha{constructor(e){super(e),this.isInitialized=!1,this.init=()=>{this.isInitialized||(Ps.showDialog=(e,t)=>this.showDialog(e,t),this.isInitialized=!0)},this.clean=()=>{this.isInitialized&&(Ps.showDialog=void 0,this.isInitialized=!1)},this.state={changed:0},this.descriptor={init:this.init,clean:this.clean}}static addModalDescriptor(e){Ps.showDialog||e.init(),this.modalDescriptors.push(e)}static removeModalDescriptor(e){e.clean(),this.modalDescriptors.splice(this.modalDescriptors.indexOf(e),1),!Ps.showDialog&&this.modalDescriptors[0]&&this.modalDescriptors[0].init()}renderElement(){return this.model?s.createPortal(n.createElement(Va,{model:this.model}),this.model.container):null}showDialog(e,t){this.model=function(e,t){var s;const i=Object.assign({},e);i.verticalPosition="top",i.horizontalPosition="left",i.showPointer=!1,i.isModal=!0,i.displayMode=e.displayMode||"popup";const r=new At(e.componentName,e.data,i);r.isFocusedContent=null===(s=e.isFocusedContent)||void 0===s||s;const n=new Gn(r);if(t&&t.appendChild){var a=oe.createElement("div");t.appendChild(a),n.setComponentElement(a)}n.container||n.initializePopupContainer();const o=(e,t)=>{t.isVisible||a&&n.resetComponentElement(),n.onVisibilityChanged.remove(o)};return n.onVisibilityChanged.add(o),n}(e,t);return this.model.onVisibilityChanged.add(((e,t)=>{t.isVisible||(this.model.dispose(),this.model=void 0,this.setState({changed:this.state.changed+1}))})),this.model.model.isVisible=!0,this.setState({changed:this.state.changed+1}),this.model}componentDidMount(){Ja.addModalDescriptor(this.descriptor)}componentWillUnmount(){this.model&&(this.model.dispose(),this.model=void 0),Ja.removeModalDescriptor(this.descriptor)}}Ja.modalDescriptors=[]; /*! * surveyjs - Survey JavaScript library v2.0.3 * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */ var Ka={modernbooleancheckchecked:'',modernbooleancheckind:'',modernbooleancheckunchecked:'',moderncheck:'',modernradio:'',progressbutton:'',removefile:'',timercircle:'',"add-24x24":'',"arrowleft-16x16":'',"arrowright-16x16":'',"camera-24x24":'',"camera-32x32":'',"cancel-24x24":'',"check-16x16":'',"check-24x24":'',"chevrondown-24x24":'',"chevronright-16x16":'',"clear-16x16":'',"clear-24x24":'',"close-16x16":'',"close-24x24":'',"collapse-16x16":'',"collapsedetails-16x16":'',"delete-24x24":'',"drag-24x24":'',"draghorizontal-24x16":'',"expand-16x16":'',"expanddetails-16x16":'',"file-72x72":'',"flip-24x24":'',"folder-24x24":'',"fullsize-16x16":'',"image-48x48":'',"loading-48x48":'',"maximize-16x16":'',"minimize-16x16":'',"more-24x24":'',"navmenu-24x24":'',"noimage-48x48":'',"ranking-arrows":'',"rankingundefined-16x16":'',"rating-star-2":'',"rating-star-small-2":'',"rating-star-small":'',"rating-star":'',"reorder-24x24":'',"restoredown-16x16":'',"search-24x24":'',"smiley-rate1-24x24":'',"smiley-rate10-24x24":'',"smiley-rate2-24x24":'',"smiley-rate3-24x24":'',"smiley-rate4-24x24":'',"smiley-rate5-24x24":'',"smiley-rate6-24x24":'',"smiley-rate7-24x24":'',"smiley-rate8-24x24":'',"smiley-rate9-24x24":''}; /*! * surveyjs - Survey JavaScript library v2.0.3 * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */class Xa extends n.Component{constructor(e){super(e),this.rootRef=n.createRef(),this.model=new Bn}componentDidMount(){const e=this.rootRef.current;e&&this.model.setRootElement(e)}componentWillUnmount(){this.model.unsubscribeRootElement(),this.model.setRootElement(void 0)}render(){return this.props.disabled?n.createElement(n.Fragment,null,this.props.children):n.createElement("div",{ref:this.rootRef,className:"sv-scroll__wrapper"},n.createElement("div",{className:"sv-scroll__scroller sv-drag-target-skipped",onScroll:()=>this.model.onScrollContainer()},n.createElement("div",{className:"sv-scroll__container"},this.props.children)),n.createElement("div",{className:"sv-scroll__scrollbar",onScroll:()=>this.model.onScrollScrollbar()},n.createElement("div",{className:"sv-scroll__scrollbar-sizer"})))}}ua.Instance.registerElement("svc-scroll",(e=>n.createElement(Xa,e))),la("v1",{modernbooleancheckchecked:'',modernbooleancheckind:'',modernbooleancheckunchecked:'',moderncheck:'',modernradio:'',progressbutton:'',removefile:'',timercircle:'',"add-24x24":'',"arrowleft-16x16":'',"arrowright-16x16":'',"camera-24x24":'',"camera-32x32":'',"cancel-24x24":'',"check-16x16":'',"check-24x24":'',"chevrondown-24x24":'',"chevronright-16x16":'',"clear-16x16":'',"clear-24x24":'',"close-16x16":'',"close-24x24":'',"collapse-16x16":'',"collapsedetails-16x16":'',"delete-24x24":'',"drag-24x24":'',"draghorizontal-24x16":'',"expand-16x16":'',"expanddetails-16x16":'',"file-72x72":'',"flip-24x24":'',"folder-24x24":'',"fullsize-16x16":'',"image-48x48":'',"loading-48x48":'',"maximize-16x16":'',"minimize-16x16":'',"more-24x24":'',"navmenu-24x24":'',"noimage-48x48":'',"ranking-arrows":'',"rankingundefined-16x16":'',"rating-star-2":'',"rating-star-small-2":'',"rating-star-small":'',"rating-star":'',"reorder-24x24":'',"restoredown-16x16":'',"search-24x24":'',"smiley-rate1-24x24":'',"smiley-rate10-24x24":'',"smiley-rate2-24x24":'',"smiley-rate3-24x24":'',"smiley-rate4-24x24":'',"smiley-rate5-24x24":'',"smiley-rate6-24x24":'',"smiley-rate7-24x24":'',"smiley-rate8-24x24":'',"smiley-rate9-24x24":''}),la("v2",Ka),aa.registerIcons(Ka);class Ya extends ha{constructor(e){super(e),this.previousJSON={},this.isSurveyUpdated=!1,this.createSurvey(e),this.updateSurvey(e,{}),this.rootRef=n.createRef(),this.rootNodeId=e.id||null,this.rootNodeClassName=e.className||""}getStateElement(){return this.survey}onSurveyUpdated(){if(this.survey){const e=this.rootRef.current;e&&this.survey.afterRenderSurvey(e),this.survey.startTimerFromUI(),this.setSurveyEvents()}}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(this.isModelJSONChanged(e)&&(this.destroySurvey(),this.createSurvey(e),this.updateSurvey(e,{}),this.isSurveyUpdated=!0),!0)}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.updateSurvey(this.props,e),this.isSurveyUpdated&&(this.onSurveyUpdated(),this.isSurveyUpdated=!1)}componentDidMount(){super.componentDidMount(),this.onSurveyUpdated()}destroySurvey(){this.survey&&(this.survey.renderCallback=void 0,this.survey.onPartialSend.clear(),this.survey.stopTimer(),this.survey.destroyResizeObserver())}componentWillUnmount(){super.componentWillUnmount(),this.destroySurvey()}doRender(){let e;e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():"empty"==this.survey.state?this.renderEmptySurvey():this.renderSurvey();const t=this.survey.backgroundImage?n.createElement("div",{className:this.css.rootBackgroundImage,style:this.survey.backgroundImageStyle}):null,s="basic"===this.survey.headerView?n.createElement(Qa,{survey:this.survey}):null;let i=n.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(i=null);const r=this.survey.getRootCss(),a=this.rootNodeClassName?this.rootNodeClassName+" "+r:r;return n.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:a,style:this.survey.themeVariables,lang:this.survey.locale||"en",dir:this.survey.localeDir},n.createElement(Xa,{disabled:this.survey.rootScrollDisabled},this.survey.needRenderIcons?n.createElement(Za,null):null,n.createElement(Ja,null),n.createElement("div",{className:this.survey.wrapperFormCss},t,n.createElement("form",{onSubmit:function(e){e.preventDefault()}},n.createElement(Xa,{disabled:this.survey.formScrollDisabled},i,n.createElement("div",{className:this.css.container},s,n.createElement(Ga,{survey:this.survey,container:"header",needRenderWrapper:!1}),e,n.createElement(Ga,{survey:this.survey,container:"footer",needRenderWrapper:!1})))),n.createElement(Ua,{notifier:this.survey.notifier}))))}renderElement(){return this.doRender()}get css(){return this.survey.css}set css(e){this.survey.css=e}renderCompleted(){if(!this.survey.showCompletedPage)return null;var e={__html:this.survey.processedCompletedHtml};return n.createElement(n.Fragment,null,n.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedCss}),n.createElement(Ga,{survey:this.survey,container:"completePage",needRenderWrapper:!1}))}renderCompletedBefore(){var e={__html:this.survey.processedCompletedBeforeHtml};return n.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedBeforeCss})}renderLoading(){var e={__html:this.survey.processedLoadingHtml};return n.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.loadingBodyCss})}renderSurvey(){var e=this.survey.activePage?this.renderPage(this.survey.activePage):null;this.survey.isShowStartingPage;var t=this.survey.activePage?this.survey.activePage.id:"";let s=this.survey.bodyCss;const i={};return this.survey.renderedWidth&&(i.maxWidth=this.survey.renderedWidth),n.createElement("div",{className:this.survey.bodyContainerCss},n.createElement(Ga,{survey:this.survey,container:"left"}),n.createElement("div",{className:"sv-components-column sv-components-column--expandable"},n.createElement(Ga,{survey:this.survey,container:"center"}),n.createElement("div",{id:t,className:s,style:i},n.createElement(Ga,{survey:this.survey,container:"contentTop"}),e,n.createElement(Ga,{survey:this.survey,container:"contentBottom"}),this.survey.showBrandInfo?n.createElement(Wa,null):null)),n.createElement(Ga,{survey:this.survey,container:"right"}))}renderPage(e){return n.createElement(Ha,{survey:this.survey,page:e,css:this.css,creator:this})}renderEmptySurvey(){return n.createElement("div",{className:this.css.bodyEmpty},this.survey.emptySurveyText)}createSurvey(e){e||(e={}),this.previousJSON={},e?e.model?this.survey=e.model:e.json&&(this.previousJSON=e.json,this.survey=new mr(e.json)):this.survey=new mr,e.css&&(this.survey.css=this.css)}isModelJSONChanged(e){return e.model?this.survey!==e.model:!!e.json&&!ue.isTwoValueEquals(e.json,this.previousJSON)}updateSurvey(e,t){if(e)for(var s in t=t||{},e)"model"!=s&&"children"!=s&&"json"!=s&&("css"!=s?e[s]!==t[s]&&(0==s.indexOf("on")&&this.survey[s]&&this.survey[s].add?(t[s]&&this.survey[s].remove(t[s]),this.survey[s].add(e[s])):this.survey[s]=e[s]):(this.survey.mergeValues(e.css,this.survey.getCss()),this.survey.updateNavigationCss(),this.survey.updateElementCss()))}setSurveyEvents(){var e=this;this.survey.renderCallback=function(){var t=e.state&&e.state.modelChanged?e.state.modelChanged:0;e.setState({modelChanged:t+1})},this.survey.onPartialSend.add((t=>{e.state&&e.setState(e.state)}))}createQuestionElement(e){return Ra.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})}renderError(e,t,s,i){return ua.Instance.createElement(this.survey.questionErrorComponent,{key:e,error:t,cssClasses:s,element:i})}questionTitleLocation(){return this.survey.questionTitleLocation}questionErrorLocation(){return this.survey.questionErrorLocation}}function $a(e,t,s={processEsc:!0,disableTabStop:!1}){return t&&t.disableTabStop||s&&s.disableTabStop?n.cloneElement(e,{tabIndex:-1}):(s=Object.assign({},s),n.cloneElement(e,{tabIndex:0,onKeyUp:e=>(e.preventDefault(),e.stopPropagation(),ps(e,s),!1),onKeyDown:e=>function(e,t={processEsc:!0}){if(t&&(t.__keyDownReceived=!0),e.target&&"true"===e.target.contentEditable)return;var s=e.which||e.keyCode;const i=[13,32];t.processEsc&&i.push(27),-1!==i.indexOf(s)&&e.preventDefault()}(e,s),onBlur:e=>cs(e)}))}ua.Instance.registerElement("survey",(e=>n.createElement(Ya,e)));class eo extends n.Component{constructor(e){super(e),this.updateStateFunction=null,this.state={update:0}}get survey(){return this.props.survey}get css(){return this.props.css||this.survey.css}componentDidMount(){if(this.survey){var e=this;this.updateStateFunction=function(){e.setState({update:e.state.update+1})},this.survey.onPageVisibleChanged.add(this.updateStateFunction)}}componentWillUnmount(){this.survey&&this.updateStateFunction&&(this.survey.onPageVisibleChanged.remove(this.updateStateFunction),this.updateStateFunction=null)}}class to extends ca{constructor(e){super(e),this.circleLength=440}getStateElement(){return this.timerModel}get timerModel(){return this.props.model}get progress(){return-this.timerModel.progress*this.circleLength}render(){if(!this.timerModel.isRunning)return null;let e=n.createElement("div",{className:this.timerModel.survey.getCss().timerRoot},this.timerModel.text);if(this.timerModel.showTimerAsClock){let t={strokeDasharray:this.circleLength,strokeDashoffset:this.progress};const s=this.timerModel.showProgress?n.createElement(ba,{className:this.timerModel.getProgressCss(),style:t,iconName:"icon-timercircle",size:"auto"}):null;e=n.createElement("div",{className:this.timerModel.rootCss},s,n.createElement("div",{className:this.timerModel.textContainerCss},n.createElement("span",{className:this.timerModel.majorTextCss},this.timerModel.clockMajorText),this.timerModel.clockMinorText?n.createElement("span",{className:this.timerModel.minorTextCss},this.timerModel.clockMinorText):null))}return e}}ua.Instance.registerElement("sv-timerpanel",(e=>n.createElement(to,e)));class so extends fa{constructor(e){super(e),this.hasBeenExpanded=!1}get panel(){return this.panelBase}renderElement(){const e=this.renderHeader(),t=n.createElement(Ma,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),s={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.renderedIsExpanded?void 0:"none"};let i=null;if(this.panel.renderedIsExpanded){const e=this.renderRows(this.panelBase.cssClasses),t=this.panelBase.cssClasses.panel.content;i=this.renderContent(s,e,t)}return n.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:()=>{this.panelBase&&this.panelBase.focusIn()},id:this.panelBase.id},this.panel.showErrorsAbovePanel?t:null,e,this.panel.showErrorsAbovePanel?null:t,i)}renderHeader(){return this.panel.hasTitle||this.panel.hasDescription?n.createElement(qa,{element:this.panel}):null}wrapElement(e){const t=this.panel.survey;let s=null;return t&&(s=da.wrapElement(t,e,this.panel)),null!=s?s:e}renderContent(e,t,s){const i=this.renderBottom();return n.createElement("div",{style:e,className:s,id:this.panel.contentId},t,i)}renderTitle(){return this.panelBase.title?n.createElement(Ta,{element:this.panelBase}):null}renderDescription(){if(!this.panelBase.description)return null;var e=ha.renderLocString(this.panelBase.locDescription);return n.createElement("div",{className:this.panel.cssClasses.panel.description},e)}renderBottom(){const e=this.panel.getFooterToolbar();return e.hasActions?n.createElement(Pa,{model:e}):null}getIsVisible(){return this.panelBase.getIsContentVisible()}}ua.Instance.registerElement("panel",(e=>n.createElement(so,e)));class io extends so{constructor(e){super(e)}get flowPanel(){return this.panel}componentDidMount(){super.componentDidMount(),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=function(){return""},this.flowPanel.onGetHtmlForQuestion=this.renderQuestion)}componentWillUnmount(){super.componentWillUnmount(),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=null,this.flowPanel.onGetHtmlForQuestion=null)}getQuestion(e){return this.flowPanel.getQuestionByName(e)}renderQuestion(e){return""+e.name+""}renderRows(){const e=this.renderHtml();return e?[e]:[]}getNodeIndex(){return this.renderedIndex++}renderHtml(){if(!this.flowPanel)return null;const e=""+this.flowPanel.produceHtml()+"";if(!DOMParser){const t={__html:e};return n.createElement("div",{dangerouslySetInnerHTML:t})}const t=(new DOMParser).parseFromString(e,"text/xml");return this.renderedIndex=0,this.renderParentNode(t)}renderNodes(e){const t=[];for(let s=0;sn.createElement(io,e)));class ro extends pa{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){var e=this.question.cssClasses;return n.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:e=>this.setControl(e),role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage},n.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.getHeader(),this.question.hasColumns?this.getColumnedBody(e):this.getBody(e),this.getFooter(),this.question.isOtherSelected?this.renderOther():null)}getHeader(){if(this.question.hasHeadItems)return this.question.headItems.map(((e,t)=>this.renderItem(e,!1,this.question.cssClasses)))}getFooter(){if(this.question.hasFootItems)return this.question.footItems.map(((e,t)=>this.renderItem(e,!1,this.question.cssClasses)))}getColumnedBody(e){return n.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))}getColumns(e){return this.question.columns.map(((t,s)=>{var i=t.map(((t,i)=>this.renderItem(t,0===s&&0===i,e,""+s+i)));return n.createElement("div",{key:"column"+s+this.question.getItemsColumnKey(t),className:this.question.getColumnClass(),role:"presentation"},i)}))}getBody(e){return this.question.blockedRow?n.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):n.createElement(n.Fragment,null,this.getItems(e,this.question.bodyItems))}getItems(e,t){for(var s=[],i=0;i{this.question.clickItemHandler(this.item,e.target.checked)},this.rootRef=n.createRef()}getStateElement(){return this.item}get question(){return this.props.question}get item(){return this.props.item}get textStyle(){return this.props.textStyle}get isFirst(){return this.props.isFirst}get index(){return this.props.index}get hideCaption(){return!0===this.props.hideCaption}componentDidUpdate(e,t){super.componentDidUpdate(e,t),e.item===this.props.item||this.question.isDesignMode||(this.props.item&&this.props.item.setRootElement(this.rootRef.current),e.item&&e.item.setRootElement(void 0))}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render)}canRender(){return!!this.item&&!!this.question}renderElement(){var e=this.question.isItemSelected(this.item);return this.renderCheckbox(e,null)}get inputStyle(){return null}renderCheckbox(e,t){const s=this.question.getItemId(this.item),i=this.question.getItemClass(this.item),r=this.question.getLabelClass(this.item),a=this.hideCaption?null:n.createElement("span",{className:this.cssClasses.controlLabel},this.renderLocString(this.item.locText,this.textStyle));return n.createElement("div",{className:i,role:"presentation",ref:this.rootRef},n.createElement("label",{className:r},n.createElement("input",{className:this.cssClasses.itemControl,type:"checkbox",name:this.question.name+this.item.id,value:this.item.value,id:s,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),readOnly:this.question.isReadOnlyAttr,checked:e,onChange:this.handleOnChange,required:this.question.hasRequiredError()}),this.cssClasses.materialDecorator?n.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?n.createElement("svg",{className:this.cssClasses.itemDecorator},n.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,a),t)}componentDidMount(){super.componentDidMount(),this.question.isDesignMode||this.item.setRootElement(this.rootRef.current)}componentWillUnmount(){super.componentWillUnmount(),this.question.isDesignMode||this.item.setRootElement(void 0)}}ua.Instance.registerElement("survey-checkbox-item",(e=>n.createElement(no,e))),Ra.Instance.registerQuestion("checkbox",(e=>n.createElement(ro,e)));class ao extends pa{get question(){return this.questionBase}renderElement(){if(this.question.selectToRankEnabled){const e=!0;return n.createElement("div",{className:this.question.rootClass,ref:e=>this.setControl(e)},n.createElement("div",{className:this.question.getContainerClasses("from"),"data-ranking":"from-container"},this.getItems(this.question.renderedUnRankingChoices,e),0===this.question.renderedUnRankingChoices.length?n.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyRankedAreaText)," "):null),n.createElement("div",{className:this.question.cssClasses.containersDivider}),n.createElement("div",{className:this.question.getContainerClasses("to"),"data-ranking":"to-container"},this.getItems(),0===this.question.renderedRankingChoices.length?n.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyUnrankedAreaText)," "):null))}return n.createElement("div",{className:this.question.rootClass,ref:e=>this.setControl(e)},this.getItems())}getItems(e=this.question.renderedRankingChoices,t){const s=[];for(let i=0;i{this.question.handleKeydown.call(this.question,e,r)}),(e=>{e.persist(),this.question.handlePointerDown.call(this.question,e,r,e.currentTarget)}),(e=>{e.persist(),this.question.handlePointerUp.call(this.question,e,r,e.currentTarget)}),this.question.cssClasses,this.question.getItemClass(r),this.question,t))}return s}renderItem(e,t,s,i,r,a,o,l,u){e.renderedId;const d=this.renderLocString(e.locText),h=t,c=this.question.getNumberByIndex(h),p=this.question.getItemTabIndex(e),m=n.createElement(oo,{key:e.value,text:d,index:h,indexText:c,itemTabIndex:p,handleKeydown:s,handlePointerDown:i,handlePointerUp:r,cssClasses:a,itemClass:o,question:l,unrankedItem:u,item:e}),g=this.question.survey;let v=null;return g&&(v=da.wrapItemValue(g,m,this.question,e)),null!=v?v:m}}class oo extends ca{get text(){return this.props.text}get index(){return this.props.index}get indexText(){return this.props.indexText}get handleKeydown(){return this.props.handleKeydown}get handlePointerDown(){return this.props.handlePointerDown}get handlePointerUp(){return this.props.handlePointerUp}get cssClasses(){return this.props.cssClasses}get itemClass(){return this.props.itemClass}get itemTabIndex(){return this.props.itemTabIndex}get question(){return this.props.question}get unrankedItem(){return this.props.unrankedItem}get item(){return this.props.item}renderEmptyIcon(){return n.createElement("svg",null,n.createElement("use",{xlinkHref:this.question.dashSvgIcon}))}renderElement(){let e=ua.Instance.createElement(this.question.itemComponent,{item:this.item,cssClasses:this.cssClasses});return n.createElement("div",{tabIndex:this.itemTabIndex,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,onPointerUp:this.handlePointerUp,"data-sv-drop-target-ranking-item":this.index},n.createElement("div",{tabIndex:-1,style:{outline:"none"}},n.createElement("div",{className:this.cssClasses.itemGhostNode}),n.createElement("div",{className:this.cssClasses.itemContent},n.createElement("div",{className:this.cssClasses.itemIconContainer},n.createElement("svg",{className:this.question.getIconHoverCss()},n.createElement("use",{xlinkHref:this.question.dragDropSvgIcon})),n.createElement("svg",{className:this.question.getIconFocusCss()},n.createElement("use",{xlinkHref:this.question.arrowsSvgIcon}))),n.createElement("div",{className:this.question.getItemIndexClasses(this.item)},!this.unrankedItem&&this.indexText?this.indexText:this.renderEmptyIcon()),e)))}}class lo extends ca{get item(){return this.props.item}get cssClasses(){return this.props.cssClasses}renderElement(){return n.createElement("div",{className:this.cssClasses.controlLabel},ha.renderLocString(this.item.locText))}}ua.Instance.registerElement("sv-ranking-item",(e=>n.createElement(lo,e))),Ra.Instance.registerQuestion("ranking",(e=>n.createElement(ao,e)));class uo extends ha{constructor(e){super(e),this.handleOnMouseDown=this.handleOnMouseDown.bind(this)}get question(){return this.props.question}get item(){return this.props.item}get index(){return this.props.index}getStateElement(){return this.item}handleOnMouseDown(e){this.question.onMouseDown()}}class ho extends uo{render(){var e=this.renderLocString(this.item.locText);return n.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClassByText(this.item.itemValue,this.item.text)},n.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:()=>{},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),n.createElement("span",{className:this.question.cssClasses.itemText,"data-text":this.item.text},e))}componentDidMount(){super.componentDidMount()}}ua.Instance.registerElement("sv-rating-item",(e=>n.createElement(ho,e)));class co extends uo{render(){return n.createElement("label",{onMouseDown:this.handleOnMouseDown,className:this.question.getItemClass(this.item.itemValue),onMouseOver:e=>this.question.onItemMouseIn(this.item),onMouseOut:e=>this.question.onItemMouseOut(this.item)},n.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:()=>{},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),n.createElement(ba,{className:"sv-star",size:"auto",iconName:this.question.itemStarIcon,title:this.item.text}),n.createElement(ba,{className:"sv-star-2",size:"auto",iconName:this.question.itemStarIconAlt,title:this.item.text}))}}ua.Instance.registerElement("sv-rating-item-star",(e=>n.createElement(co,e)));class po extends uo{render(){return n.createElement("label",{onMouseDown:this.handleOnMouseDown,style:this.question.getItemStyle(this.item.itemValue,this.item.highlight),className:this.question.getItemClass(this.item.itemValue),onMouseOver:e=>this.question.onItemMouseIn(this.item),onMouseOut:e=>this.question.onItemMouseOut(this.item)},n.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:()=>{},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),n.createElement(ba,{size:"auto",iconName:this.question.getItemSmileyIconName(this.item.itemValue),title:this.item.text}))}}ua.Instance.registerElement("sv-rating-item-smiley",(e=>n.createElement(po,e)));class mo extends ha{get item(){return this.props.item}getStateElement(){return this.item}render(){if(!this.item)return null;const e=this.props.item,t=this.renderDescription(e);return n.createElement("div",{className:"sd-rating-dropdown-item"},n.createElement("span",{className:"sd-rating-dropdown-item_text"},e.title),t)}renderDescription(e){return e.description?n.createElement("div",{className:"sd-rating-dropdown-item_description"},this.renderLocString(e.description,void 0,"locString")):null}}ua.Instance.registerElement("sv-rating-dropdown-item",(e=>n.createElement(mo,e)));class go extends ha{get model(){return this.props.model}get question(){return this.props.question}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.updateDomElement()}componentDidMount(){super.componentDidMount(),this.updateDomElement()}updateDomElement(){if(this.inputElement){const e=this.inputElement,t=this.model.inputStringRendered;ue.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.model.inputStringRendered)}}onChange(e){const{root:t}=Ps.environment;e.target===t.activeElement&&(this.model.inputStringRendered=e.target.value)}keyhandler(e){this.model.inputKeyHandler(e)}onBlur(e){this.question.onBlur(e)}onFocus(e){this.question.onFocus(e)}constructor(e){super(e)}getStateElement(){return this.model}render(){return n.createElement("div",{className:this.question.cssClasses.hint},this.model.showHintPrefix?n.createElement("div",{className:this.question.cssClasses.hintPrefix},n.createElement("span",null,this.model.hintStringPrefix)):null,n.createElement("div",{className:this.question.cssClasses.hintSuffixWrapper},this.model.showHintString?n.createElement("div",{className:this.question.cssClasses.hintSuffix},n.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},this.model.inputStringRendered),n.createElement("span",null,this.model.hintStringSuffix)):null,n.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),inputMode:this.model.inputMode,ref:e=>this.inputElement=e,className:this.question.cssClasses.filterStringInput,disabled:this.question.isInputReadOnly,readOnly:!!this.model.filterReadOnly||void 0,size:this.model.inputStringRendered?void 0:1,role:this.model.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-controls":this.model.listElementId,"aria-activedescendant":this.model.ariaActivedescendant,placeholder:this.model.filterStringPlaceholder,onKeyDown:e=>{this.keyhandler(e)},onChange:e=>{this.onChange(e)},onBlur:e=>{this.onBlur(e)},onFocus:e=>{this.onFocus(e)}})))}}Ra.Instance.registerQuestion("sv-tagbox-filter",(e=>n.createElement(go,e)));class vo extends ca{constructor(e){super(e),this.state={changed:0},this.setupModel()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.setupModel()}componentDidMount(){super.componentDidMount(),this.setupModel()}componentWillUnmount(){super.componentWillUnmount(),this.item&&(this.item.locText.onChanged=()=>{})}setupModel(){if(!this.item.locText)return;const e=this;this.item.locText.onChanged=()=>{e.setState({changed:e.state.changed+1})}}getStateElement(){return this.item}get item(){return this.props.item}canRender(){return!!this.item}renderElement(){return n.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)}}class fo extends ma{constructor(){super(...arguments),this.click=e=>{var t;null===(t=this.question.dropdownListModel)||void 0===t||t.onClick(e)},this.chevronPointerDown=e=>{var t;null===(t=this.question.dropdownListModel)||void 0===t||t.chevronPointerDown(e)},this.clear=e=>{var t;null===(t=this.question.dropdownListModel)||void 0===t||t.onClear(e)},this.keyhandler=e=>{var t;null===(t=this.question.dropdownListModel)||void 0===t||t.keyHandler(e)},this.blur=e=>{this.updateInputDomElement(),this.question.onBlur(e)},this.focus=e=>{this.question.onFocus(e)}}getStateElement(){return this.question.dropdownListModel}setValueCore(e){this.questionBase.renderedValue=e}getValueCore(){return this.questionBase.renderedValue}renderReadOnlyElement(){return n.createElement("div",null,this.question.readOnlyText)}renderSelect(e){var t,s;let i=null;if(this.question.isReadOnly){const e=this.question.selectedItemLocText?this.renderLocString(this.question.selectedItemLocText):"";i=n.createElement("div",{id:this.question.inputId,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,tabIndex:this.question.isDisabledAttr?void 0:0,className:this.question.getControlClass(),ref:e=>this.setControl(e)},e,this.renderReadOnlyElement())}else i=n.createElement(n.Fragment,null,this.renderInput(this.question.dropdownListModel),n.createElement(xa,{model:null===(s=null===(t=this.question)||void 0===t?void 0:t.dropdownListModel)||void 0===s?void 0:s.popupModel}));return n.createElement("div",{className:e.selectWrapper,onClick:this.click},i,this.createChevronButton())}renderValueElement(e){return this.question.showInputFieldComponent?ua.Instance.createElement(this.question.inputFieldComponentName,{item:e.getSelectedAction(),question:this.question}):this.question.showSelectedItemLocText?this.renderLocString(this.question.selectedItemLocText):null}renderInput(e){let t=this.renderValueElement(e);const{root:s}=Ps.environment;return n.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isDisabledAttr,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,onFocus:this.focus,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,"aria-expanded":this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant,ref:e=>this.setControl(e)},e.showHintPrefix?n.createElement("div",{className:this.question.cssClasses.hintPrefix},n.createElement("span",null,e.hintStringPrefix)):null,n.createElement("div",{className:this.question.cssClasses.controlValue},e.showHintString?n.createElement("div",{className:this.question.cssClasses.hintSuffix},n.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},e.inputStringRendered),n.createElement("span",null,e.hintStringSuffix)):null,t,n.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),ref:e=>this.inputElement=e,className:this.question.cssClasses.filterStringInput,role:e.filterStringEnabled?this.question.ariaRole:void 0,"aria-expanded":this.question.ariaExpanded,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant,placeholder:e.placeholderRendered,readOnly:!!e.filterReadOnly||void 0,tabIndex:e.noTabIndex?void 0:-1,disabled:this.question.isDisabledAttr,inputMode:e.inputMode,onChange:t=>{(t=>{t.target===s.activeElement&&(e.inputStringRendered=t.target.value)})(t)},onBlur:this.blur,onFocus:this.focus})),this.createClearButton())}createClearButton(){if(!this.question.allowClear||!this.question.cssClasses.cleanButtonIconId)return null;const e={display:this.question.showClearButton?"":"none"};return n.createElement("div",{className:this.question.cssClasses.cleanButton,style:e,onClick:this.clear,"aria-hidden":"true"},n.createElement(ba,{className:this.question.cssClasses.cleanButtonSvg,iconName:this.question.cssClasses.cleanButtonIconId,title:this.question.clearCaption,size:"auto"}))}createChevronButton(){return this.question.cssClasses.chevronButtonIconId?n.createElement("div",{className:this.question.cssClasses.chevronButton,"aria-hidden":"true",onPointerDown:this.chevronPointerDown},n.createElement(ba,{className:this.question.cssClasses.chevronButtonSvg,iconName:this.question.cssClasses.chevronButtonIconId,size:"auto"})):null}renderOther(e){return n.createElement("div",{className:this.question.getCommentAreaCss(!0)},n.createElement(ja,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode,isOther:!0}))}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.updateInputDomElement()}componentDidMount(){super.componentDidMount(),this.updateInputDomElement()}componentWillUnmount(){super.componentWillUnmount(),this.question.dropdownListModel&&(this.question.dropdownListModel.focused=!1)}updateInputDomElement(){if(this.inputElement){const e=this.inputElement,t=this.question.dropdownListModel.inputStringRendered;ue.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.question.dropdownListModel.inputStringRendered)}}}class bo extends fo{constructor(e){super(e)}renderElement(){const e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,s=this.renderSelect(e);return n.createElement("div",{className:this.question.renderCssRoot},s,t)}}Ra.Instance.registerQuestion("dropdown",(e=>n.createElement(bo,e)));class yo extends ca{constructor(e){super(e)}get question(){return this.props.question}get item(){return this.props.item}canRender(){return!!this.item&&!!this.question}renderElement(){const e=this.renderLocString(this.item.locText);return n.createElement("div",{className:"sv-tagbox__item"},n.createElement("div",{className:"sv-tagbox__item-text"},e),n.createElement("div",{className:this.question.cssClasses.cleanItemButton,onClick:e=>{this.question.dropdownListModel.deselectItem(this.item.value),e.stopPropagation()}},n.createElement(ba,{className:this.question.cssClasses.cleanItemButtonSvg,iconName:this.question.cssClasses.cleanItemButtonIconId,size:"auto"})))}}class Co extends fo{constructor(e){super(e)}renderItem(e,t){return n.createElement(yo,{key:e,question:this.question,item:t})}renderInput(e){const t=e,s=this.question.selectedChoices.map(((e,t)=>this.renderItem("item"+t,e)));return n.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:this.question.ariaRole,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,"aria-expanded":this.question.ariaExpanded,"aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant,ref:e=>this.setControl(e)},n.createElement("div",{className:this.question.cssClasses.controlValue},s,n.createElement(go,{model:t,question:this.question})),this.createClearButton())}renderElement(){const e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,s=this.renderSelect(e);return n.createElement("div",{className:this.question.renderCssRoot},s,t)}renderReadOnlyElement(){return this.question.locReadOnlyText?this.renderLocString(this.question.locReadOnlyText):null}}Ra.Instance.registerQuestion("tagbox",(e=>n.createElement(Co,e)));class wo extends bo{constructor(e){super(e)}renderSelect(e){const t=this.isDisplayMode?n.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):n.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:e=>this.setControl(e),autoComplete:this.question.autocomplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onClick:e=>{this.question.onClick(e)},onKeyUp:e=>{this.question.onKeyUp(e)},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,required:this.question.isRequired},this.question.allowClear?n.createElement("option",{value:""},this.question.placeholder):null,this.question.visibleChoices.map(((e,t)=>n.createElement(vo,{key:"item"+t,item:e}))));return n.createElement("div",{className:e.selectWrapper},t,this.createChevronButton())}}Ra.Instance.registerQuestion("sv-dropdown-select",(e=>n.createElement(wo,e))),Ys.Instance.registerRenderer("dropdown","select","sv-dropdown-select");class xo extends pa{constructor(e){super(e),this.state={rowsChanged:0}}get question(){return this.questionBase}componentDidMount(){if(super.componentDidMount(),this.question){var e=this;this.question.visibleRowsChangedCallback=function(){e.setState({rowsChanged:e.state.rowsChanged+1})}}}componentWillUnmount(){super.componentWillUnmount(),this.question&&(this.question.visibleRowsChangedCallback=null)}renderElement(){for(var e=this.question.cssClasses,t=this.question.hasRows?n.createElement("td",null):null,s=[],i=0;ithis.setControl(e)},n.createElement("fieldset",null,n.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),n.createElement("table",{className:this.question.getTableCss()},h,n.createElement("tbody",null,l))))}}class Vo extends ca{constructor(e){super(e)}getStateElement(){return this.row?this.row.item:super.getStateElement()}get question(){return this.props.question}get row(){return this.props.row}wrapCell(e,t,s){if(!s)return t;const i=this.question.survey;let r=null;return i&&(r=da.wrapMatrixCell(i,t,e,s)),null!=r?r:t}canRender(){return!!this.row}renderElement(){var e=null;if(this.question.hasRows){var t=this.renderLocString(this.row.locText);const s={};this.question.rowTitleWidth&&(s.minWidth=this.question.rowTitleWidth,s.width=this.question.rowTitleWidth),e=n.createElement("td",{style:s,className:this.row.rowTextClasses},this.wrapCell({row:this.row},t,"row-header"))}var s=this.generateTds();return n.createElement("tr",{className:this.row.rowClasses||void 0},e,s)}generateTds(){const e=[],t=this.row,s=this.question.cellComponent;for(var i=0;i()=>this.cellClick(t,e);r=n.createElement("td",{key:o,className:l,onClick:e?e(a):()=>{}},this.renderLocString(this.question.getCellDisplayLocText(t.name,a)))}else{const e=ua.Instance.createElement(s,{question:this.question,row:this.row,column:a,columnIndex:i,cssClasses:this.cssClasses,cellChanged:()=>{this.cellClick(this.row,a)}});r=n.createElement("td",{key:o,"data-responsive-title":a.locText.renderedHtml,className:this.question.cssClasses.cell},e)}e.push(r)}return e}cellClick(e,t){e.value=t.value,this.setState({value:this.row.value})}}class _o extends ca{constructor(e){super(e),this.handleOnMouseDown=this.handleOnMouseDown.bind(this),this.handleOnChange=this.handleOnChange.bind(this)}handleOnChange(e){this.props.cellChanged&&this.props.cellChanged()}handleOnMouseDown(e){this.question.onMouseDown()}get question(){return this.props.question}get row(){return this.props.row}get column(){return this.props.column}get columnIndex(){return this.props.columnIndex}canRender(){return!!this.question&&!!this.row}renderElement(){const e=this.row.value==this.column.value,t=this.question.inputId+"_"+this.row.name+"_"+this.columnIndex,s=this.question.getItemClass(this.row,this.column),i=this.question.isMobile?n.createElement("span",{className:this.question.cssClasses.cellResponsiveTitle},this.renderLocString(this.column.locText)):void 0;return n.createElement("label",{onMouseDown:this.handleOnMouseDown,className:s},this.renderInput(t,e),n.createElement("span",{className:this.question.cssClasses.materialDecorator},this.question.itemSvgIcon?n.createElement("svg",{className:this.cssClasses.itemDecorator},n.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null),i)}renderInput(e,t){return n.createElement("input",{id:e,type:"radio",className:this.cssClasses.itemValue,name:this.row.fullName,value:this.column.value,disabled:this.row.isDisabledAttr,readOnly:this.row.isReadOnlyAttr,checked:t,onChange:this.handleOnChange,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.getCellAriaLabel(this.row.locText.renderedHtml,this.column.locText.renderedHtml),"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage})}}ua.Instance.registerElement("survey-matrix-cell",(e=>n.createElement(_o,e))),Ra.Instance.registerQuestion("matrix",(e=>n.createElement(xo,e)));class Eo extends pa{constructor(e){super(e)}get question(){return this.questionBase}componentDidMount(){this.reactOnStrChanged()}componentWillUnmount(){this.question.locHtml.onChanged=function(){}}componentDidUpdate(e,t){this.reactOnStrChanged()}reactOnStrChanged(){this.question.locHtml.onChanged=()=>{this.setState({changed:this.state&&this.state.changed?this.state.changed+1:1})}}canRender(){return super.canRender()&&!!this.question.html}renderElement(){var e={__html:this.question.locHtml.renderedHtml};return n.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})}}Ra.Instance.registerQuestion("html",(e=>n.createElement(Eo,e)));class Po extends n.Component{render(){return n.createElement("div",{className:"sd-loading-indicator"},n.createElement(ba,{iconName:"icon-loading",size:"auto"}))}}class So extends ca{constructor(e){super(e)}get question(){return this.props.item&&this.props.item.data.question||this.props.data.question}render(){return $a(n.createElement("label",{tabIndex:0,className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonText,onClick:e=>this.question.chooseFile(e.nativeEvent)},this.question.cssClasses.chooseFileIconId?n.createElement(ba,{title:this.question.chooseButtonText,iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null,n.createElement("span",null,this.question.chooseButtonText)))}}ua.Instance.registerElement("sv-file-choose-btn",(e=>n.createElement(So,e)));class Io extends pa{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){const e=this.question.allowShowPreview?this.renderPreview():null,t=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,s=this.question.isPlayingVideo?this.renderVideo():null,i=this.question.showFileDecorator?this.renderFileDecorator():null,r=this.question.showRemoveButton?this.renderClearButton(this.question.cssClasses.removeButton):null,a=this.question.showRemoveButtonBottom?this.renderClearButton(this.question.cssClasses.removeButtonBottom):null,o=this.question.fileNavigatorVisible?n.createElement(Pa,{model:this.question.fileNavigator}):null;let l;return l=this.question.isReadOnlyAttr?n.createElement("input",{readOnly:!0,type:"file",className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:e=>this.setControl(e),style:this.isDisplayMode?{color:"transparent"}:{},multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):this.question.isDisabledAttr?n.createElement("input",{disabled:!0,type:"file",className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:e=>this.setControl(e),style:this.isDisplayMode?{color:"transparent"}:{},multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):this.question.hasFileUI?n.createElement("input",{type:"file",disabled:this.isDisplayMode,tabIndex:-1,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:e=>this.setControl(e),style:this.isDisplayMode?{color:"transparent"}:{},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,multiple:this.question.allowMultiple,title:this.question.inputTitle,accept:this.question.acceptedTypes,capture:this.question.renderCapture}):null,n.createElement("div",{className:this.question.fileRootCss,ref:e=>this.setContent(e)},l,n.createElement("div",{className:this.question.cssClasses.dragArea,onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave,onDragEnter:this.question.onDragEnter},i,t,s,r,e,a,o))}renderFileDecorator(){const e=this.question.showChooseButton?this.renderChooseButton():null,t=this.question.actionsContainerVisible?n.createElement(Pa,{model:this.question.actionsContainer}):null,s=this.question.isEmpty()?n.createElement("span",{className:this.question.cssClasses.noFileChosen},this.question.noFileChosenCaption):null;return n.createElement("div",{className:this.question.getFileDecoratorCss()},n.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.renderLocString(this.question.locRenderedPlaceholder)),n.createElement("div",{className:this.question.cssClasses.wrapper},e,t,s))}renderChooseButton(){return n.createElement(So,{data:{question:this.question}})}renderClearButton(e){return this.question.isUploading?null:n.createElement("button",{type:"button",onClick:this.question.doClean,className:e},n.createElement("span",null,this.question.clearButtonCaption),this.question.cssClasses.removeButtonIconId?n.createElement(ba,{iconName:this.question.cssClasses.removeButtonIconId,size:"auto",title:this.question.clearButtonCaption}):null)}renderPreview(){return ua.Instance.createElement("sv-file-preview",{question:this.question})}renderLoadingIndicator(){return n.createElement("div",{className:this.question.cssClasses.loadingIndicator},n.createElement(Po,null))}renderVideo(){return n.createElement("div",{className:this.question.cssClasses.videoContainer},n.createElement(Ca,{item:this.question.changeCameraAction}),n.createElement(Ca,{item:this.question.closeCameraAction}),n.createElement("video",{autoPlay:!0,playsInline:!0,id:this.question.videoId,className:this.question.cssClasses.video}),n.createElement(Ca,{item:this.question.takePictureAction}))}}Ra.Instance.registerQuestion("file",(e=>n.createElement(Io,e)));class To extends ha{get question(){return this.props.question}get item(){return this.props.item}renderFileSign(e,t){return e&&t.name?n.createElement("div",{className:e},n.createElement("a",{href:t.content,onClick:e=>{this.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth}},t.name)):null}renderElement(){const e=this.item;return n.createElement("span",{className:this.question.cssClasses.previewItem,onClick:e=>this.question.doDownloadFileFromContainer(e)},this.renderFileSign(this.question.cssClasses.fileSign,e),n.createElement("div",{className:this.question.getImageWrapperCss(e)},this.question.canPreviewImage(e)?n.createElement("img",{src:e.content,style:{height:this.question.imageHeight,width:this.question.imageWidth},alt:"File preview"}):this.question.cssClasses.defaultImage?n.createElement(ba,{iconName:this.question.cssClasses.defaultImageIconId,size:"auto",className:this.question.cssClasses.defaultImage}):null,e.name&&!this.question.isReadOnly?n.createElement("div",{className:this.question.getRemoveButtonCss(),onClick:t=>this.question.doRemoveFile(e,t)},n.createElement("span",{className:this.question.cssClasses.removeFile},this.question.removeFileCaption),this.question.cssClasses.removeFileSvgIconId?n.createElement(ba,{title:this.question.removeFileCaption,iconName:this.question.cssClasses.removeFileSvgIconId,size:"auto",className:this.question.cssClasses.removeFileSvg}):null):null),this.renderFileSign(this.question.cssClasses.fileSignBottom,e))}canRender(){return this.question.showPreviewContainer}}class Ro extends ha{get question(){return this.props.question}get page(){return this.props.page}renderElement(){const e=this.page.items.map(((e,t)=>n.createElement(To,{item:e,question:this.question,key:t})));return n.createElement("div",{className:this.page.css,id:this.page.id},e)}}class ko extends ha{get question(){return this.props.question}renderFileSign(e,t){return e&&t.name?n.createElement("div",{className:e},n.createElement("a",{href:t.content,onClick:e=>{this.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth}},t.name)):null}renderElement(){const e=this.question.supportFileNavigator?this.question.renderedPages.map(((e,t)=>n.createElement(Ro,{page:e,question:this.question,key:e.id}))):this.question.previewValue.map(((e,t)=>n.createElement(To,{item:e,question:this.question,key:t})));return n.createElement("div",{className:this.question.cssClasses.fileList||void 0},e)}canRender(){return this.question.showPreviewContainer}}ua.Instance.registerElement("sv-file-preview",(e=>n.createElement(ko,e)));class Do extends pa{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){for(var e=this.question.cssClasses,t=this.question.getRows(),s=[],i=0;i{e.item.focusIn()}},i)}renderRow(e,t,s){const i="item"+e,r=[];for(let e=0;en.createElement(Do,e)));class jo extends pa{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){var e=this.question.cssClasses,t=null;return this.question.showClearButtonInContent&&(t=n.createElement("div",null,n.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:()=>this.question.clearValue(!0),value:this.question.clearButtonCaption}))),n.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:e=>this.setControl(e),role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage},this.question.hasColumns?this.getColumnedBody(e):this.getBody(e),this.getFooter(),this.question.isOtherSelected?this.renderOther(e):null,t)}getFooter(){if(this.question.hasFootItems)return this.question.footItems.map(((e,t)=>this.renderItem(e,!1,this.question.cssClasses)))}getColumnedBody(e){return n.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))}getColumns(e){var t=this.getStateValue();return this.question.columns.map(((s,i)=>{var r=s.map(((s,r)=>this.renderItem(s,t,e,""+i+r)));return n.createElement("div",{key:"column"+i+this.question.getItemsColumnKey(s),className:this.question.getColumnClass(),role:"presentation"},r)}))}getBody(e){return this.question.blockedRow?n.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):n.createElement(n.Fragment,null,this.getItems(e,this.question.bodyItems))}getItems(e,t){for(var s=[],i=this.getStateValue(),r=0;rn.createElement(Oo,e))),Ra.Instance.registerQuestion("radiogroup",(e=>n.createElement(jo,e)));class qo extends ma{constructor(e){super(e)}renderInput(){const e=this.question.getControlClass(),t=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return n.createElement("div",null,this.question.inputValue);const s=this.question.getMaxLength()?n.createElement(ka,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return n.createElement(n.Fragment,null,n.createElement("input",{id:this.question.inputId,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,className:e,type:this.question.inputType,ref:e=>this.setControl(e),style:this.question.inputStyle,maxLength:this.question.getMaxLength(),min:this.question.renderedMin,max:this.question.renderedMax,step:this.question.renderedStep,size:this.question.inputSize,placeholder:t,list:this.question.dataListId,autoComplete:this.question.autocomplete,onBlur:e=>{this.question.onBlur(e)},onFocus:e=>{this.question.onFocus(e)},onChange:this.question.onChange,onKeyUp:this.question.onKeyUp,onKeyDown:this.question.onKeyDown,onCompositionUpdate:e=>this.question.onCompositionUpdate(e.nativeEvent),"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}),s)}renderElement(){return this.question.dataListId?n.createElement("div",null,this.renderInput(),this.renderDataList()):this.renderInput()}setValueCore(e){this.question.inputValue=e}getValueCore(){return this.question.inputValue}renderDataList(){if(!this.question.dataListId)return null;var e=this.question.dataList;if(0==e.length)return null;for(var t=[],s=0;sn.createElement(qo,e)));class No extends pa{constructor(e){super(e),this.handleOnChange=this.handleOnChange.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.handleOnLabelClick=this.handleOnLabelClick.bind(this),this.handleOnSwitchClick=this.handleOnSwitchClick.bind(this),this.handleOnKeyDown=this.handleOnKeyDown.bind(this),this.checkRef=n.createRef()}getStateElement(){return this.question}get question(){return this.questionBase}doCheck(e){this.question.booleanValue=e}handleOnChange(e){this.doCheck(e.target.checked)}handleOnClick(e){this.question.onLabelClick(e,!0)}handleOnSwitchClick(e){this.question.onSwitchClickModel(e.nativeEvent)}handleOnLabelClick(e,t){this.question.onLabelClick(e,t)}handleOnKeyDown(e){this.question.onKeyDownCore(e)}updateDomElement(){if(!this.question)return;const e=this.checkRef.current;e&&(e.indeterminate=this.question.isIndeterminate),this.setControl(e),super.updateDomElement()}renderElement(){const e=this.question.cssClasses,t=this.question.getItemCss();return n.createElement("div",{className:e.root,onKeyDown:this.handleOnKeyDown},n.createElement("label",{className:t,onClick:this.handleOnClick},n.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:e.control,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}),n.createElement("div",{className:e.sliderGhost,onClick:e=>this.handleOnLabelClick(e,this.question.swapOrder)},n.createElement("span",{className:this.question.getLabelCss(this.question.swapOrder)},this.renderLocString(this.question.locLabelLeft))),n.createElement("div",{className:e.switch,onClick:this.handleOnSwitchClick},n.createElement("span",{className:e.slider},this.question.isDeterminated&&e.sliderText?n.createElement("span",{className:e.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),n.createElement("div",{className:e.sliderGhost,onClick:e=>this.handleOnLabelClick(e,!this.question.swapOrder)},n.createElement("span",{className:this.question.getLabelCss(!this.question.swapOrder)},this.renderLocString(this.question.locLabelRight)))))}}Ra.Instance.registerQuestion("boolean",(e=>n.createElement(No,e)));class Mo extends No{constructor(e){super(e)}renderElement(){const e=this.question.cssClasses,t=this.question.getCheckboxItemCss(),s=this.question.canRenderLabelDescription?ha.renderQuestionDescription(this.question):null;return n.createElement("div",{className:e.rootCheckbox},n.createElement("div",{className:t},n.createElement("label",{className:e.checkboxLabel},n.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:e.controlCheckbox,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),n.createElement("span",{className:e.checkboxMaterialDecorator},this.question.svgIcon?n.createElement("svg",{className:e.checkboxItemDecorator},n.createElement("use",{xlinkHref:this.question.svgIcon})):null,n.createElement("span",{className:"check"})),this.question.isLabelRendered&&n.createElement("span",{className:e.checkboxControlLabel,id:this.question.labelRenderedAriaID},n.createElement(Ia,{element:this.question,cssClasses:this.question.cssClasses}))),s))}}Ra.Instance.registerQuestion("sv-boolean-checkbox",(e=>n.createElement(Mo,e))),Ys.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");class Fo extends No{constructor(e){super(e),this.handleOnChange=e=>{this.question.booleanValue="true"==e.nativeEvent.target.value}}renderRadioItem(e,t){const s=this.question.cssClasses;return n.createElement("div",{role:"presentation",className:this.question.getRadioItemClass(s,e)},n.createElement("label",{className:s.radioLabel},n.createElement("input",{type:"radio",name:this.question.name,value:e,"aria-errormessage":this.question.ariaErrormessage,checked:e===this.question.booleanValueRendered,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,className:s.itemRadioControl,onChange:this.handleOnChange}),this.question.cssClasses.materialRadioDecorator?n.createElement("span",{className:s.materialRadioDecorator},this.question.itemSvgIcon?n.createElement("svg",{className:s.itemRadioDecorator},n.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,n.createElement("span",{className:s.radioControlLabel},this.renderLocString(t))))}renderElement(){const e=this.question.cssClasses;return n.createElement("div",{className:e.rootRadio},n.createElement("fieldset",{role:"presentation",className:e.radioFieldset},this.question.swapOrder?n.createElement(n.Fragment,null,this.renderRadioItem(!0,this.question.locLabelTrue),this.renderRadioItem(!1,this.question.locLabelFalse)):n.createElement(n.Fragment,null,this.renderRadioItem(!1,this.question.locLabelFalse),this.renderRadioItem(!0,this.question.locLabelTrue))))}}Ra.Instance.registerQuestion("sv-boolean-radio",(e=>n.createElement(Fo,e))),Ys.Instance.registerRenderer("boolean","radio","sv-boolean-radio");class Bo extends pa{constructor(e){super(e),this.state={value:this.question.value}}get question(){return this.questionBase}renderElement(){return n.createElement("div",null)}}Ra.Instance.registerQuestion("empty",(e=>n.createElement(Bo,e)));class zo extends ha{constructor(e){super(e),this.root=n.createRef(),this.onPointerDownHandler=e=>{this.parentMatrix.onPointerDown(e.nativeEvent,this.model.row)}}get model(){return this.props.model}get parentMatrix(){return this.props.parentMatrix}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.root.current&&this.model.setRootElement(this.root.current)}componentWillUnmount(){super.componentWillUnmount(),this.model.setRootElement(void 0)}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(e.model!==this.model&&(e.element&&e.element.setRootElement(this.root.current),this.model&&this.model.setRootElement(void 0)),!0)}render(){const e=this.model;return e.visible?n.createElement("tr",{ref:this.root,className:e.className,"data-sv-drop-target-matrix-row":e.row&&e.row.id,onPointerDown:e=>this.onPointerDownHandler(e)},this.props.children):null}}ua.Instance.registerElement("sv-matrix-row",(e=>n.createElement(zo,e)));class Ho extends ca{get question(){return this.props.item.data.question}renderElement(){return n.createElement("div",null,this.renderIcon())}renderIcon(){return this.question.iconDragElement?n.createElement("svg",{className:this.question.cssClasses.dragElementDecorator},n.createElement("use",{xlinkHref:this.question.iconDragElement})):n.createElement("span",{className:this.question.cssClasses.iconDrag})}}ua.Instance.registerElement("sv-matrix-drag-drop-icon",(e=>n.createElement(Ho,e)));class Qo extends ha{get question(){return this.props.question}get creator(){return this.props.creator}get table(){return this.question.renderedTable}getStateElement(){return this.table}wrapCell(e,t,s){return this.props.wrapCell(e,t,s)}renderHeader(){const e=this.question.renderedTable;if(!e.showHeader)return null;const t=[],s=e.headerRow.cells;for(var i=0;i{this.updateStateOnCallback()}}componentWillUnmount(){super.componentWillUnmount(),this.question.onRenderedTableResetCallback=()=>{}}renderElement(){return this.renderTableDiv()}renderTableDiv(){var e=this.question.showHorizontalScroll?{overflowX:"scroll"}:{};return n.createElement("div",{style:e,className:this.question.cssClasses.tableWrapper,ref:e=>this.setControl(e)},n.createElement(Qo,{question:this.question,creator:this.creator,wrapCell:(e,t,s)=>this.wrapCell(e,t,s)}))}}class Uo extends ca{constructor(e){super(e)}get model(){return this.props.model}renderElement(){return n.createElement(Pa,{model:this.model,handleClick:!1})}}class Go extends za{constructor(e){super(e)}get key(){return this.props.keyValue}get cell(){return this.props.cell}render(){return this.cell.isVisible?n.createElement("td",{className:this.cell.className,key:this.key,colSpan:this.cell.colSpans,title:this.cell.getTitle()},super.render()):null}getQuestionPropertiesToTrack(){return super.getQuestionPropertiesToTrack().concat(["visible"])}}ua.Instance.registerElement("sv-matrixdynamic-actions-cell",(e=>n.createElement(Uo,e)));class Zo extends ca{constructor(e){super(e)}get column(){return this.props.column}get question(){return this.props.question}getStateElement(){return this.column}renderElement(){return this.column.isRenderedRequired?n.createElement(n.Fragment,null,n.createElement("span",null," "),n.createElement("span",{className:this.question.cssClasses.cellRequiredMark},this.column.requiredMark)):null}}class Jo extends Ba{constructor(e){super(e)}get cell(){return this.props.cell}get itemCss(){return this.cell?this.cell.className:""}getQuestion(){var e=super.getQuestion();return e||(this.cell?this.cell.question:null)}doAfterRender(){var e=this.cellRef.current;if(e&&this.cell&&this.question&&this.question.survey&&"r"!==e.getAttribute("data-rendered")){e.setAttribute("data-rendered","r");const t={cell:this.cell,cellQuestion:this.question,htmlElement:e,row:this.cell.row,column:this.cell.cell.column};this.question.survey.matrixAfterCellRender(this.question,t),this.question.afterRenderCore(e)}}getShowErrors(){return this.question.isVisible&&(!this.cell.isChoice||this.cell.isFirstChoice)}getCellStyle(){var e=super.getCellStyle();return(this.cell.width||this.cell.minWidth)&&(e||(e={}),this.cell.width&&(e.width=this.cell.width),this.cell.minWidth&&(e.minWidth=this.cell.minWidth)),e}getHeaderText(){return this.cell.headers}renderElement(){return this.cell.isVisible?super.renderElement():null}renderCellContent(){const e=super.renderCellContent(),t=this.cell.showResponsiveTitle?n.createElement("span",{className:this.cell.responsiveTitleCss},this.renderLocString(this.cell.responsiveLocTitle),n.createElement(Zo,{column:this.cell.column,question:this.cell.matrix})):null;return n.createElement(n.Fragment,null,t,e)}renderQuestion(){return this.question.isVisible?this.cell.isChoice?this.cell.isOtherChoice?this.renderOtherComment():this.cell.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():Na.renderQuestionBody(this.creator,this.question):n.createElement(n.Fragment,null)}renderOtherComment(){const e=this.cell.question,t=e.cssClasses||{};return n.createElement(ja,{question:e,cssClasses:t,otherCss:t.other,isDisplayMode:e.isInputReadOnly})}renderCellCheckboxButton(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return n.createElement(no,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,isFirst:this.cell.isFirstChoice,index:this.cell.choiceIndex.toString(),hideCaption:!0})}renderCellRadiogroupButton(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return n.createElement(Oo,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,index:this.cell.choiceIndex.toString(),isChecked:this.cell.question.value===this.cell.item.value,isDisabled:this.cell.question.isReadOnly||!this.cell.item.isEnabled,hideCaption:!0})}}class Ko extends Wo{constructor(e){super(e)}}Ra.Instance.registerQuestion("matrixdropdown",(e=>n.createElement(Ko,e)));class Xo extends Wo{constructor(e){super(e),this.handleOnRowAddClick=this.handleOnRowAddClick.bind(this)}get matrix(){return this.questionBase}handleOnRowAddClick(e){this.matrix.addRowUI()}renderElement(){var e=this.question.cssClasses,t=this.question.renderedTable.showTable?this.renderTableDiv():this.renderNoRowsContent(e);return n.createElement("div",null,this.renderAddRowButtonOnTop(e),t,this.renderAddRowButtonOnBottom(e))}renderAddRowButtonOnTop(e){return this.matrix.renderedTable.showAddRowOnTop?this.renderAddRowButton(e):null}renderAddRowButtonOnBottom(e){return this.matrix.renderedTable.showAddRowOnBottom?this.renderAddRowButton(e):null}renderNoRowsContent(e){const t=this.renderLocString(this.matrix.locNoRowsText),s=n.createElement("div",{className:e.noRowsText},t),i=this.matrix.renderedTable.showAddRow?this.renderAddRowButton(e,!0):void 0;return n.createElement("div",{className:e.noRowsSection},s,i)}renderAddRowButton(e,t=!1){return ua.Instance.createElement("sv-matrixdynamic-add-btn",{question:this.question,cssClasses:e,isEmptySection:t})}}Ra.Instance.registerQuestion("matrixdynamic",(e=>n.createElement(Xo,e)));class Yo extends ca{constructor(e){super(e),this.handleOnRowAddClick=this.handleOnRowAddClick.bind(this)}get matrix(){return this.props.question}handleOnRowAddClick(e){this.matrix.addRowUI()}renderElement(){const e=this.renderLocString(this.matrix.locAddRowText),t=n.createElement("button",{className:this.matrix.getAddRowButtonCss(this.props.isEmptySection),type:"button",disabled:this.matrix.isInputReadOnly,onClick:this.matrix.isDesignMode?void 0:this.handleOnRowAddClick},e,n.createElement("span",{className:this.props.cssClasses.iconAdd}));return this.props.isEmptySection?t:n.createElement("div",{className:this.props.cssClasses.footer},t)}}ua.Instance.registerElement("sv-matrixdynamic-add-btn",(e=>n.createElement(Yo,e)));class $o extends ca{constructor(e){super(e)}get data(){return this.props.item&&this.props.item.data||this.props.data}get question(){return this.props.item&&this.props.item.data.question||this.props.data.question}}class el extends $o{constructor(){super(...arguments),this.handleClick=e=>{this.question.addPanelUI()}}renderElement(){if(!this.question.canAddPanel)return null;const e=this.renderLocString(this.question.locAddPanelText);return n.createElement("button",{type:"button",id:this.question.addButtonId,className:this.question.getAddButtonCss(),onClick:this.handleClick},n.createElement("span",{className:this.question.cssClasses.buttonAddText},e))}}ua.Instance.registerElement("sv-paneldynamic-add-btn",(e=>n.createElement(el,e)));class tl extends $o{constructor(){super(...arguments),this.handleClick=e=>{this.question.goToNextPanel()}}renderElement(){return n.createElement("div",{title:this.question.panelNextText,onClick:this.handleClick,className:this.question.getNextButtonCss()},n.createElement(ba,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))}}ua.Instance.registerElement("sv-paneldynamic-next-btn",(e=>n.createElement(tl,e)));class sl extends $o{constructor(){super(...arguments),this.handleClick=e=>{this.question.goToPrevPanel()}}renderElement(){return n.createElement("div",{title:this.question.panelPrevText,onClick:this.handleClick,className:this.question.getPrevButtonCss()},n.createElement(ba,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))}}ua.Instance.registerElement("sv-paneldynamic-prev-btn",(e=>n.createElement(sl,e)));class il extends $o{renderElement(){return n.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)}}ua.Instance.registerElement("sv-paneldynamic-progress-text",(e=>n.createElement(il,e)));class rl extends pa{constructor(e){super(e)}get question(){return this.questionBase}componentDidMount(){super.componentDidMount(),this.setState({panelCounter:0});const e=this;this.question.panelCountChangedCallback=function(){e.updateQuestionRendering()},this.question.currentIndexChangedCallback=function(){e.updateQuestionRendering()},this.question.renderModeChangedCallback=function(){e.updateQuestionRendering()}}componentWillUnmount(){super.componentWillUnmount(),this.question.panelCountChangedCallback=()=>{},this.question.currentIndexChangedCallback=()=>{},this.question.renderModeChangedCallback=()=>{}}updateQuestionRendering(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})}renderElement(){const e=[];this.question.renderedPanels.forEach(((t,s)=>{e.push(n.createElement(nl,{key:t.id,element:t,question:this.question,index:s,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}));const t=this.question.isRenderModeList&&this.question.showLegacyNavigation?this.renderAddRowButton():null,s=this.question.isProgressTopShowing?this.renderNavigator():null,i=this.question.isProgressBottomShowing?this.renderNavigator():null,r=this.renderNavigatorV2(),a=this.renderPlaceholder();return n.createElement("div",{className:this.question.cssClasses.root},this.question.hasTabbedMenu?n.createElement("div",{className:this.question.getTabsContainerCss()},n.createElement(Pa,{model:this.question.tabbedMenu})):null,a,s,n.createElement("div",{className:this.question.cssClasses.panelsContainer},e),i,t,r)}renderNavigator(){if(!this.question.showLegacyNavigation)return this.question.isRangeShowing&&this.question.isProgressTopShowing?this.renderRange():null;const e=this.question.isRangeShowing?this.renderRange():null,t=this.rendrerPrevButton(),s=this.rendrerNextButton(),i=this.renderAddRowButton(),r=this.question.isProgressTopShowing?this.question.cssClasses.progressTop:this.question.cssClasses.progressBottom;return n.createElement("div",{className:r},n.createElement("div",{style:{clear:"both"}},n.createElement("div",{className:this.question.cssClasses.progressContainer},t,e,s),i,this.renderProgressText()))}renderProgressText(){return n.createElement(il,{data:{question:this.question}})}rendrerPrevButton(){return n.createElement(sl,{data:{question:this.question}})}rendrerNextButton(){return n.createElement(tl,{data:{question:this.question}})}renderRange(){return n.createElement("div",{className:this.question.cssClasses.progress},n.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:this.question.progress},role:"progressbar"}))}renderAddRowButton(){return ua.Instance.createElement("sv-paneldynamic-add-btn",{data:{question:this.question}})}renderNavigatorV2(){if(!this.question.showNavigation)return null;const e=this.question.isRangeShowing&&this.question.isProgressBottomShowing?this.renderRange():null;return n.createElement("div",{className:this.question.cssClasses.footer},n.createElement("hr",{className:this.question.cssClasses.separator}),e,this.question.footerToolbar.visibleActions.length?n.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},n.createElement(Pa,{model:this.question.footerToolbar})):null)}renderPlaceholder(){return this.question.getShowNoEntriesPlaceholder()?n.createElement("div",{className:this.question.cssClasses.noEntriesPlaceholder},n.createElement("span",null,this.renderLocString(this.question.locNoEntriesText)),this.renderAddRowButton()):null}}class nl extends so{get question(){return this.props.question}get index(){return this.props.index}getSurvey(){return this.question?this.question.survey:null}getCss(){const e=this.getSurvey();return e?e.getCss():{}}render(){const e=super.render(),t=this.renderButton(),s=this.question.showSeparator(this.index)?n.createElement("hr",{className:this.question.cssClasses.separator}):null;return n.createElement(n.Fragment,null,n.createElement("div",{className:this.question.getPanelWrapperCss(this.panel)},e,t),s)}renderButton(){return this.question.canRenderRemovePanelOnRight(this.panel)?ua.Instance.createElement("sv-paneldynamic-remove-btn",{data:{question:this.question,panel:this.panel}}):null}}Ra.Instance.registerQuestion("paneldynamic",(e=>n.createElement(rl,e)));class al extends eo{constructor(e){super(e)}get isTop(){return this.props.isTop}get progress(){return this.survey.progressValue}get progressText(){return this.survey.progressText}render(){var e={width:this.progress+"%"};return n.createElement("div",{className:this.survey.getProgressCssClasses(this.props.container)},n.createElement("div",{style:e,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":"progress"},n.createElement("span",{className:Dn.getProgressTextInBarCss(this.css)},this.progressText)),n.createElement("span",{className:Dn.getProgressTextUnderBarCss(this.css)},this.progressText))}}ua.Instance.registerElement("sv-progress-pages",(e=>n.createElement(al,e))),ua.Instance.registerElement("sv-progress-questions",(e=>n.createElement(al,e))),ua.Instance.registerElement("sv-progress-correctquestions",(e=>n.createElement(al,e))),ua.Instance.registerElement("sv-progress-requiredquestions",(e=>n.createElement(al,e)));class ol extends eo{constructor(e){super(e),this.listContainerRef=n.createRef()}get model(){return this.props.model}get container(){return this.props.container}onResize(e){this.setState({canShowItemTitles:e}),this.setState({canShowHeader:!e})}onUpdateScroller(e){this.setState({hasScroller:e})}onUpdateSettings(){this.setState({canShowItemTitles:this.model.showItemTitles}),this.setState({canShowFooter:!this.model.showItemTitles})}render(){return n.createElement("div",{className:this.model.getRootCss(this.props.container),style:{maxWidth:this.model.progressWidth},role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":"progress"},this.state.canShowHeader?n.createElement("div",{className:this.css.progressButtonsHeader},n.createElement("div",{className:this.css.progressButtonsPageTitle,title:this.model.headerText},this.model.headerText)):null,n.createElement("div",{className:this.css.progressButtonsContainer},n.createElement("div",{className:this.model.getScrollButtonCss(this.state.hasScroller,!0),role:"button",onClick:()=>this.clickScrollButton(this.listContainerRef.current,!0)}),n.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},n.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),n.createElement("div",{className:this.model.getScrollButtonCss(this.state.hasScroller,!1),role:"button",onClick:()=>this.clickScrollButton(this.listContainerRef.current,!1)})),this.state.canShowFooter?n.createElement("div",{className:this.css.progressButtonsFooter},n.createElement("div",{className:this.css.progressButtonsPageTitle,title:this.model.footerText},this.model.footerText)):null)}getListElements(){let e=[];return this.survey.visiblePages.forEach(((t,s)=>{e.push(this.renderListElement(t,s))})),e}renderListElement(e,t){const s=ha.renderLocString(e.locNavigationTitle);return n.createElement("li",{key:"listelement"+t,className:this.model.getListElementCss(t),onClick:this.model.isListElementClickable(t)?()=>this.model.clickListElement(e):void 0,"data-page-number":this.model.getItemNumber(e)},n.createElement("div",{className:this.css.progressButtonsConnector}),this.state.canShowItemTitles?n.createElement(n.Fragment,null,n.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.renderedNavigationTitle},s),n.createElement("div",{className:this.css.progressButtonsPageDescription,title:e.navigationDescription},e.navigationDescription)):null,n.createElement("div",{className:this.css.progressButtonsButton},n.createElement("div",{className:this.css.progressButtonsButtonBackground}),n.createElement("div",{className:this.css.progressButtonsButtonContent}),n.createElement("span",null,this.model.getItemNumber(e))))}clickScrollButton(e,t){e&&(e.scrollLeft+=70*(t?-1:1))}componentDidMount(){super.componentDidMount(),setTimeout((()=>{this.respManager=new ur(this.model,this.listContainerRef.current,this)}),10)}componentWillUnmount(){this.respManager&&this.respManager.dispose(),super.componentWillUnmount()}}ua.Instance.registerElement("sv-progress-buttons",(e=>n.createElement(ol,e)));class ll extends ha{constructor(){super(...arguments),this.handleKeydown=e=>{this.model.onKeyDown(e)}}get model(){return this.props.model}get item(){return this.props.item}getStateElement(){return this.item}render(){if(!this.item)return null;const e=this.model.getItemClass(this.item),t=this.item.component||this.model.itemComponent,s=ua.Instance.createElement(t,{item:this.item,key:this.item.id,model:this.model}),i=n.createElement("div",{style:this.model.getItemStyle(this.item),className:this.model.cssClasses.itemBody,title:this.item.getTooltip(),onMouseOver:e=>{this.model.onItemHover(this.item)},onMouseLeave:e=>{this.model.onItemLeave(this.item)}},s),r=this.item.needSeparator?n.createElement("div",{className:this.model.cssClasses.itemSeparator}):null,a={display:this.model.isItemVisible(this.item)?null:"none"};return $a(n.createElement("li",{className:e,role:"option",style:a,id:this.item.elementId,"aria-selected":this.model.isItemSelected(this.item),onClick:e=>{this.model.onItemClick(this.item),e.stopPropagation()},onPointerDown:e=>this.model.onPointerDown(e,this.item)},r,i),this.item)}componentDidMount(){super.componentDidMount(),this.model.onLastItemRended(this.item)}}ua.Instance.registerElement("sv-list-item",(e=>n.createElement(ll,e)));class ul extends ha{constructor(e){super(e),this.handleKeydown=e=>{this.model.onKeyDown(e)},this.handleMouseMove=e=>{this.model.onMouseMove(e)},this.state={filterString:this.model.filterString||""},this.listContainerRef=n.createRef()}get model(){return this.props.model}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.listContainerRef&&this.listContainerRef.current&&this.model.initListContainerHtmlElement(this.listContainerRef.current)}componentDidUpdate(e,t){var s;super.componentDidUpdate(e,t),this.model!==e.model&&(this.model&&(null===(s=this.listContainerRef)||void 0===s?void 0:s.current)&&this.model.initListContainerHtmlElement(this.listContainerRef.current),e.model&&e.model.initListContainerHtmlElement(void 0))}componentWillUnmount(){super.componentWillUnmount(),this.model&&this.model.initListContainerHtmlElement(void 0)}renderElement(){return n.createElement("div",{className:this.model.cssClasses.root,ref:this.listContainerRef},this.searchElementContent(),this.emptyContent(),this.renderList())}renderList(){if(!this.model.renderElements)return null;const e=this.renderItems(),t={display:this.model.isEmpty?"none":null};return n.createElement("ul",{className:this.model.getListClass(),style:t,role:"listbox",id:this.model.elementId,onMouseDown:e=>{e.preventDefault()},onKeyDown:this.handleKeydown,onMouseMove:this.handleMouseMove},e)}renderItems(){if(!this.model)return null;const e=this.model.renderedActions;return e?e.map(((e,t)=>n.createElement(ll,{model:this.model,item:e,key:"item"+t}))):null}searchElementContent(){if(this.model.showFilter){const e=e=>{const{root:t}=Ps.environment;e.target===t.activeElement&&(this.model.filterString=e.target.value)},t=e=>{this.model.goToItems(e)},s=this.model.showSearchClearButton&&this.model.filterString?n.createElement("button",{className:this.model.cssClasses.searchClearButtonIcon,onClick:e=>{this.model.onClickSearchClearButton(e)}},n.createElement(ba,{iconName:"icon-searchclear",size:"auto"})):null;return n.createElement("div",{className:this.model.cssClasses.filter},n.createElement("div",{className:this.model.cssClasses.filterIcon},n.createElement(ba,{iconName:"icon-search",size:"auto"})),n.createElement("input",{type:"text",className:this.model.cssClasses.filterInput,"aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onKeyUp:t,onChange:e}),s)}return null}emptyContent(){const e={display:this.model.isEmpty?null:"none"};return n.createElement("div",{className:this.model.cssClasses.emptyContainer,style:e},n.createElement("div",{className:this.model.cssClasses.emptyText,"aria-label":this.model.emptyMessage},this.model.emptyMessage))}}ua.Instance.registerElement("sv-list",(e=>n.createElement(ul,e)));class dl extends eo{componentDidMount(){super.componentDidMount();this.props.model.updateStickyTOCSize(this.survey.rootElement)}render(){const e=this.props.model;let t;return t=e.isMobile?n.createElement("div",{onClick:e.togglePopup},n.createElement(ba,{iconName:e.icon,size:24}),n.createElement(xa,{model:e.popupModel})):n.createElement(ul,{model:e.listModel}),n.createElement("div",{className:e.containerCss},t)}}ua.Instance.registerElement("sv-navigation-toc",(e=>n.createElement(dl,e)));class hl extends pa{constructor(e){super(e),this.handleOnClick=this.handleOnClick.bind(this)}get question(){return this.questionBase}handleOnClick(e){this.question.setValueFromClick(e.target.value),this.setState({value:this.question.value})}renderItem(e,t){return ua.Instance.createElement(this.question.itemComponent,{question:this.question,item:e,index:t,key:"value"+t,handleOnClick:this.handleOnClick,isDisplayMode:this.isDisplayMode})}renderElement(){var e=this.question.cssClasses,t=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,s=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null;return n.createElement("div",{className:this.question.ratingRootCss,ref:e=>this.setControl(e)},n.createElement("fieldset",{role:"radiogroup"},n.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?n.createElement("span",{className:e.minText},t):null,this.question.renderedRateItems.map(((e,t)=>this.renderItem(e,t))),this.question.hasMaxLabel?n.createElement("span",{className:e.maxText},s):null))}}Ra.Instance.registerQuestion("rating",(e=>n.createElement(hl,e)));class cl extends fo{constructor(e){super(e)}renderElement(){var e=this.question.cssClasses,t=this.renderSelect(e);return n.createElement("div",{className:this.question.cssClasses.rootDropdown},t)}}Ra.Instance.registerQuestion("sv-rating-dropdown",(e=>n.createElement(cl,e))),Ys.Instance.registerRenderer("rating","dropdown","sv-rating-dropdown");class pl extends pa{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){var e=this.question.cssClasses;return n.createElement("div",{id:this.question.inputId,className:e.root,ref:e=>this.setControl(e)},this.question.formatedValue)}}Ra.Instance.registerQuestion("expression",(e=>n.createElement(pl,e)));class ml extends pa{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){var e=this.question.cssClasses;return n.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),style:this.question.getContainerStyle()},n.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.question.hasColumns?this.getColumns(e):this.getItems(e))}getColumns(e){return this.question.columns.map(((t,s)=>{var i=t.map(((t,s)=>this.renderItem("item"+s,t,e)));return n.createElement("div",{key:"column"+s+this.question.getItemsColumnKey(t),className:this.question.getColumnClass(),role:"presentation"},i)}))}getItems(e){for(var t=[],s=0;s{this.setState({locImageLinkchanged:this.state&&this.state.locImageLink?this.state.locImageLink+1:1})}}get cssClasses(){return this.props.cssClasses}get item(){return this.props.item}get question(){return this.props.question}handleOnChange(e){if(!this.question.isReadOnlyAttr){if(this.question.multiSelect)if(e.target.checked)this.question.value=this.question.value.concat(e.target.value);else{var t=this.question.value;t.splice(this.question.value.indexOf(e.target.value),1),this.question.value=t}else this.question.value=e.target.value;this.setState({value:this.question.value})}}renderElement(){const e=this.item,t=this.question,s=this.cssClasses;var i=t.isItemSelected(e),r=t.getItemClass(e),a=null;t.showLabel&&(a=n.createElement("span",{className:t.cssClasses.itemText},e.text?ha.renderLocString(e.locText):e.value));var o={objectFit:this.question.imageFit},l=null;if(e.locImageLink.renderedHtml&&"image"===this.question.contentMode&&(l=n.createElement("img",{className:s.image,src:e.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:e.locText.renderedHtml,style:o,onLoad:t=>{this.question.onContentLoaded(e,t.nativeEvent)},onError:t=>{e.onErrorHandler(e,t.nativeEvent)}})),e.locImageLink.renderedHtml&&"video"===this.question.contentMode&&(l=n.createElement("video",{controls:!0,className:s.image,src:e.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:o,onLoadedMetadata:t=>{this.question.onContentLoaded(e,t.nativeEvent)},onError:t=>{e.onErrorHandler(e,t.nativeEvent)}})),!e.locImageLink.renderedHtml||e.contentNotLoaded){let e={width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,objectFit:this.question.imageFit};l=n.createElement("div",{className:s.itemNoImage,style:e},s.itemNoImageSvgIcon?n.createElement(ba,{className:s.itemNoImageSvgIcon,iconName:this.question.cssClasses.itemNoImageSvgIconId,size:48}):null)}return n.createElement("div",{className:r},n.createElement("label",{className:s.label},n.createElement("input",{className:s.itemControl,id:this.question.getItemId(e),type:this.question.inputType,name:this.question.questionName,checked:i,value:e.value,disabled:!this.question.getItemEnabled(e),readOnly:this.question.isReadOnlyAttr,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":e.locText.renderedHtml,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),n.createElement("div",{className:this.question.cssClasses.itemDecorator},n.createElement("div",{className:this.question.cssClasses.imageContainer},this.question.cssClasses.checkedItemDecorator?n.createElement("span",{className:this.question.cssClasses.checkedItemDecorator,"aria-hidden":"true"},this.question.cssClasses.checkedItemSvgIconId?n.createElement(ba,{size:"auto",className:this.question.cssClasses.checkedItemSvgIcon,iconName:this.question.cssClasses.checkedItemSvgIconId}):null):null,l),a)))}}Ra.Instance.registerQuestion("imagepicker",(e=>n.createElement(ml,e)));class vl extends pa{constructor(e){super(e)}componentDidMount(){super.componentDidMount(),this.question.locImageLink.onChanged=()=>{this.forceUpdate()}}componentWillUnmount(){super.componentWillUnmount(),this.question.locImageLink.onChanged=()=>{}}get question(){return this.questionBase}renderElement(){var e=this.question.getImageCss(),t={objectFit:this.question.imageFit,width:this.question.renderedStyleWidth,height:this.question.renderedStyleHeight};this.question.imageLink&&!this.question.contentNotLoaded||(t.display="none");var s=null;"image"===this.question.renderedMode&&(s=n.createElement("img",{className:e,src:this.question.locImageLink.renderedHtml||null,alt:this.question.altText||this.question.title,width:this.question.renderedWidth,height:this.question.renderedHeight,style:t,onLoad:e=>{this.question.onLoadHandler()},onError:e=>{this.question.onErrorHandler()}})),"video"===this.question.renderedMode&&(s=n.createElement("video",{controls:!0,className:e,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:t,onLoadedMetadata:e=>{this.question.onLoadHandler()},onError:e=>{this.question.onErrorHandler()}})),"youtube"===this.question.renderedMode&&(s=n.createElement("iframe",{className:e,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:t}));var i=null;return this.question.imageLink&&!this.question.contentNotLoaded||(i=n.createElement("div",{className:this.question.cssClasses.noImage},n.createElement(ba,{iconName:this.question.cssClasses.noImageSvgIconId,size:48}))),n.createElement("div",{className:this.question.cssClasses.root},s,i)}}Ra.Instance.registerQuestion("image",(e=>n.createElement(vl,e)));class fl extends pa{constructor(e){super(e),this.state={value:this.question.value}}get question(){return this.questionBase}renderElement(){var e=this.question.cssClasses;const t=this.question.showLoadingIndicator?this.renderLoadingIndicator():null;var s=this.renderCleanButton();return n.createElement("div",{className:e.root,ref:e=>this.setControl(e),style:{width:this.question.renderedCanvasWidth}},n.createElement("div",{className:e.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.renderLocString(this.question.locRenderedPlaceholder)),n.createElement("div",null,this.renderBackgroundImage(),n.createElement("canvas",{tabIndex:-1,className:this.question.cssClasses.canvas,onBlur:e=>{this.question.onBlur(e)}})),s,t)}renderBackgroundImage(){return this.question.backgroundImage?n.createElement("img",{className:this.question.cssClasses.backgroundImage,src:this.question.backgroundImage,style:{width:this.question.renderedCanvasWidth}}):null}renderLoadingIndicator(){return n.createElement("div",{className:this.question.cssClasses.loadingIndicator},n.createElement(Po,null))}renderCleanButton(){if(!this.question.canShowClearButton)return null;var e=this.question.cssClasses;return n.createElement("div",{className:e.controls},n.createElement("button",{type:"button",className:e.clearButton,title:this.question.clearButtonCaption,onClick:()=>this.question.clearValue(!0)},this.question.cssClasses.clearButtonIconId?n.createElement(ba,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):n.createElement("span",null,"✖")))}}Ra.Instance.registerQuestion("signaturepad",(e=>n.createElement(fl,e)));class bl extends ma{constructor(e){super(e)}getStateElements(){const e=super.getStateElements();return this.question.contentQuestion&&e.push(this.question.contentQuestion),e}renderElement(){return Na.renderQuestionBody(this.creator,this.question.contentQuestion)}}class yl extends ma{constructor(e){super(e)}canRender(){return!!this.question.contentPanel}renderElement(){return n.createElement(so,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})}}Ra.Instance.registerQuestion("custom",(e=>n.createElement(bl,e))),Ra.Instance.registerQuestion("composite",(e=>n.createElement(yl,e)));class Cl extends ha{get model(){return this.props.model}get item(){return this.props.item}getStateElement(){return this.item}render(){if(!this.item)return null;const e=this.renderLocString(this.item.locTitle,void 0,"locString"),t=this.item.iconName?n.createElement(ba,{className:this.model.cssClasses.itemIcon,iconName:this.item.iconName,size:this.item.iconSize,"aria-label":this.item.title}):null,s=this.item.markerIconName?n.createElement(ba,{className:this.item.cssClasses.itemMarkerIcon,iconName:this.item.markerIconName,size:"auto"}):null;return n.createElement(n.Fragment,null,t,e,s)}}ua.Instance.registerElement("sv-list-item-content",(e=>n.createElement(Cl,e)));class wl extends ha{get model(){return this.props.model}get item(){return this.props.item}getStateElement(){return this.item}render(){var e;if(!this.item)return null;const t=ua.Instance.createElement("sv-list-item-content",{item:this.item,key:"content"+this.item.id,model:this.model});return n.createElement(n.Fragment,null,t,n.createElement(xa,{model:null===(e=this.item)||void 0===e?void 0:e.popupModel}))}}ua.Instance.registerElement("sv-list-item-group",(e=>n.createElement(wl,e)));class xl extends n.Component{constructor(e){super(e)}get survey(){return this.props.data}render(){const e=[];return e.push(n.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},n.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml||null,alt:this.survey.locTitle.renderedHtml,width:this.survey.renderedLogoWidth,height:this.survey.renderedLogoHeight,style:{objectFit:this.survey.logoFit,width:this.survey.renderedStyleLogoWidth,height:this.survey.renderedStyleLogoHeight}}))),n.createElement(n.Fragment,null,e)}}ua.Instance.registerElement("sv-logo-image",(e=>n.createElement(xl,e)));class Vl extends ca{constructor(e){super(e),this.handleOnRowRemoveClick=this.handleOnRowRemoveClick.bind(this)}get question(){return this.props.item.data.question}get row(){return this.props.item.data.row}handleOnRowRemoveClick(e){this.question.removeRowUI(this.row)}renderElement(){var e=this.renderLocString(this.question.locRemoveRowText);return n.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly},e,n.createElement("span",{className:this.question.cssClasses.iconRemove}))}}ua.Instance.registerElement("sv-matrix-remove-button",(e=>n.createElement(Vl,e)));class _l extends ca{constructor(e){super(e),this.handleOnShowHideClick=this.handleOnShowHideClick.bind(this)}getStateElement(){return this.props.item}get item(){return this.props.item}get question(){return this.props.item.data.question}get row(){return this.props.item.data.row}handleOnShowHideClick(e){this.row.showHideDetailPanelClick()}renderElement(){var e=this.row.isDetailPanelShowing,t=e,s=e?this.row.detailPanelId:void 0;return n.createElement("button",{type:"button",onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":t,"aria-controls":s},n.createElement(ba,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))}}ua.Instance.registerElement("sv-matrix-detail-button",(e=>n.createElement(_l,e)));class El extends $o{constructor(){super(...arguments),this.handleClick=e=>{this.question.removePanelUI(this.data.panel)}}renderElement(){const e=this.renderLocString(this.question.locRemovePanelText),t=this.question.getPanelRemoveButtonId(this.data.panel);return n.createElement("button",{id:t,className:this.question.getPanelRemoveButtonCss(),onClick:this.handleClick,type:"button"},n.createElement("span",{className:this.question.cssClasses.buttonRemoveText},e),n.createElement("span",{className:this.question.cssClasses.iconRemove}))}}ua.Instance.registerElement("sv-paneldynamic-remove-btn",(e=>n.createElement(El,e)));class Pl extends ca{get item(){return this.props.item}canRender(){return this.item.isVisible}renderElement(){return n.createElement("input",{className:this.item.innerCss,type:"button",disabled:this.item.disabled,onMouseDown:this.item.data&&this.item.data.mouseDown,onClick:this.item.action,title:this.item.getTooltip(),value:this.item.title})}}ua.Instance.registerElement("sv-nav-btn",(e=>n.createElement(Pl,e)));class Sl extends n.Component{constructor(e){super(e),this.onChangedHandler=(e,t)=>{this.isRendering||this.setState({changed:this.state&&this.state.changed?this.state.changed+1:1})},this.rootRef=n.createRef()}get locStr(){return this.props.locStr}get style(){return this.props.style}componentDidMount(){this.reactOnStrChanged()}componentWillUnmount(){this.locStr&&this.locStr.onStringChanged.remove(this.onChangedHandler)}componentDidUpdate(e,t){e.locStr&&e.locStr.onStringChanged.remove(this.onChangedHandler),this.reactOnStrChanged()}reactOnStrChanged(){this.locStr&&this.locStr.onStringChanged.add(this.onChangedHandler)}render(){if(!this.locStr)return null;this.isRendering=!0;const e=this.renderString();return this.isRendering=!1,e}renderString(){const e=this.locStr.allowLineBreaks?"sv-string-viewer sv-string-viewer--multiline":"sv-string-viewer";if(this.locStr.hasHtml){let t={__html:this.locStr.renderedHtml};return n.createElement("span",{ref:this.rootRef,className:e,style:this.style,dangerouslySetInnerHTML:t})}return n.createElement("span",{ref:this.rootRef,className:e,style:this.style},this.locStr.renderedHtml)}}ua.Instance.registerElement(Xt.defaultRenderer,(e=>n.createElement(Sl,e)));class Il extends n.Component{render(){return n.createElement("div",null,n.createElement("span",{className:this.props.cssClasses.error.icon||void 0,"aria-hidden":"true"}),n.createElement("span",{className:this.props.cssClasses.error.item||void 0},n.createElement(Sl,{locStr:this.props.error.locText})))}}ua.Instance.registerElement("sv-question-error",(e=>n.createElement(Il,e)));class Tl extends n.Component{render(){var e,t;return n.createElement("div",{className:"sv-skeleton-element",id:null===(e=this.props.element)||void 0===e?void 0:e.id,style:{height:null===(t=this.props.element)||void 0===t?void 0:t.skeletonHeight}})}}ua.Instance.registerElement("sv-skeleton",(e=>n.createElement(Tl,e)));class Rl extends n.Component{get model(){return this.props.model}renderLogoImage(){const e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return ua.Instance.createElement(e,{data:t})}render(){return n.createElement("div",{className:"sv-header--mobile"},this.model.survey.hasLogo?n.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.survey.hasTitle?n.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.renderedTextAreaWidth}},n.createElement(Ta,{element:this.model.survey})):null,this.model.survey.renderedHasDescription?n.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.renderedTextAreaWidth}},n.createElement("div",{className:this.model.survey.css.description},ha.renderLocString(this.model.survey.locDescription))):null)}}class kl extends n.Component{get model(){return this.props.model}renderLogoImage(){const e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return ua.Instance.createElement(e,{data:t})}render(){return n.createElement("div",{className:this.model.css,style:this.model.style},n.createElement("div",{className:"sv-header__cell-content",style:this.model.contentStyle},this.model.showLogo?n.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.showTitle?n.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},n.createElement(Ta,{element:this.model.survey})):null,this.model.showDescription?n.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},n.createElement("div",{className:this.model.survey.css.description},ha.renderLocString(this.model.survey.locDescription))):null))}}class Dl extends ha{get model(){return this.props.model}getStateElement(){return this.model}renderElement(){if(this.model.survey=this.props.survey,"advanced"!==this.props.survey.headerView||this.model.isEmpty)return null;let e=null;return e=this.props.survey.isMobile?n.createElement(Rl,{model:this.model}):n.createElement("div",{className:this.model.contentClasses,style:{maxWidth:this.model.maxWidth}},this.model.cells.map(((e,t)=>n.createElement(kl,{key:t,model:e})))),n.createElement("div",{className:this.model.headerClasses,style:{height:this.model.renderedHeight}},this.model.backgroundImage?n.createElement("div",{style:this.model.backgroundImageStyle,className:this.model.backgroundImageClasses}):null,e)}componentDidMount(){super.componentDidMount(),this.model.processResponsiveness()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.model.processResponsiveness()}}ua.Instance.registerElement("sv-header",(e=>n.createElement(Dl,e)));class Ll extends n.Component{constructor(e){super(e),this.onInput=e=>{this.locStr.text=e.target.innerText},this.onClick=e=>{e.preventDefault(),e.stopPropagation()},this.state={changed:0}}get locStr(){return this.props.locStr}get style(){return this.props.style}componentDidMount(){if(this.locStr){var e=this;this.locStr.onChanged=function(){e.setState({changed:e.state.changed+1})}}}componentWillUnmount(){this.locStr&&(this.locStr.onChanged=function(){})}render(){if(!this.locStr)return null;if(this.locStr.hasHtml){const e={__html:this.locStr.renderedHtml};return n.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return n.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)}}ua.Instance.registerElement(Xt.editableRenderer,(e=>n.createElement(Ll,e))),function(e,t){if(na!=e){const s="survey-core has version '2.0.3' and "+t+" has version '"+e+"'. SurveyJS libraries should have the same versions to work correctly.";console.error(s)}}("2.0.3","survey-react-ui"); /*! * surveyjs - Survey JavaScript library v2.0.3 * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */ var Al={themeName:"sharp",colorPalette:"dark",isPanelless:!1,cssVariables:{"--sjs-general-backcolor":"rgba(48, 48, 48, 1)","--sjs-general-backcolor-dark":"rgba(58, 58, 58, 1)","--sjs-general-backcolor-dim":"rgba(27, 27, 27, 1)","--sjs-general-backcolor-dim-light":"rgba(33, 33, 33, 1)","--sjs-general-backcolor-dim-dark":"rgba(47, 47, 47, 1)","--sjs-general-forecolor":"rgba(255, 255, 255, 0.78)","--sjs-general-forecolor-light":"rgba(255, 255, 255, 0.5)","--sjs-general-dim-forecolor":"rgba(255, 255, 255, 0.8)","--sjs-general-dim-forecolor-light":"rgba(255, 255, 255, 0.55)","--sjs-primary-backcolor":"rgba(16, 226, 255, 1)","--sjs-primary-backcolor-light":"rgba(0, 0, 0, 0.35)","--sjs-primary-backcolor-dark":"rgba(129, 240, 255, 1)","--sjs-primary-forecolor":"rgba(32, 32, 32, 1)","--sjs-primary-forecolor-light":"rgba(32, 32, 32, 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(48, 48, 48, 1)","--sjs-secondary-forecolor-light":"rgba(48, 48, 48, 0.25)","--sjs-shadow-small":"0px 0px 0px 1px rgba(255, 255, 255, 0.28)","--sjs-shadow-small-reset":"0px 0px 0px 0px rgba(255, 255, 255, 0.28)","--sjs-shadow-medium":"0px 0px 0px 1px rgba(255, 255, 255, 0.25),0px 2px 6px 0px rgba(0, 0, 0, 0.2)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.2)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(255, 255, 255, 0.22)","--sjs-shadow-inner-reset":"0px 0px 0px 0px rgba(255, 255, 255, 0.22)","--sjs-border-light":"rgba(255, 255, 255, 0.22)","--sjs-border-default":"rgba(255, 255, 255, 0.22)","--sjs-border-inside":"rgba(255, 255, 255, 0.08)","--sjs-special-red":"rgba(254, 76, 108, 1)","--sjs-special-red-light":"rgba(254, 76, 108, 0.1)","--sjs-special-red-forecolor":"rgba(48, 48, 48, 1)","--sjs-special-green":"rgba(36, 197, 164, 1)","--sjs-special-green-light":"rgba(36, 197, 164, 0.1)","--sjs-special-green-forecolor":"rgba(48, 48, 48, 1)","--sjs-special-blue":"rgba(91, 151, 242, 1)","--sjs-special-blue-light":"rgba(91, 151, 242, 0.1)","--sjs-special-blue-forecolor":"rgba(48, 48, 48, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(48, 48, 48, 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"}};ne('/*!\n * surveyjs - Survey JavaScript library v2.0.3\n * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/\n * License: MIT (http://www.opensource.org/licenses/mit-license.php)\n */@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format("woff2");unicode-range:u+0590-05ff,u+200c-2010,u+20aa,u+25cc,u+fb1d-fb4f}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+1ea0-1ef9,u+20ab}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:600;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:600;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:600;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:600;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:600;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format("woff2");unicode-range:u+0590-05ff,u+200c-2010,u+20aa,u+25cc,u+fb1d-fb4f}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:600;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+1ea0-1ef9,u+20ab}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:600;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:600;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format("woff2");unicode-range:u+0590-05ff,u+200c-2010,u+20aa,u+25cc,u+fb1d-fb4f}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+1ea0-1ef9,u+20ab}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Open Sans;font-stretch:100%;font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}:root{--font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;--sjs-transition-duration:150ms}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes changeHeight{0%{height:var(--animation-height-from)}to{height:var(--animation-height-to)}}@keyframes moveInWithOverflow{0%{border-bottom-width:0;border-top-width:0;height:var(--animation-height-from);margin-bottom:0;margin-top:0;min-height:var(--animation-height-from);overflow:hidden;padding-bottom:0;padding-top:0}99%{border-bottom-width:var(--animation-border-bottom-width);border-top-width:var(--animation-border-top-width);height:var(--animation-height-to);margin-bottom:var(--animation-margin-bottom);margin-top:var(--animation-margin-top);min-height:var(--animation-height-to);overflow:hidden;padding-bottom:var(--animation-padding-bottom);padding-top:var(--animation-padding-top)}to{border-bottom-width:var(--animation-border-bottom-width);border-top-width:var(--animation-border-top-width);height:var(--animation-height-to);margin-bottom:var(--animation-margin-bottom);margin-top:var(--animation-margin-top);min-height:var(--animation-height-to);overflow:visible;padding-bottom:var(--animation-padding-bottom);padding-top:var(--animation-padding-top)}}@keyframes moveIn{0%{height:0}to{height:var(--animation-height)}}@keyframes paddingFadeIn{0%{padding-bottom:0;padding-top:0}to{padding-bottom:var(--animation-padding-bottom);padding-top:var(--animation-padding-top)}}.sv-action-bar{align-items:center;box-sizing:content-box;display:flex;margin-left:auto;overflow:hidden;position:relative;white-space:nowrap}.sv-action-bar-separator{background-color:var(--sjs-border-default,var(--border,#d6d6d6));display:inline-block;height:24px;margin-right:16px;vertical-align:middle;width:1px}.sv-action-bar--default-size-mode .sv-action-bar-separator{margin:0 var(--sjs-base-unit,var(--base-unit,8px))}.sv-action-bar--small-size-mode .sv-action-bar-separator{margin:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sv-action-bar-item{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:calc((var(--sjs-corner-radius, 4px))*.5);box-sizing:border-box;color:var(--sjs-general-forecolor,var(--foreground,#161616));cursor:pointer;display:flex;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));overflow-x:hidden;padding:var(--sjs-base-unit,var(--base-unit,8px));white-space:nowrap}button.sv-action-bar-item{overflow:hidden}.sv-action-bar--default-size-mode .sv-action-bar-item{font-size:var(--sjs-font-size,16px);height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);line-height:calc((var(--sjs-font-size, 16px))*1.5);margin:0 var(--sjs-base-unit,var(--base-unit,8px))}.sv-action-bar--small-size-mode .sv-action-bar-item{font-size:calc((var(--sjs-font-size, 16px))*.75);height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);line-height:var(--sjs-font-size,16px);margin:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sv-action:first-of-type .sv-action-bar-item{margin-inline-start:0}.sv-action:last-of-type .sv-action-bar-item{margin-inline-end:0}.sv-action-bar--default-size-mode .sv-action-bar-item__title--with-icon{margin-inline-start:var(--sjs-base-unit,var(--base-unit,8px))}.sv-action-bar--small-size-mode .sv-action-bar-item__title--with-icon{margin-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sv-action-bar-item__icon svg{display:block}.sv-action-bar-item__icon use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sv-action-bar-item:focus,.sv-action-bar-item:hover{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));outline:none}.sv-action-bar-item.svc-toolbar__item--pressed,.sv-action-bar-item:active{opacity:.5}.sv-action-bar-item.svc-toolbar__item--active{outline:none}.sv-action-bar-item:disabled{cursor:default;opacity:.25}.sv-action-bar-item__title{color:inherit;vertical-align:middle;white-space:nowrap}.sv-action-bar-item--secondary .sv-action-bar-item__icon use{fill:var(--sjs-secondary-backcolor,var(--secondary,#ff9814))}.sv-action-bar-item--active .sv-action-bar-item__icon use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sv-action-bar-item-dropdown{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:calc((var(--sjs-corner-radius, 4px))*.5);box-sizing:border-box;cursor:pointer;display:flex;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);line-height:calc((var(--sjs-font-size, 16px))*1.5);padding:var(--sjs-base-unit,var(--base-unit,8px))}.sv-expand-action:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 10 10\' style=\'enable-background:new 0 0 10 10\' xml:space=\'preserve\'%3E%3Cpath style=\'fill:%23404040\' d=\'M2 2 0 4l5 5 5-5-2-2-3 3z\'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;content:"";display:inline-block;height:10px;margin:auto 8px;width:12px}.sv-expand-action--expanded:before{transform:rotate(180deg)}.sv-dots{width:48px}.sv-dots__item{width:100%}.sv-dots__item .sv-action-bar-item__icon{margin:auto}.sv-action--hidden{height:0;overflow:hidden;visibility:hidden;width:0}.sv-action--hidden .sv-action__content{min-width:fit-content}.sv-action__content{align-items:center;display:flex;flex-direction:row}.sv-action__content>*{flex:0 0 auto}.sv-action--space{margin-left:auto}.sv-action-bar-item--pressed:not(.sv-action-bar-item--active){background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));opacity:50%}.sv-dragged-element-shortcut{background-color:var(--sjs-general-backcolor,var(--background,#fff));border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4.5);box-shadow:0 8px 16px rgba(0,0,0,.1);cursor:grabbing;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);line-height:calc((var(--sjs-font-size, 16px))*1.5);min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2.5);position:absolute;z-index:10000}.sv-matrixdynamic__drag-icon{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.75)}.sv-matrixdynamic__drag-icon:after{border:1px solid #e7e7e7;border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.25);box-sizing:border-box;content:" ";cursor:move;display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.75);margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2.5)}.sv-matrixdynamic-dragged-row{cursor:grabbing;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));position:absolute;z-index:10000}.sv-matrixdynamic-dragged-row .sd-table__row{align-items:center;background-color:var(--sjs-general-backcolor,var(--background,#fff));box-shadow:var(--sjs-shadow-large,0 8px 16px 0 rgba(0,0,0,.1)),var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1));display:flex;flex-grow:0;flex-shrink:0;line-height:0}.sv-matrixdynamic-dragged-row .sd-table__cell.sd-table__cell--drag>div{background-color:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sd-table__cell--header.sd-table__cell--drag,.sd-table__cell.sd-table__cell--drag{padding-left:0;padding-right:0}.sd-question--mobile .sd-table__cell--header.sd-table__cell--drag,.sd-question--mobile .sd-table__cell.sd-table__cell--drag{display:none}.sv-matrix-row--drag-drop-ghost-mod td{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3))}.sv-matrix-row--drag-drop-ghost-mod td>*{visibility:hidden}.sv-drag-drop-choices-shortcut{cursor:grabbing;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));max-width:400px;min-width:100px;position:absolute;z-index:10000}.sv-drag-drop-choices-shortcut .sv-ranking-item{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sv-drag-drop-choices-shortcut .sv-ranking-item .sv-ranking-item__text .sv-string-editor,.sv-drag-drop-choices-shortcut .sv-ranking-item .sv-ranking-item__text .sv-string-viewer{overflow:hidden;white-space:nowrap}.sv-drag-drop-choices-shortcut__content.sv-drag-drop-choices-shortcut__content{border-radius:calc(var(--sjs-base-unit, var(--base-unit, 8px))*4.5);margin-left:0;min-width:100px;padding-right:calc(var(--sjs-base-unit, var(--base-unit, 8px))*2)}.sv-drag-drop-choices-shortcut__content.sv-drag-drop-choices-shortcut__content,.sv-drag-drop-image-picker-shortcut{background-color:var(--sjs-general-backcolor,var(--background,#fff));box-shadow:var(--sjs-shadow-large,0 8px 16px 0 rgba(0,0,0,.1)),var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1))}.sv-drag-drop-image-picker-shortcut{border-radius:calc(var(--sjs-base-unit, var(--base-unit, 8px))*.5);cursor:grabbing;padding:calc(var(--sjs-base-unit, var(--base-unit, 8px))*.5);position:absolute;z-index:10000}sv-popup{display:block;position:absolute}.sv-popup{height:100vh;left:0;outline:none;position:fixed;top:0;width:100vw;z-index:2000}.sv-dropdown-popup,.sv-popup.sv-popup-inner{height:0}.sv-popup-inner>.sv-popup__container{margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1)}.sv-list__item--with-icon .sv-popup-inner>.sv-popup__container{margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.5)}.sv-popup--menu-popup>.sv-popup__container{background:var(--lbr-popup-menu-background-color-global,var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3)));border-radius:var(--lbr-popup-menu-corner-radius,var(--sjs-corner-radius,4px));box-shadow:var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1)),var(--sjs-shadow-large,0 8px 16px 0 rgba(0,0,0,.1))}.sv-popup--menu-popup>.sv-popup__container>.sv-popup__body-content{background-color:var(--lbr-popup-menu-background-color,var(--sjs-general-backcolor,var(--background,#fff)));border-radius:var(--lbr-popup-menu-corner-radius,var(--sjs-corner-radius,4px));height:100%}.sv-popup__container{padding:0;position:absolute}.sv-popup__content{min-height:0;min-width:100%;position:relative}.sv-popup__body-content,.sv-popup__content{display:flex;flex-direction:column;height:100%}.sv-popup__body-content{box-sizing:border-box;max-height:90vh;max-width:100vw;width:100%}.sv-popup--modal-popup{align-items:center;background-color:var(--lbr-dialog-screen-color,var(--background-semitransparent,hsla(0,0%,56%,.5)));box-sizing:border-box;display:flex;justify-content:center;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*15) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*8)}.sv-popup--modal-popup>.sv-popup__container{background-color:var(--lbr-dialog-background-color,var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9)));border-radius:var(--lbr-dialog-corner-radius,calc((var(--sjs-corner-radius, 4px))*2));box-shadow:var(--lbr-dialog-shadow-2-offset-x,0) var(--lbr-dialog-shadow-2-offset-y,2px) var(--lbr-dialog-shadow-2-blur,6px) var(--lbr-dialog-shadow-2-spread,0) var(--lbr-dialog-shadow-2-color,rgba(0,0,0,.1)),var(--lbr-dialog-shadow-1-offset-x,0) var(--lbr-dialog-shadow-1-offset-y,8px) var(--lbr-dialog-shadow-1-blur,16px) var(--lbr-dialog-shadow-1-spread,0) var(--lbr-dialog-shadow-1-color,rgba(0,0,0,.1));display:flex;position:static}.sv-popup--modal-popup>.sv-popup__container>.sv-popup__body-content{gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);height:auto;min-width:452px;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sv-popup--modal-popup .sv-popup__body-footer .sv-modal-footer-action-bar{overflow:visible}.sv-popup--modal-popup .sv-popup__scrolling-content{margin:-2px;padding:2px}.sd-root-modern--mobile .sv-popup--modal-popup .sv-popup__body-content{min-width:auto}.sv-popup--confirm .sv-popup__body-content .sv-string-viewer{align-self:self-start;color:var(--sjs-font-editorfont-color,var(--sjs-general-forecolor,rgba(0,0,0,.91)));font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);font-style:normal;font-weight:400;line-height:calc((var(--sjs-font-size, 16px))*1.5)}.sv-popup__scrolling-content{display:flex;flex-direction:column;height:100%;overflow:auto}.sv-popup__scrolling-content ::-webkit-scrollbar,.sv-popup__scrolling-content::-webkit-scrollbar{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));height:6px;width:6px}.sv-popup__scrolling-content ::-webkit-scrollbar-thumb,.sv-popup__scrolling-content::-webkit-scrollbar-thumb{background:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)))}.sv-popup--show-pointer.sv-popup--top .sv-popup__pointer{transform:translate(calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1)) rotate(180deg)}.sv-popup--show-pointer.sv-popup--bottom .sv-popup__pointer{transform:translate(calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1),calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1))}.sv-popup--show-pointer.sv-popup--right .sv-popup__container{transform:translate(var(--sjs-base-unit,var(--base-unit,8px)))}.sv-popup--show-pointer.sv-popup--right .sv-popup__container .sv-popup__pointer{transform:translate(-12px,-4px) rotate(-90deg)}.sv-popup--show-pointer.sv-popup--left .sv-popup__container{transform:translate(calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1))}.sv-popup--show-pointer.sv-popup--left .sv-popup__container .sv-popup__pointer{transform:translate(-4px,-4px) rotate(90deg)}.sv-popup__pointer{display:block;position:absolute}.sv-popup__pointer:after{align-self:center;border-bottom:var(--sjs-base-unit,var(--base-unit,8px)) solid var(--sjs-general-backcolor,var(--background,#fff));border-left:var(--sjs-base-unit,var(--base-unit,8px)) solid transparent;border-right:var(--sjs-base-unit,var(--base-unit,8px)) solid transparent;content:" ";display:block;height:0;width:0}.sv-popup__body-header{color:var(--sjs-general-forecolor,var(--foreground,#161616));font-family:Open Sans;font-size:calc((var(--sjs-font-size, 16px))*1.5);font-style:normal;font-weight:700;line-height:calc((var(--sjs-font-size, 16px))*2)}.sv-popup__body-footer{display:flex}.sv-popup__body-footer .sv-action-bar{gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);overflow:visible}.sv-popup--menu-phone,.sv-popup--menu-tablet{height:var(--sv-popup-overlay-height,100vh);padding:0;width:100%;z-index:2001}.sv-popup--menu-phone .sv-popup__body-footer-item,.sv-popup--menu-tablet .sv-popup__body-footer-item{width:100%}.sv-popup--menu-phone .sv-popup__body-footer .sv-action-bar,.sv-popup--menu-tablet .sv-popup__body-footer .sv-action-bar{justify-content:flex-start;width:100%}.sv-popup--menu-phone .sv-popup__body-footer .sv-action-bar .sv-action,.sv-popup--menu-tablet .sv-popup__body-footer .sv-action-bar .sv-action{flex:0 0 auto}.sv-popup--menu-phone .sv-popup__body-footer,.sv-popup--menu-tablet .sv-popup__body-footer{background:var(--lbr-popup-menu-footer-background-color,var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9)));border-top:var(--lbr-popup-menu-footer-border-width-top,1px) solid var(--lbr-popup-menu-footer-border-color,var(--sjs-border-light,var(--border-light,#eaeaea)));padding:var(--lbr-popup-menu-footer-padding-top,calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)) var(--lbr-popup-menu-footer-padding-right,0) var(--lbr-popup-menu-footer-padding-bottom,calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)) var(--lbr-popup-menu-footer-padding-left,0)}.sv-popup--menu-phone .sv-list__filter,.sv-popup--menu-tablet .sv-list__filter{align-items:center;display:flex;margin-bottom:0;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sv-popup--menu-phone .sv-list,.sv-popup--menu-tablet .sv-list{flex-grow:1}.sv-popup--menu-phone .sv-list__filter-icon,.sv-popup--menu-tablet .sv-list__filter-icon{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);position:static}.sv-popup--menu-phone .sv-list__empty-container,.sv-popup--menu-tablet .sv-list__empty-container{display:flex;flex-direction:column;flex-grow:1;justify-content:center}.sv-popup--menu-phone .sv-list__filter-clear-button,.sv-popup--menu-tablet .sv-list__filter-clear-button{appearance:none;background-color:transparent;border:none;border-radius:100%;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-popup--menu-phone .sv-list__filter-clear-button svg,.sv-popup--menu-tablet .sv-list__filter-clear-button svg{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sv-popup--menu-phone .sv-list__filter-clear-button svg use,.sv-popup--menu-tablet .sv-list__filter-clear-button svg use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sv-popup--menu-phone .sv-list__filter-clear-button:hover,.sv-popup--menu-tablet .sv-list__filter-clear-button:hover{background:var(--lbr-popup-menu-search-clear-button-background-color-hovered,var(--sjs-special-red-light,rgba(229,10,62,.1)));border-radius:var(--lbr-popup-menu-search-clear-button-corner-radius,1024px)}.sv-popup--menu-phone .sv-list__filter-clear-button:hover use,.sv-popup--menu-tablet .sv-list__filter-clear-button:hover use{fill:var(--lbr-popup-menu-search-clear-button-icon-color-hovered,var(--sjs-special-red,#e50a3e))}.sv-popup--menu-phone .sv-list__input,.sv-popup--menu-tablet .sv-list__input{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:max(16px,var(--sjs-font-size,16px));line-height:max(24px,1.5*(var(--sjs-font-size,16px)));padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) var(--sjs-base-unit,var(--base-unit,8px))}.sv-popup--menu-phone .sv-list__item--focused .sv-list__item-body,.sv-popup--menu-phone .sv-list__item:focus .sv-list__item-body,.sv-popup--menu-phone .sv-list__item:hover .sv-list__item-body,.sv-popup--menu-tablet .sv-list__item--focused .sv-list__item-body,.sv-popup--menu-tablet .sv-list__item:focus .sv-list__item-body,.sv-popup--menu-tablet .sv-list__item:hover .sv-list__item-body{background:var(--sjs-general-backcolor,var(--background,#fff))}.sv-popup--menu-phone .sv-list__item--focused.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-phone .sv-list__item:focus.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-phone .sv-list__item:hover.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-tablet .sv-list__item--focused.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-tablet .sv-list__item:focus.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-tablet .sv-list__item:hover.sv-list__item--selected .sv-list__item-body{background:var(--sjs-primary-backcolor,var(--primary,#19b394));color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));font-weight:600}.sv-popup--menu-phone.sv-multi-select-list .sv-list__item--focused.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-phone.sv-multi-select-list .sv-list__item:focus.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-phone.sv-multi-select-list .sv-list__item:hover.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-tablet.sv-multi-select-list .sv-list__item--focused.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-tablet.sv-multi-select-list .sv-list__item:focus.sv-list__item--selected .sv-list__item-body,.sv-popup--menu-tablet.sv-multi-select-list .sv-list__item:hover.sv-list__item--selected .sv-list__item-body{background:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)));color:var(--sjs-general-forecolor,var(--foreground,#161616));font-weight:400}.sv-popup--menu-phone>.sv-popup__container{background:var(--lbr-popup-menu-background-color-global,var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3)));border:unset;box-shadow:unset;box-sizing:content-box;height:calc(var(--sv-popup-overlay-height, 100vh));max-height:calc(var(--sv-popup-overlay-height, 100vh));max-width:100vw;width:100%}.sv-popup--menu-phone>.sv-popup__container>.sv-popup__body-content{background-color:var(--lbr-popup-menu-background-color,var(--sjs-general-backcolor,var(--background,#fff)));height:calc(var(--sv-popup-overlay-height, 100vh));max-height:var(--sv-popup-overlay-height,100vh);max-width:100vw}.sv-popup--menu-tablet{background:var(--lbr-dialog-screen-color,var(--background-semitransparent,hsla(0,0%,56%,.5)))}.sv-popup--menu-tablet>.sv-popup__container{--sv-popup-overlay-max-height:calc(var(--sv-popup-overlay-height, 100vh) - var(--sjs-base-unit, var(--base-unit, 8px))*8);--sv-popup-overlay-max-width:calc(100% - var(--sjs-base-unit, var(--base-unit, 8px))*8);background:var(--lbr-popup-menu-background-color-global,var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3)));border:unset;border-radius:var(--lbr-popup-menu-corner-radius,var(--sjs-corner-radius,4px));box-shadow:var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1)),var(--sjs-shadow-large,0 8px 16px 0 rgba(0,0,0,.1));box-sizing:content-box;height:auto;left:50%;max-height:var(--sv-popup-overlay-max-height);max-width:var(--sv-popup-overlay-max-width);min-height:min(var(--sv-popup-overlay-max-height),30*(var(--sjs-base-unit,var(--base-unit,8px))));min-width:min(40*(var(--sjs-base-unit,var(--base-unit,8px))),var(--sv-popup-overlay-max-width));overflow:hidden;position:absolute;top:50%;transform:translate(-50%,-50%);width:auto}.sv-popup--menu-tablet>.sv-popup__container>.sv-popup__body-content{background-color:var(--lbr-popup-menu-background-color,var(--sjs-general-backcolor,var(--background,#fff)));height:auto;max-height:calc(var(--sv-popup-overlay-height, 100vh) - var(--sjs-base-unit, var(--base-unit, 8px))*8);max-width:100vw;min-height:min(var(--sv-popup-overlay-max-height),30*(var(--sjs-base-unit,var(--base-unit,8px))))}.sv-popup--menu-tablet .sv-list__container,.sv-popup--menu-tablet .sv-popup__content,.sv-popup--menu-tablet .sv-popup__scrolling-content{flex-grow:1}.sv-popup--visible{opacity:1}.sv-popup--enter{animation-duration:.15s;animation-fill-mode:forwards;animation-name:fadeIn}.sv-popup--modal-popup.sv-popup--enter{animation-duration:.25s;animation-timing-function:ease-out}.sv-popup--leave{animation-direction:reverse;animation-duration:.15s;animation-fill-mode:forwards;animation-name:fadeIn}.sv-popup--modal-popup.sv-popup--leave{animation-duration:.25s;animation-timing-function:ease-in}.sv-popup--hidden{opacity:0}@keyframes modalMoveUp{0%{transform:translateY(64px)}to{transform:translateY(0)}}.sv-popup--modal-popup.sv-popup--enter .sv-popup__container,.sv-popup--modal-popup.sv-popup--leave .sv-popup__container{animation-duration:.25s;animation-fill-mode:forwards;animation-name:modalMoveUp;animation-timing-function:ease-out}.sv-popup--modal-popup.sv-popup--leave .sv-popup__container{animation-direction:reverse;animation-timing-function:ease-in}.sv-button-group{border:1px solid var(--sjs-border-default,var(--border,#d6d6d6));overflow:auto}.sv-button-group,.sv-button-group__item{align-items:center;display:flex;flex-direction:row;font-size:var(--sjs-font-size,16px)}.sv-button-group__item{appearance:none;background:var(--sjs-general-backcolor,var(--background,#fff));box-sizing:border-box;color:var(--sjs-general-forecolor,var(--foreground,#161616));cursor:pointer;font-weight:400;justify-content:center;line-height:calc((var(--sjs-font-size, 16px))*1.5);outline:none;overflow:hidden;padding:11px calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);position:relative;width:100%}.sv-button-group__item:not(:last-of-type){border-right:1px solid var(--sjs-border-default,var(--border,#d6d6d6))}.sv-button-group__item--hover:hover{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3))}.sv-button-group__item-icon{display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-button-group__item-icon use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sv-button-group__item--selected{color:var(--sjs-primary-backcolor,var(--primary,#19b394));font-weight:600}.sv-button-group__item--selected .sv-button-group__item-icon use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sv-button-group__item--selected:hover{background-color:var(--sjs-general-backcolor,var(--background,#fff))}.sv-button-group__item-decorator{align-items:center;display:flex;max-width:100%}.sv-button-group__item-caption{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sv-button-group__item-icon+.sv-button-group__item-caption{margin-left:var(--sjs-base-unit,var(--base-unit,8px))}.sv-button-group__item--disabled{color:var(--sjs-general-forecolor,var(--foreground,#161616));cursor:default}.sv-button-group__item--disabled .sv-button-group__item-decorator{font-weight:400;opacity:.25}.sv-button-group__item--disabled .sv-button-group__item-icon use{fill:var(--sjs-general-forecolor,var(--foreground,#161616))}.sv-button-group__item--disabled:hover{background-color:var(--sjs-general-backcolor,var(--background,#fff))}.sv-button-group:focus-within{border-color:var(--sjs-primary-backcolor,var(--primary,#19b394));box-shadow:0 0 0 1px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sv-visuallyhidden{clip:rect(0 0 0 0);height:1px;overflow:hidden;position:absolute;width:1px}.sv-hidden{display:none!important}.sv-title-actions{align-items:center;display:flex;width:100%}.sv-title-actions__title{flex-wrap:wrap;max-width:90%;min-width:50%;white-space:normal}.sv-action-title-bar{min-width:56px}.sv-title-actions .sv-title-actions__title{flex:0 1 auto;flex-wrap:wrap;max-width:unset;min-width:unset}.sv-title-actions .sv-action-title-bar{flex:1 1 auto;justify-content:flex-end;min-width:unset}.sv_window{background-clip:padding-box;background:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));border:1px solid var(--sjs-border-inside,var(--border-inside,rgba(0,0,0,.16)));border-radius:var(--sjs-base-unit,var(--base-unit,8px));bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);box-shadow:var(--sjs-shadow-large,0 8px 16px 0 rgba(0,0,0,.1)),var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1));box-sizing:border-box;max-height:50vh;overflow:auto;position:fixed;right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);width:calc(100% - (var(--sjs-base-unit, var(--base-unit, 8px)))*4)!important;z-index:100}@-moz-document url-prefix(){.sv_window,.sv_window *{scrollbar-color:var(--sjs-border-default,var(--border,#d6d6d6)) transparent;scrollbar-width:thin}}.sv_window ::-webkit-scrollbar,.sv_window::-webkit-scrollbar{background-color:transparent;height:12px;width:12px}.sv_window ::-webkit-scrollbar-thumb,.sv_window::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:var(--sjs-border-default,var(--border,#d6d6d6));border:4px solid transparent;border-radius:32px}.sv_window ::-webkit-scrollbar-track,.sv_window::-webkit-scrollbar-track{background:transparent}.sv_window ::-webkit-scrollbar-thumb:hover,.sv_window::-webkit-scrollbar-thumb:hover{background-color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));border:2px solid transparent}.sv_window_root-content{height:100%}.sv_window--full-screen{bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);max-height:100%;max-width:none!important;right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);width:auto!important}.sv_window_header{display:flex;justify-content:flex-end}.sv_window_content{overflow:hidden}.sv_window--collapsed{height:auto}.sv_window--collapsed .sv_window_header{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));border-radius:var(--sjs-base-unit,var(--base-unit,8px));box-sizing:content-box;display:flex;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);padding:var(--sjs-base-unit,var(--base-unit,8px)) var(--sjs-base-unit,var(--base-unit,8px)) var(--sjs-base-unit,var(--base-unit,8px)) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sv_window--collapsed .sv_window_content{display:none}.sv_window--collapsed .sv_window_buttons_container{margin-right:0;margin-top:0}.sv_window_header_title_collapsed{align-items:center;color:var(--sjs-general-dim-forecolor,rgba(0,0,0,.91));display:flex;flex:1;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);font-style:normal;font-weight:600;justify-content:flex-start;line-height:calc((var(--sjs-font-size, 16px))*1.5)}.sv_window_header_description{font-feature-settings:"salt" on;color:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);font-style:normal;line-height:calc((var(--sjs-font-size, 16px))*1.5);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sv_window_buttons_container{display:flex;gap:var(--sjs-base-unit,var(--base-unit,8px));margin-right:var(--sjs-base-unit,var(--base-unit,8px));margin-top:var(--sjs-base-unit,var(--base-unit,8px));position:fixed;z-index:10000}.sv_window_button{align-items:center;border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);cursor:pointer;display:flex;justify-content:center;padding:var(--sjs-base-unit,var(--base-unit,8px))}.sv_window_button:active,.sv_window_button:hover{background-color:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)))}.sv_window_button:active svg path,.sv_window_button:active svg use,.sv_window_button:hover svg path,.sv_window_button:hover svg use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sv_window_button:active{opacity:.5}.sv_window_button svg path,.sv_window_button svg use{fill:var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45))}.sv-brand-info,sv-brand-info{margin-top:1px;position:relative;z-index:1}.sv-brand-info{color:#161616;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));padding:24px 40px;text-align:right}.sv-brand-info a{color:#161616;text-decoration-line:underline}.sd-body--static .sv-brand-info{margin-top:16px;padding-top:0}.sd-body--responsive .sv-brand-info{margin-top:-8px;padding-top:16px}.sd-root-modern--mobile .sv-brand-info{margin-top:0;padding:48px 24px 8px;text-align:center}.sv-brand-info__text{color:#161616;font-size:var(--sjs-font-size,16px);font-weight:600;line-height:calc((var(--sjs-font-size, 16px))*1.5)}.sv-brand-info__logo{display:inline-block}.sv-brand-info__logo img{width:118px}.sv-brand-info__terms{font-size:calc((var(--sjs-font-size, 16px))*.75);font-weight:400;line-height:var(--sjs-font-size,16px);padding-top:4px}.sv-brand-info__terms a{color:#909090}.sd-body--responsive .sv-brand-info{padding-left:0;padding-right:0}.sv-ranking{outline:none;user-select:none;-webkit-user-select:none}.sv-ranking-item{cursor:pointer;opacity:1;position:relative}.sv-ranking-item:focus .sv-ranking-item__icon--hover{visibility:hidden}.sv-ranking-item:hover:not(:focus) .sv-ranking-item__icon--hover{visibility:visible}.sv-question--disabled .sv-ranking-item:hover .sv-ranking-item__icon--hover{visibility:hidden}.sv-ranking-item:focus{outline:none}.sv-ranking-item:focus .sv-ranking-item__icon--focus{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.6);visibility:visible}.sv-ranking-item:focus .sv-ranking-item__index{background:var(--sjs-general-backcolor,var(--background,#fff));outline:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) solid var(--sjs-primary-backcolor,var(--primary,#19b394))}.sv-ranking-item__content.sv-ranking-item__content{align-items:center;border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);display:flex;line-height:1em;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) 0}.sv-ranking-item__icon-container{align-self:flex-start;bottom:0;box-sizing:content-box;flex-shrink:0;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);left:0;margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2);padding-left:var(--sjs-base-unit,var(--base-unit,8px));padding-right:var(--sjs-base-unit,var(--base-unit,8px));position:relative;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-ranking-item--disabled.sv-ranking-item--disabled,.sv-ranking-item--preview.sv-ranking-item--preview,.sv-ranking-item--readonly.sv-ranking-item--readonly{cursor:auto;user-select:auto;-webkit-user-select:initial}.sv-ranking-item--disabled.sv-ranking-item--disabled .sv-ranking-item__icon-container.sv-ranking-item__icon-container .sv-ranking-item__icon.sv-ranking-item__icon,.sv-ranking-item--preview.sv-ranking-item--preview .sv-ranking-item__icon-container.sv-ranking-item__icon-container .sv-ranking-item__icon.sv-ranking-item__icon,.sv-ranking-item--readonly.sv-ranking-item--readonly .sv-ranking-item__icon-container.sv-ranking-item__icon-container .sv-ranking-item__icon.sv-ranking-item__icon{visibility:hidden}.sv-ranking-item__icon.sv-ranking-item__icon{fill:var(--sjs-primary-backcolor,var(--primary,#19b394));height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);position:absolute;top:var(--sjs-base-unit,var(--base-unit,8px));visibility:hidden;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-ranking-item__index.sv-ranking-item__index{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));align-items:center;align-self:self-start;background-color:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)));border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) solid transparent;border-radius:100%;box-sizing:border-box;color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));display:flex;flex-shrink:0;font-size:var(--sjs-internal-font-editorfont-size);font-weight:600;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);justify-content:center;line-height:calc((var(--sjs-font-size, 16px))*1.5);margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0);outline:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) solid transparent;transition:outline var(--sjs-transition-duration,.15s),background var(--sjs-transition-duration,.15s);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sv-ranking-item__index.sv-ranking-item__index svg{fill:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));height:var(--sjs-internal-font-editorfont-size);width:var(--sjs-internal-font-editorfont-size)}.sv-ranking-item__text{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));align-self:self-start;color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));display:inline-block;font-size:var(--sjs-internal-font-editorfont-size);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);margin:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);overflow:hidden;overflow-wrap:break-word;padding-bottom:var(--sjs-base-unit,var(--base-unit,8px));padding-top:var(--sjs-base-unit,var(--base-unit,8px));text-overflow:ellipsis;white-space:nowrap;word-break:normal}.sv-ranking-item__text .sv-string-editor,.sv-ranking-item__text .sv-string-viewer{overflow:initial;white-space:pre-line}.sd-ranking--disabled .sv-ranking-item__text{color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));opacity:.25}.sv-ranking-item--disabled .sv-ranking-item__text{color:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));opacity:.25}.sv-ranking-item--readonly .sv-ranking-item__index{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sv-ranking-item--preview .sv-ranking-item__index{background-color:transparent;border:1px solid var(--sjs-general-forecolor,var(--foreground,#161616));box-sizing:border-box}.sv-ranking-item__ghost.sv-ranking-item__ghost{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);display:none;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);left:0;position:absolute;top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*31);z-index:1}[dir=rtl] .sv-ranking-item__ghost{left:initilal;right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sv-ranking-item--ghost{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sv-ranking-item--ghost .sv-ranking-item__text .sv-string-editor,.sv-ranking-item--ghost .sv-ranking-item__text .sv-string-viewer{white-space:unset}.sv-ranking-item--ghost .sv-ranking-item__ghost{display:block}.sv-ranking-item--ghost .sv-ranking-item__content{visibility:hidden}.sv-ranking-item--drag .sv-ranking-item__content{border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);box-shadow:var(--sjs-shadow-large,0 8px 16px 0 rgba(0,0,0,.1))}.sv-ranking--drag .sv-ranking-item:hover .sv-ranking-item__icon{visibility:hidden}.sv-ranking-item--drag .sv-ranking-item__icon--hover{visibility:visible}.sv-ranking--mobile .sv-ranking-item__icon--hover{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));visibility:visible}.sv-ranking--mobile.sv-ranking--drag .sv-ranking-item--ghost .sv-ranking-item__icon.sv-ranking-item__icon--hover{visibility:hidden}.sv-ranking--mobile.sv-ranking-shortcut{max-width:80%}.sv-ranking--mobile .sd-element--with-frame .sv-ranking-item__icon,.sv-ranking--mobile .sv-ranking-item__index.sv-ranking-item__index{margin-left:0}.sv-ranking--design-mode .sv-ranking-item:hover .sv-ranking-item__icon{visibility:hidden}.sv-ranking--disabled{opacity:.8}.sv-ranking-shortcut[hidden]{display:none}.sv-ranking-shortcut .sv-ranking-item__icon{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sv-ranking-shortcut .sv-ranking-item__text{margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sv-ranking-shortcut .sv-ranking-item__icon--hover{visibility:visible}.sv-ranking-shortcut .sv-ranking-item__icon{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);top:var(--sjs-base-unit,var(--base-unit,8px));width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-ranking-shortcut .sv-ranking-item__content{padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sv-ranking-shortcut .sv-ranking-item__icon-container{margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0)}.sv-ranking-shortcut{background-color:var(--sjs-general-backcolor,var(--background,#fff));border-radius:calc(var(--sjs-base-unit, var(--base-unit, 8px))*12.5);box-shadow:var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1)),var(--sjs-shadow-large,0 8px 16px 0 rgba(0,0,0,.1));cursor:grabbing;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));max-width:400px;min-width:100px;position:absolute;z-index:10000}.sv-ranking-shortcut .sv-ranking-item{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sv-ranking-shortcut .sv-ranking-item .sv-ranking-item__text .sv-string-editor,.sv-ranking-shortcut .sv-ranking-item .sv-ranking-item__text .sv-string-viewer{overflow:hidden;white-space:nowrap}.sv-ranking--select-to-rank{display:flex}.sv-ranking--select-to-rank-vertical{flex-direction:column-reverse}.sv-ranking--select-to-rank-vertical .sv-ranking__containers-divider{height:1px;margin:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3) 0}.sv-ranking--select-to-rank-vertical .sv-ranking__container--empty{align-items:center;display:flex;justify-content:center;padding-bottom:var(--sjs-base-unit,var(--base-unit,8px));padding-top:var(--sjs-base-unit,var(--base-unit,8px))}.sv-ranking-item--animate-item-removing{animation-delay:var(--sjs-ranking-move-out-delay,0ms),0s;animation-direction:reverse;animation-duration:var(--sjs-ranking-move-out-duration,.15s),var(--sjs-ranking-fade-out-duration,.1s);animation-fill-mode:forwards;animation-name:moveIn,fadeIn;animation-timing-function:linear}.sv-ranking-item--animate-item-adding{animation-delay:0s,var(--sjs-ranking-fade-in-delay,.15s);animation-duration:var(--sjs-ranking-move-in-duration,.15s),var(--sjs-ranking-fade-in-duration,.1s);animation-fill-mode:forwards;animation-name:moveIn,fadeIn;animation-timing-function:linear;opacity:0}.sv-ranking-item--animate-item-adding-empty{animation-delay:0;animation-duration:var(--sjs-ranking-fade-in-duration,.1s);animation-name:fadeIn;animation-timing-function:linear;opacity:0}.sv-ranking-item--animate-item-removing-empty{animation-delay:0;animation-direction:reverse;animation-duration:var(--sjs-ranking-fade-out-duration,.1s);animation-name:fadeIn;animation-timing-function:linear}@keyframes sv-animate-item-opacity-reverse-keyframes{0%{opacity:0}to{opacity:1}}@keyframes sv-animate-item-opacity-keyframes{0%{opacity:1}to{opacity:0}}.sv-ranking--select-to-rank-horizontal .sv-ranking__container{max-width:calc(50% - 1px)}.sv-ranking--select-to-rank-horizontal .sv-ranking__containers-divider{width:1px}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--to .sv-ranking-item{left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--empty.sv-ranking__container--to .sv-ranking-item{left:auto}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--empty.sv-ranking__container--to .sv-ranking__container-placeholder{padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--empty.sv-ranking__container--from .sv-ranking__container-placeholder{padding-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sv-ranking__container-placeholder{align-items:center;box-sizing:border-box;color:var(--sjs-font-questiondescription-color,var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45)));display:flex;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);font-style:normal;height:100%;justify-content:center;line-height:calc((var(--sjs-font-size, 16px))*1.5);padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);white-space:normal}.sv-ranking__container{flex:1}.sv-ranking__container--empty{box-sizing:border-box;text-align:center}.sv-ranking__containers-divider{background:var(--sjs-border-default,var(--sjs-border-inside,var(--border-inside,rgba(0,0,0,.16))))}.sv-ranking__container--from .sv-ranking-item__icon--focus{display:none}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--to .sv-ranking-item{left:0!important;padding-left:16px}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--to .sv-ranking-item .sv-ranking-item__ghost{left:auto}.sv-ranking--select-to-rank-swap-areas{flex-direction:row-reverse}.sv-ranking--select-to-rank-swap-areas .sv-ranking__container--to .sv-ranking-item{left:-24px!important;padding-left:0}.sv-ranking--select-to-rank-swap-areas .sv-ranking__container--from .sv-ranking-item{left:0;padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sv-ranking--select-to-rank-swap-areas .sv-ranking__container--from .sv-ranking-item__ghost.sv-ranking-item__ghost{left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sv-ranking--select-to-rank-swap-areas .sv-ranking__container--empty.sv-ranking__container--to .sv-ranking__container-placeholder{padding-left:0;padding-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sv-ranking--select-to-rank-swap-areas .sv-ranking__container--empty.sv-ranking__container--to .sv-ranking-item__ghost.sv-ranking-item__ghost{right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sv-ranking--select-to-rank-swap-areas .sv-ranking__container--empty.sv-ranking__container--from .sv-ranking__container-placeholder{padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);padding-right:0}.sd-question--mobile .sv-ranking-item__icon-container,.sd-root-modern.sd-root-modern--mobile .sv-ranking-item__icon-container{display:flex;justify-content:flex-end;margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2);padding:0;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sv-list{list-style-type:none;margin:0;overflow-y:auto;padding:var(--lbr-popup-menu-padding-top,4px) var(--lbr-popup-menu-padding-right,4px) var(--lbr-popup-menu-padding-bottom,4px) var(--lbr-popup-menu-padding-left,4px)}.sv-list,.sv-list__empty-container{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)))}.sv-list__empty-container{align-items:center;align-self:stretch;box-sizing:border-box;display:flex;flex-direction:column;gap:var(--lbr-placeholder-gap,4px);justify-content:center;padding:var(--lbr-placeholder-padding-top,16px) var(--lbr-placeholder-padding-right,64px) var(--lbr-placeholder-padding-bottom,16px) var(--lbr-placeholder-padding-left,64px);width:100%}.sv-list__empty-text{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));font-size:var(--sjs-font-size,16px);font-weight:400;line-height:calc((var(--sjs-font-size, 16px))*1.5);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.sv-list__item{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sv-list__item,.sv-list__item-body{align-items:center;box-sizing:border-box;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.sv-list__item-body{--sjs-list-item-padding-left-default:calc(var(--sjs-base-unit, var(--base-unit, 8px))*2);--sjs-list-item-padding-left:calc(var(--sjs-list-item-level)*var(--sjs-list-item-padding-left-default));color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));font-size:var(--sjs-font-size,16px);font-weight:400;line-height:calc((var(--sjs-font-size, 16px))*1.5);padding-block:var(--sjs-base-unit,var(--base-unit,8px));padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*8);padding-inline-start:var(--sjs-list-item-padding-left,calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2));position:relative;text-align:start;transition:background-color var(--sjs-transition-duration,.15s),color var(--sjs-transition-duration,.15s)}.sv-list__item.sv-list__item--focused:not(.sv-list__item--selected){outline:none}.sv-list__item.sv-list__item--focused:not(.sv-list__item--selected) .sv-list__item-body{border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) solid var(--sjs-border-light,var(--border-light,#eaeaea));border-radius:var(--sjs-corner-radius,4px);padding-block:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.75);padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*7.75);padding-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.75)}.sv-list__item:focus,.sv-list__item:hover{outline:none}.sv-list__item--hovered>.sv-list__item-body,.sv-list__item:focus .sv-list__item-body{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sv-list__item--with-icon.sv-list__item--with-icon{padding:0}.sv-list__item--with-icon.sv-list__item--with-icon>.sv-list__item-body{display:flex;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}.sv-list__item-icon{flex-shrink:0;float:left;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-list__item-icon svg{display:block}.sv-list__item-icon use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sv-list-item__marker-icon{box-sizing:content-box;flex-shrink:0;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);position:absolute;right:var(--sjs-base-unit,var(--base-unit,8px));width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sv-list-item__marker-icon svg{display:block}.sv-list-item__marker-icon use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}[dir=rtl] .sv-list__item-icon,[style*="direction: rtl"] .sv-list__item-icon,[style*="direction:rtl"] .sv-list__item-icon{float:right}.sv-list__item-separator{background-color:var(--sjs-border-default,var(--border,#d6d6d6));height:1px;margin:var(--sjs-base-unit,var(--base-unit,8px)) 0}.sv-list--filtering .sv-list__item-separator{display:none}.sv-list__item.sv-list__item--selected.sv-list__item--focused>.sv-list__item-body,.sv-list__item.sv-list__item--selected:hover>.sv-list__item-body,.sv-list__item.sv-list__item--selected>.sv-list__item-body,.sv-multi-select-list .sv-list__item.sv-list__item--selected.sv-list__item--focused>.sv-list__item-body,li:focus .sv-list__item.sv-list__item--selected>.sv-list__item-body{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));font-weight:600}.sv-list__item.sv-list__item--selected .sv-list__item-icon use,.sv-list__item.sv-list__item--selected.sv-list__item--focused .sv-list__item-icon use,.sv-list__item.sv-list__item--selected:hover .sv-list__item-icon use,.sv-multi-select-list .sv-list__item.sv-list__item--selected.sv-list__item--focused .sv-list__item-icon use,li:focus .sv-list__item.sv-list__item--selected .sv-list__item-icon use{fill:var(--sjs-general-backcolor,var(--background,#fff))}.sv-list__item.sv-list__item--selected .sv-list-item__marker-icon use,.sv-list__item.sv-list__item--selected.sv-list__item--focused .sv-list-item__marker-icon use,.sv-list__item.sv-list__item--selected:hover .sv-list-item__marker-icon use,.sv-multi-select-list .sv-list__item.sv-list__item--selected.sv-list__item--focused .sv-list-item__marker-icon use,li:focus .sv-list__item.sv-list__item--selected .sv-list-item__marker-icon use{fill:var(--sjs-primary-forecolor,var(--primary-foreground,#fff))}.sv-list__item--group-selected>.sv-list__item-body,.sv-multi-select-list .sv-list__item.sv-list__item--selected .sv-list__item-body,.sv-multi-select-list .sv-list__item.sv-list__item--selected:hover .sv-list__item-body{background-color:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)));color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));font-weight:400}.sv-list__item--group-selected>.sv-list__item-body use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sv-list__item.sv-list__item--disabled .sv-list__item-body{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));cursor:default}.sv-list__item span{white-space:nowrap}.sv-list__item-text--wrap span{word-wrap:break-word;white-space:normal}.sv-list__container{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}.sv-list__filter{border-bottom:1px solid var(--sjs-border-inside,var(--border-inside,rgba(0,0,0,.16)))}.sv-list__filter-icon{display:block;inset-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);position:absolute;top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}.sv-list__filter-icon .sv-svg-icon{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-list__filter-icon .sv-svg-icon use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sv-list__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;box-sizing:border-box;color:var(--sjs-general-forecolor,var(--foreground,#161616));display:block;font-size:var(--sjs-font-size,16px);line-height:calc((var(--sjs-font-size, 16px))*1.5);min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*30);outline:none;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);padding-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*7);width:100%}.sv-list__input::placeholder{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sv-list__input:disabled,.sv-list__input:disabled::placeholder{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sv-list__loading-indicator{pointer-events:none}.sv-list__loading-indicator .sv-list__item-body{background-color:transparent}.sv-scroll__wrapper{display:flex;flex-direction:column;height:100%;position:relative}.sv-scroll__scroller{-ms-overflow-style:none;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.sv-scroll__scroller::-webkit-scrollbar{display:none}.sv-scroll__scrollbar{bottom:0;inset-inline-end:0;inset-inline-start:auto;margin-inline-start:-1px;overflow-x:hidden;overflow-y:scroll;position:absolute;top:0;visibility:hidden;width:fit-content;z-index:30}@-moz-document url-prefix(){.sv-scroll__scrollbar{scrollbar-color:var(--ctr-scrollbar-background-color,var(--sjs-border-25-overlay,rgba(0,0,0,.149))) transparent;scrollbar-width:thin}}.sv-scroll__wrapper:hover .sv-scroll__scrollbar{visibility:visible}.sv-scroll__scrollbar-sizer{width:1px}.sv-scroll__container{display:flex;flex-direction:column;flex-grow:1;width:100%}.sv-save-data_root{align-items:center;background:var(--sjs-general-backcolor,var(--background,#fff));border-radius:calc((var(--sjs-corner-radius, 4px))*2);bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);box-shadow:var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1));color:var(--sjs-general-forecolor,var(--foreground,#161616));display:flex;flex-direction:row;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);justify-content:center;left:50%;line-height:calc((var(--sjs-font-size, 16px))*1.5);min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*30);opacity:0;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);position:fixed;text-align:center;transform:translateX(-50%) translateY(calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3));transition-delay:.25s;transition-property:transform,opacity;transition-timing-function:ease-in;transition:.5s;z-index:1600}.sv-save-data_root.sv-save-data_root--shown{opacity:.75;transform:translateX(-50%) translateY(0);transition-delay:.25s;transition-property:transform,opacity;transition-timing-function:ease-out}.sv-save-data_root span{display:flex;flex-grow:1}.sv-save-data_root .sv-action-bar{display:flex;flex-grow:0;flex-shrink:0}.sv-save-data_root--shown.sv-save-data_error,.sv-save-data_root--shown.sv-save-data_success{opacity:1}.sv-save-data_root.sv-save-data_root--with-buttons{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sv-save-data_root.sv-save-data_error{background-color:var(--sjs-special-red,var(--red,#e60a3e));color:var(--sjs-general-backcolor,var(--background,#fff));font-weight:600;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sv-save-data_root.sv-save-data_error .sv-save-data_button{align-items:center;background-color:var(--sjs-special-red,var(--red,#e60a3e));border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) solid #fff;border-radius:calc((var(--sjs-corner-radius, 4px))*1.5);color:#fff;display:flex;font-size:var(--sjs-font-size,16px);font-weight:600;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);line-height:calc((var(--sjs-font-size, 16px))*1.5);padding:var(--sjs-base-unit,var(--base-unit,8px)) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-save-data_root.sv-save-data_error .sv-save-data_button:focus,.sv-save-data_root.sv-save-data_error .sv-save-data_button:hover{background-color:var(--sjs-general-backcolor,var(--background,#fff));color:var(--sjs-special-red,var(--red,#e60a3e))}.sv-save-data_root.sv-save-data_success{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));color:#fff;font-weight:600}.sv-string-viewer.sv-string-viewer--multiline{white-space:pre-wrap}.sd-element{padding-left:var(--sv-element-add-padding-left,0);padding-right:var(--sv-element-add-padding-right,0)}.sd-element__title{outline:none}.sd-element__title.sd-element__title--disabled{opacity:.25}.sd-root--readonly .sd-element__title.sd-element__title--disabled{opacity:1}.sd-element--invisible{opacity:.35}.sd-title.sd-element__title{color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));font-family:var(--sjs-font-questiontitle-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-weight:var(--sjs-font-questiontitle-weight,600)}.sd-element__header .sv-string-editor{max-width:100%;white-space:normal}.sd-element__title{font-size:0;line-height:0;margin:0;position:static}.sd-element__title .sd-element__num{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));font-size:calc((var(--sjs-font-size, 16px))*.75);line-height:var(--sjs-font-size,16px)}.sd-element__title span{font-size:var(--sjs-font-questiontitle-size,var(--sjs-font-size,16px));line-height:calc((var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)))*1.5)}.sd-element__title .sv-title-actions__title{font-size:0;line-height:0;white-space:nowrap}.sd-element__title .sv-string-viewer{white-space:normal}.sd-element__title .sv-string-viewer.sv-string-viewer--multiline{white-space:pre-wrap}.sd-element__num{box-sizing:border-box;color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));flex-shrink:0;float:left;font-size:calc((var(--sjs-font-size, 16px))*.75);line-height:var(--sjs-font-size,16px);margin-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-5);padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.375);padding-inline-end:var(--sjs-base-unit,var(--base-unit,8px));padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.625);padding-inline-start:0;text-align:end;white-space:nowrap;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sd-element__num+span,.sd-page__num+span{float:left;width:0}[dir=rtl] .sd-element__num,[style*="direction: rtl"] .sd-element__num,[style*="direction:rtl"] .sd-element__num{float:right}[dir=rtl] .sd-element__title--collapsed .sd-element__title-expandable-svg,[style*="direction: rtl"] .sd-element__title--collapsed .sd-element__title-expandable-svg,[style*="direction:rtl"] .sd-element__title--collapsed .sd-element__title-expandable-svg{transform:rotate(180deg)}.sd-element__title--num-inline .sd-element__num{float:none;margin-inline-start:0;padding-inline-end:0;padding-inline-start:0;width:auto}.sd-element__title--num-inline .sd-element__num+span{float:none;width:auto}.sd-element__title--expandable.sd-element__title--expandable{display:block;position:relative}.sd-element__title-expandable-svg{display:inline-block;height:var(--lbr-question-panel-expand-button-icon-height,calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2));inset-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3);position:absolute;top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);width:var(--lbr-question-panel-expand-button-icon-width,calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2))}.sd-element__title-expandable-svg use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sd-element--with-frame{background:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));border-radius:var(--sjs-questionpanel-cornerRadius,var(--sjs-corner-radius,4px));box-shadow:var(--sjs-shadow-small,0 1px 2px 0 rgba(0,0,0,.15));box-sizing:border-box;padding:var(--sd-base-padding) calc(var(--sd-base-padding) + var(--sv-element-add-padding-right, 0px)) var(--sd-base-padding) calc(var(--sd-base-padding) + var(--sv-element-add-padding-left, 0px))}.sd-element--with-frame.sd-element--compact{background-color:transparent;border:1px solid var(--sjs-border-default,var(--border,#d6d6d6));border-radius:var(--sjs-questionpanel-cornerRadius,var(--sjs-corner-radius,4px));box-shadow:none}@keyframes elementMoveIn{0%{flex-basis:0;flex-grow:0;height:0;max-width:0;min-width:0;overflow:hidden;padding-left:0;width:0}to{flex-basis:var(--animation-width);height:var(--animation-height);min-width:var(--animation-width);overflow:visible;padding-left:var(--animation-padding-left);width:var(--animation-width)}}.sd-element-wrapper--enter{animation-delay:0s,var(--sjs-element-fade-in-delay,.1s);animation-duration:var(--sjs-element-move-in-duration,.25s),var(--sjs-element-fade-in-duration,.5s);animation-fill-mode:forwards;animation-name:elementMoveIn,fadeIn;animation-timing-function:ease-out;opacity:0}.sd-element-wrapper--leave{animation-delay:var(--sjs-element-move-out-delay,0ms),0s;animation-direction:reverse;animation-duration:var(--sjs-element-move-out-duration,.25s),var(--sjs-element-fade-out-duration,.15s);animation-fill-mode:forwards;animation-name:elementMoveIn,fadeIn;animation-timing-function:ease-in}.sd-element__content{box-sizing:border-box}.sd-element__content--enter,.sd-element__content--leave{--animation-padding-top:0;--animation-padding-bottom:0}.sd-element__content--enter{animation-delay:var(--sjs-expand-fade-in-delay,.15s),0s,0s;animation-duration:var(--sjs-expand-fade-in-duration,.5s),var(--sjs-expand-move-in-duration,.15s);animation-fill-mode:forwards;animation-name:fadeIn,moveInWithOverflow;animation-timing-function:ease-out;min-height:0!important;opacity:0}.sd-element__content--leave{animation-delay:0s,var(--sjs-collapse-move-out-delay,.1s),var(--sjs-collapse-move-out-delay,.1s);animation-direction:reverse;animation-duration:var(--sjs-collapse-fade-out-duration,.15s),var(--sjs-collapse-move-out-duration,.25s);animation-fill-mode:forwards;animation-name:fadeIn,moveInWithOverflow;animation-timing-function:ease-in;min-height:0!important}.sd-element--expandable.sd-elemenet--expandable--animating>.sd-element__header:focus-within,.sd-element--expandable.sd-elemenet--expandable--animating>.sd-element__header:hover{background-color:transparent}.sd-elemenet--expandable--animating.sd-element--expandable,.sd-elemenet--expandable--animating.sd-element--expandable>.sd-element__header{transition-property:padding-top,padding-bottom}.sd-elemenet--expandable--animating.sd-element--expandable.sd-element--expanded,.sd-elemenet--expandable--animating.sd-element--expandable.sd-element--expanded>.sd-element__header{transition-duration:var(--sjs-expand-move-in-duration,.15s);transition-timing-function:ease-out}.sd-elemenet--expandable--animating.sd-element--expandable.sd-element--expanded>.sd-element__header .sd-element__title:before{transition-duration:var(--sjs-expand-move-in-duration,.15s)}.sd-elemenet--expandable--animating.sd-element--expandable.sd-element--collapsed,.sd-elemenet--expandable--animating.sd-element--expandable.sd-element--collapsed>.sd-element__header{transition-delay:var(--sjs-collapse-move-out-delay,.1s);transition-duration:var(--sjs-collapse-move-out-duration,.25s);transition-timing-function:ease-out}.sd-elemenet--expandable--animating.sd-element--expandable.sd-element--collapsed>.sd-element__header .sd-element__title:before{transition-delay:var(--sjs-collapse-move-out-delay,.1s);transition-duration:var(--sjs-collapse-move-out-duration,.25s)}.sd-elemenet--expandable--animating.sd-element--expandable.sd-element--complex:not(.sd-question--empty)>.sd-element__header--location-top:after{--animation-height:1px;animation-delay:var(--sjs-expand-fade-in-delay,.15s),0s;animation-duration:var(--sjs-expand-fade-in-duration,.5s),var(--sjs-expand-move-in-duration,.15s);animation-fill-mode:forwards;animation-name:fadeIn,moveIn;animation-timing-function:ease-out;display:block;height:0;opacity:0}.sd-elemenet--expandable--animating.sd-element--expandable.sd-element--complex:not(.sd-question--empty).sd-element--collapsed .sd-element__header--location-top:after{animation-delay:0s,var(--sjs-collapse-move-out-delay,.1s);animation-direction:reverse;animation-duration:var(--sjs-collapse-fade-out-duration,.15s),var(--sjs-collapse-move-out-duration,.25s);animation-timing-function:ease-in;height:1px;opacity:1}.sd-question{position:relative}.sd-question--no-pointer-events .sd-rating label,.sd-question--no-pointer-events .sd-selectbase label{pointer-events:none}.sd-element__erbox--above-element{margin-bottom:var(--sjs-base-unit,var(--base-unit,8px))}.sd-question__erbox--below-question{margin-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-question__content--support-container-queries{container-type:inline-size}.sd-question--title-top>.sd-question__erbox--above-question{margin-bottom:calc(var(--sd-base-vertical-padding)*.5)}.sd-question--description-under-input>.sd-question__erbox--below-question,.sd-question--title-bottom>.sd-question__erbox--below-question{margin-top:calc(var(--sd-base-vertical-padding)*.25 + var(--sjs-base-unit, var(--base-unit, 8px))*.5)}.sd-element--with-frame>.sd-element__erbox--above-element{border-radius:var(--sjs-corner-radius,4px) var(--sjs-corner-radius,4px) 0 0;margin-bottom:var(--sd-base-padding)}.sd-question--left>.sd-element__erbox--above-element{margin-bottom:0}.sd-element--with-frame.sd-question--left>.sd-element__erbox--above-element{margin-bottom:calc(var(--sd-base-vertical-padding)*1)}.sd-element--with-frame>.sd-question__erbox--below-question{border-radius:0 0 var(--sjs-corner-radius,4px) var(--sjs-corner-radius,4px);margin-top:auto}.sd-element--with-frame.sd-question--title-top>.sd-question__erbox--above-question{margin-bottom:calc(var(--sd-base-vertical-padding)*.5 + var(--sjs-base-unit, var(--base-unit, 8px)))}.sd-element--with-frame.sd-question--description-under-input>.sd-question__erbox--below-question,.sd-element--with-frame.sd-question--title-bottom>.sd-question__erbox--below-question{margin-top:calc(var(--sd-base-vertical-padding)*.5 + var(--sjs-base-unit, var(--base-unit, 8px)))}.sd-question__header{width:100%}.sd-question__header--location-top{padding-bottom:calc(var(--sd-base-vertical-padding)*.5)}.sd-question__header--location--bottom{padding-top:calc(var(--sd-base-vertical-padding)*.375)}.sd-element--with-frame.sd-question--title-top{padding-top:var(--sd-base-vertical-padding)}.sd-element--with-frame.sd-question--error-top{padding-top:0}.sd-element--with-frame.sd-question--error-bottom{display:flex;flex-direction:column;padding-bottom:0}.sd-element--with-frame.sd-question--error-bottom>.sd-question__content{margin-bottom:var(--sd-base-padding)}.sd-element--with-frame>.sd-element__erbox{margin-left:calc(var(--sd-base-padding)*-1);margin-right:calc(var(--sd-base-padding)*-1);width:calc(100% + var(--sd-base-padding)*2)}.sd-scrollable .sd-question__content{overflow-x:auto;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) 0}.sd-question__header--location--left{display:inline-block;margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);vertical-align:top;width:auto}.sd-question--left{column-gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);display:flex;flex-direction:row;flex-wrap:wrap;row-gap:calc(var(--sd-base-vertical-padding)*.25)}.sd-question__content--left{display:inline-block;flex:1;margin-top:calc(var(--sd-base-vertical-padding)*.25) 0;max-width:100%}.sd-element--with-frame>.sd-question__content--left{margin:0}.sd-question__required-text{color:var(--sjs-special-red,var(--red,#e60a3e));vertical-align:top}.sd-question__comment-area{color:var(--sjs-general-forecolor,var(--foreground,#161616));display:flex;flex-direction:column;font-size:var(--sjs-font-size,16px);gap:var(--sjs-base-unit,var(--base-unit,8px));margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);white-space:normal}.sd-question__placeholder{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));align-items:center;color:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));display:flex;flex-direction:column;font-size:var(--sjs-internal-font-editorfont-size);gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);justify-content:center;line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*24);text-align:center}.sd-question__placeholder>div .sv-string-viewer,.sd-question__placeholder>span .sv-string-viewer{white-space:pre-line}.sd-scrollable-container:not(.sd-scrollable-container--compact){max-width:100%;overflow:visible;width:max-content}.sd-question__title--empty .sv-string-viewer{display:inline-block;height:calc((var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)))*1.5)}.sd-error,.sd-question__content{box-sizing:border-box}.sd-error{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)));border-radius:var(--sjs-corner-radius,4px);color:var(--sjs-special-red,var(--red,#e60a3e));display:block;font-size:calc((var(--sjs-font-size, 16px))*.75);font-weight:600;line-height:var(--sjs-font-size,16px);padding:var(--sjs-base-unit,var(--base-unit,8px)) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);text-align:left;white-space:normal;width:100%}.sd-element--collapsed>.sd-element__header,.sd-element--expanded>.sd-element__header{cursor:pointer}.sd-element--collapsed>.sd-element__header{background-color:var(--sjs-general-backcolor,var(--background,#fff));box-sizing:border-box;margin-inline-start:calc(var(--sd-base-padding)*-1);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0) var(--sd-base-padding);width:calc(100% + var(--sd-base-padding)*2)}.sd-element--collapsed.sd-element--with-frame{padding-bottom:0;padding-top:0}.sd-element--collapsed.sd-element--with-frame>.sd-element__header{border-radius:var(--sjs-questionpanel-cornerRadius,var(--sjs-corner-radius,4px));padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-element--collapsed>.sd-element__header:focus-within,.sd-element--collapsed>.sd-element__header:hover{background-color:var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9))}.sd-element--collapsed.sd-element--nested>.sd-element__header:focus-within,.sd-element--collapsed.sd-element--nested>.sd-element__header:hover{box-shadow:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2) 0 0 var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9)),0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) 0 var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9))}.sd-element--complex.sd-element--with-frame{padding-top:0}.sd-element--complex.sd-element--nested-with-borders>.sd-element__erbox,.sd-element--complex.sd-element--with-frame>.sd-element__erbox{margin-bottom:0;margin-top:0}.sd-element--complex>.sd-element__header:after{background:var(--sjs-border-light,var(--border-light,#eaeaea));bottom:0;content:" ";display:block;height:1px;position:relative}.sd-element--complex.sd-element--with-frame>.sd-element__header{padding-bottom:var(--sd-base-vertical-padding);padding-top:var(--sd-base-vertical-padding)}.sd-element--collapsed.sd-element--complex>.sd-element__header{padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-element--nested.sd-element--complex>.sd-element__header--location-top:after{bottom:calc(var(--sd-base-vertical-padding)*-.5)}.sd-element--nested-with-borders{border:1px solid var(--sjs-border-light,var(--border-light,#eaeaea));border-radius:calc(var(--sjs-corner-radius, 4px) - 4px);box-sizing:border-box;padding-left:var(--sd-base-padding);padding-right:var(--sd-base-padding)}.sd-element--nested-with-borders>.sd-element__header--location-top{padding-bottom:calc(var(--sd-base-vertical-padding)*.5);padding-top:calc(var(--sd-base-vertical-padding)*.5)}.sd-element--nested-with-borders>.sd-element__erbox{margin-left:calc(var(--sd-base-padding)*-1);margin-right:calc(var(--sd-base-padding)*-1);width:calc(100% + var(--sd-base-padding)*2)}.sd-element--nested-with-borders>.sd-question__erbox--below-question{bottom:0;margin-top:0}.sd-element--nested-with-borders.sd-element--collapsed>.sd-element__header--location-top:focus-within,.sd-element--nested-with-borders.sd-element--collapsed>.sd-element__header--location-top:hover{box-shadow:none}.sd-element--complex.sd-element--with-frame>.sd-element__header--location-top:after,.sd-element--nested-with-borders>.sd-element__header--location-top:after{bottom:calc(var(--sd-base-vertical-padding)*-1);inset-inline-start:calc(var(--sd-base-padding)*-1);width:calc(100% + var(--sd-base-padding)*2)}.sd-element--collapsed.sd-element--complex>.sd-element__header--location-top:after{display:none}.sd-question--empty.sd-question--complex>.sd-question__content{padding-bottom:0;padding-top:0}.sd-question--empty.sd-question--complex>.sd-question__content:first-of-type{padding-top:var(--sd-base-padding)}.sd-question--empty.sd-question--complex>.sd-question__header--location-top{padding-bottom:calc(var(--sd-base-vertical-padding)*.5)}.sd-question--empty.sd-question--complex>.sd-question__header--location-top:after{display:none}.sd-input{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--sjs-editorpanel-backcolor,var(--sjs-editor-background,var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9))));border:none;border-radius:var(--sjs-editorpanel-cornerRadius,var(--sjs-corner-radius,4px));box-shadow:var(--sjs-shadow-inner,inset 0 1px 2px 0 rgba(0,0,0,.15)),0 0 0 0 var(--sjs-primary-backcolor,var(--primary,#19b394));box-sizing:border-box;color:var(--sjs-font-editorfont-color,var(--sjs-general-forecolor,rgba(0,0,0,.91)));display:block;font-family:var(--sjs-font-editorfont-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-internal-font-editorfont-size);font-weight:var(--sjs-font-editorfont-weight,400);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);position:static;text-align:start;transition:box-shadow var(--sjs-transition-duration,.15s);width:100%}.sd-input:focus{box-shadow:var(--sjs-shadow-inner-reset,inset 0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-input.sd-input:focus{outline:none}input.sd-input:disabled:not(.sd-input--disabled),textarea.sd-input:disabled:not(.sd-input--disabled){opacity:1}.sd-input--disabled{background-color:var(--sjs-editorpanel-backcolor,var(--sjs-editor-background,var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9))));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sd-input--readonly{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sd-input.sd-input--preview{background:none;border-bottom:1px solid var(--sjs-general-forecolor,var(--foreground,#161616));border-radius:0;box-shadow:none;padding-left:0;padding-right:0;transition:none}.sd-input::placeholder{color:var(--sjs-font-editorfont-placeholdercolor,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sd-input.sd-input--disabled,.sd-input.sd-input--disabled::placeholder{color:var(--sjs-general-forecolor,var(--foreground,#161616));opacity:.25}.sd-input.sd-input--readonly{box-shadow:none;color:var(--sjs-general-forecolor,var(--foreground,#161616));transition:none}.sd-input.sd-input--readonly::placeholder{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sd-root--readonly .sd-input--disabled,.sd-root--readonly .sd-input--disabled::placeholder{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-input--error{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)))}.sd-text__content{position:relative}.sd-text__character-counter{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-text__character-counter:focus-within{padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*8)}.sd-text__character-counter.sd-text__character-counter--big:focus-within{padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*11)}.sd-remaining-character-counter{align-items:flex-end;color:var(--sjs-font-editorfont-placeholdercolor,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)));display:none;flex-direction:row;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);inset-block-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);inset-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);justify-content:flex-end;line-height:calc((var(--sjs-font-size, 16px))*1.5);padding:0;position:absolute}.sd-comment__content:focus-within .sd-remaining-character-counter,.sd-matrix__question-wrapper:focus-within .sd-remaining-character-counter,.sd-multipletext__content:focus-within .sd-remaining-character-counter,.sd-text__content:focus-within .sd-remaining-character-counter{display:flex}.sd-input[type=color],.sd-input[type=date],.sd-input[type=datetime-local],.sd-input[type=email],.sd-input[type=month],.sd-input[type=password],.sd-input[type=range],.sd-input[type=tel],.sd-input[type=time],.sd-input[type=url],.sd-input[type=week]{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));box-sizing:content-box;height:calc((var(--sjs-internal-font-editorfont-size))*1.5);width:calc(100% - var(--sjs-base-unit, var(--base-unit, 8px))*4)}.sd-input[type=color].sd-text__character-counter:focus-within,.sd-input[type=date].sd-text__character-counter:focus-within,.sd-input[type=datetime-local].sd-text__character-counter:focus-within,.sd-input[type=email].sd-text__character-counter:focus-within,.sd-input[type=month].sd-text__character-counter:focus-within,.sd-input[type=password].sd-text__character-counter:focus-within,.sd-input[type=range].sd-text__character-counter:focus-within,.sd-input[type=tel].sd-text__character-counter:focus-within,.sd-input[type=time].sd-text__character-counter:focus-within,.sd-input[type=url].sd-text__character-counter:focus-within,.sd-input[type=week].sd-text__character-counter:focus-within{width:calc(100% - var(--sjs-base-unit, var(--base-unit, 8px))*10)}.sd-input[type=range]::-webkit-slider-runnable-track{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));border-radius:var(--sjs-base-unit,var(--base-unit,8px));height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}.sd-input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));border:2px solid var(--sjs-primary-backcolor,var(--primary,#19b394));border-radius:100%;box-shadow:inset 0 0 0 2px var(--background,#fff);height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.75);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-input[type=range]::-moz-range-track{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));border-radius:var(--sjs-base-unit,var(--base-unit,8px));height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}.sd-input[type=range]::-moz-range-thumb{-webkit-appearance:none;appearance:none;background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));border:2px solid var(--sjs-primary-backcolor,var(--primary,#19b394));border-radius:100%;box-shadow:inset 0 0 0 2px var(--background,#fff);height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.75);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-comment{display:block;height:auto;max-width:100%;min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sd-comment__content,.sd-panel{position:relative}.sd-panel.sd-panel--as-page>.sd-panel__header.sd-panel__header{padding-bottom:calc(var(--sd-base-vertical-padding)*.5 + var(--sjs-base-unit, var(--base-unit, 8px)));padding-top:0}.sd-panel.sd-panel--as-page>.sd-panel__header.sd-panel__header:after{content:none}.sd-panel.sd-panel--as-page>.sd-panel__header.sd-panel__header .sd-panel__title{--page-title-font-size:var(--sjs-font-pagetitle-size,calc((var(--sjs-font-size, 16px))*1.5));color:var(--sjs-font-pagetitle-color,var(--sjs-general-dim-forecolor,rgba(0,0,0,.91)));font-family:var(--sjs-font-pagetitle-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--page-title-font-size);font-weight:var(--sjs-font-pagetitle-weight,700);line-height:calc((var(--page-title-font-size))*1.33);margin:0 0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) 0;position:static}.sd-panel.sd-panel--as-page>.sd-panel__header.sd-panel__header .sd-panel__title span{color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.sd-panel.sd-panel--as-page>.sd-panel__header.sd-panel__header .sd-element__num{float:none;margin:initial;padding:initial;width:auto}.sd-panel.sd-panel--as-page>.sd-panel__header.sd-panel__header .sd-panel__description{color:var(--sjs-font-pagedescription-color,var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45)));font-family:var(--sjs-font-pagedescription-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-font-pagedescription-size,var(--sjs-font-size,16px));font-weight:var(--sjs-font-pagedescription-weight,400);line-height:calc((var(--sjs-font-pagedescription-size, var(--sjs-font-size, 16px)))*1.5);margin:0 0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) 0;position:static}.sd-panel.sd-panel--as-page>.sd-panel__header.sd-panel__header .sd-panel__required-text{display:none}.sd-panel.sd-panel--as-page>.sd-panel__errbox{margin:0 0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) 0;padding:calc(var(--sd-base-vertical-padding)*.5 + var(--sjs-base-unit, var(--base-unit, 8px))) var(--sd-base-padding)}.sd-panel.sd-panel--as-page>.sd-panel__content{padding-top:0}.sd-root--compact .sd-panel--as-page>.sd-panel__errbox{margin:0 0 var(--sd-base-vertical-padding) 0}.sd-row~.sd-row .sd-panel--as-page{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-panel__required-text{color:var(--sjs-special-red,var(--red,#e60a3e))}.sd-panel__footer{border-top:1px solid var(--sjs-border-light,var(--border-light,#eaeaea));box-sizing:border-box;margin-bottom:calc(var(--sd-base-padding)*-1 + var(--sd-base-vertical-padding)*.5);margin-left:calc(var(--sd-base-padding)*-1);margin-top:calc(var(--sd-base-vertical-padding)*.5);padding-left:calc(var(--sd-base-padding) - var(--sjs-base-unit, var(--base-unit, 8px))*3);padding-top:calc(var(--sd-base-vertical-padding)*.5);width:calc(100% + var(--sd-base-padding)*2)}.sd-panel--as-page .sd-panel__footer{border:none;margin:0;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4) 0 0;width:auto}.sd-panel__content{padding-top:var(--sd-base-padding)}.sd-panel.sd-element--nested>.sd-panel__content{--animation-padding-top:var(--sd-base-padding);padding-bottom:var(--sd-base-padding)}.sd-panel__content{--animation-padding-top:var(--sd-base-padding)}.sjs_sp_placeholder{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));align-items:center;color:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));display:flex;font-size:var(--sjs-internal-font-editorfont-size);height:100%;justify-content:center;line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);pointer-events:none;position:absolute;user-select:none;width:100%;z-index:1}.sjs_sp_container{border:1px dashed var(--sjs-border-default,var(--border,#d6d6d6));box-sizing:content-box;max-width:100%;position:relative}.sjs_sp_container>div>canvas:focus{outline:none}.sd-question--preview .sjs_sp_container,.sd-question--readonly .sjs_sp_container{border:none}.sd-question--preview .sjs_sp_placeholder,.sd-question--readonly .sjs_sp_placeholder{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sjs_sp_controls{bottom:0;left:0;position:absolute}.sjs_sp_controls>button{user-select:none}.sjs_sp_controls.sd-signaturepad__controls{bottom:auto;left:auto;right:var(--sjs-base-unit,var(--base-unit,8px));top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-question--signature.sd-question--error .sjs_sp_placeholder{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)))}.sd-signaturepad__background-image{left:0;object-fit:cover;position:absolute;top:0}.sd-signaturepad__loading-indicator{height:100%;left:0;position:absolute;top:0;width:100%}.sd-signaturepad__loading-indicator .sd-loading-indicator{position:absolute;right:var(--sjs-base-unit,var(--base-unit,8px));top:var(--sjs-base-unit,var(--base-unit,8px))}.sjs_sp_canvas{display:block;max-width:100%;position:relative}.sjs_sp__background-image{height:100%;left:0;max-width:100%;object-fit:cover;position:absolute;top:0;width:100%}.sd-checkbox__decorator{border-radius:calc((var(--sjs-corner-radius, 4px))*.5)}.sd-checkbox__svg{display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-checkbox__svg use{fill:transparent;transition:fill var(--sjs-transition-duration,.15s)}.sd-checkbox--checked .sd-checkbox__svg use{fill:var(--sjs-primary-forecolor,var(--primary-foreground,#fff))}.sd-checkbox--checked.sd-checkbox--disabled .sd-checkbox__svg use{fill:var(--sjs-border-default,var(--border,#d6d6d6))}.sd-checkbox--checked .sd-checkbox__control:focus+.sd-checkbox__decorator .sd-checkbox__svg use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-checkbox--checked.sd-checkbox--preview .sd-checkbox__svg use,.sd-checkbox--checked.sd-checkbox--readonly .sd-checkbox__svg use{fill:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-matrixdynamic__btn.sd-matrixdynamic__add-btn{left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3);margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3);position:sticky;z-index:12}.sd-question--mobile .sd-matrixdynamic__footer:before{background-color:var(--sjs-border-light,var(--border-light,#eaeaea));content:" ";display:block;height:1px;left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3);position:relative;top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1);width:calc(100% + var(--sjs-base-unit, var(--base-unit, 8px))*6);z-index:12}.sd-matrixdynamic__footer:first-child{padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-matrixdynamic__footer:first-child:before{display:none}.sd-matrixdynamic__footer{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-action.sd-matrixdynamic__remove-btn{opacity:.5}.sd-action.sd-matrixdynamic__remove-btn .sd-action__icon{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));height:calc((var(--sjs-internal-font-editorfont-size))*1.5);width:calc((var(--sjs-internal-font-editorfont-size))*1.5)}.sd-matrixdynamic__btn{appearance:none;background:transparent;border:none;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);font-weight:600;line-height:calc((var(--sjs-font-size, 16px))*1.5);padding:var(--sjs-base-unit,var(--base-unit,8px)) 0}.sd-matrixdynamic__drag-element{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-matrixdynamic__drag-element:hover{background-color:var(--sjs-general-backcolor,var(--background,#fff))}.sd-matrixdynamic__drag-element:after{border:1px solid var(--sjs-border-default,var(--border,#d6d6d6));border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.25);box-sizing:border-box;content:" ";display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-matrixdynamic__placeholder .sd-matrixdynamic__add-btn{margin-left:0}.sd-table__row:hover .sd-drag-element__svg{visibility:visible}.sd-table__cell.sd-table__cell--drag>div{align-items:center;background-color:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));display:flex;justify-content:end;margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-4);min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-drag-element__svg{cursor:pointer;display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);visibility:hidden;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-drag-element__svg use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}@keyframes borderAnimation{0%{border-width:0}to{border-width:8px}}@keyframes paddingAnimation{0%{padding-bottom:0;padding-top:0}to{padding-bottom:32px;padding-top:24px}}.sd-table__row--enter,.sd-table__row--leave{--move-whole-animation-duration:calc(var(--move-animation-duration) + var(--move-animation-delay));--fade-whole-animation-duration:calc(var(--fade-animation-duration) + var(--fade-animation-delay));animation-duration:max(var(--fade-whole-animation-duration),var(--move-whole-animation-duration));animation-name:empty}.sd-table__row--enter>td,.sd-table__row--leave>td{animation-delay:var(--move-animation-delay);animation-direction:var(--animation-direction);animation-duration:var(--move-animation-duration);animation-fill-mode:forwards;animation-name:borderAnimation;animation-timing-function:var(--animation-timing-function)}.sd-table__row--enter>td>div,.sd-table__row--leave>td>div{animation-delay:var(--fade-animation-delay),var(--move-animation-delay);animation-direction:var(--animation-direction);animation-duration:var(--fade-animation-duration),var(--move-animation-duration);animation-fill-mode:forwards;animation-name:fadeIn,moveInWithOverflow;animation-timing-function:var(--animation-timing-function);opacity:0}.sd-table__row--enter{--move-animation-delay:0s;--move-animation-duration:var(--sjs-matrix-row-move-in-duration,150ms);--fade-animation-duration:var(--sjs-matrix-row-fade-in-duration,250ms);--fade-animation-delay:var(--sjs-matrix-row-fade-in-delay,150ms);--animation-direction:normal;--animation-timing-function:cubic-bezier(0,0,0.58,1)}.sd-table__row--leave{--move-animation-delay:var(--sjs-matrix-row-move-out-delay,100ms);--move-animation-duration:var(--sjs-matrix-row-move-out-duration,250ms);--fade-animation-duration:var(--sjs-matrix-row-fade-out-duration,100ms);--fade-animation-delay:0s;--animation-direction:reverse;--animation-timing-function:cubic-bezier(0.42,0,1,1)}.sd-table__row--detail.sd-table__row--enter>td,.sd-table__row--detail.sd-table__row--leave>td{animation-direction:var(--animation-direction);animation-duration:var(--move-animation-duration);animation-fill-mode:forwards;animation-name:borderAnimation,paddingAnimation;animation-timing-function:var(--animation-timing-function)}.sd-table__row--detail.sd-table__row--enter{--move-animation-delay:0s;--move-animation-duration:var(--sjs-matrix-detail-row-move-in-duration,150ms);--fade-animation-duration:var(--sjs-matrix-detail-row-fade-in-duration,500ms);--fade-animation-delay:var(--sjs-matrix-detail-row-fade-in-delay,150ms);--animation-direction:normal;--animation-timing-function:cubic-bezier(0,0,0.58,1)}.sd-table__row--detail.sd-table__row--leave{--move-animation-delay:var(--sjs-matrix-detail-row-move-out-delay,100ms);--move-animation-duration:var(--sjs-matrix-detail-row-move-out-duration,250ms);--fade-animation-duration:var(--sjs-matrix-detail-row-fade-out-duration,150ms);--fade-animation-delay:0s;--animation-direction:reverse;--animation-timing-function:cubic-bezier(0.42,0,1,1)}.sd-table{background:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));border-collapse:separate;border-spacing:0;white-space:normal;width:100%}.sd-table>thead>tr>th{border-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) solid transparent;border-top:0}.sd-table__cell{background-clip:padding-box;border-bottom:var(--sjs-base-unit,var(--base-unit,8px)) solid transparent;border-left:none;border-right:none;border-top:var(--sjs-base-unit,var(--base-unit,8px)) solid transparent;box-sizing:content-box}.sd-table.sd-table--columnsautowidth .sd-table__cell:not(.sd-table__cell--actions):not(.sd-table__cell--action):not(.sd-table__cell--empty.sd-table__cell--error){width:10000px}.sd-table__row:first-of-type>.sd-table__cell{border-top:0}.sd-table__row:last-of-type>.sd-table__cell{border-bottom:0}.sd-table--align-top .sd-table__cell{vertical-align:top}.sd-table--no-header{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-panel:not(.sd-panel--as-page)>.sd-panel__content .sd-table--no-header{padding-top:0}.sd-panel:not(.sd-panel--as-page)>.sd-panel__content .sd-question--table .sd-question__content{margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.25);margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1);padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25);padding-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-panel:not(.sd-panel--as-page)>.sd-panel__content .sd-question--table>.sd-question__header~.sd-question__content{--animation-padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-panel:not(.sd-panel--as-page)>.sd-panel__content .sd-question--table>.sd-question__header~.sd-question__content .sd-table--no-header{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-panel:not(.sd-panel--as-page)>.sd-panel__content .sd-question--table>.sd-question__content .sd-table-wrapper .sd-table:not(.sd-table--no-header){margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3)}.sd-panel:not(.sd-panel--as-page)>.sd-panel__content .sd-question--table.sd-question--error-top>.sd-question__content .sd-table-wrapper .sd-table:not(.sd-table--no-header){margin-top:0}.sd-panel:not(.sd-panel--as-page)>.sd-panel__content>.sd-row:not(:first-of-type) .sd-question--table>.sd-question__content .sd-table-wrapper .sd-table:not(.sd-table--no-header){margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2)}.sd-panel:not(.sd-panel--as-page)>.sd-panel__content>.sd-row:not(:first-of-type) .sd-question--table.sd-question--error-top>.sd-question__content .sd-table-wrapper .sd-table:not(.sd-table--no-header){margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0)}.sd-panel:not(.sd-panel--as-page)>.sd-panel__content .sd-question--table>.sd-question__header~.sd-question__content .sd-table-wrapper .sd-table:not(.sd-table--no-header),.sd-panel:not(.sd-panel--as-page)>.sd-panel__content>.sd-row:not(:first-of-type) .sd-question--table>.sd-question__header~.sd-question__content .sd-table-wrapper .sd-table:not(.sd-table--no-header){margin-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows{margin-left:var(--sjs-base-unit,var(--base-unit,8px));margin-right:var(--sjs-base-unit,var(--base-unit,8px));width:calc(100% - var(--sjs-base-unit, var(--base-unit, 8px))*2)}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__cell:not(.sd-table__cell--header):first-of-type{padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__cell:last-of-type{padding-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:first-of-type>.sd-table__cell{border-top:var(--sjs-base-unit,var(--base-unit,8px)) solid transparent}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:last-of-type>.sd-table__cell{border-bottom:var(--sjs-base-unit,var(--base-unit,8px)) solid transparent}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd) td:first-of-type,.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd)>td.sd-table__cell:not(.sd-table__cell--actions){background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8));border-bottom-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8));border-top-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd) td:first-of-type.sd-matrix__text--checked,.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd)>td.sd-table__cell:not(.sd-table__cell--actions).sd-matrix__text--checked{background-color:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)))}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd) td:first-of-type .sd-input,.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd)>td.sd-table__cell:not(.sd-table__cell--actions) .sd-input{background-color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff))}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd) td:first-of-type .sd-item:not(.sd-item--error) .sd-item__decorator,.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd)>td.sd-table__cell:not(.sd-table__cell--actions) .sd-item:not(.sd-item--error) .sd-item__decorator{background-color:var(--sjs-general-backcolor,var(--background,#fff))}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd) td:first-of-type .sd-item:not(.sd-item--error).sd-item--checked .sd-item__decorator,.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd)>td.sd-table__cell:not(.sd-table__cell--actions) .sd-item:not(.sd-item--error).sd-item--checked .sd-item__decorator{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd) td:first-of-type .sd-item:not(.sd-item--error).sd-item--checked .sd-item__control:focus+.sd-item__decorator,.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd) td:first-of-type .sd-item:not(.sd-item--error).sd-item--readonly.sd-item--checked .sd-item__decorator,.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd)>td.sd-table__cell:not(.sd-table__cell--actions) .sd-item:not(.sd-item--error).sd-item--checked .sd-item__control:focus+.sd-item__decorator,.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd)>td.sd-table__cell:not(.sd-table__cell--actions) .sd-item:not(.sd-item--error).sd-item--readonly.sd-item--checked .sd-item__decorator{background-color:var(--sjs-general-backcolor,var(--background,#fff))}.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd) td:first-of-type .sd-item:not(.sd-item--error).sd-item--preview.sd-item--preview .sd-item__decorator,.sd-question:not(.sd-question--mobile) .sd-table--alternate-rows .sd-table__row:nth-of-type(odd)>td.sd-table__cell:not(.sd-table__cell--actions) .sd-item:not(.sd-item--error).sd-item--preview.sd-item--preview .sd-item__decorator{background-color:transparent}.sd-table__cell{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));color:var(--sjs-general-forecolor,var(--foreground,#161616));font-size:var(--sjs-internal-font-editorfont-size);font-weight:400;line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);padding:0 var(--sjs-base-unit,var(--base-unit,8px));text-align:center}.sd-table__cell:not(.sd-table__cell--empty):not(.sd-table__cell--actions):not(:empty){min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*15)}.sd-table__cell .sd-item{text-align:initial}.sd-table__cell--error{border:none;padding:0 var(--sjs-base-unit,var(--base-unit,8px))}.sd-table__cell--error .sd-question__erbox{margin:0}.sd-table__cell--error-top{padding-top:var(--sjs-base-unit,var(--base-unit,8px));vertical-align:bottom}.sd-table__cell--error-bottom{padding-bottom:var(--sjs-base-unit,var(--base-unit,8px));vertical-align:top}.sd-table__cell--item .sd-selectbase__item{justify-content:center;text-align:center}.sd-table__cell--item .sd-selectbase__label{justify-content:center}.sd-question--disabled .sd-table__cell{opacity:.25}.sd-root--readonly .sd-question--disabled .sd-table__cell{opacity:1}.sd-table__cell--header,.sd-table__cell--header .sv-vue-title-additional-div{font-size:0;line-height:0}.sd-table__cell--header span{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));font-size:var(--sjs-internal-font-editorfont-size);font-weight:var(--sjs-font-questiontitle-weight,600);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5)}.sd-table__cell--header{color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));font-weight:600;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) var(--sjs-base-unit,var(--base-unit,8px));vertical-align:top}.sd-matrixdropdown .sd-table__cell--header.sd-table__cell--empty,.sd-table__cell--header:not(.sd-table__cell--empty){min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*15)}.sd-matrixdropdown .sd-table__cell--header.sd-table__cell--action{min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-matrixdropdown .sd-table__cell--header:not(.sd-table__cell--empty){min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*15)}.sd-matrixdropdown .sd-table__cell--header:not(.sd-table__cell--empty).sd-table__cell--dropdown,.sd-matrixdropdown .sd-table__cell--header:not(.sd-table__cell--empty).sd-table__cell--rating{min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*22)}.sd-matrixdropdown .sd-table__cell--header:not(.sd-table__cell--empty).sd-table__cell--boolean{min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*18)}.sd-table__cell--footer{padding-top:var(--sjs-base-unit,var(--base-unit,8px));text-align:end}.sd-table__cell--footer-total{font-weight:600;text-align:start}.sd-table__cell--detail-panel{border-bottom:var(--sjs-base-unit,var(--base-unit,8px)) solid transparent;border-top:var(--sjs-base-unit,var(--base-unit,8px)) solid transparent;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3) var(--sjs-base-unit,var(--base-unit,8px)) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-matrixdynamic__add-btn .sv-action-bar,.sd-table__cell--actions .sv-action-bar{overflow:visible}.sd-table__cell--actions:not(.sd-table__cell--vertical){width:var(--sjs-base-unit,var(--base-unit,8px))}.sd-table__cell--actions:not(.sd-table__cell--vertical):not(.sd-table__cell--drag):first-of-type{min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);padding-left:0;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-table__cell--detail-button{background:transparent;border:none;border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding:var(--sjs-base-unit,var(--base-unit,8px));transition:background var(--sjs-transition-duration,.15s)}.sd-table__cell--detail-button svg{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));fill:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));display:block;height:var(--sjs-internal-font-editorfont-size);transition:fill var(--sjs-transition-duration,.15s);width:var(--sjs-internal-font-editorfont-size)}.sd-table__cell--detail-button:focus,.sd-table__cell--detail-button:hover{background:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)));outline:none}.sd-table__cell--detail-button:focus svg,.sd-table__cell--detail-button:hover svg{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-table__cell--actions{white-space:nowrap}.sd-table__cell--actions.sd-table__cell--vertical .sd-action-bar{justify-content:center}.sd-table__cell--row-text{color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));font-weight:var(--sjs-font-questiontitle-weight,600);min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) var(--sjs-base-unit,var(--base-unit,8px));text-align:start}.sd-matrix__question-wrapper{position:relative}.sd-table__question-wrapper:not(:focus-within):hover{position:relative}.sd-matrix tr>td:first-of-type,.sd-matrix__cell:first-of-type,.sd-table__cell--actions:not(.sd-table__cell--vertical),.sd-table__cell--empty,.sd-table__cell--footer-total,.sd-table__cell--row-text{background-color:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));position:sticky;z-index:12}.sd-matrix tr>td:first-of-type:first-of-type,.sd-matrix__cell:first-of-type:first-of-type,.sd-table__cell--actions:not(.sd-table__cell--vertical):first-of-type,.sd-table__cell--empty:first-of-type,.sd-table__cell--footer-total:first-of-type,.sd-table__cell--row-text:first-of-type{left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1)}.sd-matrix tr>td:first-of-type:last-of-type,.sd-matrix__cell:first-of-type:last-of-type,.sd-table__cell--actions:not(.sd-table__cell--vertical):last-of-type,.sd-table__cell--empty:last-of-type,.sd-table__cell--footer-total:last-of-type,.sd-table__cell--row-text:last-of-type{right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1)}.sd-table__cell--actions:not(.sd-table__cell--vertical):last-child .sd-action-bar{background:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));justify-content:flex-end;margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3)}.sd-question.sd-question--table{overflow-x:auto;position:relative}.sd-question--table.sd-element--collapsed,.sd-question--table.sd-element--nested{overflow-x:visible}.sd-question--table .sd-question__header--location--left{z-index:12}.sd-table-wrapper{display:flex;margin:0 calc(var(--sd-base-padding)*-1);min-width:calc(100% + var(--sd-base-padding)*2);width:fit-content}.sd-table-wrapper:after,.sd-table-wrapper:before{background:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));content:"";display:block;flex-shrink:0;min-height:100%;position:sticky;width:calc(var(--sd-base-padding) - var(--sjs-base-unit, var(--base-unit, 8px)));z-index:11}.sd-table-wrapper:before{left:calc(var(--sd-base-padding)*-1)}.sd-table-wrapper:after{right:calc(var(--sd-base-padding)*-1)}.sd-table-wrapper>*{flex-basis:100%}.sd-element--with-frame.sd-element--compact .sd-matrix tr>td:first-of-type,.sd-element--with-frame.sd-element--compact .sd-matrix__cell:first-of-type,.sd-element--with-frame.sd-element--compact .sd-table,.sd-element--with-frame.sd-element--compact .sd-table-wrapper:after,.sd-element--with-frame.sd-element--compact .sd-table-wrapper:before,.sd-element--with-frame.sd-element--compact .sd-table__cell--actions:not(.sd-table__cell--vertical),.sd-element--with-frame.sd-element--compact .sd-table__cell--actions:not(.sd-table__cell--vertical):last-child .sd-action-bar,.sd-element--with-frame.sd-element--compact .sd-table__cell--empty,.sd-element--with-frame.sd-element--compact .sd-table__cell--footer-total,.sd-element--with-frame.sd-element--compact .sd-table__cell--row-text{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3))}.sd-question--table .sd-question__description--under-input .sv-string-viewer,.sd-question--table>.sd-question__header{left:0;position:sticky}.sd-question--table>.sd-question__content{--animation-padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);min-width:min-content;padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-question--table.sd-element--nested>.sd-question__content{min-width:auto;overflow-x:auto}.sd-question--table.sd-element--nested>.sd-question__content,.sd-question--table:not(.sd-element--with-frame):not(.sd-element--nested){box-sizing:content-box;margin-left:calc(var(--sd-base-padding)*-1);margin-right:calc(var(--sd-base-padding)*-1);padding-left:var(--sd-base-padding);padding-right:var(--sd-base-padding)}.sd-row--multiple .sd-question--table.sd-element--nested>.sd-question__content{padding-right:calc(var(--sd-base-padding) + 2px)}.sd-question--scroll{overflow-x:scroll}.sd-table__row-disabled>.sd-table__cell{opacity:.25}.sd-question--mobile.sd-question.sd-question--table>.sd-question__content{--animation-padding-top:0;padding-top:0}.sd-question--mobile.sd-question--scroll,.sd-question--mobile.sd-question--table{overflow-x:visible}.sd-question--mobile>.sd-question__content{min-width:auto}.sd-question--mobile .sd-table-wrapper{width:auto}.sd-question--mobile .sd-table{display:block;width:calc(100% - var(--sd-base-padding)*2 + var(--sjs-base-unit, var(--base-unit, 8px))*2)}.sd-question--mobile .sd-table>tbody,.sd-question--mobile .sd-table>tfoot{display:block}.sd-question--mobile .sd-table__cell.sd-matrix__cell{align-items:flex-start;border-bottom:none;border-top:none;display:flex}.sd-question--mobile .sd-table__cell.sd-matrix__cell .sd-matrix__responsive-title{margin-left:var(--sjs-base-unit,var(--base-unit,8px));text-align:start}.sd-question--mobile .sd-table__cell.sd-matrix__cell:first-of-type{padding-bottom:var(--sjs-base-unit,var(--base-unit,8px));padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-question--mobile .sd-table thead{display:none}.sd-question--mobile .sd-table tr{display:flex;flex-direction:column}.sd-question--mobile .sd-matrix__table .sd-table__row{padding-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-question--mobile .sd-table__row{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-question--mobile .sd-table__row--expanded .sd-table__cell-action--show-detail-mobile{display:none}.sd-question--mobile .sd-table:not(.sd-matrix__table) .sd-table__row{padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-question--mobile .sd-table:not(.sd-matrix__table) .sd-table__row.sd-table__row--has-end-actions,.sd-question--mobile .sd-table:not(.sd-matrix__table) tr:not(.sd-table__row--has-end-actions){padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0)}.sd-question--mobile .sd-table:not(.sd-matrix__table) tr:not(.sd-table__row--has-end-actions):not(:last-of-type){padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-question--mobile .sd-table:not(.sd-matrix__table) tr:not(.sd-table__row--has-end-actions):not(:last-of-type):after{bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3)}.sd-question--mobile .sd-table:not(.sd-matrix__table) tfoot tr:before,.sd-question--mobile .sd-table:not(.sd-matrix__table) tr:not(.sd-table__row--expanded):after{background-color:var(--sjs-border-light,var(--border-light,#eaeaea));content:" ";display:block;height:1px;left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2);position:relative;width:calc(100% + var(--sjs-base-unit, var(--base-unit, 8px))*4);z-index:12}.sd-question--mobile .sd-table:not(.sd-matrix__table) tr:not(.sd-table__row--expanded):after{bottom:0}.sd-question--mobile .sd-table:not(.sd-matrix__table) tr:last-of-type:after{display:none}.sd-question--mobile .sd-table:not(.sd-matrix__table) tfoot tr{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sd-question--mobile .sd-table:not(.sd-matrix__table) tfoot tr:before{background-color:transparent}.sd-question--mobile .sd-table:not(.sd-table--has-footer) .sd-table__row:last-of-type .sd-table__cell-action--remove-row,.sd-question--mobile .sd-table:not(.sd-table--has-footer) .sd-table__row:last-of-type .sd-table__cell-action--show-detail-mobile{margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2)}.sd-question--mobile .sd-matrix__label{justify-content:flex-start}.sd-question--mobile .sd-table__cell{border-bottom:none;border-top:none;display:block;margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding-bottom:0;padding-top:0;text-align:start}.sd-question--mobile .sd-table__cell--error{margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0)}.sd-question--mobile .sd-table__cell--error.sd-table__cell--error-bottom .sd-question__erbox{margin-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-question--mobile .sd-matrix__cell,.sd-question--mobile .sd-table__cell:first-of-type{margin-top:0}.sd-question--mobile .sd-table__cell--footer:not(.sd-question--answered){display:none}.sd-question--mobile .sd-table__responsive-title{display:block;font-weight:600;padding-bottom:var(--sjs-base-unit,var(--base-unit,8px));text-align:start}.sd-question--mobile .sd-table__responsive-title .sv-string-viewer{white-space:normal}.sd-question--mobile .sd-table--no-header{padding-top:0}.sd-question--mobile .sd-table--no-header .sd-table__responsive-title{display:none}.sd-question--mobile .sd-table__cell--detail-panel{border-bottom:0;border-top:0;padding-bottom:0;padding-top:0}.sd-question--mobile .sd-table__cell--detail-panel .sd-panel__content{padding-top:0}.sd-question--mobile .sd-table__cell.sd-table__cell--actions{margin-bottom:var(--sjs-base-unit,var(--base-unit,8px));margin-top:var(--sjs-base-unit,var(--base-unit,8px));width:auto}.sd-question--mobile .sd-table__cell.sd-table__cell--actions .sd-action-bar{background:var(--sjs-general-backcolor,var(--background,#fff));margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3);margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3)}.sd-question--mobile .sd-table__cell.sd-table__cell--actions #show-detail-mobile{flex-grow:1}.sd-question--mobile .sd-action.sd-action.sd-matrixdynamic__remove-btn{opacity:1;padding:var(--sjs-base-unit,var(--base-unit,8px)) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-question--mobile .sd-action.sd-action.sd-matrixdynamic__remove-btn .sd-action__icon{display:none}.sd-question--mobile .sd-action.sd-action.sd-matrixdynamic__remove-btn:after{content:attr(title)}.sd-question--mobile .sd-matrixdynamic__footer{margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2);padding-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-question--mobile .sd-table__cell--footer-total:not(.sd-matrix__cell),.sd-question--mobile .sd-table__cell--row-text:not(.sd-matrix__cell){color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sd-question--mobile .sd-matrixdropdown.sd-table tr:after{bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2)}.sd-question--mobile .sd-matrixdropdown.sd-table tr:last-child:after{content:none}.sd-question--mobile .sd-table__cell--error-top:first-of-type~.sd-table__cell:nth-of-type(2),.sd-question--mobile .sd-table__cell.sd-table__cell--error-top{margin-top:0}.sd-question--mobile .sd-table__cell--error-top .sd-question__erbox{margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1);margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-question--mobile .sd-table__cell--error-top:first-of-type .sd-question__erbox{margin-bottom:var(--sjs-base-unit,var(--base-unit,8px));margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0)}.sd-question--mobile .sd-table__question-wrapper .sd-boolean-root{margin:initial}.sd-table__cell--detail-panel .sd-panel__content{padding-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-table__question-wrapper .sd-boolean-root{margin:auto}.sd-table__cell--footer .sd-table__question-wrapper--expression .sd-expression{border-bottom:1px solid var(--sjs-border-light,var(--border-light,#eaeaea));font-size:var(--sjs-font-size,16px);font-weight:600;line-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-table__cell--footer .sd-table__question-wrapper--left{text-align:start}.sd-table__cell--footer .sd-table__question-wrapper--center{text-align:center}.sd-table__cell--footer .sd-table__question-wrapper--right{text-align:end}.sd-table.sd-matrixdynamic{table-layout:auto}.sd-page{align-items:flex-start;box-sizing:border-box;display:flex;flex-direction:column;padding:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);position:relative;width:100%}.sd-root-modern--mobile .sd-page{padding:0}.sd-page .sd-page__title{--page-title-font-size:var(--sjs-font-pagetitle-size,calc((var(--sjs-font-size, 16px))*1.5));color:var(--sjs-font-pagetitle-color,var(--sjs-general-dim-forecolor,rgba(0,0,0,.91)));font-family:var(--sjs-font-pagetitle-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--page-title-font-size);font-weight:var(--sjs-font-pagetitle-weight,700);line-height:calc((var(--page-title-font-size))*1.33)}.sd-page .sd-page__description,.sd-page .sd-page__title{margin:0 0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) 0;position:static}.sd-page .sd-page__description{color:var(--sjs-font-pagedescription-color,var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45)));font-family:var(--sjs-font-pagedescription-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-font-pagedescription-size,var(--sjs-font-size,16px));font-weight:var(--sjs-font-pagedescription-weight,400);line-height:calc((var(--sjs-font-pagedescription-size, var(--sjs-font-size, 16px)))*1.5)}.sd-page__errbox{padding:calc(var(--sd-base-vertical-padding)*.5 + var(--sjs-base-unit, var(--base-unit, 8px))) var(--sd-base-padding)}.sd-page__description~.sd-page__errbox,.sd-page__title~.sd-page__errbox{margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1);margin-top:calc(var(--sd-base-vertical-padding)*.5 + var(--sjs-base-unit, var(--base-unit, 8px)))}.sd-root--compact .sd-page__description~.sd-page__errbox,.sd-root--compact .sd-page__title~.sd-page__errbox{margin-bottom:0}.sd-row{box-sizing:border-box;display:flex;flex-direction:row;margin-top:var(--sd-base-vertical-padding);width:100%}.sd-row.sd-page__row{margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-page__row.sd-row--compact{margin-top:var(--sd-base-vertical-padding)}.sd-row:first-of-type{margin-top:0}.sd-page__description~.sd-row.sd-page__row:not(.sd-row--compact),.sd-page__title~.sd-row.sd-page__row:not(.sd-row--compact){margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-page__description~.sd-page__row.sd-row--compact,.sd-page__title~.sd-page__row.sd-row--compact{margin-top:var(--sd-base-vertical-padding)}.sd-page__description~.sd-page__row.sd-row.sd-row--enter.sd-row-delayed-enter,.sd-page__title~.sd-page__row.sd-row.sd-row--enter.sd-row-delayed-enter{margin-top:0}.sd-row.sd-page__row:not(.sd-row--compact)~.sd-row.sd-page__row:not(.sd-row--compact){margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-row.sd-page__row:not(.sd-row--compact)~.sd-page__row.sd-row.sd-row--enter.sd-row-delayed-enter{margin-top:0}.sd-row--multiple{flex-wrap:wrap;margin-left:calc(var(--sd-base-padding)*-1);row-gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);width:calc(100% + var(--sd-base-padding))}.sd-row--multiple>div{--animation-padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);align-items:stretch;box-sizing:border-box;display:flex;padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-panel.sd-panel--as-page>.sd-panel__content>.sd-row--multiple:not(.sd-row--compact){margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2);width:calc(100% + var(--base-unit)*2)}.sd-panel:not(.sd-panel--as-page) .sd-row--multiple{row-gap:var(--sd-base-vertical-padding)}.sd-panel:not(.sd-panel--as-page) .sd-row--multiple>div,.sd-row--multiple.sd-row--compact>div{--animation-padding-left:var(--sd-base-padding);padding-left:var(--sd-base-padding)}.sd-page__row.sd-row--multiple{margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2);width:calc(100% + var(--sjs-base-unit, var(--base-unit, 8px))*2)}.sd-page__row.sd-row--multiple.sd-row--compact{margin-left:calc(var(--sd-base-padding)*-1);padding:0;row-gap:var(--sd-base-vertical-padding);width:calc(100% + var(--sd-base-padding))}.sd-row__panel,.sd-row__question{box-sizing:border-box;width:100%}.sd-row__question{white-space:nowrap}.sd-row.sd-row--enter{margin-top:0}.sd-row--enter{animation-delay:var(--sjs-row-fade-in-delay,.15s),0s,0s;animation-duration:var(--sjs-row-fade-in-duration,.5s),var(--sjs-row-move-in-duration,.15s),var(--sjs-row-move-in-duration,.15s);animation-fill-mode:forwards;animation-name:fadeIn,moveInWithOverflow;animation-timing-function:ease-out;height:0;min-height:0!important;opacity:0}.sd-row--delayed-enter{animation-delay:calc(var(--sjs-row-fade-in-delay, .15s) + var(--sjs-row-fade-in-animation-delay, .4s)),var(--sjs-row-fade-in-animation-delay,.4s),var(--sjs-row-fade-in-animation-delay,.4s)}.sd-row--leave{animation-delay:0s,var(--sjs-row-move-out-delay,.1s),var(--sjs-row-move-out-delay,.1s);animation-direction:reverse;animation-duration:var(--sjs-row-fade-out-duration,.15s),var(--sjs-row-move-out-duration,.25s),var(--sjs-row-move-out-duration,.25s);animation-fill-mode:forwards;animation-name:fadeIn,moveInWithOverflow;animation-timing-function:ease-in;min-height:0!important}.sd-row--enter .sd-element-wrapper--enter,.sd-row--leave .sd-element-wrapper--leave{animation:none}.sd-title{color:var(--sjs-general-forecolor,var(--foreground,#161616));display:block;flex-direction:row;font-style:normal;white-space:normal}.sd-title,.sd-title.sd-container-modern__title{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)))}.sd-title.sd-container-modern__title{align-items:center;box-shadow:0 2px 0 var(--sjs-primary-backcolor,var(--primary,#19b394));display:flex;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);overflow:auto;padding:var(--sd-page-vertical-padding) var(--sd-page-vertical-padding)}.sd-title.sd-container-modern__title .sd-logo.sv-logo--right{margin-left:auto}.sd-title.sd-container-modern__title .sd-logo__image{margin-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-header__text{display:flex;flex-direction:column;flex-grow:1;gap:var(--sjs-base-unit,var(--base-unit,8px))}.sd-header__text .sd-title{--survey-title-font-size:var(--sjs-font-surveytitle-size,calc((var(--sjs-font-size, 16px))*2));color:var(--sjs-font-surveytitle-color,var(--sjs-primary-backcolor,var(--primary,#19b394)));font-family:var(--sjs-font-surveytitle-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--survey-title-font-size);font-weight:var(--sjs-font-surveytitle-weight,700);line-height:calc((var(--survey-title-font-size))*1.25)}.sd-header__text h3{line-height:calc((var(--sjs-font-size, 16px))*2.5)}.sd-header__text h5{font-size:var(--sjs-font-size,16px);font-weight:400;line-height:calc((var(--sjs-font-size, 16px))*1.5)}.sd-header__text .sd-description{--survey-description-font-size:var(--sjs-font-surveydescription-size,var(--sjs-font-size,16px));color:var(--sjs-font-surveydescription-color,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)));font-family:var(--sjs-font-surveydescription-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--survey-description-font-size);font-weight:var(--sjs-font-surveydescription-weight,400);line-height:calc((var(--survey-description-font-size))*1.5)}.sd-title .sv-title-actions{justify-content:space-between;width:100%}.sd-root-modern .sd-container-modern__title{background-color:var(--sjs-general-backcolor,var(--background,#fff))}.sd-root-modern .sd-container-modern__title .sd-header__text h3{margin:0}.sd-root-modern .sd-container-modern__title .sd-description{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));margin:0}.sd-title .sv-title-actions{align-items:flex-start;width:calc(100% + var(--sjs-base-unit, var(--base-unit, 8px))*3)}.sd-title .sv-title-actions .sv-title-actions__title{flex:0 1 auto;flex-wrap:wrap;max-width:calc(100% - var(--sjs-base-unit, var(--base-unit, 8px))*3);min-width:unset;white-space:normal}.sd-root--compact .sd-title .sv-title-actions{width:100%}.sd-action-title-bar{flex:1 9 auto;justify-content:flex-end;margin:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1) 0;min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sd-action-title-bar .sv-action{flex:0 0 auto}.sd-action-title-bar.sd-action-bar--empty{min-width:0}.sd-description{color:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));font-family:var(--sjs-font-questiondescription-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-font-questiondescription-size,var(--sjs-font-size,16px));font-style:normal;font-weight:var(--sjs-font-questiondescription-weight,400);line-height:calc((var(--sjs-font-questiondescription-size, var(--sjs-font-size, 16px)))*1.5);white-space:normal}.sd-description.sd-question__description--under-input{padding-top:calc(var(--sd-base-vertical-padding)*.375)}.sd-element__header .sd-description{margin-top:calc(var(--sd-base-vertical-padding)*.25 - var(--sjs-base-unit, var(--base-unit, 8px))*.5)}.sd-item{display:flex;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) 0}.sd-item--disabled.sd-item--disabled .sd-item__decorator,.sd-item__decorator{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));align-items:center;background-color:var(--sjs-editorpanel-backcolor,var(--sjs-editor-background,var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9))));border:none;box-shadow:var(--sjs-shadow-inner,inset 0 1px 2px 0 rgba(0,0,0,.15)),0 0 0 0 var(--sjs-primary-backcolor,var(--primary,#19b394));box-sizing:border-box;display:flex;flex-shrink:0;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);justify-content:center;margin-top:calc((var(--sjs-internal-font-editorfont-size))*1.5/2 - (var(--sjs-base-unit, var(--base-unit, 8px)))*3/2);transition:box-shadow var(--sjs-transition-duration,.15s),background var(--sjs-transition-duration,.15s);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-item--readonly.sd-item--readonly .sd-item__decorator{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8));box-shadow:none;transition:none}.sd-item--preview.sd-item--preview .sd-item__decorator{background-color:transparent;box-shadow:none;transition:none}.sd-item--checked .sd-item__decorator{box-shadow:none}.sd-item__control:focus+.sd-item__decorator{background:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));box-shadow:var(--sjs-shadow-inner-reset,inset 0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394));outline:none}.sd-item--allowhover:not(.sd-item--readonly) .sd-selectbase__label:hover .sd-item__decorator{background:var(--sjs-editorpanel-hovercolor,var(--sjs-general-backcolor-dim-dark,#f3f3f3));outline:none}.sd-item--checked .sd-item__decorator{background:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-item__control-label{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));font-family:var(--sjs-font-editorfont-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-internal-font-editorfont-size);font-style:normal;font-weight:var(--sjs-font-editorfont-weight,400);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);min-width:0;text-align:start;white-space:normal;width:100%}.sd-item__control-label .sv-string-viewer{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis}.sd-item--disabled .sd-item__control-label{opacity:.25}.sd-item--disabled .sd-item__control-label,.sd-root--readonly .sd-item--disabled .sd-item__control-label{color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)))}.sd-item--error .sd-item__decorator{background:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)))}.sd-selectbase{border:none;margin:0;min-inline-size:0;min-width:0;padding:0}.sd-selectbase--row{border:none;column-gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);display:flex;flex-wrap:wrap;margin:0;padding:0}.sd-selectbase--multi-column{display:flex;flex:1 1 0px;flex-wrap:nowrap;margin:0 -2px;overflow:auto;padding:0 2px}.sd-selectbase__label{display:inline-flex;gap:var(--sjs-base-unit,var(--base-unit,8px));max-width:100%;position:relative;vertical-align:top}.sd-selectbase__column{box-sizing:border-box;display:block;flex:1 1 0px;max-width:100%;vertical-align:top}.sd-selectbase__column:not(:last-child){padding-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-selectbase__column.sv-q-column-1{width:100%}.sd-item--enter,.sd-item--leave{animation-delay:var(--move-animation-delay),var(--fade-animation-delay);animation-direction:var(--animation-direction);animation-duration:var(--move-animation-duration),var(--fade-animation-duration);animation-fill-mode:forwards;animation-name:moveInWithOverflow,fadeIn;animation-timing-function:linear;opacity:0}.sd-item--enter{--animation-direction:normal;--move-animation-duration:var(--sjs-ranking-move-in-duration,150ms);--move-animation-delay:0s;--fade-animation-duration:var(--sjs-ranking-fade-in-duration,100ms);--fade-animation-delay:var(--sjs-ranking-fade-in-delay,150ms)}.sd-item--leave{--animation-direction:reverse;--move-animation-duration:var(--sjs-ranking-move-out-duration,150ms);--move-animation-delay:var(--sjs-ranking-move-out-delay,0ms);--fade-animation-duration:var(--sjs-ranking-fade-out-duration,100ms);--fade-animation-delay:0s}div[class*=sv-q-column-]:not(:first-of-type) .sd-item--enter{--move-animation-duration:0s;--fade-animation-delay:0s}.sd-radio__decorator{border-radius:50%}.sd-radio__decorator:after{background-color:transparent;transition:background-color var(--sjs-transition-duration,.15s)}.sd-radio--checked .sd-radio__decorator:after,.sd-radio__decorator:after{border-radius:50%;content:" ";display:block;height:var(--sjs-base-unit,var(--base-unit,8px));width:var(--sjs-base-unit,var(--base-unit,8px))}.sd-radio--checked .sd-radio__decorator:after{background-color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff))}.sd-radio--checked.sd-radio--disabled .sd-radio__decorator:after{background-color:var(--sjs-border-default,var(--border,#d6d6d6))}.sd-radio--checked.sd-radio--readonly .sd-radio__decorator:after{background-color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-radio--checked.sd-radio--preview .sd-radio__decorator:after{display:none}.sd-radio--checked.sd-radio--preview .sd-radio__decorator .sd-radio__svg{fill:var(--sjs-general-forecolor,var(--foreground,#161616));display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2.5);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2.5)}.sd-radio--checked .sd-radio__control:focus+.sd-radio__decorator:after{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-radio__svg{display:none}.sd-visuallyhidden{clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute;width:1px}.sd-matrix fieldset{border:none;margin:0;padding:0}.sd-matrix__label{display:flex;justify-content:center;position:relative}.sd-matrix__text,.sd-matrix__text--checked{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-matrix__text--checked{background-color:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)))}.sd-matrix__cell:first-of-type{font-weight:var(--sjs-font-questiontitle-weight,600);text-align:start}:root{--sd-rating-bad-color:var(--sjs-special-red,var(--red,#e60a3e));--sd-rating-normal-color:var(--sjs-special-yellow,var(--yellow,#ff9814));--sd-rating-good-color:var(--sjs-special-green,var(--green,#19b394));--sd-rating-bad-color-light:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)));--sd-rating-normal-color-light:var(--sjs-special-yellow-light,var(--yellow-light,rgba(255,152,20,.1)));--sd-rating-good-color-light:var(--sjs-special-green-light,var(--green-light,rgba(25,179,148,.1)))}.sd-rating{min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);overflow-x:auto}.sd-rating fieldset{align-items:center;border:none;display:flex;flex-wrap:nowrap;gap:var(--sjs-base-unit,var(--base-unit,8px));margin-inline-start:0;padding:0 0 2px}.sd-rating.sd-rating--wrappable fieldset{flex-wrap:wrap;min-width:0}.sd-rating.sd-rating--labels-top fieldset{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4.5);position:relative}.sd-rating.sd-rating--labels-top fieldset .sd-rating__min-text{border:0;left:0;margin:0;position:absolute;top:0}.sd-rating.sd-rating--labels-top fieldset .sd-rating__max-text{border:0;margin:0;position:absolute;right:0;top:0}.sd-rating.sd-rating--labels-bottom fieldset{padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4.5);position:relative}.sd-rating.sd-rating--labels-bottom fieldset .sd-rating__min-text{border:0;bottom:0;left:0;margin:0;position:absolute}.sd-rating.sd-rating--labels-bottom fieldset .sd-rating__max-text{border:0;bottom:0;margin:0;position:absolute;right:0}.sd-rating.sd-rating--labels-diagonal fieldset{padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4.5);padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4.5);position:relative}.sd-rating.sd-rating--labels-diagonal fieldset .sd-rating__min-text{border:0;left:0;margin:0;position:absolute;top:0}.sd-rating.sd-rating--labels-diagonal fieldset .sd-rating__max-text{border:0;bottom:0;margin:0;position:absolute;right:0}.sd-rating--small{margin:auto;min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-rating--small fieldset{gap:var(--sjs-base-unit,var(--base-unit,8px));padding:0}.sd-rating__item{fill:var(--sjs-general-forecolor,var(--foreground,#161616));align-items:center;background:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));border:0 solid transparent;border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);box-shadow:var(--sjs-shadow-small,0 1px 2px 0 rgba(0,0,0,.15)),inset 0 0 0 0 var(--sjs-general-backcolor,var(--background,#fff));box-sizing:border-box;color:var(--sjs-general-forecolor,var(--foreground,#161616));display:flex;font-size:var(--sjs-font-size,16px);height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);justify-content:center;min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2.5);position:relative;text-align:center;transition:box-shadow var(--sjs-transition-duration,.15s),background-color var(--sjs-transition-duration,.15s);white-space:nowrap}.sd-rating__item--fixed-size{padding:0;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}legend+.sd-rating__item,legend+sv-ng-rating-item+.sd-rating__item,legend+sv-ng-rating-item-smiley+.sd-rating__item-smiley{margin-inline-start:2px}.sd-rating__item--error{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)));border:none;box-shadow:0 1px 2px transparent}.sd-rating__item.sd-rating__item--disabled{fill:var(--sjs-general-forecolor,var(--foreground,#161616));color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-rating__item.sd-rating__item--selected.sd-rating__item--disabled{fill:var(--sjs-general-forecolor,var(--foreground,#161616));background-color:var(--lbr-dialog-screen-color,var(--background-semitransparent,hsla(0,0%,56%,.5)));border:none;color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff))}.sd-rating__item.sd-rating__item--readonly{fill:transparent;background-color:transparent;border:2px solid var(--sjs-border-inside,var(--border-inside,rgba(0,0,0,.16)));box-shadow:none;transform:none}.sd-rating__item.sd-rating__item--readonly .sd-rating__item-text.sd-rating__item-text{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sd-rating__item.sd-rating__item--selected.sd-rating__item--readonly{border-color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-rating__item.sd-rating__item--selected.sd-rating__item--readonly .sd-rating__item-text.sd-rating__item-text{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-rating__item.sd-rating__item--preview{fill:transparent;background-color:transparent;border:1px solid transparent;box-shadow:none;transform:none}.sd-rating__item.sd-rating__item--preview:focus-within{box-shadow:none}.sd-rating__item.sd-rating__item--preview .sd-rating__item-text.sd-rating__item-text{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-rating__item.sd-rating__item--selected.sd-rating__item--preview{border-color:var(--sjs-general-forecolor,var(--foreground,#161616));border-width:1px}.sd-rating__item.sd-rating__item--selected.sd-rating__item--preview .sd-rating__item-text.sd-rating__item-text{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-question--disabled .sd-rating__item-text{opacity:.25}.sd-rating__item--allowhover:hover{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sd-rating__item:focus-within{box-shadow:0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-rating__item--selected{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));box-shadow:0 0 0 0 var(--sjs-primary-backcolor,var(--primary,#19b394));color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));font-weight:600}.sd-rating__item--selected:focus-within{box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),inset 0 0 0 4px var(--sjs-general-backcolor,var(--background,#fff)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-rating__item-smiley{fill:var(--sjs-border-default,var(--border,#d6d6d6));align-items:center;border:2px solid var(--sjs-border-default,var(--border,#d6d6d6));border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),inset 0 0 0 0 var(--sjs-general-backcolor,var(--background,#fff));box-sizing:border-box;color:var(--sjs-general-forecolor,var(--foreground,#161616));display:flex;justify-content:center;min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.25);position:relative;text-align:center;transition:box-shadow var(--sjs-transition-duration,.15s),background-color var(--sjs-transition-duration,.15s);white-space:nowrap}.sd-rating__item-smiley svg{display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-rating__item-smiley--small{border-width:1px;min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.625)}.sd-rating__item-smiley--small svg{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}.sd-rating__item-smiley--small:not(.sd-rating__item-smiley--selected):focus-within{box-shadow:0 0 0 1px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-rating__item-smiley--colored.sd-rating__item-smiley--small:not(.sd-rating__item-smiley--selected):focus-within{box-shadow:0 0 0 1px var(--sd-rating-item-color,var(--sjs-primary-backcolor,var(--primary,#19b394)))}.sd-rating__item-smiley--small.sd-rating__item-smiley--selected:focus-within{box-shadow:inset 0 0 0 2px var(--sjs-general-backcolor,var(--background,#fff)),0 0 0 1px var(--sd-rating-item-color,var(--sjs-primary-backcolor,var(--primary,#19b394)))}legend+.sd-rating__item-smiley,legend+sv-ng-rating-item+.sd-rating__item-smiley{margin-inline-start:2px}.sd-rating__item-smiley--scale-colored{fill:var(--sd-rating-item-color,var(--sjs-primary-backcolor,var(--primary,#19b394)));border-color:var(--sd-rating-item-color,var(--sjs-primary-backcolor,var(--primary,#19b394)));transition:box-shadow var(--sjs-transition-duration,.15s),opacity var(--sjs-transition-duration,.15s),background-color var(--sjs-transition-duration,.15s)}.sd-rating__item-smiley--error{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)));border-color:transparent}.sd-rating__item-smiley--error.sd-rating__item-smiley--scale-colored:hover{fill:var(--sd-rating-item-color,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)))}.sd-rating__item-smiley--error.sd-rating__item-smiley--scale-colored:not(.sd-rating__item-smiley--selected){opacity:1}.sd-rating__item-smiley.sd-rating__item-smiley--disabled{opacity:.5}.sd-rating__item-smiley.sd-rating__item-smiley--selected.sd-rating__item-smiley--disabled{fill:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));opacity:1}.sd-rating__item-smiley.sd-rating__item-smiley--readonly{fill:var(--sjs-border-default,var(--border,#d6d6d6));border-color:var(--sjs-border-default,var(--border,#d6d6d6))}.sd-rating__item-smiley.sd-rating__item-smiley--selected.sd-rating__item-smiley--readonly{fill:var(--sjs-general-forecolor,var(--foreground,#161616));background-color:unset;border-color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-rating__item-smiley.sd-rating__item-smiley--preview.sd-rating__item-smiley--preview.sd-rating__item-smiley--preview{fill:var(--sjs-general-forecolor,var(--foreground,#161616));border:1px solid var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-rating__item-smiley.sd-rating__item-smiley--preview.sd-rating__item-smiley--preview.sd-rating__item-smiley--preview:focus-within{box-shadow:none}.sd-rating__item-smiley.sd-rating__item-smiley--preview.sd-rating__item-smiley--preview.sd-rating__item-smiley--preview svg{margin:1px}.sd-rating__item-smiley.sd-rating__item-smiley--selected.sd-rating__item-smiley--preview.sd-rating__item-smiley--preview{fill:var(--sjs-general-backcolor,var(--background,#fff));background-color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-rating__item-smiley--allowhover:hover{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8));border-color:var(--sjs-border-default,var(--border,#d6d6d6))}.sd-rating__item-smiley:focus-within{border:none;box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-rating__item-smiley--selected{fill:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));background-color:var(--sd-rating-item-color,var(--sjs-primary-backcolor,var(--primary,#19b394)));border-color:var(--sd-rating-item-color,var(--sjs-primary-backcolor,var(--primary,#19b394)));font-weight:600}.sd-rating__item-smiley--selected:focus-within{border:0 solid var(--sjs-general-backcolor,var(--background,#fff));box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),inset 0 0 0 4px var(--sjs-general-backcolor,var(--background,#fff)),0 0 0 2px var(--sd-rating-item-color,var(--sjs-primary-backcolor,var(--primary,#19b394)))}.sd-rating__item-smiley--scale-colored:not(.sd-rating__item-smiley--selected){opacity:.25}.sd-rating__item-smiley--scale-colored:not(.sd-rating__item-smiley--selected).sd-rating__item-smiley--allowhover:hover{background-color:var(--sd-rating-item-color-light,var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8)));border-color:var(--sd-rating-item-color,var(--sjs-border-default,var(--border,#d6d6d6)));opacity:.5}.sd-rating__item-smiley--rate-colored:not(.sd-rating__item-smiley--selected).sd-rating__item-smiley--allowhover:hover{opacity:.5}.sd-rating__item-smiley--scale-colored:not(.sd-rating__item-smiley--selected):focus-within{box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sd-rating-item-color,var(--sjs-primary-backcolor,var(--primary,#19b394)));opacity:1}.sd-rating__item-smiley--scale-colored.sd-rating__item-smiley--small:not(.sd-rating__item-smiley--selected):focus-within{box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),0 0 0 1px var(--sd-rating-item-color,var(--sjs-primary-backcolor,var(--primary,#19b394)));opacity:1}.sd-rating__item-smiley--scale-colored.sd-rating__item-smiley--preview,.sd-rating__item-smiley--scale-colored.sd-rating__item-smiley--readonly,.sd-rating__item-smiley--scale-colored.sd-rating__item-smiley--selected{opacity:1}.sd-rating__item-star{box-sizing:content-box;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);position:relative;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sd-rating__item-star:not(:first-of-type){margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.5);padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sd-rating__item-star:not(:last-of-type){margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.5);padding-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sd-rating__item-star svg{stroke:var(--sjs-border-default,var(--border,#d6d6d6));stroke-width:2px;fill:transparent;display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);position:absolute;transition:stroke var(--sjs-transition-duration,.15s),opacity var(--sjs-transition-duration,.15s),fill var(--sjs-transition-duration,.15s);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sd-rating__item-star .sv-star{opacity:1}.sd-rating__item-star .sv-star-2{opacity:0}.sd-rating__item-star--small,.sd-rating__item-star--small svg{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-rating__item-star--small.sd-rating__item-star--selected svg{stroke-width:1px}.sd-rating__item-star--selected svg{stroke:transparent;fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-rating__item-star--selected:first-child svg{transition-delay:0ms}.sd-rating__item-star--selected:nth-child(2) svg{transition-delay:25ms}.sd-rating__item-star--selected:nth-child(3) svg{transition-delay:50ms}.sd-rating__item-star--selected:nth-child(4) svg{transition-delay:75ms}.sd-rating__item-star--selected:nth-child(5) svg{transition-delay:.1s}.sd-rating__item-star--selected:nth-child(6) svg{transition-delay:125ms}.sd-rating__item-star--selected:nth-child(7) svg{transition-delay:.15s}.sd-rating__item-star--selected:nth-child(8) svg{transition-delay:175ms}.sd-rating__item-star--selected:nth-child(9) svg{transition-delay:.2s}.sd-rating__item-star--selected:nth-child(10) svg{transition-delay:225ms}.sd-rating__item-star--selected:nth-child(11) svg{transition-delay:.25s}.sd-rating__item-star--selected:nth-child(12) svg{transition-delay:275ms}.sd-rating__item-star--selected:nth-child(13) svg{transition-delay:.3s}.sd-rating__item-star--selected:nth-child(14) svg{transition-delay:325ms}.sd-rating__item-star--selected:nth-child(15) svg{transition-delay:.35s}.sd-rating__item-star--selected:nth-child(16) svg{transition-delay:375ms}.sd-rating__item-star--selected:nth-child(17) svg{transition-delay:.4s}.sd-rating__item-star--selected:nth-child(18) svg{transition-delay:425ms}.sd-rating__item-star--selected:nth-child(19) svg{transition-delay:.45s}.sd-rating__item-star--selected:nth-child(20) svg{transition-delay:475ms}.sd-rating__item-star--selected:nth-child(21) svg{transition-delay:.5s}.sd-rating__item-star--selected:nth-child(22) svg{transition-delay:525ms}.sd-rating__item-star--selected:nth-child(23) svg{transition-delay:.55s}.sd-rating__item-star--selected:nth-child(24) svg{transition-delay:575ms}.sd-rating__item-star--selected:nth-child(25) svg{transition-delay:.6s}.sd-rating__item-star--error svg{stroke:none;fill:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)))}.sd-rating__item-star--disabled{opacity:.5}.sd-rating__item-star--disabled svg{stroke:var(--sjs-border-default,var(--border,#d6d6d6));fill:none}.sd-rating__item-star--selected.sd-rating__item-star--disabled svg{stroke:none;fill:var(--sjs-border-default,var(--border,#d6d6d6))}.sd-rating__item-star--readonly svg{stroke:var(--sjs-border-default,var(--border,#d6d6d6));fill:none}.sd-rating__item-star--selected.sd-rating__item-star--readonly svg{stroke:none;fill:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-rating__item-star--preview svg{stroke:var(--sjs-general-forecolor,var(--foreground,#161616));stroke-width:1px;fill:none}.sd-rating__item-star--selected.sd-rating__item-star--preview svg{stroke:none;fill:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-rating__item-star:not(.sd-rating__item-star--preview):focus-within svg{stroke:var(--sjs-primary-backcolor,var(--primary,#19b394));fill:transparent}.sd-rating__item-star--unhighlighted svg{stroke:transparent;fill:var(--sjs-border-default,var(--border,#d6d6d6))}.sd-rating__item-star--highlighted svg{stroke:var(--sjs-border-default,var(--border,#d6d6d6));fill:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sd-rating__item-star--selected:not(.sd-rating__item-star--preview).sd-rating__item-star--unhighlighted:focus-within svg{stroke:var(--sjs-border-default,var(--border,#d6d6d6));fill:var(--sjs-border-default,var(--border,#d6d6d6))}.sd-rating__item-star--selected:not(.sd-rating__item-star--preview):focus-within svg{stroke:var(--sjs-primary-backcolor,var(--primary,#19b394));fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-rating__item-star--selected:not(.sd-rating__item-star--preview):focus-within .sv-star{opacity:0}.sd-rating__item-star--selected:not(.sd-rating__item-star--preview):focus-within .sv-star-2{opacity:1}.sd-rating__item-text.sd-rating__item-text{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));box-sizing:border-box;color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));display:inline-block;font-family:var(--sjs-font-editorfont-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-internal-font-editorfont-size);font-weight:var(--sjs-font-editorfont-weight,400);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);transition:color var(--sjs-transition-duration,.15s)}.sd-rating__item-text.sd-rating__item-text.sd-rating__max-text,.sd-rating__item-text.sd-rating__item-text.sd-rating__min-text{border:2px solid transparent;color:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.25);margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.25)}.sd-rating__item-text.sd-rating__item-text.sd-rating__min-text{border-left:0;margin-right:var(--sjs-base-unit,var(--base-unit,8px))}.sd-rating__item-text.sd-rating__item-text.sd-rating__max-text{margin-left:var(--sjs-base-unit,var(--base-unit,8px));margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-rating__item-text.sd-rating__item-text .sv-string-editor{white-space:nowrap}.sd-rating__item-text.sd-rating__item-text.sd-rating__item--fixed-size{min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-rating__item-text.sd-rating__item-text:after{color:transparent;content:attr(data-text);display:block;font-weight:600;height:0;overflow:hidden;visibility:hidden}.sd-rating--wrappable .sd-rating__item-text{max-width:100%}.sd-rating--wrappable .sd-rating__item-text .sv-string-viewer{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis}.sd-rating__item:focus-within .sd-rating__item-text.sd-rating__item-text{border:none}.sd-rating__item--selected .sd-rating__item-text.sd-rating__item-text{border:none;color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));font-weight:inherit}.sd-rating-dropdown-item{align-items:center;display:flex;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);justify-content:space-between;width:100%}.sd-rating-dropdown-item_description{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:calc((var(--sjs-font-size, 16px))*.75);font-style:normal;font-weight:400;line-height:var(--sjs-font-size,16px)}.sv-list__item.sv-list__item--selected .sd-rating-dropdown-item_description{color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff))}.sv-ranking-item--error .sv-ranking-item__index{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)));border-color:transparent;box-shadow:0 1px 2px transparent}.sd-element--with-frame .sv-ranking-item{left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3)}.sv-ranking.sd-ranking--readonly{user-select:auto;-webkit-user-select:initial}.sv-ranking.sd-ranking--readonly .sv-ranking__container--empty,.sv-ranking.sd-ranking--readonly.sv-ranking--select-to-rank-empty-value .sv-ranking__containers-divider{visibility:hidden}.sv-ranking.sd-ranking--preview{user-select:auto;-webkit-user-select:initial}.sv-ranking.sd-ranking--preview .sv-ranking__container--empty,.sv-ranking.sd-ranking--preview.sv-ranking--select-to-rank-empty-value .sv-ranking__containers-divider{visibility:hidden}@container (max-width: 496px){.sv-ranking--select-to-rank-horizontal{flex-direction:column-reverse}.sv-ranking--select-to-rank-horizontal .sv-ranking__containers-divider{height:1px;margin:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3) 0;width:auto}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--empty{align-items:center;display:flex;justify-content:center;padding-bottom:var(--sjs-base-unit,var(--base-unit,8px));padding-top:var(--sjs-base-unit,var(--base-unit,8px))}.sv-ranking--select-to-rank-horizontal .sv-ranking__container{max-width:none}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--empty.sv-ranking__container--to .sv-ranking-item,.sv-ranking--select-to-rank-horizontal .sv-ranking__container--to .sv-ranking-item{left:auto}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--empty.sv-ranking__container--to .sv-ranking__container-placeholder{padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);padding-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-ranking--select-to-rank-horizontal .sv-ranking__container--empty.sv-ranking__container--from .sv-ranking__container-placeholder{padding-right:0}}@container (max-width: 176px){.sv-ranking__container--empty.sv-ranking__container--to .sv-ranking__container-placeholder{margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-5);margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-5)}}.sd-element--with-frame .sv-ranking--mobile .sv-ranking-item__icon-container{margin-left:0;margin-right:var(--sjs-base-unit,var(--base-unit,8px))}.sd-element--with-frame .sv-ranking--mobile .sv-ranking-item{left:0}.sv-ranking-item__content.sd-ranking-item__content{line-height:calc((var(--sjs-font-size, 16px))*1.5)}.sv-dragdrop-movedown{animation:svdragdropmovedown .1s;animation-timing-function:ease-in-out;transform:translate(0)}@keyframes svdragdropmovedown{0%{transform:translateY(-50px)}to{transform:translate(0)}}.sv-dragdrop-moveup{animation:svdragdropmoveup .1s;animation-timing-function:ease-in-out;transform:translate(0)}@keyframes svdragdropmoveup{0%{transform:translateY(50px)}to{transform:translate(0)}}.sv-dropdown_select-wrapper{position:relative}.sv-dropdown_select-wrapper use{fill:var(--sjs-font-editorfont-placeholdercolor,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)))}.sd-dropdown{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;justify-content:space-between;opacity:1;padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);padding-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);word-spacing:normal}.sd-dropdown[disabled]{pointer-events:none}.sd-dropdown--empty:not(.sd-input--disabled),.sd-dropdown--empty:not(.sd-input--disabled) .sd-dropdown__value{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sd-dropdown__input-field-component{height:auto}.sd-dropdown option{color:var(--sjs-general-forecolor,var(--foreground,#161616));font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px)}.sd-dropdown input[readonly]{pointer-events:none}.sd-dropdown__value{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));color:var(--sjs-font-editorfont-color,var(--sjs-general-forecolor,rgba(0,0,0,.91)));font-family:var(--sjs-font-editorfont-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-internal-font-editorfont-size);font-weight:var(--sjs-font-editorfont-weight,400);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);min-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:100%}.sd-dropdown_clean-button{margin:auto 0;padding:0 var(--sjs-base-unit,var(--base-unit,8px))}.sd-dropdown_chevron-button,.sd-dropdown_clean-button{align-items:center;cursor:pointer;display:flex;justify-content:center}.sd-dropdown_chevron-button{bottom:0;box-sizing:content-box;inset-inline-end:0;padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);position:absolute;top:0;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sd-dropdown_chevron-button-svg,.sd-dropdown_clean-button-svg{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));height:calc((var(--sjs-internal-font-editorfont-size))*1.5);width:calc((var(--sjs-internal-font-editorfont-size))*1.5)}.sd-dropdown_chevron-button-svg use,.sd-dropdown_clean-button-svg use{pointer-events:none}.sd-input.sd-dropdown:focus-within{box-shadow:var(--sjs-shadow-inner-reset,inset 0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-input.sd-dropdown.sd-input--readonly{box-shadow:none;transition:none}.sd-dropdown__filter-string-input{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));appearance:none;background-color:transparent;border:none;bottom:0;color:var(--sjs-font-editorfont-color,var(--sjs-general-forecolor,rgba(0,0,0,.91)));display:inline-block;font-family:var(--sjs-font-editorfont-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-internal-font-editorfont-size);font-weight:var(--sjs-font-editorfont-weight,400);left:0;line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);max-width:100%;outline:none;overflow:hidden;padding:0;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}.sd-dropdown--empty:not(.sd-input--disabled) .sd-dropdown__filter-string-input::placeholder{color:var(--sjs-font-editorfont-placeholdercolor,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)))}.sd-dropdown--empty div{min-height:calc((var(--sjs-internal-font-editorfont-size))*1.5)}.sd-dropdown__filter-string-input::placeholder{appearance:none;color:var(--sjs-general-forecolor,var(--foreground,#161616));display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.sd-dropdown__hint-prefix{color:var(--sjs-font-editorfont-placeholdercolor,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)))}.sd-dropdown__hint-prefix span{white-space:pre}.sd-dropdown__hint-suffix{color:var(--sjs-font-editorfont-placeholdercolor,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)));display:flex}.sd-dropdown__hint-suffix span{white-space:pre}.sd-input--disabled .sv-string-viewer,.sd-input--preview .sv-string-viewer,.sd-input--readonly .sv-string-viewer{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sd-question--readonly .sd-dropdown_chevron-button use{opacity:.24}.sd-question--preview .sd-dropdown_chevron-button{display:none}.sv-dropdown-popup .sd-list__item-body{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) solid transparent;border-radius:var(--sjs-corner-radius,4px);font-family:var(--sjs-font-editorfont-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-internal-font-editorfont-size);font-weight:var(--sjs-font-editorfont-weight,400);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);transition:border-color var(--sjs-transition-duration,.15s)}.sv-dropdown-popup .sd-list__item-body,.sv-dropdown-popup .sv-list__item.sv-list__item--focused:not(.sv-list__item--selected) .sv-list__item-body{padding-block:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.25);padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.75);padding-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.75)}.sv-dropdown-popup .sv-list__item.sv-list__item--focused:not(.sv-list__item--selected) .sv-list__item-body{border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) solid var(--sjs-border-light,var(--border-light,#eaeaea))}.sv-dropdown-popup.sv-single-select-list.sv-popup--leave .sd-list__item.sv-list__item--selected .sv-list__item-body{background-color:transparent;color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));font-weight:400}.sv-dropdown-popup.sv-popup--menu-popup.sv-popup--top .sv-popup__container{transform:translateY(-2px)}.sv-dropdown-popup.sv-popup--menu-popup.sv-popup--bottom .sv-popup__container{transform:translateY(2px)}[dir=rtl] .sd-dropdown,[style*="direction: rtl"] .sd-dropdown,[style*="direction:rtl"] .sd-dropdown{background-position:left calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) top 50%,0 0}.sd-input.sd-tagbox:not(.sd-tagbox--empty).sd-input--editable{height:auto;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);padding-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sd-tagbox.sd-input--disabled,.sd-tagbox.sd-input--preview,.sd-tagbox.sd-input--readonly{white-space:normal}.sd-tagbox_clean-button{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));height:calc((var(--sjs-internal-font-editorfont-size))*1.5);margin:auto 0;padding:calc((var(--sjs-internal-font-editorfont-size))*.5)}.sd-input.sd-tagbox:focus-within{box-shadow:var(--sjs-shadow-inner-reset,inset 0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sv-tagbox__item{align-items:center;background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));border-radius:calc((var(--sjs-corner-radius, 4px))*.5);box-sizing:border-box;display:flex;max-width:calc(100% - var(--sjs-base-unit, var(--base-unit, 8px)));padding:var(--sjs-base-unit,var(--base-unit,8px)) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);position:relative}.sv-tagbox__item-text{color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));font-weight:600;min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5.5);text-align:center}.sv-tagbox__item-text span{display:block;overflow:hidden;text-overflow:ellipsis}.sv-tagbox__item:focus .sd-tagbox-item_clean-button,.sv-tagbox__item:focus-within .sd-tagbox-item_clean-button,.sv-tagbox__item:hover .sd-tagbox-item_clean-button{align-self:center;opacity:1}.sd-tagbox-item_clean-button{background:linear-gradient(270deg,var(--sjs-primary-backcolor,var(--primary,#19b394)) 53.12%,rgba(25,179,148,0) 100%);display:flex;inset-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);opacity:0;padding:0;padding-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);position:absolute;transition:opacity var(--sjs-transition-duration,.15s)}.sd-tagbox-item_clean-button-svg{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));box-sizing:content-box;display:block;height:var(--sjs-internal-font-editorfont-size);padding:calc((var(--sjs-internal-font-editorfont-size))*.25);width:var(--sjs-internal-font-editorfont-size)}.sd-tagbox-item_clean-button-svg:hover{background:var(--sjs-primary-forecolor-light,var(--primary-foreground-disabled,hsla(0,0%,100%,.25)));border-radius:100px}.sd-tagbox-item_clean-button-svg use{fill:var(--sjs-primary-forecolor,var(--primary-foreground,#fff))}.sd-tagbox__value.sd-dropdown__value{display:flex;flex-grow:1;flex-wrap:wrap;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);margin-block:unset;margin-inline:unset;padding-inline:unset;position:relative}.sd-tagbox__filter-string-input{display:flex;flex-grow:1;width:100%}.sd-tagbox__placeholder{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));cursor:text;height:100%;left:0;max-width:100%;pointer-events:none;position:absolute;text-align:start;top:0;width:auto}[dir=rtl] .sd-tagbox-item_clean-button,[style*="direction: rtl"] .sd-tagbox-item_clean-button,[style*="direction:rtl"] .sd-tagbox-item_clean-button{background:linear-gradient(90deg,var(--sjs-primary-backcolor,var(--primary,#19b394)) 53.12%,rgba(25,179,148,0) 100%)}.sd-tagbox.sd-tagbox--empty .sd-tagbox__filter-string-input,.sd-tagbox.sd-tagbox--empty .sd-tagbox__hint,.sd-tagbox.sd-tagbox--empty .sd-tagbox__hint-suffix-wrapper{width:100%}.sd-tagbox__hint{display:flex;flex-grow:1;max-width:100%}.sd-tagbox__hint-suffix-wrapper{position:relative;width:100%}.sd-dropdown__hint-prefix.sd-tagbox__hint-prefix,.sd-dropdown__hint-suffix.sd-tagbox__hint-suffix{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));align-items:center;display:flex;height:100%;line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5)}.sd-dropdown__hint-prefix.sd-tagbox__hint-prefix{justify-content:flex-end;max-width:50%}.sd-imagepicker{border:none;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);margin:0;padding:0;width:100%}.sd-imagepicker--static{display:flex;flex-wrap:wrap}.sd-imagepicker--responsive{display:grid}.sd-imagepicker--column{align-items:flex-start;flex-direction:column}@supports not (aspect-ratio:1/1){.sd-imagepicker>div{margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}}.sd-imagepicker__item .sd-imagepicker__image-container>div,.sd-imagepicker__item img{background-color:var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9));border-radius:var(--sjs-corner-radius,4px)}.sd-imagepicker__item-decorator{align-items:center;display:flex;flex-direction:column;position:relative}.sd-imagepicker__label{position:relative}.sd-imagepicker__label .sd-visuallyhidden{height:100%;margin:0}.sd-imagepicker__image-container{position:relative}.sd-imagepicker__check-decorator{background-color:var(--sjs-general-backcolor,var(--background,#fff));border-radius:100%;box-sizing:border-box;display:block;opacity:0;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);position:absolute;right:var(--sjs-base-unit,var(--base-unit,8px));top:var(--sjs-base-unit,var(--base-unit,8px));transition:opacity var(--sjs-transition-duration,.15s);z-index:1}.sd-imagepicker__check-icon{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));fill:var(--sjs-primary-backcolor,var(--primary,#19b394));display:block;height:calc((var(--sjs-internal-font-editorfont-size))*1.5);width:calc((var(--sjs-internal-font-editorfont-size))*1.5)}.sd-imagepicker__item--checked .sd-imagepicker__check-decorator{opacity:1}.sd-imagepicker__item--error .sd-imagepicker__image-container:before{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)));background:linear-gradient(0deg,var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1))),var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1))));border-radius:var(--sjs-corner-radius,4px);content:" ";display:block;height:100%;left:0;position:absolute;top:0;width:100%}.sd-imagepicker__item--allowhover:not(.sd-imagepicker__item--readonly,.sd-imagepicker__item--preview) .sd-imagepicker__image:hover,.sd-imagepicker__item:focus-within .sd-imagepicker__image .sd-imagepicker__image:hover{opacity:.5}.sd-imagepicker__image{box-sizing:border-box;display:block;max-width:100%;transition:opacity var(--sjs-transition-duration,.15s)}.sd-imagepicker__text{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));font-size:var(--sjs-internal-font-editorfont-size);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);margin-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-imagepicker__no-image{background-color:var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9));display:flex;inset-block-start:0}.sd-imagepicker__no-image-svg{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);margin:auto;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sd-imagepicker__no-image-svg use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));opacity:.5}.sd-imagepicker__column{align-items:flex-start;display:flex;flex-direction:column;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding-right:0}.sd-imagepicker__column.sd-selectbase__column{min-width:0}.sd-imagepicker__column .sd-imagepicker__item{width:100%}.sd-imagepicker__column .sd-imagepicker__text{display:inline-block;overflow:hidden;text-align:center;text-overflow:ellipsis;width:100%}.sd-selectbase__column.sd-imagepicker__column:not(:last-child){padding-right:0}.sd-imagepicker__item--readonly .sd-imagepicker__check-icon{fill:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-imagepicker__item--preview .sd-imagepicker__check-decorator{display:none}.sd-imagepicker__item--preview .sd-imagepicker__image{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.25}.sd-imagepicker__item--preview.sd-imagepicker__item--checked .sd-imagepicker__image{-webkit-filter:grayscale(0);filter:grayscale(0);opacity:1}.sd-image__image{border-radius:var(--sjs-corner-radius,4px);display:block;max-width:100%}.sd-image__image--adaptive{height:auto;max-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*80);width:100%}.sd-image__no-image{align-items:center;background:var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9));display:flex;height:100%;justify-content:center;min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*27.5);min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);position:relative;width:100%}.sd-image__no-image use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));opacity:.5}.sd-question--image{width:100%}.sd-html{color:var(--sjs-font-pagetitle-color,var(--sjs-general-dim-forecolor,rgba(0,0,0,.91)));font-size:var(--sjs-article-font-default-fontSize,var(--sjs-font-size,16px));font-stretch:var(--sjs-article-font-default-fontStretch,"normal");font-style:var(--sjs-article-font-default-fontStyle,"normal");font-weight:var(--sjs-article-font-default-fontWeight,400);letter-spacing:var(--sjs-article-font-default-letterSpacing,0);line-height:var(--sjs-article-font-default-lineHeight,28px);text-decoration:var(--sjs-article-font-default-textDecoration,"none");text-indent:var(--sjs-article-font-default-paragraphIndent,0);text-transform:var(--sjs-article-font-default-textCase,"none");white-space:normal}.sd-html,.sd-html h1{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)))}.sd-html h1{font-size:var(--sjs-article-font-xx-large-fontSize,calc((var(--sjs-font-size, 16px))*4));font-stretch:var(--sjs-article-font-xx-large-fontStretch,"normal");font-style:var(--sjs-article-font-xx-large-fontStyle,"normal");font-weight:var(--sjs-article-font-xx-large-fontWeight,700);letter-spacing:var(--sjs-article-font-xx-large-letterSpacing,0);line-height:var(--sjs-article-font-xx-large-lineHeight,64px);text-decoration:var(--sjs-article-font-xx-large-textDecoration,"none");text-indent:var(--sjs-article-font-xx-large-paragraphIndent,0);text-transform:var(--sjs-article-font-xx-large-textCase,"none")}.sd-html h2{font-size:var(--sjs-article-font-x-large-fontSize,calc((var(--sjs-font-size, 16px))*3));font-stretch:var(--sjs-article-font-x-large-fontStretch,"normal");font-style:var(--sjs-article-font-x-large-fontStyle,"normal");font-weight:var(--sjs-article-font-x-large-fontWeight,700);letter-spacing:var(--sjs-article-font-x-large-letterSpacing,0);line-height:var(--sjs-article-font-x-large-lineHeight,56px);text-decoration:var(--sjs-article-font-x-large-textDecoration,"none");text-indent:var(--sjs-article-font-x-large-paragraphIndent,0);text-transform:var(--sjs-article-font-x-large-textCase,"none")}.sd-html h2,.sd-html h3{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)))}.sd-html h3{font-size:var(--sjs-article-font-large-fontSize,calc((var(--sjs-font-size, 16px))*2));font-stretch:var(--sjs-article-font-large-fontStretch,"normal");font-style:var(--sjs-article-font-large-fontStyle,"normal");font-weight:var(--sjs-article-font-large-fontWeight,700);letter-spacing:var(--sjs-article-font-large-letterSpacing,0);line-height:var(--sjs-article-font-large-lineHeight,40px);text-decoration:var(--sjs-article-font-large-textDecoration,"none");text-indent:var(--sjs-article-font-large-paragraphIndent,0);text-transform:var(--sjs-article-font-large-textCase,"none")}.sd-html h4,.sd-html h5,.sd-html h6{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-medium-fontSize,calc((var(--sjs-font-size, 16px))*1.5));font-stretch:var(--sjs-article-font-medium-fontStretch,"normal");font-style:var(--sjs-article-font-medium-fontStyle,"normal");font-weight:var(--sjs-article-font-medium-fontWeight,700);letter-spacing:var(--sjs-article-font-medium-letterSpacing,0);line-height:var(--sjs-article-font-medium-lineHeight,32px);text-decoration:var(--sjs-article-font-medium-textDecoration,"none");text-indent:var(--sjs-article-font-medium-paragraphIndent,0);text-transform:var(--sjs-article-font-medium-textCase,"none")}.sd-html div,.sd-html p,.sd-html span,.sd-html td{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-default-fontSize,var(--sjs-font-size,16px));font-stretch:var(--sjs-article-font-default-fontStretch,"normal");font-style:var(--sjs-article-font-default-fontStyle,"normal");font-weight:var(--sjs-article-font-default-fontWeight,400);letter-spacing:var(--sjs-article-font-default-letterSpacing,0);line-height:var(--sjs-article-font-default-lineHeight,28px);text-decoration:var(--sjs-article-font-default-textDecoration,"none");text-indent:var(--sjs-article-font-default-paragraphIndent,0);text-transform:var(--sjs-article-font-default-textCase,"none")}.sd-html a,.sd-html button{color:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-html button{align-items:center;background-color:var(--sjs-general-backcolor,var(--background,#fff));border:none;border-radius:var(--sjs-corner-radius,4px);box-shadow:var(--sjs-shadow-small,0 1px 2px 0 rgba(0,0,0,.15)),0 0 0 0 var(--sjs-primary-backcolor,var(--primary,#19b394));cursor:pointer;display:flex;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-questiontitle-size,var(--sjs-font-size,16px));font-style:normal;font-weight:600;line-height:calc((var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)))*1.5);outline:solid calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) transparent;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);text-align:center;transition:box-shadow var(--sjs-transition-duration,.15s);user-select:none;vertical-align:baseline}.sd-html button:hover{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sd-html button:focus{box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-html button span{align-items:center;display:flex;flex-grow:1;justify-content:center}.sd-expression,.sd-html--nested{color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)))}.sd-expression{font-size:var(--sjs-font-size,16px);white-space:break-spaces}.sd-question__content--left .sd-expression{line-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) 0}.sd-progress{background-color:var(--sjs-border-light,var(--border-light,#eaeaea));height:2px;position:relative}.sd-progress__bar{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));height:100%;overflow:hidden;position:relative}.sd-progress__text{color:var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45));font-size:calc((var(--sjs-font-size, 16px))*.75);font-weight:600;line-height:var(--sjs-font-size,16px);margin-top:var(--sjs-base-unit,var(--base-unit,8px));padding:var(--sjs-base-unit,var(--base-unit,8px)) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);position:absolute;right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}@media only screen and (min-width:1000px){.sd-progress__text{margin-left:5%}}@media only screen and (max-width:1000px){.sd-progress__text{margin-left:10px}}.sd-body__progress--top{margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);position:sticky;top:0;z-index:50}.sd-body__progress--bottom .sd-progress__text{margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3.5)}.sv-root--sticky-top .sd-progress__text{background:var(--sjs-general-backcolor,var(--background,#fff));border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);box-shadow:var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1)),var(--sjs-shadow-small,0 1px 2px 0 rgba(0,0,0,.15));color:var(--sjs-general-dim-forecolor,rgba(0,0,0,.91));opacity:.75}.sd-boolean{background-color:var(--sjs-editorpanel-backcolor,var(--sjs-editor-background,var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9))));border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);box-shadow:var(--sjs-shadow-inner,inset 0 1px 2px 0 rgba(0,0,0,.15)),0 0 0 0 var(--sjs-primary-backcolor,var(--primary,#19b394));display:flex;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);position:relative;transition:box-shadow var(--sjs-transition-duration,.15s);width:max-content}.sd-boolean.sd-boolean--allowhover:focus-within{box-shadow:var(--sjs-shadow-inner-reset,inset 0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-boolean__label,.sd-boolean__thumb{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));color:var(--sjs-font-editorfont-placeholdercolor,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)));display:block;font-family:var(--sjs-font-editorfont-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--sjs-internal-font-editorfont-size);font-weight:var(--sjs-font-editorfont-weight,400);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);padding:var(--sjs-base-unit,var(--base-unit,8px)) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-boolean__switch{align-items:center;border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);box-sizing:border-box;display:flex;height:100%;left:0;overflow:hidden;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);position:absolute;top:0;width:100%}.sd-boolean.sd-boolean--checked .sd-boolean__label--true,.sd-boolean:not(.sd-boolean--checked):not(sd-boolean--indeterminate) .sd-boolean__label--false{color:transparent;transition-duration:.15s;transition-property:color;transition-timing-function:linear}.sd-boolean--indeterminate .sd-boolean__thumb,.sd-boolean.sd-boolean--indeterminate .sd-boolean__switch{display:none}.sd-boolean__thumb{background-color:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);box-shadow:var(--sjs-shadow-small,0 1px 2px 0 rgba(0,0,0,.15));color:var(--sjs-primary-backcolor,var(--primary,#19b394));font-weight:600;left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);position:absolute;transform:translateX(0);transition-duration:.2s;transition-property:transform,left;transition-timing-function:linear;z-index:2}.sd-boolean__thumb .sv-string-viewer.sv-string-viewer--multiline{white-space:nowrap}.sd-boolean--checked:not(.sd-boolean--exchanged) .sd-boolean__thumb,.sd-boolean--exchanged:not(.sd-boolean--checked) .sd-boolean__thumb{left:calc(100% - var(--sjs-base-unit, var(--base-unit, 8px))*.5);transform:translateX(-100%)}[dir=rtl] .sd-boolean__thumb,[style*="direction: rtl"] .sd-boolean__thumb,[style*="direction:rtl"] .sd-boolean__thumb{left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);right:unset;transform:translateX(100%)}[dir=rtl] .sd-boolean--checked:not(.sd-boolean--exchanged) .sd-boolean__thumb,[dir=rtl] .sd-boolean--exchanged:not(.sd-boolean--checked) .sd-boolean__thumb,[style*="direction: rtl"] .sd-boolean--checked:not(.sd-boolean--exchanged) .sd-boolean__thumb,[style*="direction: rtl"] .sd-boolean--exchanged:not(.sd-boolean--checked) .sd-boolean__thumb,[style*="direction:rtl"] .sd-boolean--checked:not(.sd-boolean--exchanged) .sd-boolean__thumb,[style*="direction:rtl"] .sd-boolean--exchanged:not(.sd-boolean--checked) .sd-boolean__thumb{left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5);right:unset;transform:translateX(0)}.sd-boolean--exchanged.sd-boolean.sd-boolean--checked .sd-boolean__label--true,.sd-boolean--exchanged.sd-boolean:not(.sd-boolean--checked):not(sd-boolean--indeterminate) .sd-boolean__label--false{color:var(--sjs-font-editorfont-placeholdercolor,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)))}.sd-boolean--disabled{pointer-events:none}.sd-boolean--disabled .sd-boolean__label,.sd-boolean--disabled .sd-boolean__thumb{color:var(--sjs-general-forecolor,var(--foreground,#161616));opacity:.25}.sd-boolean--readonly{background:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8));box-shadow:none;pointer-events:none;transition:none}.sd-boolean--readonly .sd-boolean__thumb{box-shadow:inset 0 0 0 2px var(--sjs-general-forecolor,var(--foreground,#161616));color:var(--sjs-general-forecolor,var(--foreground,#161616));transition:none}.sd-boolean--preview{background:transparent;box-shadow:none;pointer-events:none;transition:none}.sd-boolean--preview .sd-boolean__thumb{border:1px solid var(--sjs-general-forecolor,var(--foreground,#161616));box-shadow:none;color:var(--sjs-general-forecolor,var(--foreground,#161616));transition:none}.sd-boolean--preview.sd-boolean--checked .sd-boolean__thumb,.sd-boolean--preview.sd-boolean--indeterminate .sd-boolean__thumb{margin-left:auto}.sd-boolean--preview .sd-checkbox__label--preview{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-boolean__thumb-ghost{background-color:transparent;border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);transition:background-color var(--sjs-transition-duration,.15s);z-index:1}.sd-boolean.sd-boolean--allowhover .sd-boolean__thumb-ghost:hover{background-color:var(--sjs-editorpanel-hovercolor,var(--sjs-general-backcolor-dim-dark,#f3f3f3))}.sd-boolean--error{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)))}.sd-paneldynamic .sd-progress{height:2px;left:0;position:absolute;right:0;transform:translateY(-1px);z-index:2}.sd-paneldynamic>.sd-panel{padding-bottom:calc(var(--sd-base-vertical-padding)*.5);padding-top:1px}.sd-paneldynamic .sd-paneldynamic__panel-wrapper>.sd-panel>.sd-panel__header{padding-bottom:0;padding-top:var(--sd-base-vertical-padding)}.sd-paneldynamic .sd-paneldynamic__panel-wrapper>.sd-panel>.sd-panel__header:after{display:none}.sd-paneldynamic .sd-paneldynamic__panel-wrapper>.sd-panel>.sd-panel__header>.sd-panel__title{color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sd-question--preview .sd-paneldynamic .sd-question__placeholder,.sd-question--readonly .sd-paneldynamic .sd-question__placeholder{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-paneldynamic__separator{display:none}.sd-paneldynamic__panel-wrapper{padding-bottom:calc(var(--sd-base-padding)*1)}.sd-paneldynamic__panel-wrapper:after{clear:both;content:" ";display:table}.sd-paneldynamic__footer .sd-paneldynamic__separator,.sd-paneldynamic__panel-wrapper--list~.sd-paneldynamic__panel-wrapper--list:before{background:var(--sjs-border-light,var(--border-light,#eaeaea));border:none;content:" ";display:block;height:1px;left:0;margin:0;position:absolute;right:0}.sd-paneldynamic__separator:only-child{display:none}.sd-paneldynamic__panel-wrapper--in-row{align-items:center;display:flex;flex-direction:row}.sd-paneldynamic__footer{clear:both}.sd-paneldynamic__footer .sd-paneldynamic__next-btn,.sd-paneldynamic__footer .sd-paneldynamic__prev-btn{display:block}.sd-paneldynamic__footer .sd-paneldynamic__next-btn svg,.sd-paneldynamic__footer .sd-paneldynamic__prev-btn svg{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-paneldynamic__footer .sd-paneldynamic__add-btn,.sd-paneldynamic__footer .sd-paneldynamic__progress--bottom,.sd-paneldynamic__footer .sd-paneldynamic__progress-text{display:initial}.sd-paneldynamic__buttons-container{align-items:center;display:flex;padding:calc(var(--sd-base-vertical-padding) - var(--sjs-base-unit, var(--base-unit, 8px))) 0}.sd-paneldynamic__progress-container{align-items:center;display:flex;margin-left:auto;margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1)}.sd-paneldynamic__progress-text{color:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));font-size:var(--sjs-font-questiontitle-size,var(--sjs-font-size,16px));line-height:calc((var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)))*1.5);margin:0;margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-paneldynamic__next-btn,.sd-paneldynamic__prev-btn{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-paneldynamic__next-btn .sv-svg-icon,.sd-paneldynamic__prev-btn .sv-svg-icon{display:block}.sd-paneldynamic__next-btn,.sd-paneldynamic__prev-btn{margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-paneldynamic__next-btn{margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1);transform:rotate(180deg)}.sd-paneldynamic__placeholder .sd-paneldynamic__add-btn{display:initial;margin-left:0}.sd-question--empty.sd-question--paneldynamic>.sd-question__content{--animation-padding-bottom:var(--sd-base-padding);padding-bottom:var(--sd-base-padding)}.sd-question--paneldynamic:not(.sd-question--empty)>.sd-question__content>.sd-question__comment-area{padding-bottom:var(--sd-base-padding)}.sd-paneldynamic__buttons-container .sd-action-bar{margin:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3);width:100%;width:calc(100% + var(--sjs-base-unit, var(--base-unit, 8px))*6)}.sd-paneldynamic__panel-footer{border-top:none;justify-content:flex-end;margin-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-3);position:relative;top:calc(var(--sd-base-vertical-padding)*.5)}.sd-paneldynamic__panel-footer .sv-action:not(.sv-action--hidden){margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1)}.sd-paneldynamic__tabs-container{padding-top:var(--sd-base-padding)}.sd-paneldynamic__tabs-container .sd-tabs-toolbar{margin:0 0 -1px calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2);width:calc(100% + var(--sjs-base-unit, var(--base-unit, 8px))*4)}.sd-paneldynamic__tabs-container:after{background:var(--sjs-border-light,var(--border-light,#eaeaea));bottom:0;content:" ";display:block;height:1px;inset-inline-start:calc(var(--sd-base-padding)*-1);position:relative;width:calc(100% + var(--sd-base-padding)*2)}.sd-paneldynamic__tabs-container--with-header{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-tabs-toolbar.sv-action-bar{align-items:flex-start;z-index:1}.sd-tabs-toolbar.sd-tabs-toolbar--left{justify-content:flex-start}.sd-tabs-toolbar.sd-tabs-toolbar--right{justify-content:flex-end}.sd-tabs-toolbar.sd-tabs-toolbar--center{justify-content:center}.sd-tab-item{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;box-shadow:inset 0 0 0 var(--sjs-primary-backcolor,var(--primary,#19b394));box-sizing:border-box;color:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));cursor:pointer;display:flex;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-internal-font-editorfont-size);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);margin:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);overflow-x:hidden;padding:var(--sjs-base-unit,var(--base-unit,8px)) 0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);transition:box-shadow var(--sjs-transition-duration,.15s);white-space:nowrap}.sd-tab-item:focus-visible,.sd-tab-item:hover{box-shadow:inset 0 -2px 0 var(--sjs-primary-backcolor,var(--primary,#19b394));outline:none}.sd-tab-item.sd-tab-item--pressed{box-shadow:inset 0 -2px 0 var(--sjs-primary-backcolor,var(--primary,#19b394));color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)))}.sd-tab-item--icon{border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);padding:var(--sjs-base-unit,var(--base-unit,8px));width:auto}.sd-tab-item--icon use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));opacity:.5}.sd-tab-item--icon.sd-tab-item--pressed,.sd-tab-item--icon:hover{background-color:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)));box-shadow:none}.sd-tab-item--icon.sd-tab-item--pressed use,.sd-tab-item--icon:hover use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-tab-item--icon:hover use{opacity:1}.sd-tabs-toolbar .sv-dots{width:auto}.sd-tabs-toolbar .sv-dots.sv-action--hidden{width:0}.sd-tab-item__title{align-items:center;display:flex;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);line-height:calc((var(--sjs-font-size, 16px))*1.5)}.sd-question__title~.sd-tabs-toolbar{margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-paneldynamic__header.sd-element__header.sd-paneldynamic__header-tab{padding-bottom:0}.sd-element--collapsed .sd-paneldynamic__header.sd-element__header.sd-paneldynamic__header-tab{padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-paneldynamic__header.sd-element__header.sd-paneldynamic__header-tab:after{content:none}.sd-question--paneldynamic.sd-element--with-frame{padding-bottom:0}.sd-paneldynamic__panels-container{margin-left:calc(var(--sd-base-padding)*-1);margin-right:calc(var(--sd-base-padding)*-1);overflow:hidden;padding-left:var(--sd-base-padding);padding-right:var(--sd-base-padding);position:relative}.sd-paneldynamic__panel-wrapper{box-sizing:border-box}@keyframes movePanel{0%{transform:translateX(var(--sjs-pd-tab-move-margin))}to{transform:translateX(0)}}.sd-paneldynamic__panel-wrapper--enter.sv-pd-animation-left,.sd-paneldynamic__panel-wrapper--enter.sv-pd-animation-right{--sjs-pd-tab-animation-delay:0ms;--animation-padding-top:0;--animation-padding-bottom:calc(var(--sd-base-padding)*1);animation-delay:calc(var(--sjs-pd-tab-move-in-delay, .1s) + var(--sjs-pd-tab-animation-delay)),calc(var(--sjs-pd-tab-height-change-delay, 0ms) + var(--sjs-pd-tab-animation-delay)),calc(var(--sjs-pd-tab-height-change-delay, 0ms) + var(--sjs-pd-tab-animation-delay)),calc(var(--sjs-pd-tab-fade-in-delay, .1s) + var(--sjs-pd-tab-animation-delay));animation-duration:var(--sjs-pd-tab-move-in-duration,.25s),var(--sjs-pd-tab-height-change-duration,.25s),var(--sjs-pd-tab-height-change-duration,.25s),var(--sjs-pd-tab-fade-in-duration,.25s);animation-fill-mode:forwards;animation-name:movePanel,changeHeight,paddingFadeIn,fadeIn;animation-timing-function:ease-out;height:var(--animation-height-from);opacity:0;padding-bottom:0;transform:translateX(var(--sjs-pd-tab-move-margin))}.sd-paneldynamic__panel-wrapper--enter.sv-pd-animation-left{--sjs-pd-tab-move-margin:calc(var(--sjs-pd-tab-move-in-margin, 50%)*1)}.sd-paneldynamic__panel-wrapper--enter.sv-pd-animation-right{--sjs-pd-tab-move-margin:calc(var(--sjs-pd-tab-move-in-margin, 50%)*-1)}.sd-paneldynamic__panel-wrapper--leave.sv-pd-animation-left,.sd-paneldynamic__panel-wrapper--leave.sv-pd-animation-right{animation-delay:var(--sjs-pd-tab-fade-out-delay,0ms),var(--sjs-pd-tab-move-out-delay,0ms);animation-direction:reverse;animation-duration:var(--sjs-pd-tab-fade-out-duration,.25s),var(--sjs-pd-tab-move-out-duration,.25s);animation-fill-mode:forwards;animation-name:fadeIn,movePanel;animation-timing-function:ease-in;left:var(--sd-base-padding);position:absolute;top:0;width:calc(100% - var(--sd-base-padding)*2)}.sd-paneldynamic__panel-wrapper--leave.sv-pd-animation-left{--sjs-pd-tab-move-margin:calc(var(--sjs-pd-tab-move-out-margin, 50%)*-1)}.sd-paneldynamic__panel-wrapper--leave.sv-pd-animation-right{--sjs-pd-tab-move-margin:calc(var(--sjs-pd-tab-move-out-margin, 50%)*1)}.sd-paneldynamic__panel-wrapper--enter.sv-pd-animation-adding{animation-delay:calc(var(--sjs-pd-tab-add-fade-in-delay, .25s) + var(--sjs-pd-tab-animation-delay)),calc(var(--sjs-pd-tab-height-change-delay, 0ms) + var(--sjs-pd-tab-animation-delay)),calc(var(--sjs-pd-tab-height-change-delay, 0ms) + var(--sjs-pd-tab-animation-delay));animation-duration:var(--sjs-pd-tab-add-fade-in-duration,.5s),var(--sjs-pd-tab-height-change-duration,.25s),var(--sjs-pd-tab-height-change-duration,.25s);animation-fill-mode:forwards;animation-name:fadeIn,changeHeight,paddingFadeIn;animation-timing-function:ease-out;transform:translateX(0)}.sd-paneldynamic__panel-wrapper--enter.sv-pd-animation-removing{--sjs-pd-tab-animation-delay:var(--sjs-pd-tab-remove-fade-in-delay,150ms)}.sd-paneldynamic__panel-wrapper--leave.sv-pd-animation-removing{animation-delay:var(--sjs-pd-tab-remove-fade-out-delay,0ms);animation-direction:reverse;animation-duration:var(--sjs-pd-tab-remove-fade-out-duration,.15s);animation-fill-mode:forwards;animation-name:fadeIn;animation-timing-function:ease-in;left:var(--sd-base-padding);position:absolute;top:0;width:calc(100% - var(--sd-base-padding)*2)}.sd-paneldynamic__panel-wrapper--enter,.sd-paneldynamic__panel-wrapper--leave{--animation-padding-top:0;--animation-padding-bottom:calc(var(--sd-base-padding)*1);animation-fill-mode:forwards;animation-name:fadeIn,moveInWithOverflow;min-height:0!important}.sd-paneldynamic__panel-wrapper--enter{animation-delay:var(--sjs-pd-list-fade-in-delay,.25s),0s,0s;animation-duration:var(--sjs-pd-list-fade-in-duration,.5s),var(--sjs-pd-list-move-in-duration,.25s),var(--sjs-pd-list-move-in-duration,.25s);animation-timing-function:ease-out;opacity:0}.sd-paneldynamic__panel-wrapper--leave{--animation-padding-bottom:calc(var(--sd-base-padding)*1);animation-delay:0s,var(--sjs-pd-list-move-out-delay,.1s),var(--sjs-pd-list-move-out-delay,.1s);animation-direction:reverse;animation-duration:var(--sjs-pd-list-fade-out-duration,.15s),var(--sjs-pd-list-move-out-duration,.25s),var(--sjs-pd-list-move-out-duration,.25s);animation-timing-function:ease-in}.sd-file{box-sizing:border-box;font-size:var(--sjs-font-size,16px);line-height:calc((var(--sjs-font-size, 16px))*1.5);min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*36);padding:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);position:relative}.sd-file .sv-action-bar{bottom:0;justify-content:center;left:0;padding:var(--sjs-base-unit,var(--base-unit,8px)) 0;position:absolute;width:100%}.sd-file .sv-action-bar .sv-action-bar-item{border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-file .sv-action-bar #fileIndex .sv-action-bar-item{font-weight:600;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) 0}.sd-file .sv-action-bar #fileIndex .sv-action-bar-item:hover{background-color:var(--sjs-general-backcolor,var(--background,#fff))}.sd-file .sv-action-bar #fileIndex .sv-action-bar-item:disabled{opacity:1}.sd-file__decorator{align-items:center;border:1px dashed var(--sjs-border-default,var(--border,#d6d6d6));box-sizing:border-box;container-type:inline-size;display:flex;flex-direction:column;height:100%;justify-content:center;left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0);position:absolute;width:100%}.sd-file--answered .sd-file__decorator{container-type:unset}.sd-file__decorator--drag{background:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)));border:1px solid var(--sjs-primary-backcolor,var(--primary,#19b394));box-shadow:inset 0 0 0 1px var(--sjs-primary-backcolor,var(--primary,#19b394));z-index:1}.sd-file__no-file-chosen{display:none}.sd-file__drag-area-placeholder{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));color:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));font-size:var(--sjs-internal-font-editorfont-size);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5);padding:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*8);text-align:center;white-space:normal}@container (max-width: 496px){.sd-file__drag-area-placeholder{padding:0 var(--sjs-base-unit,var(--base-unit,8px))}}@container (max-width: 176px){.sd-file__drag-area-placeholder{display:none}.sd-file__decorator .sd-action{padding:var(--sjs-base-unit,var(--base-unit,8px))}.sd-file__decorator .sd-action .sv-svg-icon{margin-left:0}.sd-file__decorator .sd-file__actions-container{flex-direction:column}.sd-file__decorator .sd-file__actions-container span{display:none}}.sd-root-modern--mobile .sd-file__decorator{padding:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-file__choose-btn--text{color:var(--sjs-primary-backcolor,var(--primary,#19b394));cursor:pointer;display:block;font-weight:600}.sd-file__choose-btn--text .sv-svg-icon{fill:var(--sjs-primary-backcolor,var(--primary,#19b394));height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-file__choose-btn--icon>span{display:none}.sd-file__wrapper{max-width:100%;width:max-content}.sd-question--answered .sd-file__drag-area-placeholder{display:none}.sd-file__actions-container{flex-wrap:wrap;justify-content:center;margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sd-file__actions-container .sv-action--hidden{display:none}.sd-file--answered .sd-file__actions-container{gap:var(--sjs-base-unit,var(--base-unit,8px));margin-top:0;position:absolute;right:var(--sjs-base-unit,var(--base-unit,8px));top:var(--sjs-base-unit,var(--base-unit,8px));z-index:2}.sd-file--chose-btn--as .sd-file--answered .sd-file__actions-container{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));inset-inline-end:calc((var(--sjs-internal-font-editorfont-size))*1.5 + (var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sd-file__list{box-sizing:content-box;display:flex;flex-direction:row;max-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*15);min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*15);overflow:hidden;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*10.5) 0;position:relative;width:100%}.sd-file__page{align-items:stretch;display:flex;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);height:calc(100% - var(--sjs-base-unit, var(--base-unit, 8px))*21);justify-content:center;left:0;position:absolute;width:100%}@keyframes file-page-to-right{0%{left:0;opacity:1}to{left:100%;opacity:0}}@keyframes file-page-from-right{0%{left:100%;opacity:0}to{left:0;opacity:1}}@keyframes file-page-from-left{0%{left:-100%;opacity:0}to{left:0;opacity:1}}@keyframes file-page-to-left{0%{left:0;opacity:1}to{left:-100%;opacity:0}}.sd-file__page--enter-from-left,.sd-file__page--enter-from-right,.sd-file__page--leave-to-left,.sd-file__page--leave-to-right{animation-duration:.5s;animation-fill-mode:forwards}.sd-file__page--leave-to-right{animation-name:file-page-to-right}.sd-file__page--enter-from-right{animation-name:file-page-from-right}.sd-file__page--leave-to-left{animation-name:file-page-to-left}.sd-file__page--enter-from-left{animation-name:file-page-from-left}.sd-file__preview-item{align-items:stretch;cursor:pointer;display:flex;flex-direction:column;margin:0;min-height:100%;position:relative;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12)}.sd-file__preview-item .sd-file__default-image{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*9);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*9)}.sd-file__preview-item .sd-file__default-image use{fill:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)))}.sd-file__preview-item:hover .sd-file__remove-file-button{opacity:1}.sd-file__preview-item:hover .sd-file__sign a{text-decoration:underline}.sd-file__sign{font-size:calc((var(--sjs-font-size, 16px))*.75);margin-top:var(--sjs-base-unit,var(--base-unit,8px));text-align:center}.sd-file__sign,.sd-file__sign a{line-height:var(--sjs-font-size,16px)}.sd-file__sign a{-webkit-line-clamp:3;-webkit-box-orient:vertical;color:var(--sjs-font-questiontitle-color,var(--sjs-general-forecolor,var(--foreground,#161616)));display:block;display:-webkit-box;max-height:calc((var(--sjs-font-size, 16px))*3);max-width:100%;min-width:100%;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:normal;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12);word-break:break-all}.sd-file__remove-file-button{display:block;left:100%;opacity:0;position:absolute;top:0;transform:translate(-50%,-50%);transition:opacity var(--sjs-transition-duration,.15s)}.sd-file__image-wrapper--default-image .sd-file__remove-file-button{left:50%;top:50%;transform:translate(calc(var(--sjs-base-unit, var(--base-unit, 8px))*3.5 - 50% - 1.5px),calc(var(--sjs-base-unit, var(--base-unit, 8px))*-4.25 - 50% + 1.5px))}.sd-file__decorator--error{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)))}.sd-file__image-wrapper{align-items:center;background:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));display:flex;justify-content:center;min-height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12);position:relative;text-align:center}.sd-file__image-wrapper,.sd-file__image-wrapper img:not(.sd-file__default-image){height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12)}.sd-file__image-wrapper img:not(.sd-file__default-image){display:block;max-height:100%;max-width:100%;object-fit:contain}.sd-file__image-wrapper--default-image{background:transparent}.sd-file--single .sd-file__preview-item .sd-file__remove-file-button{display:none}.sd-file--single-image{height:calc(var(--sjs-base-unit, var(--base-unit, 8px))*36)}.sd-file--single-image .sd-file__page{height:100%}.sd-file--single-image .sd-file__preview-item{margin:0;width:100%}.sd-file--single-image .sd-file__list{height:100%;left:0;max-height:100%;padding:0;position:absolute;width:100%}.sd-file--single-image .sd-file__image-wrapper{background-color:var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9));min-height:100%;min-width:100%}.sd-file--single-image .sd-file__image-wrapper img{height:100%;width:100%}.sd-file--single-image .sd-file__sign{margin:0;min-height:100%;position:absolute;width:100%}.sd-file--single-image .sd-file__sign a{color:transparent;height:100%;max-width:100%;min-width:100%;outline:none;width:100%}.sd-file__image-wrapper.sd-file__image-wrapper--default-image{background:transparent}.sd-file>input:focus+.sd-file__decorator .sd-file__choose-btn.sd-file__choose-btn--icon use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-file>input:focus+.sd-file__decorator .sd-file__choose-btn:not(.sd-file__choose-btn--icon){background-color:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)))}.sd-file__drag-area{position:static;width:100%}.sd-file__change-camera-button{left:var(--sjs-base-unit,var(--base-unit,8px))}.sd-file__change-camera-button,.sd-file__close-camera-button{position:absolute;top:var(--sjs-base-unit,var(--base-unit,8px));z-index:2}.sd-file__close-camera-button{right:var(--sjs-base-unit,var(--base-unit,8px))}.sd-context-btn.sd-file__take-picture-button{background-color:var(--sjs-special-red,var(--red,#e60a3e));bottom:16px;left:50%;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);position:absolute;transform:translateX(-50%)}.sd-context-btn.sd-file__take-picture-button:focus,.sd-context-btn.sd-file__take-picture-button:hover{box-shadow:0 0 0 2px var(--sjs-special-red,var(--red,#e60a3e))}.sd-context-btn.sd-file__take-picture-button .sv-svg-icon{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-context-btn.sd-file__take-picture-button .sv-svg-icon use{fill:var(--sjs-general-backcolor,var(--background,#fff))}.sd-file__video-container{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8));height:100%;left:0;position:absolute;top:0;width:100%}.sd-file__loading-indicator{border:1px dashed var(--sjs-border-default,var(--border,#d6d6d6));box-sizing:border-box;height:100%;left:0;position:absolute;width:100%}.sd-file__loading-indicator .sd-loading-indicator{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.sd-file__choose-file-btn--disabled{cursor:default;opacity:.25}.sd-file--readonly .sd-context-btn{display:none}.sd-file--readonly .sd-file__decorator{border-color:transparent}.sd-file--readonly .sd-file__actions-container{display:none}.sd-file--readonly .sd-file__image-wrapper{background:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sd-file--readonly .sd-file__drag-area-placeholder{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-file--preview .sd-context-btn{display:none}.sd-file--preview .sd-file__decorator{border-color:transparent}.sd-file--preview .sd-file__image-wrapper{background:transparent}.sd-file--preview .sd-file__actions-container{display:none}.sd-file--preview .sd-file__drag-area-placeholder{color:var(--sjs-general-forecolor,var(--foreground,#161616))}.sd-hidden{display:none!important}.sd-body__navigation .sd-btn{font-size:var(--sjs-font-questiontitle-size,var(--sjs-font-size,16px));line-height:calc((var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)))*1.5);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*8)}.sd-root--compact .sd-body__navigation .sd-btn:not(.sd-btn--action){background-color:var(--sjs-general-backcolor-dim-light,var(--background-dim-light,#f9f9f9))}.sd-root--compact .sd-body__navigation .sd-btn:not(.sd-btn--action):hover{background-color:var(--sjs-editorpanel-hovercolor,var(--sjs-general-backcolor-dim-dark,#f3f3f3))}.sd-root-modern--mobile .sd-body__navigation .sd-btn,.sd-root-modern--mobile .sd-body__navigation .sv-action:not(.sv-action--hidden){flex-grow:1}.sd-root-modern--mobile .sd-body__navigation .sd-btn{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-body__navigation .sv-action--hidden{display:none}.sd-btn{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));border:none;border-radius:var(--sjs-corner-radius,4px);box-shadow:var(--sjs-shadow-small,0 1px 2px 0 rgba(0,0,0,.15)),0 0 0 0 var(--sjs-primary-backcolor,var(--primary,#19b394));color:var(--sjs-primary-backcolor,var(--primary,#19b394));cursor:pointer;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-size,16px);font-style:normal;font-weight:600;line-height:calc((var(--sjs-font-size, 16px))*1.5);outline:none;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6);text-align:center;transition:box-shadow var(--sjs-transition-duration,.15s),background var(--sjs-transition-duration,.15s)}.sd-btn--small{flex-grow:1;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-btn:hover{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sd-btn:focus-visible{box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-btn:disabled{color:var(--sjs-general-forecolor,var(--foreground,#161616));opacity:.25;pointer-events:none}.sd-btn--action{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-btn--action,.sd-btn--action:hover{color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff))}.sd-btn--action:hover{background-color:var(--sjs-primary-backcolor-dark,#14a48b)}.sd-btn--action:disabled{color:var(--sjs-primary-forecolor-light,var(--primary-foreground-disabled,hsla(0,0%,100%,.25)));pointer-events:none}.sd-btn--danger,.sd-btn--danger:hover{background-color:var(--sjs-special-red,var(--red,#e60a3e));color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff))}.sd-btn--danger:disabled{color:var(--sjs-special-red-forecolor,#fff);pointer-events:none}.sd-body{box-sizing:border-box;width:100%}.sd-body .sd-body__page{min-width:min(100%,300px)}.sd-body .sd-body__timer{box-sizing:border-box;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) 0}.sd-body.sd-body--static{margin-left:auto;margin-right:auto;max-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*90);padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*10);padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sd-body.sd-body--static .sd-body__navigation,.sd-body.sd-body--static .sd-body__page,.sd-body.sd-body--static .sd-body__timer{margin-left:0;margin-right:0}.sd-body.sd-body--static .sd-body__navigation{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-body.sd-body--static .sd-body__navigation.sd-action-bar{padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);padding-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sd-body.sd-body--responsive{box-sizing:border-box;max-width:none;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-body.sd-body--responsive .sd-page{padding:0}.sd-body.sd-body--responsive .sd-body__navigation,.sd-body.sd-body--responsive .sd-body__timer{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) 0}.sd-body.sd-body--responsive .sd-body__navigation{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4)}.sd-body.sd-body--responsive.sd-body--with-timer{margin-left:auto;margin-right:auto;max-width:calc(100% + var(--sd-timer-size)*-1.44444 + var(--sjs-base-unit, var(--base-unit, 8px))*6)}.sd-root-modern--mobile .sd-body.sd-body--with-timer.sd-body--responsive{margin-left:0;margin-right:0;max-width:none}.sd-root-modern--mobile .sd-body.sd-body--responsive,.sd-root-modern--mobile .sd-body.sd-body--static{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-root-modern--mobile .sd-body.sd-body--responsive .sd-body__navigation,.sd-root-modern--mobile .sd-body.sd-body--static .sd-body__navigation{padding-bottom:0;padding-left:0;padding-right:0}.sd-root--compact .sd-body.sd-body--responsive .sd-body__navigation,.sd-root--compact .sd-body.sd-body--static .sd-body__navigation{padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*7)}.sd-body__navigation.sd-action-bar{box-sizing:border-box;flex-wrap:wrap;gap:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-body--empty{box-sizing:border-box;min-height:400px;padding-top:180px;text-align:center}.sd-body--empty,.sd-body--loading{color:var(--sjs-font-pagetitle-color,var(--sjs-general-dim-forecolor,rgba(0,0,0,.91)));font-size:var(--sjs-article-font-default-fontSize,var(--sjs-font-size,16px));font-stretch:var(--sjs-article-font-default-fontStretch,"normal");font-style:var(--sjs-article-font-default-fontStyle,"normal");font-weight:var(--sjs-article-font-default-fontWeight,400);letter-spacing:var(--sjs-article-font-default-letterSpacing,0);line-height:var(--sjs-article-font-default-lineHeight,28px);text-decoration:var(--sjs-article-font-default-textDecoration,"none");text-indent:var(--sjs-article-font-default-paragraphIndent,0);text-transform:var(--sjs-article-font-default-textCase,"none")}.sd-body--empty,.sd-body--empty h1,.sd-body--loading,.sd-body--loading h1{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)))}.sd-body--empty h1,.sd-body--loading h1{font-size:var(--sjs-article-font-xx-large-fontSize,calc((var(--sjs-font-size, 16px))*4));font-stretch:var(--sjs-article-font-xx-large-fontStretch,"normal");font-style:var(--sjs-article-font-xx-large-fontStyle,"normal");font-weight:var(--sjs-article-font-xx-large-fontWeight,700);letter-spacing:var(--sjs-article-font-xx-large-letterSpacing,0);line-height:var(--sjs-article-font-xx-large-lineHeight,64px);text-decoration:var(--sjs-article-font-xx-large-textDecoration,"none");text-indent:var(--sjs-article-font-xx-large-paragraphIndent,0);text-transform:var(--sjs-article-font-xx-large-textCase,"none")}.sd-body--empty h2,.sd-body--loading h2{font-size:var(--sjs-article-font-x-large-fontSize,calc((var(--sjs-font-size, 16px))*3));font-stretch:var(--sjs-article-font-x-large-fontStretch,"normal");font-style:var(--sjs-article-font-x-large-fontStyle,"normal");font-weight:var(--sjs-article-font-x-large-fontWeight,700);letter-spacing:var(--sjs-article-font-x-large-letterSpacing,0);line-height:var(--sjs-article-font-x-large-lineHeight,56px);text-decoration:var(--sjs-article-font-x-large-textDecoration,"none");text-indent:var(--sjs-article-font-x-large-paragraphIndent,0);text-transform:var(--sjs-article-font-x-large-textCase,"none")}.sd-body--empty h2,.sd-body--empty h3,.sd-body--loading h2,.sd-body--loading h3{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)))}.sd-body--empty h3,.sd-body--loading h3{font-size:var(--sjs-article-font-large-fontSize,calc((var(--sjs-font-size, 16px))*2));font-stretch:var(--sjs-article-font-large-fontStretch,"normal");font-style:var(--sjs-article-font-large-fontStyle,"normal");font-weight:var(--sjs-article-font-large-fontWeight,700);letter-spacing:var(--sjs-article-font-large-letterSpacing,0);line-height:var(--sjs-article-font-large-lineHeight,40px);text-decoration:var(--sjs-article-font-large-textDecoration,"none");text-indent:var(--sjs-article-font-large-paragraphIndent,0);text-transform:var(--sjs-article-font-large-textCase,"none")}.sd-body--empty h4,.sd-body--empty h5,.sd-body--empty h6,.sd-body--loading h4,.sd-body--loading h5,.sd-body--loading h6{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-medium-fontSize,calc((var(--sjs-font-size, 16px))*1.5));font-stretch:var(--sjs-article-font-medium-fontStretch,"normal");font-style:var(--sjs-article-font-medium-fontStyle,"normal");font-weight:var(--sjs-article-font-medium-fontWeight,700);letter-spacing:var(--sjs-article-font-medium-letterSpacing,0);line-height:var(--sjs-article-font-medium-lineHeight,32px);text-decoration:var(--sjs-article-font-medium-textDecoration,"none");text-indent:var(--sjs-article-font-medium-paragraphIndent,0);text-transform:var(--sjs-article-font-medium-textCase,"none")}.sd-body--empty div,.sd-body--empty p,.sd-body--empty span,.sd-body--empty td,.sd-body--loading div,.sd-body--loading p,.sd-body--loading span,.sd-body--loading td{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-default-fontSize,var(--sjs-font-size,16px));font-stretch:var(--sjs-article-font-default-fontStretch,"normal");font-style:var(--sjs-article-font-default-fontStyle,"normal");font-weight:var(--sjs-article-font-default-fontWeight,400);letter-spacing:var(--sjs-article-font-default-letterSpacing,0);line-height:var(--sjs-article-font-default-lineHeight,28px);text-decoration:var(--sjs-article-font-default-textDecoration,"none");text-indent:var(--sjs-article-font-default-paragraphIndent,0);text-transform:var(--sjs-article-font-default-textCase,"none")}.sd-body--empty a,.sd-body--empty button,.sd-body--loading a,.sd-body--loading button{color:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-body--empty button,.sd-body--loading button{align-items:center;background-color:var(--sjs-general-backcolor,var(--background,#fff));border:none;border-radius:var(--sjs-corner-radius,4px);box-shadow:var(--sjs-shadow-small,0 1px 2px 0 rgba(0,0,0,.15)),0 0 0 0 var(--sjs-primary-backcolor,var(--primary,#19b394));cursor:pointer;display:flex;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-questiontitle-size,var(--sjs-font-size,16px));font-style:normal;font-weight:600;line-height:calc((var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)))*1.5);outline:solid calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) transparent;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);text-align:center;transition:box-shadow var(--sjs-transition-duration,.15s);user-select:none;vertical-align:baseline}.sd-body--empty button:hover,.sd-body--loading button:hover{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sd-body--empty button:focus,.sd-body--loading button:focus{box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-body--empty button span,.sd-body--loading button span{align-items:center;display:flex;flex-grow:1;justify-content:center}.sd-root_background-image{background-position-x:center;bottom:0;left:0;position:absolute;right:0;top:0}.sd-multipletext{border-spacing:0;height:1px;table-layout:fixed;width:100%}.sd-multipletext__cell{height:100%}.sd-multipletext__cell:not(:first-of-type){padding-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-multipletext__item-container.sd-input:focus-within{box-shadow:var(--sjs-shadow-inner-reset,inset 0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-multipletext__item-container{align-items:flex-start;display:flex;height:100%;padding-bottom:0;padding-top:0}.sd-multipletext__item-container .sd-input{border:none;box-shadow:none;padding-bottom:0;padding-right:0;padding-top:0}.sd-multipletext__item-container .sd-input,.sd-multipletext__item-title{margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}.sd-multipletext__item-title{font-size:0;line-height:0}.sd-multipletext__item-title span{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));font-size:var(--sjs-internal-font-editorfont-size);line-height:calc((var(--sjs-internal-font-editorfont-size))*1.5)}.sd-multipletext__item-title{border-right:1px solid var(--sjs-border-default,var(--border,#d6d6d6));box-sizing:content-box;color:var(--sjs-font-editorfont-placeholdercolor,var(--sjs-general-forecolor-light,var(--foreground-light,#909090)));height:calc(100% - var(--sjs-base-unit, var(--base-unit, 8px))*3);max-width:30%;padding-right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);white-space:normal}.sd-question--preview .sd-multipletext__item-title{border:none}.sd-multipletext__item{flex-grow:1}.sd-multipletext__content .sd-multipletext__item-container{position:relative}.sd-multipletext__item-container--error{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)))}.sd-multipletext__item-container--error .sd-input--error{background-color:transparent}.sd-multipletext-item__character-counter{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-question__content:focus-within .sd-multipletext-item__character-counter{padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*8)}.sd-multipletext__cell{padding-bottom:var(--sjs-base-unit,var(--base-unit,8px));padding-left:0;padding-right:0;padding-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-multipletext__cell--error-bottom,.sd-multipletext__row:first-of-type .sd-multipletext__cell{padding-top:0}.sd-multipletext__cell--error-top,.sd-multipletext__row:last-of-type .sd-multipletext__cell{padding-bottom:0}.sd-multipletext__cell--error .sd-question__erbox{margin:0}.sd-action,.sd-multipletext .sd-input .sd-input{background:transparent}.sd-action{align-items:center;appearance:none;border:none;border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);box-sizing:content-box;color:var(--sjs-primary-backcolor,var(--primary,#19b394));display:flex;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-questiontitle-size,var(--sjs-font-size,16px));font-style:normal;font-weight:600;gap:var(--sjs-base-unit,var(--base-unit,8px));line-height:calc((var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)))*1.5);outline:none;padding:var(--sjs-base-unit,var(--base-unit,8px)) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);transition:background-color var(--sjs-transition-duration,.15s)}.sd-action--negative{color:var(--sjs-special-red,var(--red,#e60a3e))}.sd-action--icon{padding:var(--sjs-base-unit,var(--base-unit,8px))}.sd-action__icon{margin-left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1)}.sd-action__icon use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-action--icon .sd-action__icon{margin-left:0}.sd-action--icon use{transition:fill var(--sjs-transition-duration,.15s)}.sd-action--icon use,svg.sd-action--icon{fill:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)))}.sd-action--disabled,.sd-action:disabled{color:var(--sjs-general-forecolor,var(--foreground,#161616));cursor:default;opacity:.25;pointer-events:none}.sd-action--disabled use,.sd-action:disabled use{fill:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)))}.sd-action:not(.sd-action--pressed):focus,.sd-action:not(.sd-action--pressed):hover{background-color:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)));cursor:pointer;opacity:1;outline:none}.sd-action:not(.sd-action--pressed):focus.sd-action--icon,.sd-action:not(.sd-action--pressed):hover.sd-action--icon{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3))}.sd-action:not(.sd-action--pressed):focus.sd-action--negative,.sd-action:not(.sd-action--pressed):hover.sd-action--negative{background-color:var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)))}.sd-action:not(.sd-action--pressed):focus.sd-action--negative.sd-action--icon use,.sd-action:not(.sd-action--pressed):hover.sd-action--negative.sd-action--icon use{fill:var(--sjs-special-red,var(--red,#e60a3e))}.sd-action:not(.sd-action--pressed):focus:active,.sd-action:not(.sd-action--pressed):hover:active{opacity:.5}.sd-action__icon{display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-action--pressed:not(.sd-action--active){background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));opacity:.5}.sd-action-bar>.sv-dots{width:auto}.sd-action-bar>.sv-action--hidden{width:0}.sd-action.sv-dots__item{width:auto}.sd-action-bar{align-items:center;display:flex}.sd-action-bar .sv-action:not(:last-child) .sv-action__content{padding-right:0}.sd-context-btn{background-color:var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff))));border:none;border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*12.5);cursor:pointer;outline:none;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}.sd-context-btn .sv-svg-icon{margin:0}.sd-context-btn svg{--sjs-internal-font-editorfont-size:var(--sjs-mobile-font-editorfont-size,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)));display:block;height:calc((var(--sjs-internal-font-editorfont-size))*1.5);width:calc((var(--sjs-internal-font-editorfont-size))*1.5)}.sd-context-btn use{fill:var(--sjs-font-questiondescription-color,var(--sjs-general-forecolor-light,rgba(0,0,0,.45)));transition:fill var(--sjs-transition-duration,.15s)}.sd-context-btn:focus use,.sd-context-btn:hover use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-context-btn:focus.sd-context-btn--negative use,.sd-context-btn:hover.sd-context-btn--negative use{fill:var(--sjs-special-red,var(--red,#e60a3e))}.sd-context-btn:disabled{opacity:.25}.sd-context-btn--small{padding:var(--sjs-base-unit,var(--base-unit,8px))}.sd-context-btn--small svg{height:var(--sjs-internal-font-editorfont-size);width:var(--sjs-internal-font-editorfont-size)}.sd-context-btn--with-border{--box-shadow-color:var(--sjs-border-default,var(--border,#d6d6d6));box-shadow:0 0 0 1px var(--box-shadow-color)}.sd-context-btn--colorful use{fill:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-context-btn--colorful.sd-context-btn--negative use{fill:var(--sjs-special-red,var(--red,#e60a3e))}.sd-context-btn--colorful:focus,.sd-context-btn--colorful:hover{background:linear-gradient(var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1))),var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)))),linear-gradient(var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff)))),var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff)))))}.sd-context-btn--colorful:focus.sd-context-btn--negative,.sd-context-btn--colorful:hover.sd-context-btn--negative{background:linear-gradient(var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1))),var(--sjs-special-red-light,var(--red-light,rgba(230,10,62,.1)))),linear-gradient(var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff)))),var(--sjs-questionpanel-backcolor,var(--sjs-question-background,var(--sjs-general-backcolor,var(--background,#fff)))))}.sd-context-btn--colorful:focus.sd-context-btn--with-border,.sd-context-btn--colorful:hover.sd-context-btn--with-border{--box-shadow-color:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-context-btn--colorful:focus.sd-context-btn--with-border.sd-context-btn--negative,.sd-context-btn--colorful:hover.sd-context-btn--with-border.sd-context-btn--negative{--box-shadow-color:var(--sjs-special-red,var(--red,#e60a3e))}.sd-completed-before-page,.sd-completedpage{align-items:center;box-sizing:border-box;color:var(--sjs-font-pagetitle-color,var(--sjs-general-dim-forecolor,rgba(0,0,0,.91)));font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-default-fontSize,var(--sjs-font-size,16px));font-stretch:var(--sjs-article-font-default-fontStretch,"normal");font-style:var(--sjs-article-font-default-fontStyle,"normal");font-weight:700;font-weight:var(--sjs-article-font-default-fontWeight,400);height:auto;letter-spacing:var(--sjs-article-font-default-letterSpacing,0);line-height:var(--sjs-article-font-default-lineHeight,28px);text-align:center;text-decoration:var(--sjs-article-font-default-textDecoration,"none");text-indent:var(--sjs-article-font-default-paragraphIndent,0);text-transform:var(--sjs-article-font-default-textCase,"none")}.sd-completed-before-page h1,.sd-completedpage h1{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-xx-large-fontSize,calc((var(--sjs-font-size, 16px))*4));font-stretch:var(--sjs-article-font-xx-large-fontStretch,"normal");font-style:var(--sjs-article-font-xx-large-fontStyle,"normal");font-weight:var(--sjs-article-font-xx-large-fontWeight,700);letter-spacing:var(--sjs-article-font-xx-large-letterSpacing,0);line-height:var(--sjs-article-font-xx-large-lineHeight,64px);text-decoration:var(--sjs-article-font-xx-large-textDecoration,"none");text-indent:var(--sjs-article-font-xx-large-paragraphIndent,0);text-transform:var(--sjs-article-font-xx-large-textCase,"none")}.sd-completed-before-page h2,.sd-completedpage h2{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-x-large-fontSize,calc((var(--sjs-font-size, 16px))*3));font-stretch:var(--sjs-article-font-x-large-fontStretch,"normal");font-style:var(--sjs-article-font-x-large-fontStyle,"normal");font-weight:var(--sjs-article-font-x-large-fontWeight,700);letter-spacing:var(--sjs-article-font-x-large-letterSpacing,0);line-height:var(--sjs-article-font-x-large-lineHeight,56px);text-decoration:var(--sjs-article-font-x-large-textDecoration,"none");text-indent:var(--sjs-article-font-x-large-paragraphIndent,0);text-transform:var(--sjs-article-font-x-large-textCase,"none")}.sd-completed-before-page h3,.sd-completedpage h3{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-large-fontSize,calc((var(--sjs-font-size, 16px))*2));font-stretch:var(--sjs-article-font-large-fontStretch,"normal");font-style:var(--sjs-article-font-large-fontStyle,"normal");font-weight:var(--sjs-article-font-large-fontWeight,700);letter-spacing:var(--sjs-article-font-large-letterSpacing,0);line-height:var(--sjs-article-font-large-lineHeight,40px);text-decoration:var(--sjs-article-font-large-textDecoration,"none");text-indent:var(--sjs-article-font-large-paragraphIndent,0);text-transform:var(--sjs-article-font-large-textCase,"none")}.sd-completed-before-page h4,.sd-completed-before-page h5,.sd-completed-before-page h6,.sd-completedpage h4,.sd-completedpage h5,.sd-completedpage h6{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-medium-fontSize,calc((var(--sjs-font-size, 16px))*1.5));font-stretch:var(--sjs-article-font-medium-fontStretch,"normal");font-style:var(--sjs-article-font-medium-fontStyle,"normal");font-weight:var(--sjs-article-font-medium-fontWeight,700);letter-spacing:var(--sjs-article-font-medium-letterSpacing,0);line-height:var(--sjs-article-font-medium-lineHeight,32px);text-decoration:var(--sjs-article-font-medium-textDecoration,"none");text-indent:var(--sjs-article-font-medium-paragraphIndent,0);text-transform:var(--sjs-article-font-medium-textCase,"none")}.sd-completed-before-page div,.sd-completed-before-page p,.sd-completed-before-page span,.sd-completed-before-page td,.sd-completedpage div,.sd-completedpage p,.sd-completedpage span,.sd-completedpage td{font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-article-font-default-fontSize,var(--sjs-font-size,16px));font-stretch:var(--sjs-article-font-default-fontStretch,"normal");font-style:var(--sjs-article-font-default-fontStyle,"normal");font-weight:var(--sjs-article-font-default-fontWeight,400);letter-spacing:var(--sjs-article-font-default-letterSpacing,0);line-height:var(--sjs-article-font-default-lineHeight,28px);text-decoration:var(--sjs-article-font-default-textDecoration,"none");text-indent:var(--sjs-article-font-default-paragraphIndent,0);text-transform:var(--sjs-article-font-default-textCase,"none")}.sd-completed-before-page a,.sd-completedpage a{color:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-completed-before-page button,.sd-completedpage button{align-items:center;background-color:var(--sjs-general-backcolor,var(--background,#fff));border:none;border-radius:var(--sjs-corner-radius,4px);box-shadow:var(--sjs-shadow-small,0 1px 2px 0 rgba(0,0,0,.15)),0 0 0 0 var(--sjs-primary-backcolor,var(--primary,#19b394));color:var(--sjs-primary-backcolor,var(--primary,#19b394));cursor:pointer;display:flex;font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));font-size:var(--sjs-font-questiontitle-size,var(--sjs-font-size,16px));font-style:normal;font-weight:600;line-height:calc((var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)))*1.5);outline:solid calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25) transparent;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);text-align:center;transition:box-shadow var(--sjs-transition-duration,.15s);user-select:none;vertical-align:baseline}.sd-completed-before-page button:hover,.sd-completedpage button:hover{background-color:var(--sjs-questionpanel-hovercolor,var(--sjs-general-backcolor-dark,#f8f8f8))}.sd-completed-before-page button:focus,.sd-completedpage button:focus{box-shadow:var(--sjs-shadow-small-reset,0 0 0 0 rgba(0,0,0,.15)),0 0 0 2px var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-completed-before-page button span,.sd-completedpage button span{align-items:center;display:flex;flex-grow:1;justify-content:center}.sd-completedpage:after,.sd-completedpage:before{content:"";display:block;margin-left:calc(50% - var(--sjs-base-unit, var(--base-unit, 8px))*4.5);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*9)}.sd-completedpage:before{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*13)}.sd-completedpage:after{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-progress-buttons__image-button-left,.sd-progress-buttons__image-button-right{display:none}.sd-progress-buttons__image-button--hidden{visibility:hidden}.sd-progress-buttons__page-description{display:none}.sd-progress-buttons{display:flex;flex-direction:column;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sd-progress-buttons__list-container{display:flex;margin:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.75);overflow:hidden}.sd-progress-buttons__connector{display:none}.sd-progress-buttons__list{display:inline-flex;flex-direction:row;flex-grow:1;margin:0 auto;padding:0}.sd-progress-buttons__list li{cursor:pointer;display:flex;flex-basis:0;flex-direction:column;flex-grow:1;flex-shrink:1;flex-wrap:nowrap;position:relative;text-align:center}.sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector{background-color:var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45));bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.125);content:"";display:block;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25);opacity:.5;pointer-events:none;position:absolute;right:calc(50% + 10px);width:calc(100% - 20px)}.sd-progress-buttons__list li .sd-progress-buttons__button{align-self:center;border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) solid transparent;border-radius:50%;box-sizing:content-box;color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));content:attr(data-page-number);display:flex;font-size:calc((var(--sjs-font-size, 16px))*.75);font-weight:600;height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0);justify-content:center;line-height:var(--sjs-font-size,16px);margin:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.75);position:relative;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*0);z-index:1}.sd-progress-buttons__list li .sd-progress-buttons__button .sd-progress-buttons__button-background{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1.25);position:absolute;top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.5);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2.5);z-index:-2}.sd-progress-buttons__list li .sd-progress-buttons__button .sd-progress-buttons__button-content{background-color:var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45));border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) solid transparent;border-radius:50%;box-sizing:content-box;height:100%;left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.5);opacity:.5;position:absolute;top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.5);width:100%;z-index:-1}.sd-progress-buttons__list li:hover .sd-progress-buttons__button{background-color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) solid var(--sjs-primary-backcolor,var(--primary,#19b394));color:var(--sjs-primary-backcolor,var(--primary,#19b394));margin:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sd-progress-buttons__list li:hover .sd-progress-buttons__button .sd-progress-buttons__button-background{left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.75)}.sd-progress-buttons__list li:hover .sd-progress-buttons__button .sd-progress-buttons__button-content{background-color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.75) solid var(--sjs-primary-backcolor,var(--primary,#19b394));left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.75);opacity:1;top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.75)}.sd-progress-buttons__list .sd-progress-buttons__list-element--passed:not(:first-child)>.sd-progress-buttons__connector{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));opacity:1}.sd-progress-buttons__list .sd-progress-buttons__list-element--passed .sd-progress-buttons__button{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394))}.sd-progress-buttons__list .sd-progress-buttons__list-element--current:not(:first-child)>.sd-progress-buttons__connector,.sd-progress-buttons__list .sd-progress-buttons__list-element--passed .sd-progress-buttons__button .sd-progress-buttons__button-content{background-color:var(--sjs-primary-backcolor,var(--primary,#19b394));opacity:1}.sd-progress-buttons__list .sd-progress-buttons__list-element--current .sd-progress-buttons__button{background-color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) solid var(--sjs-primary-backcolor,var(--primary,#19b394));color:var(--sjs-primary-backcolor,var(--primary,#19b394));margin:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.25);padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sd-progress-buttons__list .sd-progress-buttons__list-element--current .sd-progress-buttons__button .sd-progress-buttons__button-background{left:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.75)}.sd-progress-buttons__list .sd-progress-buttons__list-element--current .sd-progress-buttons__button .sd-progress-buttons__button-content{background-color:var(--sjs-primary-forecolor,var(--primary-foreground,#fff));border:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5) solid var(--sjs-primary-backcolor,var(--primary,#19b394));opacity:1}.sd-progress-buttons__page-title{align-items:center;color:var(--lbr-step-progress-bar-step-title-text-color,var(--sjs-font-pagetitle-color,var(--sjs-general-dim-forecolor,rgba(0,0,0,.91))));display:flex;flex-grow:1;font-size:calc((var(--sjs-font-size, 16px))*.75);font-weight:600;justify-content:center;line-height:var(--sjs-font-size,16px);margin-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);text-align:center}.sd-progress-buttons__header .sd-progress-buttons__page-title{margin-bottom:var(--sjs-base-unit,var(--base-unit,8px))}.sd-progress-buttons__footer .sd-progress-buttons__page-title{color:var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45));justify-content:flex-end;margin-bottom:0;margin-top:var(--sjs-base-unit,var(--base-unit,8px));padding:0}.sd-progress-buttons--bottom{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5)}.sd-progress-buttons--bottom,.sd-progress-buttons--bottom .sd-progress-buttons__list li{flex-direction:column-reverse}.sd-progress-buttons--bottom .sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector{top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.125)}.sd-progress-buttons--bottom .sd-progress-buttons__page-title{margin-bottom:0;margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-progress-buttons--bottom .sd-progress-buttons__header .sd-progress-buttons__page-title{margin-bottom:0;margin-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-progress-buttons--bottom .sd-progress-buttons__footer .sd-progress-buttons__page-title{margin-bottom:var(--sjs-base-unit,var(--base-unit,8px));margin-top:0}.sd-progress-buttons--numbered .sd-progress-buttons__list-container{margin:0 calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-1)}.sd-progress-buttons--numbered .sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector{bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2.175);right:calc(50% + 18px);width:calc(100% - 36px)}.sd-progress-buttons--numbered .sd-progress-buttons__list li .sd-progress-buttons__button{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-progress-buttons--numbered .sd-progress-buttons__list li .sd-progress-buttons__button .sd-progress-buttons__button-background{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4.5)}.sd-progress-buttons--numbered .sd-progress-buttons__list li:hover .sd-progress-buttons__button{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*.5)}.sd-progress-buttons--with-titles .sd-progress-buttons__list-container{margin:0}.sd-progress-buttons--no-titles .sd-progress-buttons__list,.sd-root-modern--mobile .sd-progress-buttons__list{justify-content:space-between;width:100%}.sd-progress-buttons--no-titles .sd-progress-buttons__list li,.sd-root-modern--mobile .sd-progress-buttons__list li{flex-grow:0}.sd-progress-buttons--bottom.sd-progress-buttons--numbered .sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector{top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2.175)}.sd-root-modern--mobile .sd-progress-buttons{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2) calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sd-progress-buttons--fit-survey-width{box-sizing:border-box;margin:auto;max-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*90);width:100%}[dir=rtl] .sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector,[style*="direction: rtl"] .sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector,[style*="direction:rtl"] .sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector{left:calc(50% + 10px);right:unset}[dir=rtl] .sd-progress-buttons--numbered .sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector,[style*="direction: rtl"] .sd-progress-buttons--numbered .sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector,[style*="direction:rtl"] .sd-progress-buttons--numbered .sd-progress-buttons__list li:not(:first-child)>.sd-progress-buttons__connector{left:calc(50% + 20px);right:unset}.sv_progress-toc{background:var(--lbr-toc-background-color,var(--sjs-general-backcolor,var(--background,#fff)));box-sizing:border-box;height:100%;max-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*42);min-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*32);padding:var(--lbr-toc-padding-top,var(--sjs-base-unit,var(--base-unit,8px))) var(--lbr-toc-padding-right,var(--sjs-base-unit,var(--base-unit,8px))) var(--lbr-toc-padding-bottom,var(--sjs-base-unit,var(--base-unit,8px))) var(--lbr-toc-padding-left,var(--sjs-base-unit,var(--base-unit,8px)))}.sv_progress-toc .sv-list{padding:0}.sv_progress-toc .sv-list__item.sv-list__item--selected .sv-list__item-body{background:var(--sjs-primary-backcolor-light,var(--primary-light,rgba(25,179,148,.1)));color:var(--sjs-general-forecolor,var(--foreground,#161616));font-weight:400}.sv_progress-toc .sv-list__item span{white-space:break-spaces}.sv_progress-toc .sv-list__item-body{border-radius:var(--sjs-corner-radius,4px);padding-inline-end:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5);padding-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2);padding-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}.sv_progress-toc use{fill:var(--sjs-general-forecolor-light,var(--foreground-light,#909090))}.sv_progress-toc--left{border-right:var(--lbr-toc-border-width-right,1px) solid var(--lbr-toc-border-color,var(--sjs-border-default,var(--border,#d6d6d6)))}.sv_progress-toc--right{border-left:var(--lbr-toc-border-width-right,1px) solid var(--lbr-toc-border-color,var(--sjs-border-default,var(--border,#d6d6d6)))}.sv_progress-toc--mobile{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));border-radius:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);height:auto;min-width:auto;position:fixed;right:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);width:auto;z-index:15}.sv_progress-toc--mobile>div{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv_progress-toc--mobile:hover{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3))}.sd-title+.sv-components-row>.sv-components-column .sv_progress-toc:not(.sv_progress-toc--mobile),.sd-title~.sv-components-row>.sv-components-column .sv_progress-toc:not(.sv_progress-toc--mobile){margin-top:2px}.sv_progress-toc.sv_progress-toc--sticky{height:auto;overflow-y:auto;position:sticky;top:0}.sd-list__item-body{border-radius:var(--sjs-corner-radius,4px);font-size:var(--sjs-font-size,16px);line-height:calc((var(--sjs-font-size, 16px))*1.5);padding-block:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)}.sd-list__item.sd-list__item--focused:not(.sd-list__item--selected){outline:none}.sd-list__item.sd-list__item--focused:not(.sd-list__item--selected) .sd-list__item-body{padding-block:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.25)}.sd-timer{background:#fff;border-radius:100%;bottom:calc(var(--sd-timer-size)/144*32);box-shadow:var(--sjs-shadow-large,0 8px 16px 0 rgba(0,0,0,.1)),var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1));box-sizing:border-box;display:flex;height:var(--sd-timer-size);margin-right:calc(var(--sd-timer-size)/144*32);padding:calc(var(--sd-timer-size)/144*8);position:fixed;right:var(--sjs-base-unit,var(--base-unit,8px));width:var(--sd-timer-size);z-index:2}.sd-timer--top{margin-bottom:calc(var(--sd-timer-size)*-1);margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*4);top:calc(var(--sd-timer-size)/144*32)}.sd-timer--bottom{bottom:calc(var(--sd-timer-size)/144*32);margin-top:calc(var(--sd-timer-size)*-1.22222)}.sd-timer__progress{--sd-timer-stroke-background-color:var(--background-dim,#f3f3f3);--sd-timer-stroke-background-width:2px;stroke-linecap:round;stroke:var(--sjs-primary-backcolor,var(--primary,#19b394));stroke-dashoffset:0;fill:none;stroke-width:4px;height:100%;transform:rotate(-90deg);width:100%}.sd-timer__progress--animation{stroke-dashoffset:0;transition:stroke-dashoffset 1s linear}.sd-timer__text-container{align-items:center;display:flex;flex-direction:column;left:50%;padding:var(--sjs-base-unit,var(--base-unit,8px));position:absolute;top:50%;transform:translate(-50%,-50%)}.sd-timer__text--major,.sd-timer__text-container{color:var(--sjs-primary-backcolor,var(--primary,#19b394));font-size:calc(var(--sd-timer-size)/144*32);font-weight:700}.sd-timer__text--minor{color:var(--lbr-timer-text-color-secondary,var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45)));font-size:var(--lbr-font-default-size,var(--sjs-font-size,16px));font-style:normal;font-weight:600;line-height:var(--lbr-font-default-line-height,calc((var(--sjs-font-size, 16px))*1.5));margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-.5)}.sv-header{background-color:var(--sjs-header-backcolor,transparent);position:relative}.sv-header__background-color--accent{background-color:var(--sjs-header-backcolor,var(--sjs-primary-backcolor,var(--primary,#19b394)))}.sv-header__overlap{box-sizing:content-box;padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*8)}.sv-header__overlap~div .sd-body,.sv-header__overlap~div .sv-body{margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-14)}.sd-root-modern--mobile .sv-header__overlap{padding-bottom:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*2)}.sd-root-modern--mobile .sv-header__overlap~div .sd-body,.sd-root-modern--mobile .sv-header__overlap~div .sv-body{margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-5)}.sv-header__overlap.sv-header__without-background{margin-bottom:0;padding-bottom:0}.sv-header__overlap.sv-header__without-background~div .sd-body,.sv-header__overlap.sv-header__without-background~div .sv-body{margin-top:0}.sv-header__without-background .sv-header--mobile,.sv-header__without-background .sv-header__content{padding-bottom:0}.sv-header__content{box-sizing:border-box;column-gap:var(--lbr-cover-column-gap,var(--lbr-spacing-x6,calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)));display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr;height:100%;padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*5);position:relative;row-gap:var(--lbr-cover-row-gap,var(--lbr-spacing-x150,calc((var(--sjs-base-unit, var(--base-unit, 8px)))*1.5)))}.sv-header--height-auto .sv-header__content{grid-template-rows:auto;height:auto}.sv-header--height-auto .sv-header__cell:not(.sv-header__cell--empty) .sv-header__cell-content{min-height:100%;min-width:100%;position:relative}.sv-header--height-auto .sv-header__cell--right .sv-header__cell-content{left:100%;transform:translateX(-100%)}.sv-header__content--static{margin-left:auto;margin-right:auto;max-width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*90)}.sv-header__background-image{background-position-x:center;border:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.sv-header__background-image--contain{background-repeat:no-repeat}.sv-header__cell{position:relative}.sv-header__cell-content{bottom:0;display:flex;flex-direction:column;max-width:300%;position:absolute;top:0;width:max-content}.sv-header__cell--left .sv-header__cell-content{left:0}.sv-header__cell--center .sv-header__cell-content{left:50%;min-width:100%;transform:translateX(-50%)}.sv-header__cell--right .sv-header__cell-content{right:0}.sv-header__logo{display:flex}.sv-header__logo img{display:block}.sv-header__title{display:flex}.sv-header__title .sd-title{--header-title-font-size:var(--sjs-font-headertitle-size,calc((var(--sjs-font-size, 16px))*2));color:var(--sjs-font-headertitle-color,var(--sjs-font-pagetitle-color,var(--sjs-general-dim-forecolor,rgba(0,0,0,.91))));font-family:var(--sjs-font-headertitle-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--header-title-font-size);font-weight:var(--sjs-font-headertitle-weight,700);line-height:calc((var(--header-title-font-size))*1.25);margin:0}.sv-header__logo~.sv-header__description,.sv-header__logo~.sv-header__title{margin-top:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3)}.sv-header__title~.sv-header__description{margin-top:var(--sjs-base-unit,var(--base-unit,8px))}.sv-header__description{display:flex}.sv-header__description .sd-description{--header-description-font-size:var(--sjs-font-headerdescription-size,20px);color:var(--sjs-font-headerdescription-color,var(--sjs-font-pagedescription-color,var(--sjs-general-dim-forecolor-light,rgba(0,0,0,.45))));font-family:var(--sjs-font-headerdescription-family,var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family))));font-size:var(--header-description-font-size);font-weight:var(--sjs-font-headerdescription-weight,400);line-height:calc((var(--header-description-font-size))*1.5);margin:0}.sv-header__background-color--accent .sv-header__title .sd-title{color:var(--sjs-font-headertitle-color,var(--sjs-primary-forecolor,var(--primary-foreground,#fff)))}.sv-header__background-color--accent .sv-header__description .sd-description{color:var(--sjs-font-headerdescription-color,var(--sjs-primary-forecolor,var(--primary-foreground,#fff)))}.sv-header__content .sd-header__text h3{margin:0}.sv-header--mobile{padding:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*3);position:relative;z-index:1}.sv-header--mobile .sv-header__logo img{max-width:100%}@keyframes rotationAnimation{0%{rotate:0deg}to{rotate:1turn}}.sd-loading-indicator,.sd-loading-indicator .sv-svg-icon{height:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sd-loading-indicator .sv-svg-icon{animation-duration:1s;animation-iteration-count:infinite;animation-name:rotationAnimation;animation-timing-function:linear;width:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*6)}.sd-loading-indicator .sv-svg-icon use{fill:var(--lbr-placeholder-loading-circle-color-spin,var(--sjs-primary-backcolor,var(--primary,#19b394)))}.sd-components-container,sv-components-container{display:flex}.sv-components-row{display:flex;flex-direction:row;width:100%}.sv-components-column{display:flex;flex-direction:column}.sv-components-column--expandable{flex-grow:1}.sv-components-row>.sv-components-column--expandable{width:1px}.sd-container-modern,.sd-root-modern{--sd-base-padding:calc(var(--sjs-base-unit, var(--base-unit, 8px))*5);--sd-base-vertical-padding:calc(var(--sjs-base-unit, var(--base-unit, 8px))*4);--sd-page-vertical-padding:calc(var(--sjs-base-unit, var(--base-unit, 8px))*3)}.sd-root-modern--mobile .sd-container-modern,.sd-root-modern.sd-root-modern--mobile{--sd-base-padding:calc(var(--sjs-base-unit, var(--base-unit, 8px))*3);--sd-base-vertical-padding:calc(var(--sjs-base-unit, var(--base-unit, 8px))*2);--sd-page-vertical-padding:calc(var(--sjs-base-unit, var(--base-unit, 8px))*2);--sjs-mobile-font-editorfont-size:Max(16px,var(--sjs-font-editorfont-size,var(--sjs-font-size,16px)))}.sd-root-modern.sd-root-modern--mobile .sd-element__num{float:none;margin-inline-start:0;padding-inline-end:0;padding-inline-start:0;width:auto}.sd-root-modern.sd-root-modern--mobile .sd-element__num+span{float:none;width:auto}.sd-root-modern.sd-root-modern--mobile .sd-element__title-expandable-svg{inset-inline-start:calc((var(--sjs-base-unit, var(--base-unit, 8px)))*-2.5)}.sd-root-modern.sd-root-modern--mobile .sd-title.sd-container-modern__title{flex-direction:column}.sd-root-modern.sd-root-modern--mobile .sd-header__text{min-width:100%}.sd-multipletext--mobile .sd-multipletext__cell{display:block}.sd-multipletext--mobile .sd-multipletext__cell:not(:first-of-type){padding-left:0;padding-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-multipletext--mobile .sd-multipletext__cell :not(:last-of-type){padding-bottom:var(--sjs-base-unit,var(--base-unit,8px))}.sd-multipletext--mobile .sd-multipletext__item-container{padding-bottom:var(--sjs-base-unit,var(--base-unit,8px));padding-top:var(--sjs-base-unit,var(--base-unit,8px))}.sd-multipletext--mobile .sd-multipletext__item-title{border-right:none;margin:0;max-width:none;padding:var(--sjs-base-unit,var(--base-unit,8px)) 0;width:100%}.sd-multipletext--mobile .sd-multipletext__item{flex-basis:0;min-width:0}.sd-multipletext--mobile .sd-multipletext__item .sd-input{margin:0;padding:0}.sd-multipletext--mobile .sd-multipletext__item-container--allow-focus:focus-within,.sd-multipletext--mobile .sd-multipletext__item-container--answered{flex-direction:column}.sd-multipletext--mobile .sd-multipletext__item-container--allow-focus:focus-within .sd-multipletext__item-title,.sd-multipletext--mobile .sd-multipletext__item-container--answered .sd-multipletext__item-title{padding:0}.sd-multipletext--mobile .sd-multipletext__item-container--allow-focus:focus-within .sd-multipletext__item-title span,.sd-multipletext--mobile .sd-multipletext__item-container--answered .sd-multipletext__item-title span{font-size:calc((var(--sjs-font-size, 16px))*.75);line-height:var(--sjs-font-size,16px)}.sd-multipletext--mobile .sd-multipletext__item-container--allow-focus:focus-within .sd-multipletext__item,.sd-multipletext--mobile .sd-multipletext__item-container--answered .sd-multipletext__item{flex-basis:auto;min-width:auto;width:100%}.sd-multipletext--mobile .sd-multipletext__item-container--allow-focus:focus-within .sd-multipletext__item .sd-input,.sd-multipletext--mobile .sd-multipletext__item-container--answered .sd-multipletext__item .sd-input{width:100%}.sd-selectbase--mobile .sd-selectbase--multi-column{flex-direction:column}.sd-selectbase--mobile .sd-selectbase--multi-column .sd-selectbase__column:not(:last-child){padding-right:0}body{--sv-defaultV2-mark:true}.sd-root-modern{-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);--sd-mobile-width:600px;--sd-timer-size:calc(var(--sjs-base-unit, var(--base-unit, 8px))*18);background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));font-family:var(--sjs-font-family,var(--font-family,var(--sjs-default-font-family)));position:relative;width:100%}@-moz-document url-prefix(){.sd-root-modern,.sd-root-modern *{scrollbar-color:var(--sjs-border-default,var(--border,#d6d6d6)) transparent;scrollbar-width:thin}}.sd-root-modern ::-webkit-scrollbar,.sd-root-modern::-webkit-scrollbar{background-color:transparent;height:12px;width:12px}.sd-root-modern ::-webkit-scrollbar-thumb,.sd-root-modern::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:var(--sjs-border-default,var(--border,#d6d6d6));border:4px solid transparent;border-radius:32px}.sd-root-modern ::-webkit-scrollbar-track,.sd-root-modern::-webkit-scrollbar-track{background:transparent}.sd-root-modern ::-webkit-scrollbar-thumb:hover,.sd-root-modern::-webkit-scrollbar-thumb:hover{background-color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));border:2px solid transparent}.sd-root-modern form{position:relative}.sd-root-modern--animation-disabled *{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.sd-root-modern.sd-root-modern--full-container{height:100%;overflow:auto;position:relative;width:100%}.sd-root-modern--mobile{--sd-timer-size:calc(var(--sjs-base-unit, var(--base-unit, 8px))*9)}.sd-root-modern__wrapper{position:relative}.sd-root-modern__wrapper--has-image{min-height:100%}.sd-root-modern--full-container .sd-root-modern__wrapper--fixed{height:100%;position:static;width:100%}.sd-root-modern--full-container .sd-root-modern__wrapper--fixed form{height:100%;max-height:100%;width:100%}.sv-popup .sv-popup__scrolling-content{box-sizing:content-box}@-moz-document url-prefix(){.sv-popup .sv-popup__scrolling-content,.sv-popup .sv-popup__scrolling-content *{scrollbar-color:var(--sjs-border-default,var(--border,#d6d6d6)) transparent;scrollbar-width:thin}}.sv-popup .sv-popup__scrolling-content ::-webkit-scrollbar,.sv-popup .sv-popup__scrolling-content::-webkit-scrollbar{background-color:transparent;height:12px;width:12px}.sv-popup .sv-popup__scrolling-content ::-webkit-scrollbar-thumb,.sv-popup .sv-popup__scrolling-content::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:var(--sjs-border-default,var(--border,#d6d6d6));border:4px solid transparent;border-radius:32px}.sv-popup .sv-popup__scrolling-content ::-webkit-scrollbar-track,.sv-popup .sv-popup__scrolling-content::-webkit-scrollbar-track{background:transparent}.sv-popup .sv-popup__scrolling-content ::-webkit-scrollbar-thumb:hover,.sv-popup .sv-popup__scrolling-content::-webkit-scrollbar-thumb:hover{background-color:var(--sjs-general-forecolor-light,var(--foreground-light,#909090));border:2px solid transparent}.sv-components-container-center{position:sticky;top:0}.sv-root--sticky-top .sv-components-container-center{z-index:15}.sv-root--sticky-top.sd-progress--buttons .sv-components-container-center,.sv-root--sticky-top.sd-progress--pages .sv-components-container-center{background-color:var(--sjs-general-backcolor-dim,var(--background-dim,#f3f3f3));box-shadow:var(--sjs-shadow-medium,0 2px 6px 0 rgba(0,0,0,.1)),var(--sjs-shadow-small,0 1px 2px 0 rgba(0,0,0,.15))}.sv-components-container-left,.sv-components-container-right{width:fit-content}',{insertAt:"top"});var jl=function(e,t,s){if(void 0===t&&(t=""),void 0===s&&(s=""),!e)return null;var i=t||"field_"+Math.random().toString(36).substr(2,9),r=s||(null==t?void 0:t.replace(/_/g," "))||i;switch(e.type){case"string":case"number":case"integer":return{type:"text",name:i,title:r,isRequired:e.required||!1};case"boolean":return{type:"boolean",name:i,title:r,isRequired:e.required||!1};case"array":if("string"===e.items.type||"number"===e.items.type||"integer"===e.items.type)return{type:"matrixdynamic",name:i,title:r,columns:[{cellType:"number"===e.items.type||"integer"===e.items.type?"number":"text",name:"value",title:" "}],rowCount:1,minRowCount:0,addRowText:"添加".concat(r),removeRowText:"删除",isRequired:e.required||!1,showHeader:!1,confirmDelete:!1,description:e.description||""};if("object"===e.items.type){var n=e.items.properties||{},a=Object.entries(n).map((function(e){var t=e[0],s=e[1];return{name:t,title:t,cellType:"number"===s.type||"integer"===s.type?"number":"text"}}));return{type:"matrixdynamic",name:i,title:r,columns:a.length>0?a:[{name:"key",title:"键",cellType:"text"},{name:"value",title:"值",cellType:"text"}],rowCount:1,minRowCount:0,addRowText:"添加".concat(r),removeRowText:"删除",isRequired:e.required||!1,showHeader:!0,confirmDelete:!1,description:e.description||""}}return{type:"paneldynamic",name:i,title:r,templateElements:[jl(e.items,"item")],panelCount:1,minPanelCount:1,addPanelText:"添加".concat(r),removePanelText:"删除",isRequired:e.required||!1};case"object":var o=Object.entries(e.properties||{}).map((function(e){var t=e[0],s=e[1];return jl(s,t)})).filter(Boolean);return t?{type:"panel",name:i,title:r,elements:o,isRequired:e.required||!1}:o;default:return console.warn("Unsupported schema type: ".concat(e.type)),null}},Ol=function(e){var s=e.tool,i=e.onComplete,r=t.useState(null),n=r[0],o=r[1];return console.log("InputSchemaForm",s),t.useEffect((function(){if(s){var e=function(e){if(!e||!e.inputSchema)return{elements:[]};if("object"===e.inputSchema.type&&(!e.inputSchema.properties||0===Object.keys(e.inputSchema.properties).length))return{elements:[{type:"text",name:"_",title:"_",isRequired:!1}],showQuestionNumbers:!1,showNavigationButtons:!0,completeText:"执行",pageNextText:"下一步",pagePrevText:"上一步"};var t=jl(e.inputSchema);return{elements:Array.isArray(t)?t:[t],showQuestionNumbers:!1,completeText:"执行",pageNextText:"下一步",pagePrevText:"上一步"}}(s),t=new mr(e);t.onComplete.add((function(e){return d(void 0,void 0,void 0,(function(){var t,r,n;return h(this,(function(a){switch(a.label){case 0:return i?(t=u({},e.data),s.inputSchema&&"object"===s.inputSchema.type&&s.inputSchema.properties&&Object.entries(s.inputSchema.properties).forEach((function(e){var s=e[0],i=e[1];"array"!==i.type||"string"!==i.items.type&&"number"!==i.items.type&&"integer"!==i.items.type||!Array.isArray(t[s])||(t[s]=t[s].map((function(e){return e.value}))),"object"===i.type&&Object.entries(i.properties).forEach((function(e){e[0],e[1]})),"array"===i.type&&"object"===i.items.type&&Array.isArray(t[s])&&(t[s]=t[s].filter((function(e){return Object.keys(e).length>0}))),console.log("##inputSchema",s,i,t[s]),"number"!==i.type&&"integer"!==i.type||(t[s]=Number(t[s]))})),o(null),[4,s.execute(t,9e5)]):[3,2];case 1:r=a.sent(),Array.isArray(r)&&"text"===(null===(n=r[0])||void 0===n?void 0:n.type)&&(r=r.map((function(e){if("text"==e.type){var t=null;try{t=JSON.parse(e.text)}catch(e){console.log(e)}t&&(e.type="json",e.json=t,delete e.text)}return u({},e)}))),i({input:t,output:r}),a.label=2;case 2:return[2]}}))}))})),t.applyTheme(Al),o(t)}}),[s,i]),n?a.default.createElement(Ya,{model:n,rootNodeClassName:"mcp-uiux-input-schema-form"}):null},ql=function(e){var s=e.prompt,i=e.onComplete,r=t.useState(null),n=r[0],o=r[1];return t.useEffect((function(){if(s){var e=function(e){return e&&e.arguments&&Array.isArray(e.arguments)?{elements:e.arguments.map((function(e){return{type:"text",name:e.name,title:e.description||e.name,isRequired:e.required||!1,defaultValue:e.default||""}})),showQuestionNumbers:!1,completeText:"执行",pageNextText:"下一步",pagePrevText:"上一步"}:{elements:[]}}(s),t=new mr(e);t.onComplete.add((function(e){return d(void 0,void 0,void 0,(function(){var t,r,n;return h(this,(function(a){switch(a.label){case 0:return i?(t=u({},e.data),o(null),[4,s.execute(t,9e5)]):[3,2];case 1:r=a.sent(),Array.isArray(r)&&"text"===(null===(n=r[0])||void 0===n?void 0:n.type)&&(r=r.map((function(e){if("text"===e.type){var t=null;try{t=JSON.parse(e.text)}catch(e){console.log(e)}t&&(e.type="json",e.json=t,delete e.text)}return u({},e)}))),i({input:t,output:r}),a.label=2;case 2:return[2]}}))}))})),t.applyTheme(Al),o(t)}}),[s,i]),n?a.default.createElement(Ya,{model:n,rootNodeClassName:"mcp-uiux-input-schema-form"}):null},Nl=function(e){var s=e.serverInfo,i=e.loading,r=e.error,n=e.tools,o=e.resources;e.resourceTemplates;var l=e.prompts,c=e.notification,p=e.onSettingsOpen,m=t.useState(null),g=m[0],v=m[1],f=t.useState(null),b=f[0],y=f[1],C=t.useState(!1),w=C[0],x=C[1],V=K(n),_=function(e){v(e),y(null)},E=function(e){y(e),v(null)};return t.useEffect((function(){d(void 0,void 0,void 0,(function(){var e,t,s;return h(this,(function(i){switch(i.label){case 0:if("resource"!==(null==g?void 0:g._type))return[3,5];x(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,g.execute({},3e5)];case 2:return e=i.sent(),Array.isArray(e)&&"text"===(null===(s=e[0])||void 0===s?void 0:s.type)&&(e=e.map((function(e){if("text"===e.type){var t=null;try{t=JSON.parse(e.text)}catch(e){console.log(e)}t&&(e.type="json",e.json=t,delete e.text)}return u({},e)}))),y({input:{},output:e}),[3,5];case 3:return t=i.sent(),console.error("执行资源时出错:",t),y({input:{},output:[{type:"text",text:"执行出错: ".concat(t.message||"未知错误")}]}),[3,5];case 4:return x(!1),[7];case 5:return[2]}}))}))}),[g]),a.default.createElement("div",{className:"sci-fi-container"},a.default.createElement("div",{className:"hologram-title"},a.default.createElement("h1",{style:{display:"flex",alignItems:"center"}},"MCP 系统状态监控 ",p&&a.default.createElement("button",{onClick:function(){return p()},className:"item",style:{fontSize:12,marginLeft:10,color:"white",border:"none"}},"设置")),a.default.createElement("div",{className:"status-indicator",style:{display:"flex",alignItems:"center"}},i?a.default.createElement("span",{className:"pulse loading"},"系统扫描中..."):r?a.default.createElement("span",{className:"pulse error"},"警告:系统异常"):a.default.createElement("span",{className:"pulse active"},"系统在线 ",(null==s?void 0:s.name)&&"- ".concat(s.name)))),r&&a.default.createElement("div",{className:"error-panel"},a.default.createElement("div",{className:"error-icon"},"⚠"),a.default.createElement("div",{className:"error-message"},r)),(null==c?void 0:c.method)&&a.default.createElement("div",{className:"module",style:{margin:20}},c.method,a.default.createElement("br",null),(null==c?void 0:c.params)&&"object"==typeof c.params?JSON.stringify(c.params,null,2):c.params),!i&&!r&&a.default.createElement("div",{style:{display:"flex"}},a.default.createElement("div",{className:"data-grid"},n.length>0&&a.default.createElement("div",{className:"module"},a.default.createElement("div",{className:"module-header"},a.default.createElement("span",{className:"module-icon"},"⚡"),a.default.createElement("h2",null,"系统工具库"),a.default.createElement("span",{className:"count"},n.length)),a.default.createElement("button",{className:"item",onClick:function(){console.log(V),navigator.clipboard.writeText(JSON.stringify(V,null,2))}},"Function Call"),a.default.createElement("div",{className:"scrollable-content"},n.map((function(e,t){return a.default.createElement("div",{key:t,className:"item",onClick:function(){return _(e)}},a.default.createElement("span",{className:"item-indicator"}),e.name)})))),o.length>0&&a.default.createElement("div",{className:"module"},a.default.createElement("div",{className:"module-header"},a.default.createElement("span",{className:"module-icon"},"📦"),a.default.createElement("h2",null,"资源矩阵"),a.default.createElement("span",{className:"count"},o.length)),a.default.createElement("div",{className:"scrollable-content"},o.map((function(e,t){return a.default.createElement("div",{key:t,className:"item",onClick:function(){return v(e),void y(null)}},a.default.createElement("span",{className:"item-indicator"}),decodeURIComponent(e.uri))})))),l.length>0&&a.default.createElement("div",{className:"module"},a.default.createElement("div",{className:"module-header"},a.default.createElement("span",{className:"module-icon"},"💡"),a.default.createElement("h2",null,"AI 提示库"),a.default.createElement("span",{className:"count"},l.length)),a.default.createElement("div",{className:"scrollable-content"},l.map((function(e,t){return a.default.createElement("div",{key:t,className:"item",onClick:function(){return _(e)}},a.default.createElement("span",{className:"item-indicator"}),e.name)}))))),"tool"===(null==g?void 0:g._type)&&a.default.createElement("div",{className:"module",style:{width:"100%"}},a.default.createElement(Ol,{tool:g,onComplete:E})),"prompt"===(null==g?void 0:g._type)&&(null==g?void 0:g.arguments)&&a.default.createElement("div",{className:"module",style:{width:"100%"}},a.default.createElement(ql,{prompt:g,onComplete:E})),"resource"===(null==g?void 0:g._type)&&w&&a.default.createElement("div",{className:"module",style:{width:"100%"}},a.default.createElement("div",{className:"loading-indicator"},"资源加载中...")),b&&a.default.createElement("div",{className:"module",style:{margin:"0 20px"}},a.default.createElement("h4",null,"数据"),a.default.createElement(re,{src:b,theme:"colors"}))))};ne('.mcp-settings-container{background:#0a0a1f;border-radius:10px;box-shadow:0 0 20px rgba(0,255,255,.2);color:#0ff;padding:2rem}.settings-group{background:rgba(0,255,255,.05);border:1px solid rgba(0,255,255,.2);border-radius:8px;margin-bottom:1rem;padding:1.5rem}.settings-field{margin-bottom:1.5rem;position:relative}.settings-label{color:#0ff;display:block;font-size:1rem;letter-spacing:1px;margin-bottom:.5rem;text-transform:uppercase}.settings-input{background:rgba(0,255,255,.05);border:1px solid rgba(0,255,255,.2);border-radius:4px;color:#0ff;font-size:1rem;padding:.8rem;transition:all .3s ease;width:100%}.settings-input:focus{border-color:#0ff;box-shadow:0 0 10px rgba(0,255,255,.3);outline:none}.settings-input:hover{background:rgba(0,255,255,.1)}.settings-field:after{background:linear-gradient(90deg,transparent,rgba(0,255,255,.5),transparent);bottom:-5px;content:"";height:1px;left:0;position:absolute;width:100%}',{insertAt:"top"});var Ml=function(e){var s=e.serverUrl,i=void 0===s?"http://localhost:8080":s,r=e.resourcePath,n=void 0===r?"":r,o=e.onServerUrlChange,l=e.onResourcePathChange,u=e.className,d=e.style,h=t.useState(i),c=h[0],p=h[1],m=t.useState(n),g=m[0],v=m[1];return t.useEffect((function(){p(i),v(n)}),[i,n]),a.default.createElement("div",{className:"mcp-settings-container ".concat(u||""),style:d},a.default.createElement("div",{className:"settings-group"},a.default.createElement("div",{className:"settings-field"},a.default.createElement("label",{className:"settings-label"},"服务器地址"),a.default.createElement("input",{className:"settings-input",type:"text",value:c,onChange:function(e){o(e.target.value),p(e.target.value)},placeholder:"输入服务器地址..."})),a.default.createElement("div",{className:"settings-field"},a.default.createElement("label",{className:"settings-label"},"资源路径过滤"),a.default.createElement("input",{className:"settings-input",type:"text",value:g,onChange:function(e){l(e.target.value),v(e.target.value)},placeholder:"输入资源路径过滤条件..."}))))};e.InputSchemaForm=Ol,e.MCPClient=X,e.MCPProvider=function(e){var s=this,i=e.children,r=t.useRef(null),a=t.useState(!1),o=a[0],l=a[1],p=t.useState(null),m=p[0],g=p[1],v=t.useState({}),f=v[0],b=v[1],y=t.useState({}),C=y[0],w=y[1],x=t.useState([]),V=x[0],_=x[1],E=t.useState([]),P=E[0],S=E[1],I=t.useState([]),T=I[0],R=I[1],k=t.useState([]),D=k[0],L=k[1],A=t.useState(null),j=A[0],O=A[1],q=t.useState(null),N=q[0],M=q[1],F=t.useState(""),B=F[0],z=F[1],H=t.useRef(null),Q=t.useRef(null),W=function(){return d(s,void 0,void 0,(function(){return h(this,(function(e){if(r.current){try{r.current.disconnect(),r.current=null,_([]),S([]),R([]),L([]),O(null)}catch(e){console.warn("关闭连接时出错:",e)}return[2,new Promise((function(e){return setTimeout(e,200)}))]}return[2,Promise.resolve()]}))}))},U=function(){return d(s,void 0,void 0,(function(){return h(this,(function(e){if(r.current){try{r.current.disconnect(),r.current=null,_([]),S([]),R([]),L([]),O(null),M(null),z("")}catch(e){console.warn("关闭连接时出错:",e)}return[2,new Promise((function(e){return setTimeout(e,200)}))]}return[2,Promise.resolve()]}))}))},G=function(e,t){return d(s,void 0,void 0,(function(){var s,i,n;return h(this,(function(a){switch(a.label){case 0:return l(!0),g(null),r.current?[4,W()]:[3,2];case 1:a.sent(),a.label=2;case 2:_([]),S([]),R([]),L([]),O(null),a.label=3;case 3:return a.trys.push([3,5,,6]),s=new X({url:e,onToolsReady:function(e){console.log("获取到工具列表:",e),_(Array.from(e||[],(function(e){return u(u({},e),{_type:"tool"})})))},onResourcesReady:function(e){console.log("获取到资源列表:",t,e),S(Array.from(e||[],(function(e){var s;if(!t||(null===(s=e.uri)||void 0===s?void 0:s.startsWith(t)))return u(u({},e),{_type:"resource"})})).filter(Boolean))},onResourceTemplatesReady:function(e){console.log("获取到资源变量列表:",t,e),R(Array.from(e||[],(function(e){var s;if(!t||(null===(s=e.uriTemplate)||void 0===s?void 0:s.startsWith(t)))return u(u({},e),{_type:"resourceTemplate"})})).filter(Boolean))},onPromptsReady:function(e){console.log("获取到提示列表:",e),L(Array.from(e||[],(function(e){return u(u({},e),{_type:"prompt"})})).filter(Boolean))},onError:function(e){var t=e.message||"未知错误";console.error("MCP客户端连接失败:",e),g("连接失败: ".concat(t)),O(null)},onReady:function(e){console.log("MCP客户端连接成功",e),O(e),g(null)},onNotification:function(e){console.log("onNotification 收到通知消息:",e),b(e),w((function(t){return c(c([],t,!0),[u(u({},e),{id:Date.now(),timestamp:new Date})],!1)}))}}),[4,s.connect()];case 4:return a.sent(),window.mcpClient=s,r.current=s,l(!1),g(null),[2,s];case 5:return i=a.sent(),n=i instanceof Error?i.message:"未知错误",console.error("MCP客户端连接失败:",i),g("连接失败: ".concat(n)),l(!1),O(null),[2,null];case 6:return[2]}}))}))},Z=function(e,t){return d(s,void 0,void 0,(function(){var s,i,n,a=this;return h(this,(function(l){return!r.current||m||o?(s=e||N||(null===(n=r.current)||void 0===n?void 0:n.url)||"http://127.0.0.1:8080",i=void 0!==t?t:B,Q.current={url:s,filter:i},H.current&&clearTimeout(H.current),H.current=setTimeout((function(){return d(a,void 0,void 0,(function(){var t;return h(this,(function(s){switch(s.label){case 0:return(t=Q.current)?(Q.current=null,!r.current||m||o?[4,W()]:(console.log("连接已恢复正常,取消重连"),H.current=null,g(null),[2])):[2];case 1:return s.sent(),console.log("正在重新连接MCP服务...",t.url),[4,G(t.url,t.filter)];case 2:return s.sent()&&!e&&(M(t.url),z(t.filter)),H.current=null,[2]}}))}))}),300),[2]):(console.log("当前连接正常,无需重连"),[2])}))}))};return t.useEffect((function(){if(m&&N&&!j){var e=setTimeout((function(){console.log("检测到连接错误,尝试自动重连...",m,N),Z()}),5e3);return function(){return clearTimeout(e)}}}),[m,N]),t.useEffect((function(){return function(){if(r.current)try{r.current.disconnect()}catch(e){console.warn("关闭连接时出错:",e)}H.current&&clearTimeout(H.current)}}),[]),n.createElement(Y.Provider,{value:{mcpClient:r.current,loading:o,error:m,reconnect:Z,connect:function(e,t){return d(s,void 0,void 0,(function(){var s,i=this;return h(this,(function(r){return e&&e.match("http")?(s=t||"",Q.current={url:e,filter:s},H.current&&clearTimeout(H.current),H.current=setTimeout((function(){return d(i,void 0,void 0,(function(){var e;return h(this,(function(t){switch(t.label){case 0:return(e=Q.current)?(Q.current=null,[4,U()]):[2];case 1:return t.sent(),console.log("正在连接MCP服务...",e.url),[4,G(e.url,e.filter)];case 2:return t.sent()&&(M(e.url),z(e.filter)),H.current=null,[2]}}))}))}),300),[2]):[2]}))}))},disconnect:U,tools:V,toolsFunctionCall:K(V),resources:P,resourceTemplates:T,prompts:D,serverInfo:j,notification:f,notifications:C}},i)},e.MCPStatus=function(e){var s=e.serverUrl,i=void 0===s?"http://localhost:8080":s,r=e.resourcePath,n=void 0===r?"":r,o=e.className,l=e.style,u=e.showSettings,d=void 0!==u&&u,h=e.render,c=t.useState(i),p=c[0],m=c[1],g=t.useState(n),v=g[0],f=g[1],b=t.useState(d),y=b[0],C=b[1];t.useEffect((function(){m(localStorage.getItem("mcp-uiux-serverUrl")||i),f(localStorage.getItem("mcp-uiux-resourcePath")||n)}),[]);var w=$(),x=w.connect,V=w.loading,_=w.error,E=w.tools,P=w.resources,S=w.resourceTemplates,I=w.prompts,T=w.serverInfo,R=w.notification;return t.useEffect((function(){x(p,v)}),[p,v]),h?h({loading:V,error:_,tools:E,resources:P,resourceTemplates:S,prompts:I,notification:R}):a.default.createElement("div",{className:o,style:l},y&&a.default.createElement(Ml,{serverUrl:p,resourcePath:v,onServerUrlChange:function(e){m(e),localStorage.setItem("mcp-uiux-serverUrl",e)},onResourcePathChange:function(e){f(e),localStorage.setItem("mcp-uiux-resourcePath",e)},style:{marginBottom:"20px"}}),a.default.createElement(Nl,{serverInfo:T,loading:V,error:_,tools:E,resources:P,resourceTemplates:S,prompts:I,notification:R,onSettingsOpen:function(){return C(!y)}}))},e.ReactJson=re,e.SurveyModel=mr,e.prepareTools=function(e,t){return void 0===t&&(t=6e4),new Promise((function(s,i){var r=null,n=setTimeout((function(){r&&r.disconnect(),i(new Error("Connection timeout"))}),t),a=function(){return clearTimeout(n)};try{(r=new X({url:e,onToolsReady:function(e){return d(void 0,void 0,void 0,(function(){var t,i,n,o;return h(this,(function(l){switch(l.label){case 0:return r?(a(),[4,r.getPromptsList()]):[3,2];case 1:t=null===(o=l.sent())||void 0===o?void 0:o.prompts,i=(null==t?void 0:t.filter((function(e){return null==e?void 0:e.systemPrompt})))||"",n=K(e),s({tools:e,mcpClient:r,toolsFunctionCall:n,systemPrompts:i}),l.label=2;case 2:return[2]}}))}))},onError:function(e){r&&r.disconnect(),a(),i(new Error("Failed to prepare tools: ".concat(e.message)))}})).connect()}catch(e){r&&r.disconnect(),i(new Error("Failed to initialize MCPClient: ".concat(e.message)))}})).catch((function(e){throw e})).finally((function(){}))},e.useMCP=$,Object.defineProperty(e,"__esModule",{value:!0})}));