survey-react-ui 1.9.84 → 1.9.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.84
2
+ * surveyjs - Survey JavaScript library v1.9.85
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
6
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("survey-core"),require("react-dom")):"function"==typeof define&&define.amd?define("survey-react-ui",["react","survey-core","react-dom"],t):"object"==typeof exports?exports["survey-react-ui"]=t(require("react"),require("survey-core"),require("react-dom")):e.SurveyReact=t(e.React,e.Survey,e.ReactDOM)}(this,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(5),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(3))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,s,a,u=1,l={},c=!1,p=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){i.port2.postMessage(e)}):p&&"onreadystatechange"in p.createElement("script")?(o=p.documentElement,r=function(e){var t=p.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&f(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return l[u]=o,r(u),u++},h.clearImmediate=d}function d(e){delete l[e]}function f(e){if(c)setTimeout(f,0,e);else{var t=l[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(3),n(6))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,l=[],c=!1,p=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=a(h);c=!0;for(var t=l.length;t;){for(u=l,l=[];++p<t;)u&&u[p].run();p=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||c||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t),n.d(t,"Survey",(function(){return te})),n.d(t,"attachKey2click",(function(){return ne})),n.d(t,"ReactSurveyElementsWrapper",(function(){return a})),n.d(t,"SurveyNavigationBase",(function(){return oe})),n.d(t,"SurveyTimerPanel",(function(){return se})),n.d(t,"SurveyPage",(function(){return Q})),n.d(t,"SurveyRow",(function(){return m})),n.d(t,"SurveyPanel",(function(){return we})),n.d(t,"SurveyFlowPanel",(function(){return _e})),n.d(t,"SurveyQuestion",(function(){return ge})),n.d(t,"SurveyElementErrors",(function(){return be})),n.d(t,"SurveyQuestionAndErrorsCell",(function(){return Ee})),n.d(t,"ReactSurveyElement",(function(){return p})),n.d(t,"SurveyElementBase",(function(){return c})),n.d(t,"SurveyQuestionElementBase",(function(){return h})),n.d(t,"SurveyQuestionCommentItem",(function(){return pe})),n.d(t,"SurveyQuestionComment",(function(){return ce})),n.d(t,"SurveyQuestionCheckbox",(function(){return Ie})),n.d(t,"SurveyQuestionCheckboxItem",(function(){return Pe})),n.d(t,"SurveyQuestionRanking",(function(){return Re})),n.d(t,"SurveyQuestionRankingItem",(function(){return Ne})),n.d(t,"RatingItem",(function(){return Te})),n.d(t,"RatingItemStar",(function(){return ke})),n.d(t,"RatingItemSmiley",(function(){return Be})),n.d(t,"TagboxFilterString",(function(){return Ae})),n.d(t,"SurveyQuestionOptionItem",(function(){return We})),n.d(t,"SurveyQuestionDropdownBase",(function(){return Ue})),n.d(t,"SurveyQuestionDropdown",(function(){return Ve})),n.d(t,"SurveyQuestionTagboxItem",(function(){return Ke})),n.d(t,"SurveyQuestionTagbox",(function(){return Ze})),n.d(t,"SurveyQuestionDropdownSelect",(function(){return Xe})),n.d(t,"SurveyQuestionMatrix",(function(){return Ye})),n.d(t,"SurveyQuestionMatrixRow",(function(){return et})),n.d(t,"SurveyQuestionHtml",(function(){return nt})),n.d(t,"SurveyQuestionFile",(function(){return ot})),n.d(t,"SurveyQuestionMultipleText",(function(){return st})),n.d(t,"SurveyQuestionRadiogroup",(function(){return ct})),n.d(t,"SurveyQuestionRadioItem",(function(){return pt})),n.d(t,"SurveyQuestionText",(function(){return dt})),n.d(t,"SurveyQuestionBoolean",(function(){return mt})),n.d(t,"SurveyQuestionBooleanCheckbox",(function(){return vt})),n.d(t,"SurveyQuestionBooleanRadio",(function(){return bt})),n.d(t,"SurveyQuestionEmpty",(function(){return Et})),n.d(t,"SurveyQuestionMatrixDropdownCell",(function(){return Rt})),n.d(t,"SurveyQuestionMatrixDropdownBase",(function(){return It})),n.d(t,"SurveyQuestionMatrixDropdown",(function(){return jt})),n.d(t,"SurveyQuestionMatrixDynamic",(function(){return Dt})),n.d(t,"SurveyQuestionMatrixDynamicAddButton",(function(){return kt})),n.d(t,"SurveyQuestionPanelDynamic",(function(){return zt})),n.d(t,"SurveyProgress",(function(){return Zt})),n.d(t,"SurveyProgressButtons",(function(){return Xt})),n.d(t,"SurveyProgressToc",(function(){return rn})),n.d(t,"SurveyQuestionRating",(function(){return sn})),n.d(t,"SurveyQuestionRatingDropdown",(function(){return un})),n.d(t,"SurveyQuestionExpression",(function(){return cn})),n.d(t,"PopupSurvey",(function(){return hn})),n.d(t,"SurveyWindow",(function(){return dn})),n.d(t,"ReactQuestionFactory",(function(){return K})),n.d(t,"ReactElementFactory",(function(){return s})),n.d(t,"SurveyQuestionImagePicker",(function(){return mn})),n.d(t,"SurveyQuestionImage",(function(){return gn})),n.d(t,"SurveyQuestionSignaturePad",(function(){return Cn})),n.d(t,"SurveyQuestionButtonGroup",(function(){return qn})),n.d(t,"SurveyQuestionCustom",(function(){return _n})),n.d(t,"SurveyQuestionComposite",(function(){return Sn})),n.d(t,"Popup",(function(){return P})),n.d(t,"List",(function(){return tn})),n.d(t,"TitleActions",(function(){return L})),n.d(t,"TitleElement",(function(){return H})),n.d(t,"SurveyActionBar",(function(){return D})),n.d(t,"LogoImage",(function(){return Pn})),n.d(t,"SurveyHeader",(function(){return z})),n.d(t,"SvgIcon",(function(){return b})),n.d(t,"SurveyQuestionMatrixDynamicRemoveButton",(function(){return Rn})),n.d(t,"SurveyQuestionMatrixDetailButton",(function(){return jn})),n.d(t,"SurveyQuestionMatrixDynamicDragDropIcon",(function(){return _t})),n.d(t,"SurveyQuestionPanelDynamicAddButton",(function(){return Lt})),n.d(t,"SurveyQuestionPanelDynamicRemoveButton",(function(){return Dn})),n.d(t,"SurveyQuestionPanelDynamicPrevButton",(function(){return Qt})),n.d(t,"SurveyQuestionPanelDynamicNextButton",(function(){return Ht})),n.d(t,"SurveyQuestionPanelDynamicProgressText",(function(){return Ft})),n.d(t,"SurveyNavigationButton",(function(){return Mn})),n.d(t,"MatrixRow",(function(){return wt})),n.d(t,"Skeleton",(function(){return Ln})),n.d(t,"NotifierComponent",(function(){return X})),n.d(t,"ComponentsContainer",(function(){return Y})),n.d(t,"CharacterCounterComponent",(function(){return ue})),n.d(t,"SurveyLocStringViewer",(function(){return F})),n.d(t,"SurveyLocStringEditor",(function(){return Hn})),n.d(t,"SurveyModel",(function(){return i.SurveyModel})),n.d(t,"SurveyWindowModel",(function(){return i.SurveyWindowModel})),n.d(t,"settings",(function(){return i.settings})),n.d(t,"surveyLocalization",(function(){return i.surveyLocalization})),n.d(t,"surveyStrings",(function(){return i.surveyStrings})),n.d(t,"Model",(function(){return i.SurveyModel})),n.d(t,"ResponsivityManager",(function(){return Fn})),n.d(t,"VerticalResponsivityManager",(function(){return Vn})),n.d(t,"unwrap",(function(){return Qn}));var r=n(0),o=n.n(r),i=n(1),s=function(){function e(){this.creatorHash={}}return e.prototype.registerElement=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.isElementRegistered=function(e){return!!this.creatorHash[e]},e.prototype.createElement=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),a=function(){function e(){}return e.wrapRow=function(e,t,n){var r=e.getRowWrapperComponentName(n),o=e.getRowWrapperComponentData(n);return s.Instance.createElement(r,{element:t,row:n,componentData:o})},e.wrapElement=function(e,t,n){var r=e.getElementWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapQuestionContent=function(e,t,n){var r=e.getQuestionContentWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapItemValue=function(e,t,n,r){var o=e.getItemValueWrapperComponentName(r,n),i=e.getItemValueWrapperComponentData(r,n);return s.Instance.createElement(o,{key:null==t?void 0:t.key,element:t,question:n,item:r,componentData:i})},e.wrapMatrixCell=function(e,t,n,r){void 0===r&&(r="cell");var o=e.getElementWrapperComponentName(n,r),i=e.getElementWrapperComponentData(n,r);return s.Instance.createElement(o,{element:t,cell:n,componentData:i})},e}();i.SurveyModel.platform="react";var u,l=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t){var n=e.call(this,t)||this;return n._allowComponentUpdate=!0,n}return l(t,e),t.renderLocString=function(e,t,n){return void 0===t&&(t=null),s.Instance.createElement(e.renderAs,{locStr:e.renderAsData,style:t,key:n})},t.renderQuestionDescription=function(e){var n=t.renderLocString(e.locDescription);return r.createElement("div",{className:e.cssDescription},n)},t.prototype.componentDidMount=function(){this.makeBaseElementsReact()},t.prototype.componentWillUnmount=function(){this.unMakeBaseElementsReact()},t.prototype.componentDidUpdate=function(e,t){this.makeBaseElementsReact()},t.prototype.allowComponentUpdate=function(){this._allowComponentUpdate=!0,this.forceUpdate()},t.prototype.denyComponentUpdate=function(){this._allowComponentUpdate=!1},t.prototype.shouldComponentUpdate=function(e,t){return this._allowComponentUpdate&&this.unMakeBaseElementsReact(),this._allowComponentUpdate},t.prototype.render=function(){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},t.prototype.wrapElement=function(e){return e},Object.defineProperty(t.prototype,"isRendering",{get:function(){for(var e=0,t=this.getRenderedElements();e<t.length;e++){if(t[e].reactRendering>0)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return this.getStateElements()},t.prototype.startEndRendering=function(e){for(var t=0,n=this.getRenderedElements();t<n.length;t++){var r=n[t];r.reactRendering||(r.reactRendering=0),r.reactRendering+=e}},t.prototype.canRender=function(){return!0},t.prototype.renderElement=function(){return null},Object.defineProperty(t.prototype,"changedStatePropName",{get:function(){return this.changedStatePropNameValue},enumerable:!1,configurable:!0}),t.prototype.makeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)this.makeBaseElementReact(e[t])},t.prototype.unMakeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)this.unMakeBaseElementReact(e[t])},t.prototype.getStateElements=function(){var e=this.getStateElement();return e?[e]:[]},t.prototype.getStateElement=function(){return null},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!1},enumerable:!1,configurable:!0}),t.prototype.renderLocString=function(e,n,r){return void 0===n&&(n=null),t.renderLocString(e,n,r)},t.prototype.canMakeReact=function(e){return!!e&&!!e.iteratePropertiesHash},t.prototype.makeBaseElementReact=function(e){var t=this;this.canMakeReact(e)&&(e.iteratePropertiesHash((function(e,n){if(t.canUsePropInState(n)){var r=e[n];if(Array.isArray(r))(r=r).onArrayChanged=function(e){t.isRendering||(t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t})))}}})),e.setPropertyValueCoreHandler=function(e,n,r){if(e[n]!==r){if(e[n]=r,!t.canUsePropInState(n))return;if(t.isRendering)return;t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t}))}})},t.prototype.canUsePropInState=function(e){return!0},t.prototype.unMakeBaseElementReact=function(e){this.canMakeReact(e)&&(e.setPropertyValueCoreHandler=void 0,e.iteratePropertiesHash((function(e,t){var n=e[t];Array.isArray(n)&&((n=n).onArrayChanged=function(){})})))},t}(r.Component),p=function(e){function t(t){return e.call(this,t)||this}return l(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t}(c),h=function(e){function t(t){return e.call(this,t)||this}return l(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase){var t=this.control;this.questionBase.beforeDestroyQuestionElement(t),t&&t.removeAttribute("data-rendered")}},t.prototype.updateDomElement=function(){var e=this.control;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.questionBase.afterRenderQuestionElement(e))},Object.defineProperty(t.prototype,"questionBase",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return[this.questionBase]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.questionBase&&!!this.creator},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&!(this.questionBase.customWidget&&!this.questionBase.customWidgetData.isNeedRender&&!this.questionBase.customWidget.widgetJson.isDefaultRender&&!this.questionBase.customWidget.widgetJson.render)},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!!this.questionBase&&this.questionBase.isInputReadOnly||!1},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.questionBase.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.setControl=function(e){e&&(this.control=e)},t}(c),d=function(e){function t(t){var n=e.call(this,t)||this;return n.updateValueOnEvent=function(e){i.Helpers.isTwoValueEquals(n.questionBase.value,e.target.value)||n.setValueCore(e.target.value)},n.updateValueOnEvent=n.updateValueOnEvent.bind(n),n}return l(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.setValueCore=function(e){this.questionBase.value=e},t.prototype.getValueCore=function(){return this.questionBase.value},t.prototype.updateDomElement=function(){if(this.control){var t=this.control,n=this.getValueCore();i.Helpers.isTwoValueEquals(n,t.value)||(t.value=this.getValue(n))}e.prototype.updateDomElement.call(this)},t.prototype.getValue=function(e){return i.Helpers.isValueEmpty(e)?"":e},t}(h),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=r.createRef(),n.recalculateCss(),n}return f(t,e),t.prototype.recalculateCss=function(){this.row.visibleElements.map((function(e){return e.cssClasses}))},t.prototype.getStateElement=function(){return this.row},Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.row&&!!this.survey&&!!this.creator&&this.row.visible},t.prototype.renderElementContent=function(){var e=this,t=this.row.visibleElements.map((function(t,n){var o=e.createElement(t,n),i=t.cssClassesValue;return r.createElement("div",{className:i.questionWrapper,style:t.rootStyle,"data-key":o.key,key:o.key,onFocus:function(){var e=t;e&&!e.isDisposed&&e.isQuestion&&e.focusIn()}},e.row.isNeedRender?o:s.Instance.createElement(t.skeletonComponentName,{element:t,css:e.css}))}));return r.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},t)},t.prototype.renderElement=function(){var e=this.survey,t=this.renderElementContent();return a.wrapRow(e,t,this.row)||t},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var n=this.rootRef.current;if(n&&!this.row.isNeedRender){var r=n;setTimeout((function(){t.row.startLazyRendering(r)}),10)}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.row!==this.row&&(t.row.isNeedRender=this.row.isNeedRender,this.stopLazyRendering()),this.recalculateCss(),!0)},t.prototype.stopLazyRendering=function(){this.row.stopLazyRendering(),this.row.isNeedRender=!this.row.isLazyRendering()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.stopLazyRendering()},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(e){function t(t){var n=e.call(this,t)||this;return n.renderedRowsCache={},n.rootRef=r.createRef(),n}return y(t,e),t.prototype.getStateElement=function(){return this.panelBase},t.prototype.canUsePropInState=function(t){return"elements"!==t&&e.prototype.canUsePropInState.call(this,t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.getSurvey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.getCss()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelBase",{get:function(){return this.getPanelBase()},enumerable:!1,configurable:!0}),t.prototype.getPanelBase=function(){return this.props.element||this.props.question},t.prototype.getSurvey=function(){return this.props.survey||(this.panelBase?this.panelBase.survey:null)},t.prototype.getCss=function(){return this.props.css},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),t.page&&this.survey&&this.survey.currentPage&&t.page.name===this.survey.currentPage.name||this.doAfterRender()},t.prototype.doAfterRender=function(){var e=this.rootRef.current;e&&this.survey&&(this.panelBase.isPanel?this.survey.afterRenderPanel(this.panelBase,e):this.survey.afterRenderPage(e))},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.survey&&!!this.panelBase&&this.panelBase.isVisible&&!!this.panelBase.survey},t.prototype.renderRows=function(e){"rows"!==this.changedStatePropName&&(this.renderedRowsCache={});for(var t=[],n=this.panelBase.rows,r=0;r<n.length;r++){var o=this.renderedRowsCache[n[r].id];o||(o=this.createRow(n[r],e),this.renderedRowsCache[n[r].id]=o),t.push(o)}return t},t.prototype.createRow=function(e,t){return r.createElement(m,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})},t}(c),g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.svgIconRef=o.a.createRef(),n}return g(t,e),t.prototype.updateSvg=function(){this.props.iconName&&Object(i.createSvg)(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current,this.props.title)},t.prototype.componentDidUpdate=function(){this.updateSvg()},t.prototype.render=function(){var e="sv-svg-icon";return this.props.className&&(e+=" "+this.props.className),this.props.iconName?o.a.createElement("svg",{className:e,style:this.props.style,onClick:this.props.onClick,ref:this.svgIconRef,role:"img","aria-label":this.props.title},o.a.createElement("use",null)):null},t.prototype.componentDidMount=function(){this.updateSvg()},t}(o.a.Component);s.Instance.registerElement("sv-svg-icon",(function(e){return o.a.createElement(b,e)}));var C=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(t){return e.call(this,t)||this}return C(t,e),t.prototype.render=function(){var e="sv-action-bar-separator "+this.props.cssClasses;return o.a.createElement("div",{className:e})},t}(o.a.Component);s.Instance.registerElement("sv-action-bar-separator",(function(e){return o.a.createElement(E,e)}));var q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this.item.getActionRootCss(),t=this.item.needSeparator?o.a.createElement(E,null):null,n=s.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return o.a.createElement("div",{className:e,id:this.item.id},o.a.createElement("div",{className:"sv-action__content"},t,n))},t}(c),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){return o.a.createElement(o.a.Fragment,null,this.renderInnerButton())},t.prototype.renderText=function(){if(!this.item.hasTitle)return null;var e=this.item.getActionBarItemTitleCss();return o.a.createElement("span",{className:e},this.item.title)},t.prototype.renderButtonContent=function(){var e=this.renderText(),t=this.item.iconName?o.a.createElement(b,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName,title:this.item.tooltip||this.item.title}):null;return o.a.createElement(o.a.Fragment,null,t,e)},t.prototype.renderInnerButton=function(){var e=this,t=this.item.getActionBarItemCss(),n=this.item.tooltip||this.item.title,r=this.renderButtonContent(),i=this.item.disableTabStop?-1:void 0;return ne(o.a.createElement("button",{className:t,type:"button",disabled:this.item.disabled,onClick:function(){return e.item.action(e.item)},title:n,tabIndex:i,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},r),null,{processEsc:!1})},t}(c);s.Instance.registerElement("sv-action-bar-item",(function(e){return o.a.createElement(O,e)}));var _=n(2),S=n.n(_),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=o.a.createRef(),n.createModel(),n}return I(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.createModel=function(){this.popup=Object(i.createPopupViewModel)(this.props.model,void 0),this.popup.initializePopupContainer()},t.prototype.setTargetElement=function(){if(this.containerRef.current&&!this.popup.isModal){var e=this.popup;if(!e)return;this.containerRef.current.parentElement&&(e.targetElement=this.containerRef.current.parentElement)}},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.popup.initializePopupContainer(),this.setTargetElement()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setTargetElement()},t.prototype.componentWillUnmount=function(){this.popup.unmountPopupContainer()},t.prototype.shouldComponentUpdate=function(t,n){var r;if(!e.prototype.shouldComponentUpdate.call(this,t,n))return!1;var o=t.model!==this.popup.model;return o&&(null===(r=this.popup)||void 0===r||r.dispose(),this.createModel()),o},t.prototype.render=function(){var e;return this.popup.model=this.model,e=this.model.isModal?S.a.createPortal(o.a.createElement(x,{model:this.popup}),this.popup.container):S.a.createPortal(o.a.createElement(R,{model:this.popup}),this.popup.container),o.a.createElement("div",{ref:this.containerRef},e)},t}(c);s.Instance.registerElement("sv-popup",(function(e){return o.a.createElement(P,e)}));var x=function(e){function t(t){var n=e.call(this,t)||this;return n.prevIsVisible=!1,n.handleKeydown=function(e){n.model.onKeyDown(e)},n.clickInside=function(e){e.stopPropagation()},n}return I(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),!this.prevIsVisible&&this.model.isVisible&&this.model.updateOnShowing(),this.prevIsVisible=this.model.isVisible},t.prototype.renderContainer=function(e){var t=this,n=e.showHeader?this.renderHeaderPopup(e):null,r=e.title?this.renderHeaderContent():null,i=this.renderContent(),s=e.showFooter?this.renderFooter(this.model):null;return o.a.createElement("div",{className:"sv-popup__container",style:{left:e.left,top:e.top,height:e.height,width:e.width,minWidth:e.minWidth},onClick:function(e){t.clickInside(e)}},o.a.createElement("div",{className:"sv-popup__shadow"},n,o.a.createElement("div",{className:"sv-popup__body-content"},r,o.a.createElement("div",{className:"sv-popup__scrolling-content"},i),s)))},t.prototype.renderHeaderContent=function(){return o.a.createElement("div",{className:"sv-popup__body-header"},this.model.title)},t.prototype.renderContent=function(){var e=s.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return o.a.createElement("div",{className:"sv-popup__content"},e)},t.prototype.renderHeaderPopup=function(e){return null},t.prototype.renderFooter=function(e){return o.a.createElement("div",{className:"sv-popup__body-footer"},o.a.createElement(D,{model:e.footerToolbar}))},t.prototype.render=function(){var e=this,t=this.renderContainer(this.model),n=(new i.CssClassBuilder).append("sv-popup").append(this.model.styleClass).toString(),r={display:this.model.isVisible?"":"none"};return o.a.createElement("div",{tabIndex:-1,className:n,style:r,onClick:function(t){e.model.clickOutside(),t.stopPropagation()},onKeyDown:this.handleKeydown},t)},t}(c),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t.prototype.renderHeaderPopup=function(e){var t=e;return t?o.a.createElement("span",{style:{left:t.pointerTarget.left,top:t.pointerTarget.top},className:"sv-popup__pointer"}):null},t}(x);i.settings.showModal=function(e,t,n,r,s,a,u){return void 0===u&&(u="popup"),function(e){e.onHide=function(){S.a.unmountComponentAtNode(t.container),t.unmountPopupContainer()};var t=Object(i.createPopupModalViewModel)(e);return S.a.render(o.a.createElement(x,{model:t}),t.container),t.model.isVisible=!0,t}(Object(i.createDialogOptions)(e,t,n,r,void 0,void 0,s,a,u))};var N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(e){function t(t){var n=e.call(this,t)||this;return n.viewModel=new i.ActionDropdownViewModel(n.item),n}return N(t,e),t.prototype.renderButtonContent=function(){var t=e.prototype.renderButtonContent.call(this);return o.a.createElement(o.a.Fragment,null,t,o.a.createElement(P,{model:this.item.popupModel}))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.viewModel.dispose()},t}(O);s.Instance.registerElement("sv-action-bar-item-dropdown",(function(e){return o.a.createElement(j,e)}));var T=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=o.a.createRef(),n}return T(t,e),Object.defineProperty(t.prototype,"handleClick",{get:function(){return void 0===this.props.handleClick||this.props.handleClick},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.model.hasActions){var t=this.rootRef.current;t&&this.model.initResponsivityManager(t)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.hasActions&&this.model.resetResponsivityManager()},t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(!this.model.hasActions)return null;var e=this.renderItems();return o.a.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),onClick:this.handleClick?function(e){e.stopPropagation()}:void 0},e)},t.prototype.renderItems=function(){return this.model.renderedActions.map((function(e,t){return o.a.createElement(w,{item:e,key:"item"+t})}))},t}(c);s.Instance.registerElement("sv-action-bar",(function(e){return o.a.createElement(D,e)}));var k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(e){function t(t){return e.call(this,t)||this}return k(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(this.element.isTitleRenderedAsString)return c.renderLocString(this.element.locTitle);var e=this.renderTitleSpans(this.element.getTitleOwner(),this.cssClasses);return o.a.createElement(o.a.Fragment,null,e)},t.prototype.renderTitleSpans=function(e,t){var n=function(e){return o.a.createElement("span",{"data-key":e,key:e}," ")},r=[];e.isRequireTextOnStart&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp")));var i=e.no;return i&&(r.push(o.a.createElement("span",{"data-key":"q_num",key:"q_num",className:t.number||t.panel.number,style:{position:"static"},"aria-hidden":!0},i)),r.push(n("num-sp"))),e.isRequireTextBeforeTitle&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp"))),r.push(c.renderLocString(e.locTitle,null,"q_title")),e.isRequireTextAfterTitle&&(r.push(n("req-sp")),r.push(this.renderRequireText(e,t))),r},t.prototype.renderRequireText=function(e,t){return o.a.createElement("span",{"data-key":"req-text",key:"req-text",className:t.requiredText||t.panel.requiredText,"aria-hidden":!0},e.requiredText)},t}(o.a.Component),B=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=o.a.createElement(M,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?o.a.createElement("div",{className:"sv-title-actions"},o.a.createElement("span",{className:"sv-title-actions__title"},e),o.a.createElement(D,{model:this.element.getTitleToolbar()})):e},t}(o.a.Component);i.RendererFactory.Instance.registerRenderer("element","title-actions","sv-title-actions"),s.Instance.registerElement("sv-title-actions",(function(e){return o.a.createElement(L,e)}));var A=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(e){function t(t){return e.call(this,t)||this}return A(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element;if(!e||!e.hasTitle)return null;var t=e.titleAriaLabel||void 0,n=o.a.createElement(L,{element:e,cssClasses:e.cssClasses}),r=void 0;e.hasTitleEvents&&(r=function(e){Object(i.doKey2ClickUp)(e.nativeEvent)});var s=e.titleTagName;return o.a.createElement(s,{className:e.cssTitle,id:e.ariaTitleId,"aria-label":t,tabIndex:e.titleTabIndex,"aria-expanded":e.titleAriaExpanded,role:e.titleAriaRole,onClick:void 0,onKeyUp:r},n)},t}(o.a.Component),W=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(e){function t(t){return e.call(this,t)||this}return W(t,e),t.prototype.getPanelBase=function(){return this.props.page},Object.defineProperty(t.prototype,"page",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderTitle(),t=this.renderDescription(),n=this.renderRows(this.panelBase.cssClasses);return r.createElement("div",{ref:this.rootRef,className:this.page.cssRoot},e,t,n)},t.prototype.renderTitle=function(){return r.createElement(H,{element:this.page})},t.prototype.renderDescription=function(){if(!this.page._showDescription)return null;var e=c.renderLocString(this.page.locDescription);return r.createElement("div",{className:this.panelBase.cssClasses.page.description},e)},t}(v),U=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e){function t(t){var n=e.call(this,t)||this;return n.onChangedHandler=function(e,t){n.isRendering||n.setState({changed:n.state&&n.state.changed?n.state.changed+1:1})},n.rootRef=o.a.createRef(),n}return U(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.locStr&&this.locStr.onStringChanged.remove(this.onChangedHandler)},t.prototype.componentDidUpdate=function(e,t){e.locStr&&e.locStr.onStringChanged.remove(this.onChangedHandler),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){this.locStr&&this.locStr.onStringChanged.add(this.onChangedHandler)},t.prototype.render=function(){if(!this.locStr)return null;this.isRendering=!0;var e=this.renderString();return this.isRendering=!1,e},t.prototype.renderString=function(){if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{ref:this.rootRef,className:"sv-string-viewer",style:this.style,dangerouslySetInnerHTML:e})}return o.a.createElement("span",{ref:this.rootRef,className:"sv-string-viewer",style:this.style},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.defaultRenderer,(function(e){return o.a.createElement(F,e)}));var V=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),z=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n}return V(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.survey.locLogo.onChanged=function(){e.setState({changed:e.state.changed+1})}},t.prototype.componentWillUnmount=function(){this.survey.locLogo.onChanged=function(){}},t.prototype.renderTitle=function(){if(!this.survey.renderedHasTitle)return null;var e=c.renderLocString(this.survey.locDescription);return o.a.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},o.a.createElement(H,{element:this.survey}),this.survey.renderedHasDescription?o.a.createElement("h5",{className:this.css.description},e):null)},t.prototype.renderLogoImage=function(e){if(!e)return null;var t=this.survey.getElementWrapperComponentName(this.survey,"logo-image"),n=this.survey.getElementWrapperComponentData(this.survey,"logo-image");return s.Instance.createElement(t,{data:n})},t.prototype.render=function(){return this.survey.renderedHasHeader?o.a.createElement("div",{className:this.css.header},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),o.a.createElement("div",{className:this.css.headerClose})):null},t}(o.a.Component);s.Instance.registerElement("survey-header",(function(e){return o.a.createElement(z,e)}));var K=function(){function e(){this.creatorHash={}}return e.prototype.registerQuestion=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.createQuestion=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),J=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.render=function(){return o.a.createElement("div",{className:"sv-brand-info"},o.a.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"},o.a.createElement("img",{src:"https://surveyjs.io/Content/Images/poweredby.svg"})),o.a.createElement("div",{className:"sv-brand-info__text"},"Try and see how easy it is to ",o.a.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")),o.a.createElement("div",{className:"sv-brand-info__terms"},o.a.createElement("a",{href:"https://surveyjs.io/TermsOfUse"},"Terms of Use & Privacy Statement")))},t}(o.a.Component),G=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){if(!this.notifier.isDisplayed)return null;var e={visibility:this.notifier.active?"visible":"hidden"};return o.a.createElement("div",{className:this.notifier.css,style:e},o.a.createElement("span",null,this.notifier.message),o.a.createElement(D,{model:this.notifier.actionBar}))},t}(c);s.Instance.registerElement("sv-notifier",(function(e){return o.a.createElement(X,e)}));var $=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype.render=function(){var e=this,t=this.props.survey.getContainerContent(this.props.container),n=!1!==this.props.needRenderWrapper;return 0==t.length?null:n?o.a.createElement("div",{className:"sv-components-column"},t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,key:t.id})}))):o.a.createElement(o.a.Fragment,null,t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,key:t.id})})))},t}(o.a.Component);s.Instance.registerElement("sv-components-container",(function(e){return o.a.createElement(Y,e)}));var ee=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),te=function(e){function t(t){var n=e.call(this,t)||this;return n.previousJSON={},n.isSurveyUpdated=!1,n.createSurvey(t),n.updateSurvey(t,{}),n.rootRef=r.createRef(),n.rootNodeId=t.id||null,n.rootNodeClassName=t.className||"",n}return ee(t,e),Object.defineProperty(t,"cssType",{get:function(){return i.surveyCss.currentType},set:function(e){i.StylesManager.applyTheme(e)},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.survey},t.prototype.onSurveyUpdated=function(){if(this.survey){var e=this.rootRef.current;e&&this.survey.afterRenderSurvey(e),this.survey.startTimerFromUI()}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(this.isModelJSONChanged(t)&&(this.destroySurvey(),this.createSurvey(t),this.updateSurvey(t,{}),this.isSurveyUpdated=!0),!0)},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateSurvey(this.props,t),this.isSurveyUpdated&&(this.onSurveyUpdated(),this.isSurveyUpdated=!1)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.onSurveyUpdated()},t.prototype.destroySurvey=function(){this.survey&&(this.survey.stopTimer(),this.survey.destroyResizeObserver())},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.destroySurvey()},t.prototype.doRender=function(){var e;this.survey.needRenderIcons&&i.SvgRegistry.renderIcons(),e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():this.renderSurvey();var t=r.createElement(z,{survey:this.survey}),n=r.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(n=null);var o=this.survey.getRootCss(),s=this.rootNodeClassName?this.rootNodeClassName+" "+o:o,a={backgroundImage:this.survey.renderBackgroundImage},u={backgroundColor:this.survey.renderBackgroundOpacity};return r.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:s,style:a},r.createElement("form",{onSubmit:function(e){e.preventDefault()},style:u},n,r.createElement("div",{className:this.css.container},t,r.createElement(Y,{survey:this.survey,container:"header",needRenderWrapper:!1}),e,r.createElement(Y,{survey:this.survey,container:"footer",needRenderWrapper:!1}))),this.survey.showBrandInfo?r.createElement(Z,null):null,r.createElement(X,{notifier:this.survey.notifier}))},t.prototype.renderElement=function(){return this.doRender()},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},set:function(e){this.survey.css=e},enumerable:!1,configurable:!0}),t.prototype.renderCompleted=function(){if(!this.survey.showCompletedPage)return null;var e={__html:this.survey.processedCompletedHtml};return r.createElement(r.Fragment,null,r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedCss}))},t.prototype.renderCompletedBefore=function(){var e={__html:this.survey.processedCompletedBeforeHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.css.body})},t.prototype.renderLoading=function(){var e={__html:this.survey.processedLoadingHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.css.body})},t.prototype.renderSurvey=function(){var e=this.survey.activePage?this.renderPage(this.survey.activePage):null,t=(this.survey.isShowStartingPage,this.survey.activePage?this.survey.activePage.id:""),n=this.survey.bodyCss;e||(n=this.css.bodyEmpty,e=this.renderEmptySurvey());var o={};return this.survey.renderedWidth&&(o.maxWidth=this.survey.renderedWidth),r.createElement("div",{className:this.survey.bodyContainerCss},r.createElement(Y,{survey:this.survey,container:"left"}),r.createElement("div",{id:t,className:n,style:o},r.createElement(Y,{survey:this.survey,container:"contentTop"}),e,r.createElement(Y,{survey:this.survey,container:"contentBottom"})),r.createElement(Y,{survey:this.survey,container:"right"}))},t.prototype.renderPage=function(e){return r.createElement(Q,{survey:this.survey,page:e,css:this.css,creator:this})},t.prototype.renderEmptySurvey=function(){return r.createElement("span",null,this.survey.emptySurveyText)},t.prototype.createSurvey=function(e){e||(e={}),this.previousJSON={},e?e.model?this.survey=e.model:e.json&&(this.previousJSON=e.json,this.survey=new i.SurveyModel(e.json)):this.survey=new i.SurveyModel,e.css&&(this.survey.css=this.css),this.setSurveyEvents()},t.prototype.isModelJSONChanged=function(e){return e.model?this.survey!==e.model:!!e.json&&!i.Helpers.isTwoValueEquals(e.json,this.previousJSON)},t.prototype.updateSurvey=function(e,t){if(e)for(var n in t=t||{},e)"model"!=n&&"children"!=n&&"json"!=n&&("css"!=n?e[n]!==t[n]&&(0==n.indexOf("on")&&this.survey[n]&&this.survey[n].add?(t[n]&&this.survey[n].remove(t[n]),this.survey[n].add(e[n])):this.survey[n]=e[n]):(this.survey.mergeValues(e.css,this.survey.getCss()),this.survey.updateNavigationCss(),this.survey.updateElementCss()))},t.prototype.setSurveyEvents=function(){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((function(t){e.state&&e.setState(e.state)}))},t.prototype.createQuestionElement=function(e){return K.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.renderError=function(e,t,n){return r.createElement("div",{key:e},r.createElement("span",{className:n.error.icon||void 0,"aria-hidden":"true"}),r.createElement("span",{className:n.error.item||void 0},r.createElement(F,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(c);function ne(e,t,n){return void 0===n&&(n={processEsc:!0,disableTabStop:!1}),t&&t.disableTabStop||n&&n.disableTabStop?r.cloneElement(e,{tabIndex:-1}):r.cloneElement(e,{tabIndex:0,onKeyUp:function(e){return e.preventDefault(),e.stopPropagation(),Object(i.doKey2ClickUp)(e,n),!1},onKeyDown:function(e){return Object(i.doKey2ClickDown)(e,n)},onBlur:function(e){return Object(i.doKey2ClickBlur)(e)}})}s.Instance.registerElement("survey",(function(e){return r.createElement(te,e)}));var re=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oe=function(e){function t(t){var n=e.call(this,t)||this;return n.updateStateFunction=null,n.state={update:0},n}return re(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css||this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.survey){var e=this;this.updateStateFunction=function(){e.setState({update:e.state.update+1})},this.survey.onPageVisibleChanged.add(this.updateStateFunction)}},t.prototype.componentWillUnmount=function(){this.survey&&this.updateStateFunction&&(this.survey.onPageVisibleChanged.remove(this.updateStateFunction),this.updateStateFunction=null)},t}(r.Component),ie=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),se=function(e){function t(t){var n=e.call(this,t)||this;return n.circleLength=440,n}return ie(t,e),t.prototype.getStateElement=function(){return this.timerModel},Object.defineProperty(t.prototype,"timerModel",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return-this.timerModel.progress*this.circleLength},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.timerModel.isRunning)return null;var e=r.createElement("div",{className:this.timerModel.survey.getCss().timerRoot},this.timerModel.text);if(this.timerModel.showTimerAsClock){var t={strokeDasharray:this.circleLength,strokeDashoffset:this.progress},n=this.timerModel.showProgress?r.createElement(b,{className:this.timerModel.getProgressCss(),style:t,iconName:"icon-timercircle",size:"auto"}):null;e=r.createElement("div",{className:this.timerModel.rootCss},n,r.createElement("div",{className:this.timerModel.textContainerCss},r.createElement("span",{className:this.timerModel.majorTextCss},this.timerModel.clockMajorText),this.timerModel.clockMinorText?r.createElement("span",{className:this.timerModel.minorTextCss},this.timerModel.clockMinorText):null))}return e},t}(p);s.Instance.registerElement("sv-timerpanel",(function(e){return r.createElement(se,e)}));var ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ae(t,e),t.prototype.getStateElement=function(){return this.props.counter},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.props.remainingCharacterCounter},this.props.counter.remainingCharacterCounter)},t}(c);s.Instance.registerElement("sv-character-counter",(function(e){return o.a.createElement(ue,e)}));var le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e){function t(t){return e.call(this,t)||this}return le(t,e),t.prototype.renderElement=function(){var e=this,t=this.question.isInputTextUpdate?void 0:this.updateValueOnEvent,n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(ue,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("textarea",{id:this.question.inputId,className:this.question.className,disabled:this.question.isInputReadOnly,readOnly:this.question.isInputReadOnly,ref:function(t){return e.setControl(t)},maxLength:this.question.getMaxLength(),placeholder:n,onBlur:t,onInput:function(t){e.question.isInputTextUpdate?e.updateValueOnEvent(t):e.question.updateElement();var n=t.target.value;e.question.updateRemainingCharacterCounter(n)},onKeyDown:function(t){e.question.onKeyDown(t)},cols:this.question.cols,rows:this.question.rows,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,style:{resize:this.question.resizeStyle}}),o)},t}(d),pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return le(t,e),t.prototype.canRender=function(){return!!this.props.question},t.prototype.onCommentChange=function(e){this.props.question.onCommentChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onCommentInput(e)},t.prototype.getComment=function(){return this.props.question.comment},t.prototype.getId=function(){return this.props.question.commentId},t.prototype.getPlaceholder=function(){return this.props.question.commentPlaceholder},t.prototype.renderElement=function(){var e=this,t=this.props.question,n=this.props.otherCss||this.cssClasses.comment,o=function(t){e.setState({comment:t.target.value}),e.onCommentChange(t)},i=this.getComment(),s=this.state?this.state.comment:void 0;void 0!==s&&s.trim()!==i&&(s=i);var a=void 0!==s?s:i||"";return t.isReadOnlyRenderDiv()?r.createElement("div",null,a):r.createElement("textarea",{id:this.getId(),className:n,value:a,disabled:this.isDisplayMode,maxLength:t.getOthersMaxLength(),placeholder:this.getPlaceholder(),onChange:o,onBlur:function(t){e.onCommentChange(t),o(t)},onInput:function(t){return e.onCommentInput(t)},"aria-required":t.isRequired,"aria-label":t.locTitle.renderedHtml,style:{resize:t.resizeStyle}})},t}(p),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return le(t,e),t.prototype.onCommentChange=function(e){this.props.question.onOtherValueChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onOtherValueInput(e)},t.prototype.getComment=function(){return this.props.question.otherValue},t.prototype.getId=function(){return this.props.question.otherId},t.prototype.getPlaceholder=function(){return this.props.question.otherPlaceholder},t}(pe);K.Instance.registerQuestion("comment",(function(e){return r.createElement(ce,e)}));var de=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fe=function(e){function t(t){var n=e.call(this,t)||this;return n.widgetRef=r.createRef(),n}return de(t,e),t.prototype._afterRender=function(){if(this.questionBase.customWidget){var e=this.widgetRef.current;e&&(this.questionBase.customWidget.afterRender(this.questionBase,e),this.questionBase.customWidgetData.isNeedRender=!1)}},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.questionBase&&this._afterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var r=!!this.questionBase.customWidget&&this.questionBase.customWidget.isDefaultRender;this.questionBase&&!r&&this._afterRender()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase.customWidget){var t=this.widgetRef.current;t&&this.questionBase.customWidget.willUnmount(this.questionBase,t)}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.questionBase.visible},t.prototype.renderElement=function(){var e=this.questionBase.customWidget;if(e.isDefaultRender)return r.createElement("div",{ref:this.widgetRef},this.creator.createQuestionElement(this.questionBase));var t=null;if(e.widgetJson.render)t=e.widgetJson.render(this.questionBase);else if(e.htmlTemplate){var n={__html:e.htmlTemplate};return r.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:n})}return r.createElement("div",{ref:this.widgetRef},t)},t}(h),me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return me(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element,t=e.hasTitle?o.a.createElement(H,{element:e}):null,n=e.hasDescriptionUnderTitle?c.renderQuestionDescription(this.element):null,r=e.additionalTitleToolbar?o.a.createElement(D,{model:e.additionalTitleToolbar}):null;return o.a.createElement("div",{className:e.cssHeader,onClick:e.clickTitleFunction},t,n,r)},t}(o.a.Component),ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ge=function(e){function t(t){var n=e.call(this,t)||this;return n.isNeedFocus=!1,n.rootRef=r.createRef(),n}return ve(t,e),t.renderQuestionBody=function(e,t){return t.isVisible?t.customWidget?r.createElement(fe,{creator:e,question:t}):e.createQuestionElement(t):null},t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.question&&(this.question.react=this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.react=null);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){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"),e.setAttribute("data-name",this.question.name),this.question.afterRender&&this.question.afterRender(e))}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question&&!!this.creator&&this.question.isVisible},t.prototype.renderQuestionContent=function(){var e=this.question,t={display:this.question.isCollapsed?"none":""},n=e.cssClasses,o=this.renderQuestion(),i=this.question.showErrorOnTop?this.renderErrors(n,"top"):null,s=this.question.showErrorOnBottom?this.renderErrors(n,"bottom"):null,a=e&&e.hasComment?this.renderComment(n):null,u=this.question.isErrorsModeTooltip?this.renderErrors(n,"tooltip"):null,l=e.hasDescriptionUnderInput?this.renderDescription():null;return r.createElement("div",{className:e.cssContent||void 0,style:t,role:"presentation"},i,o,a,s,u,l)},t.prototype.renderElement=function(){var e=this.question,t=e.cssClasses,n=this.renderHeader(e),o=e.hasTitleOnLeftTop?n:null,i=e.hasTitleOnBottom?n:null,s=this.question.showErrorsAboveQuestion?this.renderErrors(t,""):null,a=this.question.showErrorsBelowQuestion?this.renderErrors(t,""):null,u=e.getRootStyle(),l=this.wrapQuestionContent(this.renderQuestionContent());return r.createElement(r.Fragment,null,r.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:u,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-labelledby":e.ariaLabelledBy},s,o,l,i,a))},t.prototype.wrapElement=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapElement(t,e,this.question)),null!=n?n:e},t.prototype.wrapQuestionContent=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapQuestionContent(t,e,this.question)),null!=n?n:e},t.prototype.renderQuestion=function(){return t.renderQuestionBody(this.creator,this.question)},t.prototype.renderDescription=function(){return c.renderQuestionDescription(this.question)},t.prototype.renderComment=function(e){var t=c.renderLocString(this.question.locCommentText);return r.createElement("div",{className:this.question.getCommentAreaCss()},r.createElement("div",null,t),r.createElement(pe,{question:this.question,cssClasses:e,otherCss:e.other,isDisplayMode:this.question.isInputReadOnly}))},t.prototype.renderHeader=function(e){return r.createElement(ye,{element:e})},t.prototype.renderErrors=function(e,t){return r.createElement(be,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})},t}(c);s.Instance.registerElement("question",(function(e){return r.createElement(ge,e)}));var be=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getState(),n.tooltipRef=r.createRef(),n}return ve(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.props.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),e?{error:e.error+1}:{error:0}},t.prototype.canRender=function(){return!!this.element&&this.element.hasVisibleErrors},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),"tooltip"==this.props.location&&(this.tooltipRef.current&&!this.tooltipManager&&(this.tooltipManager=new i.TooltipManager(this.tooltipRef.current)),this.tooltipManager&&!this.tooltipRef.current&&this.disposeTooltipManager())},t.prototype.componentWillUnmount=function(){this.tooltipManager&&this.disposeTooltipManager()},t.prototype.disposeTooltipManager=function(){var e;null===(e=this.tooltipManager)||void 0===e||e.dispose(),this.tooltipManager=void 0},t.prototype.renderElement=function(){for(var e=[],t=0;t<this.element.errors.length;t++){var n="error"+t;e.push(this.creator.renderError(n,this.element.errors[t],this.cssClasses))}return r.createElement("div",{role:"alert","aria-live":"polite",className:this.element.cssError,id:this.id,ref:this.tooltipRef},e)},t}(p),Ce=function(e){function t(t){return e.call(this,t)||this}return ve(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.getQuestion()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){return this.props.question},Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.props.itemCss},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){},t.prototype.canRender=function(){return!!this.question},t.prototype.renderErrors=function(e){return this.getShowErrors()?r.createElement(be,{element:this.question,cssClasses:this.cssClasses,creator:this.creator,location:e}):null},t.prototype.renderContent=function(){var e=this.creator.questionErrorLocation(),t=this.renderErrors(e),n=this.question.showErrorOnTop?t:null,o=this.question.showErrorOnBottom?t:null,i=this.renderQuestion();return r.createElement(r.Fragment,null,n,i,o)},t.prototype.getShowErrors=function(){return this.question.isVisible},t.prototype.renderQuestion=function(){return ge.renderQuestionBody(this.creator,this.question)},t}(p),Ee=function(e){function t(t){var n=e.call(this,t)||this;return n.cellRef=r.createRef(),n}return ve(t,e),t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.question){var t=this.cellRef.current;t&&t.removeAttribute("data-rendered")}},t.prototype.renderElement=function(){var e=this.getCellStyle(),t=this.question.isErrorsModeTooltip?this.renderErrors("tooltip"):null;return r.createElement("td",{ref:this.cellRef,className:this.itemCss,colSpan:this.props.cell.colSpans,"data-responsive-title":this.getHeaderText(),title:this.props.cell.getTitle(),style:e},this.wrapCell(this.props.cell,r.createElement("div",{className:this.cssClasses.cellQuestionWrapper},this.renderContent(),t)))},t.prototype.getCellStyle=function(){return null},t.prototype.getHeaderText=function(){return""},t.prototype.wrapCell=function(e,t){if(!e)return t;var n=this.question.survey,r=null;return n&&(r=a.wrapMatrixCell(n,t,e,this.props.reason)),null!=r?r:t},t}(Ce),qe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),we=function(e){function t(t){var n=e.call(this,t)||this;return n.hasBeenExpanded=!1,n}return qe(t,e),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.renderHeader(),n=r.createElement(be,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),o={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.isCollapsed?"none":void 0},i=null;if(!this.panel.isCollapsed||this.hasBeenExpanded){this.hasBeenExpanded=!0;var s=this.renderRows(this.panelBase.cssClasses),a=this.panelBase.cssClasses.panel.content;i=this.renderContent(o,s,a)}return r.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:function(){e.panelBase&&e.panelBase.focusIn()},id:this.panelBase.id},t,n,i)},t.prototype.renderHeader=function(){return this.panel.hasTitle||this.panel.hasDescription?r.createElement(ye,{element:this.panel}):null},t.prototype.wrapElement=function(e){var t=this.panel.survey,n=null;return t&&(n=a.wrapElement(t,e,this.panel)),null!=n?n:e},t.prototype.renderContent=function(e,t,n){var o=this.renderBottom();return r.createElement("div",{style:e,className:n,id:this.panel.contentId},t,o)},t.prototype.renderTitle=function(){return this.panelBase.title?r.createElement(H,{element:this.panelBase}):null},t.prototype.renderDescription=function(){if(!this.panelBase.description)return null;var e=c.renderLocString(this.panelBase.locDescription);return r.createElement("div",{className:this.panel.cssClasses.panel.description},e)},t.prototype.renderBottom=function(){var e=this.panel.getFooterToolbar();return e.hasActions?r.createElement(D,{model:e}):null},t}(v);s.Instance.registerElement("panel",(function(e){return r.createElement(we,e)}));var Oe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_e=function(e){function t(t){return e.call(this,t)||this}return Oe(t,e),Object.defineProperty(t.prototype,"flowPanel",{get:function(){return this.panel},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=function(){return""},this.flowPanel.onGetHtmlForQuestion=this.renderQuestion)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=null,this.flowPanel.onGetHtmlForQuestion=null)},t.prototype.getQuestion=function(e){return this.flowPanel.getQuestionByName(e)},t.prototype.renderQuestion=function(e){return"<question>"+e.name+"</question>"},t.prototype.renderRows=function(){var e=this.renderHtml();return e?[e]:[]},t.prototype.getNodeIndex=function(){return this.renderedIndex++},t.prototype.renderHtml=function(){if(!this.flowPanel)return null;var e="<span>"+this.flowPanel.produceHtml()+"</span>";if(!DOMParser){var t={__html:e};return r.createElement("div",{dangerouslySetInnerHTML:t})}var n=(new DOMParser).parseFromString(e,"text/xml");return this.renderedIndex=0,this.renderParentNode(n)},t.prototype.renderNodes=function(e){for(var t=[],n=0;n<e.length;n++){var r=this.renderNode(e[n]);r&&t.push(r)}return t},t.prototype.getStyle=function(e){var t={};return"b"===e.toLowerCase()&&(t.fontWeight="bold"),"i"===e.toLowerCase()&&(t.fontStyle="italic"),"u"===e.toLowerCase()&&(t.textDecoration="underline"),t},t.prototype.renderParentNode=function(e){var t=e.nodeName.toLowerCase(),n=this.renderNodes(this.getChildDomNodes(e));return"div"===t?r.createElement("div",{key:this.getNodeIndex()},n):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},n)},t.prototype.renderNode=function(e){if(!this.hasTextChildNodesOnly(e))return this.renderParentNode(e);var t=e.nodeName.toLowerCase();if("question"===t){var n=this.flowPanel.getQuestionByName(e.textContent);if(!n)return null;var o=r.createElement(ge,{key:n.name,element:n,creator:this.creator,css:this.css});return r.createElement("span",{key:this.getNodeIndex()},o)}return"div"===t?r.createElement("div",{key:this.getNodeIndex()},e.textContent):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},e.textContent)},t.prototype.getChildDomNodes=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t},t.prototype.hasTextChildNodesOnly=function(e){for(var t=e.childNodes,n=0;n<t.length;n++)if("#text"!==t[n].nodeName.toLowerCase())return!1;return!0},t.prototype.renderContent=function(e,t){return r.createElement("f-panel",{style:e},t)},t}(we);s.Instance.registerElement("flowpanel",(function(e){return r.createElement(_e,e)}));var Se=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ie=function(e){function t(t){return e.call(this,t)||this}return Se(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("fieldset",{role:"presentation",className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)}},r.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.getHeader(),this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther():null)},t.prototype.getHeader=function(){var e=this;if(this.question.hasHeadItems)return this.question.headItems.map((function(t,n){return e.renderItem("item_h"+n,t,!1,e.question.cssClasses)}))},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,0===o&&0===r,e,""+o+r)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i="item"+r,s=this.renderItem(i,o,0==r,e,""+r);s&&n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(){var e=this.question.cssClasses;return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(he,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isFirst:n}),u=this.question.survey,l=null;return u&&i&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t}(h),Pe=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.clickItemHandler(n.item,e.target.checked)},n.selectAllChanged=function(e){n.question.toggleSelectAll()},n}return Se(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFirst",{get:function(){return this.props.isFirst},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this.question.isItemSelected(this.item);return this.renderCheckbox(e,null)},Object.defineProperty(t.prototype,"inputStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderCheckbox=function(e,t){var n=this.question.getItemId(this.item),o=(this.hideCaption||this.renderLocString(this.item.locText),this.question.getItemClass(this.item)),i=this.question.getLabelClass(this.item),s=this.item==this.question.selectAllItem?this.selectAllChanged:this.handleOnChange,a=this.hideCaption?null:r.createElement("span",{className:this.cssClasses.controlLabel},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:o,role:"presentation"},r.createElement("label",{className:i,"aria-label":this.question.getAriaItemLabel(this.item)},r.createElement("input",{className:this.cssClasses.itemControl,role:"option",type:"checkbox",name:this.question.name,value:"selectall"!=this.item.value?this.item.value:void 0,id:n,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),checked:e,onChange:s,"aria-describedby":this.question.ariaDescribedBy}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,a),t)},t}(p);s.Instance.registerElement("survey-checkbox-item",(function(e){return r.createElement(Pe,e)})),K.Instance.registerQuestion("checkbox",(function(e){return r.createElement(Ie,e)}));var xe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this;return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},this.getItems())},t.prototype.getItems=function(){for(var e=this,t=[],n=this.question.rankingChoices,r=function(r){var i=n[r];t.push(o.renderItem(i,r,(function(t){e.question.handleKeydown.call(e.question,t,i)}),(function(t){t.persist(),e.question.handlePointerDown.call(e.question,t,i,t.currentTarget)}),o.question.cssClasses,o.question.getItemClass(i),o.question))},o=this,i=0;i<n.length;i++)r(i);return t},t.prototype.renderItem=function(e,t,n,o,i,s,u){var l=e.value+"-"+t+"-item",c=this.renderLocString(e.locText),p=t,h=this.question.getNumberByIndex(t),d=this.question.getItemTabIndex(e),f=r.createElement(Ne,{key:l,text:c,index:p,indexText:h,itemTabIndex:d,handleKeydown:n,handlePointerDown:o,cssClasses:i,itemClass:s,question:u}),m=this.question.survey,y=null;return m&&(y=a.wrapItemValue(m,f,this.question,e)),null!=y?y:f},t}(h),Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.props.text},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indexText",{get:function(){return this.props.indexText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handleKeydown",{get:function(){return this.props.handleKeydown},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handlePointerDown",{get:function(){return this.props.handlePointerDown},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemClass",{get:function(){return this.props.itemClass},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemTabIndex",{get:function(){return this.props.itemTabIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",{tabIndex:this.itemTabIndex,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,"data-sv-drop-target-ranking-item":this.index},r.createElement("div",{tabIndex:-1,style:{outline:"none"}},r.createElement("div",{className:this.cssClasses.itemGhostNode}),r.createElement("div",{className:this.cssClasses.itemContent},r.createElement("div",{className:this.cssClasses.itemIconContainer},r.createElement("svg",{width:"10",height:"16",viewBox:"0 0 10 16",className:this.question.getIconHoverCss(),xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M6 2C6 0.9 6.9 0 8 0C9.1 0 10 0.9 10 2C10 3.1 9.1 4 8 4C6.9 4 6 3.1 6 2ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12ZM2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12Z"})),r.createElement("svg",{width:"10",height:"24",viewBox:"0 0 10 24",className:this.question.getIconFocusCss(),xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M10 5L5 0L0 5H4V9H6V5H10Z"}),r.createElement("path",{d:"M6 19V15H4V19H0L5 24L10 19H6Z"}))),r.createElement("div",{className:this.question.getItemIndexClasses()},this.indexText),r.createElement("div",{className:this.cssClasses.controlLabel},this.text))))},t}(p);K.Instance.registerQuestion("ranking",(function(e){return r.createElement(Re,e)}));var je=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return je(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this.renderLocString(this.item.locText);return o.a.createElement("label",{className:this.question.getItemClassByText(this.item.itemValue,this.item.text)},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement("span",{className:this.question.cssClasses.itemText},e))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t}(c);s.Instance.registerElement("sv-rating-item",(function(e){return o.a.createElement(Te,e)}));var De=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;return o.a.createElement("label",{className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement(b,{className:"sv-star",size:"auto",iconName:"icon-rating-star",title:this.item.text}),o.a.createElement(b,{className:"sv-star-2",size:"auto",iconName:"icon-rating-star-2",title:this.item.text}))},t}(c);s.Instance.registerElement("sv-rating-item-star",(function(e){return o.a.createElement(ke,e)}));var Me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Me(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;return o.a.createElement("label",{className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement(b,{size:"auto",iconName:this.question.getItemSmileyIconName(this.item.itemValue),title:this.item.text}))},t}(c);s.Instance.registerElement("sv-rating-item-smiley",(function(e){return o.a.createElement(Be,e)}));var Le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ae=function(e){function t(t){return e.call(this,t)||this}return Le(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.updateDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.model.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value)||(e.value=this.model.inputStringRendered)}},t.prototype.onChange=function(e){e.target===document.activeElement&&(this.model.inputStringRendered=e.target.value)},t.prototype.keyhandler=function(e){this.model.inputKeyHandler(e)},t.prototype.onBlur=function(e){this.model.onBlur(e)},t.prototype.onFocus=function(e){this.model.onFocus(e)},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),inputMode:this.model.inputMode,ref:function(t){return e.inputElement=t},className:this.question.cssClasses.filterStringInput,disabled:this.question.isInputReadOnly,readOnly:!this.model.searchEnabled||void 0,size:this.model.inputStringRendered?void 0:1,role:this.model.filterStringEnabled?this.question.ariaRole:void 0,"aria-label":this.question.placeholder,"aria-expanded":this.question.ariaExpanded?"true":"false","aria-controls":this.model.listElementId,"aria-activedescendant":this.model.ariaActivedescendant,placeholder:this.model.filterStringPlaceholder,onKeyDown:function(t){e.keyhandler(t)},onChange:function(t){e.onChange(t)},onBlur:function(t){e.onBlur(t)},onFocus:function(t){e.onFocus(t)}})},t}(c);K.Instance.registerQuestion("sv-tagbox-filter",(function(e){return r.createElement(Ae,e)}));var He=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),We=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.setupModel(),n}return He(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setupModel()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item&&(this.item.locText.onChanged=function(){})},t.prototype.setupModel=function(){if(this.item.locText){var e=this;this.item.locText.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item},t.prototype.renderElement=function(){return r.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)},t}(p),Qe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ue=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.click=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClick(e)},t.clear=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClear(e)},t.keyhandler=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.keyHandler(e)},t.blur=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onBlur(e),t.updateInputDomElement()},t.focus=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onFocus(e)},t}return Qe(t,e),t.prototype.getStateElement=function(){return this.question.dropdownListModel},t.prototype.setValueCore=function(e){this.questionBase.renderedValue=e},t.prototype.getValueCore=function(){return this.questionBase.renderedValue},t.prototype.renderSelect=function(e){var t,n,o=null;if(this.question.isReadOnly){var s=this.question.selectedItemLocText?this.renderLocString(this.question.selectedItemLocText):"";o=r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},s,r.createElement("div",null,this.question.readOnlyText))}else this.question.dropdownListModel||(this.question.dropdownListModel=new i.DropdownListModel(this.question)),o=r.createElement(r.Fragment,null,this.renderInput(this.question.dropdownListModel),r.createElement(P,{model:null===(n=null===(t=this.question)||void 0===t?void 0:t.dropdownListModel)||void 0===n?void 0:n.popupModel}));return r.createElement("div",{className:e.selectWrapper},o)},t.prototype.renderValueElement=function(e){return this.question.showInputFieldComponent?s.Instance.createElement(this.question.inputFieldComponentName,{item:e.getSelectedAction(),question:this.question}):this.question.showSelectedItemLocText?this.renderLocString(this.question.selectedItemLocText):null},t.prototype.renderInput=function(e){var t=this,n=this.renderValueElement(e);return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.inputReadOnly?void 0:0,onClick:this.click,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-describedby":this.question.ariaDescribedBy,"aria-expanded":this.question.ariaExpanded?"true":"false","aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},e.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,e.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.controlValue},e.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},e.inputStringRendered),r.createElement("span",null,e.hintStringSuffix)):null,n,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),ref:function(e){return t.inputElement=e},className:this.question.cssClasses.filterStringInput,role:e.filterStringEnabled?this.question.ariaRole:void 0,"aria-label":this.question.placeholder,"aria-expanded":this.question.ariaExpanded?"true":"false","aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant,placeholder:e.placeholderRendered,readOnly:!e.searchEnabled||void 0,tabIndex:e.inputReadOnly?void 0:-1,disabled:this.question.isInputReadOnly,inputMode:e.inputMode,onChange:function(t){!function(t){t.target===document.activeElement&&(e.inputStringRendered=t.target.value)}(t)},onBlur:this.blur,onFocus:this.focus})),this.createClearButton())},t.prototype.createClearButton=function(){if(!this.question.allowClear||!this.question.cssClasses.cleanButtonIconId)return null;var e={display:this.question.isEmpty()?"none":""};return r.createElement("div",{className:this.question.cssClasses.cleanButton,style:e,onClick:this.clear},r.createElement(b,{className:this.question.cssClasses.cleanButtonSvg,iconName:this.question.cssClasses.cleanButtonIconId,title:this.question.clearCaption,size:"auto"}))},t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(he,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode,isOther:!0}))},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateInputDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateInputDomElement()},t.prototype.updateInputDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.question.dropdownListModel.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value)||(e.value=this.question.dropdownListModel.inputStringRendered)}},t}(d),Fe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ve=function(e){function t(t){return e.call(this,t)||this}return Fe(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t}(Ue);K.Instance.registerQuestion("dropdown",(function(e){return r.createElement(Ve,e)}));var ze=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ke=function(e){function t(t){return e.call(this,t)||this}return ze(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this,t=this.renderLocString(this.item.locText);return r.createElement("div",{className:"sv-tagbox__item"},r.createElement("div",{className:"sv-tagbox__item-text"},t),r.createElement("div",{className:this.question.cssClasses.cleanItemButton,onClick:function(t){e.question.dropdownListModel.deselectItem(e.item.value),t.stopPropagation()}},r.createElement(b,{className:this.question.cssClasses.cleanItemButtonSvg,iconName:this.question.cssClasses.cleanItemButtonIconId,size:"auto"})))},t}(p),Je=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ze=function(e){function t(t){return e.call(this,t)||this}return Je(t,e),t.prototype.renderItem=function(e,t){return r.createElement(Ke,{key:e,question:this.question,item:t})},t.prototype.renderInput=function(e){var t=this,n=e,o=this.question.selectedChoices.map((function(e,n){return t.renderItem("item"+n,e)}));return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.inputReadOnly?void 0:0,onClick:this.click,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-describedby":this.question.ariaDescribedBy,"aria-expanded":this.question.ariaExpanded?"true":"false","aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},r.createElement("div",{className:this.question.cssClasses.controlValue},o,r.createElement(Ae,{model:n,question:this.question})),this.createClearButton())},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t}(Ue);K.Instance.registerQuestion("tagbox",(function(e){return r.createElement(Ze,e)}));var Ge=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=function(e){function t(t){return e.call(this,t)||this}return Ge(t,e),t.prototype.renderSelect=function(e){var t=this,n=this.isDisplayMode?r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):r.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:function(e){return t.setControl(e)},autoComplete:this.question.autocomplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onClick:function(e){t.question.onClick(e)},onKeyUp:function(e){t.question.onKeyUp(e)},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,required:this.question.isRequired},this.question.allowClear?r.createElement("option",{value:""},this.question.placeholder):null,this.question.visibleChoices.map((function(e,t){return r.createElement(We,{key:"item"+t,item:e})})));return r.createElement("div",{className:e.selectWrapper},n)},t}(Ve);K.Instance.registerQuestion("sv-dropdown-select",(function(e){return r.createElement(Xe,e)})),i.RendererFactory.Instance.registerRenderer("dropdown","select","sv-dropdown-select");var $e=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(e){function t(t){var n=e.call(this,t)||this;return n.state={rowsChanged:0},n}return $e(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.question){var t=this;this.question.visibleRowsChangedCallback=function(){t.setState({rowsChanged:t.state.rowsChanged+1})}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.visibleRowsChangedCallback=null)},t.prototype.renderElement=function(){for(var e=this,t=this.question.cssClasses,n=this.question.hasRows?r.createElement("td",null):null,o=[],i=0;i<this.question.visibleColumns.length;i++){var s=this.question.visibleColumns[i],a="column"+i,u=this.renderLocString(s.locText),l={};this.question.columnMinWidth&&(l.minWidth=this.question.columnMinWidth,l.width=this.question.columnMinWidth),o.push(r.createElement("th",{className:this.question.cssClasses.headerCell,style:l,key:a},this.wrapCell({column:s},u,"column-header")))}var c=[],p=this.question.visibleRows;for(i=0;i<p.length;i++){var h=p[i];a="row-"+h.name+"-"+i;c.push(r.createElement(et,{key:a,question:this.question,cssClasses:t,isDisplayMode:this.isDisplayMode,row:h,isFirst:0==i}))}var d=this.question.showHeader?r.createElement("thead",null,r.createElement("tr",null,n,o)):null;return r.createElement("div",{className:t.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",null,r.createElement("legend",{"aria-label":this.question.locTitle.renderedHtml}),r.createElement("table",{className:this.question.getTableCss()},d,r.createElement("tbody",null,c))))},t}(h),et=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return $e(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),t.prototype.handleOnChange=function(e){this.row.value=e.target.value,this.setState({value:this.row.value})},t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.question.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.canRender=function(){return!!this.row},t.prototype.renderElement=function(){var e=null;if(this.question.hasRows){var t=this.renderLocString(this.row.locText),n={};this.question.rowTitleWidth&&(n.minWidth=this.question.rowTitleWidth,n.width=this.question.rowTitleWidth),e=r.createElement("td",{style:n,className:this.question.cssClasses.rowTextCell},this.wrapCell({row:this.row},t,"row-header"))}var o=this.generateTds();return r.createElement("tr",{className:this.row.rowClasses||void 0},e,o)},t.prototype.generateTds=function(){for(var e=this,t=[],n=this.row,o=0;o<this.question.visibleColumns.length;o++){var i=null,s=this.question.visibleColumns[o],a="value"+o,u=n.value==s.value,l=this.question.getItemClass(n,s),c=this.question.inputId+"_"+n.name+"_"+o;if(this.question.hasCellText){var p=this.question.isInputReadOnly?null:function(t){return function(){return e.cellClick(n,t)}};i=r.createElement("td",{key:a,className:l,onClick:p?p(s):function(){}},this.renderLocString(this.question.getCellDisplayLocText(n.name,s)))}else i=r.createElement("td",{key:a,"data-responsive-title":s.locText.renderedHtml,className:this.question.cssClasses.cell},r.createElement("label",{className:l},r.createElement("input",{id:c,type:"radio",className:this.cssClasses.itemValue,name:n.fullName,value:s.value,disabled:this.isDisplayMode,checked:u,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":s.locText.renderedHtml,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("span",{className:this.question.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null),r.createElement("span",{style:this.question.isMobile?void 0:{display:"none"},className:this.question.cssClasses.cellResponsiveTitle},this.renderLocString(s.locText))));t.push(i)}return t},t.prototype.cellClick=function(e,t){e.value=t.value,this.setState({value:this.row.value})},t}(p);K.Instance.registerQuestion("matrix",(function(e){return r.createElement(Ye,e)}));var tt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nt=function(e){function t(t){return e.call(this,t)||this}return tt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.question.locHtml.onChanged=function(){}},t.prototype.componentDidUpdate=function(e,t){this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.question.locHtml.onChanged=function(){e.setState({changed:e.state&&e.state.changed?e.state.changed+1:1})}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question.html},t.prototype.renderElement=function(){var e={__html:this.question.locHtml.renderedHtml};return r.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})},t}(h);K.Instance.registerQuestion("html",(function(e){return r.createElement(nt,e)}));var rt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ot=function(e){function t(t){return e.call(this,t)||this}return rt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e,t=this,n=this.renderPreview(),o=this.renderFileDecorator(),i=this.renderClearButton(this.question.showRemoveButton),s=this.renderClearButton(this.question.showRemoveButtonBottom),a=this.question.mobileFileNavigatorVisible?r.createElement(D,{model:this.question.mobileFileNavigator}):null;return e=this.isDisplayMode?r.createElement("input",{type:"file",disabled:this.isDisplayMode,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?function(){}:this.question.doChange,multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):r.createElement("input",{type:"file",disabled:this.isDisplayMode,tabIndex:-1,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?function(){}:this.question.doChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,multiple:this.question.allowMultiple,title:this.question.inputTitle,accept:this.question.acceptedTypes}),r.createElement("div",{className:this.question.fileRootCss},e,r.createElement("div",{className:this.question.cssClasses.dragArea,onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave,onDragEnter:this.question.onDragEnter},o,i,n,s,a))},t.prototype.renderFileDecorator=function(){this.question.cssClasses;var e,t=null;return e=r.createElement("label",{role:"button",tabIndex:0,className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonCaption},r.createElement("span",null,this.question.chooseButtonCaption),this.question.cssClasses.chooseFileIconId?r.createElement(b,{title:this.question.chooseButtonCaption,iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null),this.question.isEmpty()&&(t=r.createElement("span",{className:this.question.cssClasses.noFileChosen},this.question.noFileChosenCaption)),r.createElement("div",{className:this.question.getFileDecoratorCss()},r.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.question.dragAreaPlaceholder),r.createElement("div",{className:this.question.cssClasses.wrapper},e,t))},t.prototype.renderClearButton=function(e){return e?r.createElement("button",{type:"button",onClick:this.question.doClean,className:e},r.createElement("span",null,this.question.clearButtonCaption),this.question.cssClasses.removeButtonIconId?r.createElement(b,{iconName:this.question.cssClasses.removeButtonIconId,size:"auto",title:this.question.clearButtonCaption}):null):null},t.prototype.renderFileSign=function(e,t){var n=this;return e&&t.name?r.createElement("div",{className:e},r.createElement("a",{href:t.content,onClick:function(e){n.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth}},t.name)):null},t.prototype.renderPreview=function(){var e=this;if(!this.question.previewValue||!this.question.previewValue.length)return null;var t=this.question.previewValue.map((function(t,n){return t?r.createElement("span",{key:e.question.inputId+"_"+n,className:e.question.cssClasses.preview,style:{display:e.question.isPreviewVisible(n)?void 0:"none"}},e.renderFileSign(e.question.cssClasses.fileSign,t),r.createElement("div",{className:e.question.cssClasses.imageWrapper},e.question.canPreviewImage(t)?r.createElement("img",{src:t.content,style:{height:e.question.imageHeight,width:e.question.imageWidth},alt:"File preview"}):e.question.cssClasses.defaultImage?r.createElement(b,{iconName:e.question.cssClasses.defaultImageIconId,size:"auto",className:e.question.cssClasses.defaultImage}):null,t.name&&!e.question.isReadOnly?r.createElement("div",{className:e.question.cssClasses.removeFileButton,onClick:function(){return e.question.doRemoveFile(t)}},r.createElement("span",{className:e.question.cssClasses.removeFile},e.question.removeFileCaption),e.question.cssClasses.removeFileSvgIconId?r.createElement(b,{title:e.question.removeFileCaption,iconName:e.question.cssClasses.removeFileSvgIconId,size:"auto",className:e.question.cssClasses.removeFileSvg}):null):null),e.renderFileSign(e.question.cssClasses.fileSignBottom,t)):null}));return r.createElement("div",{className:this.question.cssClasses.fileList||void 0},t)},t}(h);K.Instance.registerQuestion("file",(function(e){return r.createElement(ot,e)}));var it=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),st=function(e){function t(t){return e.call(this,t)||this}return it(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){for(var e=this.question.cssClasses,t=this.question.getRows(),n=[],o=0;o<t.length;o++)n.push(this.renderRow(o,t[o],e));return r.createElement("table",{className:e.root},r.createElement("tbody",null,n))},t.prototype.renderRow=function(e,t,n){for(var o="item"+e,i=[],s=0;s<t.length;s++){var a=t[s];i.push(r.createElement("td",{key:"item"+s,className:this.question.cssClasses.cell},r.createElement(at,{question:this.question,item:a,creator:this.creator,cssClasses:n})))}return r.createElement("tr",{key:o,className:n.row},i)},t}(h),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return it(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElements=function(){return[this.item,this.item.editor]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.item,t=this.cssClasses;return r.createElement("label",{className:this.question.getItemLabelCss(e)},r.createElement("span",{className:t.itemTitle},r.createElement(M,{element:e.editor,cssClasses:e.editor.cssClasses})),r.createElement(ut,{cssClasses:t,itemCss:this.question.getItemCss(),question:e.editor,creator:this.creator}),this.renderItemTooltipError(e,t))},t.prototype.renderItemTooltipError=function(e,t){return this.item.editor.isErrorsModeTooltip?r.createElement(be,{element:e.editor,cssClasses:t,creator:this.creator,location:"tooltip",id:e.editor.id+"_errors"}):null},t}(p),ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return it(t,e),t.prototype.renderElement=function(){return r.createElement("div",{className:this.itemCss},this.renderContent())},t}(Ce);K.Instance.registerQuestion("multipletext",(function(e){return r.createElement(st,e)}));var lt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ct=function(e){function t(t){return e.call(this,t)||this}return lt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=null;return this.question.showClearButtonInContent&&(n=r.createElement("div",null,r.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:function(){return e.question.clearValue()},value:this.question.clearButtonCaption}))),r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),role:"presentation",ref:function(t){return e.setControl(t)}},this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther(t):null,n)},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this,n=this.getStateValue();return this.question.columns.map((function(o,i){var s=o.map((function(r,o){return t.renderItem("item"+i+o,r,n,e,""+i+o)}));return r.createElement("div",{key:"column"+i,className:t.question.getColumnClass(),role:"presentation"},s)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=this.getStateValue(),o=0;o<t.length;o++){var i=t[o],s=this.renderItem("item"+o,i,r,e,""+o);n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(he,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isChecked:n===t.value}),u=this.question.survey,l=null;return u&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t.prototype.getStateValue=function(){return this.question.isEmpty()?"":this.question.renderedValue},t}(h),pt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return lt(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this.props.isChecked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.handleOnChange=function(e){this.question.clickItemHandler(this.item)},t.prototype.canRender=function(){return!!this.question&&!!this.item},t.prototype.renderElement=function(){var e=this.question.getItemClass(this.item),t=this.question.getLabelClass(this.item),n=this.question.getControlLabelClass(this.item),o=this.hideCaption?null:r.createElement("span",{className:n},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:e,role:"presentation"},r.createElement("label",{className:t,"aria-label":this.question.getAriaItemLabel(this.item)},r.createElement("input",{"aria-describedby":this.question.ariaDescribedBy,className:this.cssClasses.itemControl,id:this.question.getItemId(this.item),type:"radio",name:this.question.questionName,checked:this.isChecked,value:this.item.value,disabled:!this.question.getItemEnabled(this.item),onChange:this.handleOnChange}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o))},t}(p);s.Instance.registerElement("survey-radiogroup-item",(function(e){return r.createElement(pt,e)})),K.Instance.registerQuestion("radiogroup",(function(e){return r.createElement(ct,e)}));var ht=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dt=function(e){function t(t){return e.call(this,t)||this}return ht(t,e),t.prototype.renderInput=function(){var e=this,t=this.question.getControlClass(),n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(ue,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:t,type:this.question.inputType,ref:function(t){return e.setControl(t)},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:n,list:this.question.dataListId,autoComplete:this.question.autocomplete,onBlur:this.question.onBlur,onFocus:this.question.onFocus,onChange:this.question.onChange,onKeyUp:this.question.onKeyUp,onKeyDown:this.question.onKeyDown,onCompositionUpdate:function(t){return e.question.onCompositionUpdate(t.nativeEvent)},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o)},t.prototype.renderElement=function(){return this.question.dataListId?r.createElement("div",null,this.renderInput(),this.renderDataList()):this.renderInput()},t.prototype.renderDataList=function(){if(!this.question.dataListId)return null;var e=this.question.dataList;if(0==e.length)return null;for(var t=[],n=0;n<e.length;n++)t.push(r.createElement("option",{key:"item"+n,value:e[n]}));return r.createElement("datalist",{id:this.question.dataListId},t)},t}(d);K.Instance.registerQuestion("text",(function(e){return r.createElement(dt,e)}));var ft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnClick=n.handleOnClick.bind(n),n.handleOnLabelClick=n.handleOnLabelClick.bind(n),n.handleOnSwitchClick=n.handleOnSwitchClick.bind(n),n.handleOnKeyDown=n.handleOnKeyDown.bind(n),n.checkRef=r.createRef(),n}return ft(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.doCheck=function(e){this.question.booleanValue=e},t.prototype.handleOnChange=function(e){this.doCheck(e.target.checked)},t.prototype.handleOnClick=function(e){this.question.onLabelClick(e,!0)},t.prototype.handleOnSwitchClick=function(e){this.question.onSwitchClickModel(e.nativeEvent)},t.prototype.handleOnLabelClick=function(e,t){this.question.onLabelClick(e,t)},t.prototype.handleOnKeyDown=function(e){this.question.onKeyDownCore(e)},t.prototype.updateDomElement=function(){if(this.question){var t=this.checkRef.current;t&&(t.indeterminate=this.question.isIndeterminate),this.setControl(t),e.prototype.updateDomElement.call(this)}},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.getItemCss();return r.createElement("div",{className:t.root,onKeyDown:this.handleOnKeyDown},r.createElement("label",{className:n,onClick:this.handleOnClick},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:t.control,disabled:this.isDisplayMode,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("span",{className:this.question.getLabelCss(!1),onClick:function(t){return e.handleOnLabelClick(t,!1)}},this.renderLocString(this.question.locLabelFalse)),r.createElement("div",{className:t.switch,onClick:this.handleOnSwitchClick},r.createElement("span",{className:t.slider},this.question.isDeterminated&&t.sliderText?r.createElement("span",{className:t.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),r.createElement("span",{className:this.question.getLabelCss(!0),onClick:function(t){return e.handleOnLabelClick(t,!0)}},this.renderLocString(this.question.locLabelTrue))))},t}(h);K.Instance.registerQuestion("boolean",(function(e){return r.createElement(mt,e)}));var yt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vt=function(e){function t(t){return e.call(this,t)||this}return yt(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.getCheckboxItemCss(),n=this.question.canRenderLabelDescription?c.renderQuestionDescription(this.question):null;return r.createElement("div",{className:e.rootCheckbox},r.createElement("div",{className:t},r.createElement("label",{className:e.checkboxLabel},r.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.isDisplayMode,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("span",{className:e.checkboxMaterialDecorator},this.question.svgIcon?r.createElement("svg",{className:e.checkboxItemDecorator},r.createElement("use",{xlinkHref:this.question.svgIcon})):null,r.createElement("span",{className:"check"})),this.question.isLabelRendered&&r.createElement("span",{className:e.checkboxControlLabel,id:this.question.labelRenderedAriaID},r.createElement(L,{element:this.question,cssClasses:this.question.cssClasses}))),n))},t}(mt);K.Instance.registerQuestion("sv-boolean-checkbox",(function(e){return r.createElement(vt,e)})),i.RendererFactory.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");var gt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.booleanValue="true"==e.nativeEvent.target.value},n}return gt(t,e),t.prototype.renderRadioItem=function(e,t){var n=this.question.cssClasses;return r.createElement("div",{role:"presentation",className:this.question.getRadioItemClass(n,e)},r.createElement("label",{className:n.radioLabel},r.createElement("input",{type:"radio",name:this.question.name,value:e,"aria-describedby":this.question.ariaDescribedBy,checked:e===this.question.booleanValueRendered,disabled:this.question.isInputReadOnly,className:n.itemRadioControl,onChange:this.handleOnChange}),this.question.cssClasses.materialRadioDecorator?r.createElement("span",{className:n.materialRadioDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:n.itemRadioDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,r.createElement("span",{className:n.radioControlLabel},this.renderLocString(t))))},t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("div",{className:e.rootRadio},r.createElement("fieldset",{role:"presentation",className:e.radioFieldset},this.renderRadioItem(!1,this.question.locLabelFalse),this.renderRadioItem(!0,this.question.locLabelTrue)))},t}(mt);K.Instance.registerQuestion("sv-boolean-radio",(function(e){return r.createElement(bt,e)})),i.RendererFactory.Instance.registerRenderer("boolean","radio","sv-boolean-radio");var Ct=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Et=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Ct(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",null)},t}(h);K.Instance.registerQuestion("empty",(function(e){return r.createElement(Et,e)}));var qt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(e){function t(t){var n=e.call(this,t)||this;return n.onPointerDownHandler=function(e){n.parentMatrix.onPointerDown(e.nativeEvent,n.model.row)},n}return qt(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentMatrix",{get:function(){return this.props.parentMatrix},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=this.model;return o.a.createElement("tr",{className:t.className,"data-sv-drop-target-matrix-row":t.row&&t.row.id,onPointerDown:function(t){return e.onPointerDownHandler(t)}},this.props.children)},t}(c);s.Instance.registerElement("sv-matrix-row",(function(e){return o.a.createElement(wt,e)}));var Ot=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ot(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return this.question.iconDragElement?o.a.createElement("svg",{className:this.question.cssClasses.dragElementDecorator},o.a.createElement("use",{xlinkHref:this.question.iconDragElement})):o.a.createElement("span",{className:this.question.cssClasses.iconDrag})},t}(p);s.Instance.registerElement("sv-matrix-drag-drop-icon",(function(e){return o.a.createElement(_t,e)}));var St=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),It=function(e){function t(t){var n=e.call(this,t)||this;n.question.renderedTable;return n.state=n.getState(),n}return St(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),{rowCounter:e?e.rowCounter+1:0}},t.prototype.updateStateOnCallback=function(){this.isRendering||this.setState(this.getState(this.state))},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.visibleRowsChangedCallback=function(){t.updateStateOnCallback()},this.question.onRenderedTableResetCallback=function(){t.question.renderedTable.renderedRowsChangedCallback=function(){t.updateStateOnCallback()},t.updateStateOnCallback()},this.question.renderedTable.renderedRowsChangedCallback=function(){t.updateStateOnCallback()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.visibleRowsChangedCallback=function(){},this.question.onRenderedTableResetCallback=function(){},this.question.renderedTable.renderedRowsChangedCallback=function(){}},t.prototype.renderElement=function(){return this.renderTableDiv()},t.prototype.renderTableDiv=function(){var e=this,t=this.renderHeader(),n=this.renderFooter(),o=this.renderRows(),i=this.question.showHorizontalScroll?{overflowX:"scroll"}:{};return r.createElement("div",{style:i,className:this.question.cssClasses.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("table",{className:this.question.getTableCss()},t,o,n))},t.prototype.renderHeader=function(){var e=this.question.renderedTable;if(!e.showHeader)return null;for(var t=[],n=e.headerRow.cells,o=0;o<n.length;o++){var i=n[o],s="column"+o,a={};i.width&&(a.width=i.width),i.minWidth&&(a.minWidth=i.minWidth);var u=this.renderCellContent(i,"column-header",{}),l=i.hasTitle?r.createElement("th",{className:i.className,key:s,style:a}," ",u," "):r.createElement("td",{className:i.className,key:s,style:a});t.push(l)}return r.createElement("thead",null,r.createElement("tr",null,t))},t.prototype.renderFooter=function(){var e=this.question.renderedTable;if(!e.showFooter)return null;var t=this.renderRow("footer",e.footerRow,this.question.cssClasses,"row-footer");return r.createElement("tfoot",null,t)},t.prototype.renderRows=function(){for(var e=this.question.cssClasses,t=[],n=this.question.renderedTable.rows,o=0;o<n.length;o++)t.push(this.renderRow(n[o].id,n[o],e));return r.createElement("tbody",null,t)},t.prototype.renderRow=function(e,t,n,o){for(var i=[],s=t.cells,a=0;a<s.length;a++)i.push(this.renderCell(s[a],a,n,o));var u="row"+e;return r.createElement(r.Fragment,{key:u},r.createElement(wt,{model:t,parentMatrix:this.question},i))},t.prototype.renderCell=function(e,t,n,o){var i="cell"+t;if(e.hasQuestion)return r.createElement(Rt,{key:i,cssClasses:n,cell:e,creator:this.creator,reason:o});var s=o;s||(s=e.hasTitle?"row-header":"");var a=this.renderCellContent(e,s,n),u=null;return(e.width||e.minWidth)&&(u={},e.width&&(u.width=e.width),e.minWidth&&(u.minWidth=e.minWidth)),r.createElement("td",{className:e.className,key:i,style:u,colSpan:e.colSpans,"data-responsive-title":e.headers,title:e.getTitle()},a)},t.prototype.renderCellContent=function(e,t,n){var o=null,i=null;if((e.width||e.minWidth)&&(i={},e.width&&(i.width=e.width),e.minWidth&&(i.minWidth=e.minWidth)),e.hasTitle){t="row-header";var a=this.renderLocString(e.locTitle),u=e.column?r.createElement(xt,{column:e.column,question:this.question}):null;o=r.createElement(r.Fragment,null,a,u)}if(e.isDragHandlerCell&&(o=r.createElement(r.Fragment,null,r.createElement(_t,{item:{data:{row:e.row,question:this.question}}}))),e.isActionsCell&&(o=s.Instance.createElement("sv-matrixdynamic-actions-cell",{question:this.question,cssClasses:n,cell:e,model:e.item.getData()})),e.hasPanel&&(o=r.createElement(we,{key:e.panel.id,element:e.panel,survey:this.question.survey,cssClasses:n,isDisplayMode:this.isDisplayMode,creator:this.creator})),!o)return null;var l=r.createElement(r.Fragment,null,o);return this.wrapCell(e,l,t)},t}(h),Pt=function(e){function t(t){return e.call(this,t)||this}return St(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement(D,{model:this.model,handleClick:!1})},t}(p);s.Instance.registerElement("sv-matrixdynamic-actions-cell",(function(e){return r.createElement(Pt,e)}));var xt=function(e){function t(t){return e.call(this,t)||this}return St(t,e),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.column},t.prototype.renderElement=function(){return this.column.isRenderedRequired?r.createElement(r.Fragment,null,r.createElement("span",{className:this.question.cssClasses.cellRequiredText},this.column.requiredText)):null},t}(p),Rt=function(e){function t(t){return e.call(this,t)||this}return St(t,e),Object.defineProperty(t.prototype,"cell",{get:function(){return this.props.cell},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.cell?this.cell.className:""},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){var t=e.prototype.getQuestion.call(this);return t||(this.cell?this.cell.question:null)},t.prototype.doAfterRender=function(){var e=this.cellRef.current;if(e&&this.cell&&this.question&&this.question.survey&&"r"!==e.getAttribute("data-rendered")){e.setAttribute("data-rendered","r");var 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)}},t.prototype.getShowErrors=function(){return this.question.isVisible&&(!this.cell.isChoice||this.cell.isFirstChoice)},t.prototype.getCellStyle=function(){var t=e.prototype.getCellStyle.call(this);return(this.cell.width||this.cell.minWidth)&&(t||(t={}),this.cell.width&&(t.width=this.cell.width),this.cell.minWidth&&(t.minWidth=this.cell.minWidth)),t},t.prototype.getHeaderText=function(){return this.cell.headers},t.prototype.renderQuestion=function(){return this.cell.isChoice?this.cell.isOtherChoice?this.renderOtherComment():this.cell.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():ge.renderQuestionBody(this.creator,this.question)},t.prototype.renderOtherComment=function(){var e=this.cell.question,t=e.cssClasses||{};return r.createElement(he,{question:e,cssClasses:t,otherCss:t.other,isDisplayMode:e.isInputReadOnly})},t.prototype.renderCellCheckboxButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(Pe,{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})},t.prototype.renderCellRadiogroupButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(pt,{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})},t}(Ee),Nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jt=function(e){function t(t){return e.call(this,t)||this}return Nt(t,e),t}(It);K.Instance.registerQuestion("matrixdropdown",(function(e){return r.createElement(jt,e)}));var Tt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Tt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.renderedTable.showTable?this.renderTableDiv():this.renderNoRowsContent(e);return r.createElement("div",null,this.renderAddRowButtonOnTop(e),t,this.renderAddRowButtonOnBottom(e))},t.prototype.renderAddRowButtonOnTop=function(e){return this.matrix.renderedTable.showAddRowOnTop?this.renderAddRowButton(e):null},t.prototype.renderAddRowButtonOnBottom=function(e){return this.matrix.renderedTable.showAddRowOnBottom?this.renderAddRowButton(e):null},t.prototype.renderNoRowsContent=function(e){var t=this.renderLocString(this.matrix.locEmptyRowsText),n=r.createElement("div",{className:e.emptyRowsText},t),o=this.renderAddRowButton(e,!0);return r.createElement("div",{className:e.emptyRowsSection},n,o)},t.prototype.renderAddRowButton=function(e,t){return void 0===t&&(t=!1),s.Instance.createElement("sv-matrixdynamic-add-btn",{question:this.question,cssClasses:e,isEmptySection:t})},t}(It);K.Instance.registerQuestion("matrixdynamic",(function(e){return r.createElement(Dt,e)}));var kt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Tt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.renderLocString(this.matrix.locAddRowText),t=r.createElement("button",{className:this.matrix.getAddRowButtonCss(this.props.isEmptySection),type:"button",disabled:this.matrix.isInputReadOnly,onClick:this.matrix.isDesignMode?void 0:this.handleOnRowAddClick},e,r.createElement("span",{className:this.props.cssClasses.iconAdd}));return this.props.isEmptySection?t:r.createElement("div",{className:this.props.cssClasses.footer},t)},t}(p);s.Instance.registerElement("sv-matrixdynamic-add-btn",(function(e){return r.createElement(kt,e)}));var Mt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bt=function(e){function t(t){return e.call(this,t)||this}return Mt(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.item&&this.props.item.data||this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t}(p),Lt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.addPanelUI()},t}return Mt(t,e),t.prototype.renderElement=function(){return this.question.canAddPanel?o.a.createElement("button",{type:"button",className:this.question.getAddButtonCss(),onClick:this.handleClick},o.a.createElement("span",{className:this.question.cssClasses.buttonAddText},this.question.panelAddText)):null},t}(Bt);s.Instance.registerElement("sv-paneldynamic-add-btn",(function(e){return o.a.createElement(Lt,e)}));var At=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ht=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToNextPanel()},t}return At(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelNextText,onClick:this.handleClick,className:this.question.getNextButtonCss()},o.a.createElement(b,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(Bt);s.Instance.registerElement("sv-paneldynamic-next-btn",(function(e){return o.a.createElement(Ht,e)}));var Wt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToPrevPanel()},t}return Wt(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelPrevText,onClick:this.handleClick,className:this.question.getPrevButtonCss()},o.a.createElement(b,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(Bt);s.Instance.registerElement("sv-paneldynamic-prev-btn",(function(e){return o.a.createElement(Qt,e)}));var Ut=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ut(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)},t}(Bt);s.Instance.registerElement("sv-paneldynamic-progress-text",(function(e){return o.a.createElement(Ft,e)}));var Vt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(e){function t(t){return e.call(this,t)||this}return Vt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setState({panelCounter:0});var t=this;this.question.panelCountChangedCallback=function(){t.updateQuestionRendering()},this.question.currentIndexChangedCallback=function(){t.updateQuestionRendering()},this.question.renderModeChangedCallback=function(){t.updateQuestionRendering()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.panelCountChangedCallback=function(){},this.question.currentIndexChangedCallback=function(){},this.question.renderModeChangedCallback=function(){}},t.prototype.updateQuestionRendering=function(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})},t.prototype.renderElement=function(){var e=[];if(this.question.isRenderModeList)for(var t=0;t<this.question.panels.length;t++){var n=this.question.panels[t];e.push(r.createElement(Kt,{key:n.id,element:n,question:this.question,index:t,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}else if(null!=this.question.currentPanel){n=this.question.currentPanel;e.push(r.createElement(Kt,{key:this.question.currentIndex,element:n,question:this.question,index:this.question.currentIndex,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}var o=this.question.isRenderModeList&&this.question.showLegacyNavigation?this.renderAddRowButton():null,i=this.question.isProgressTopShowing?this.renderNavigator():null,s=this.question.isProgressBottomShowing?this.renderNavigator():null,a=this.renderNavigatorV2(),u=this.renderPlaceholder();return r.createElement("div",{className:this.question.cssClasses.root},u,i,e,s,o,a)},t.prototype.renderNavigator=function(){if(!this.question.showLegacyNavigation)return this.question.isRangeShowing&&this.question.isProgressTopShowing?this.renderRange():null;var e=this.question.isRangeShowing?this.renderRange():null,t=this.rendrerPrevButton(),n=this.rendrerNextButton(),o=this.renderAddRowButton(),i=this.question.isProgressTopShowing?this.question.cssClasses.progressTop:this.question.cssClasses.progressBottom;return r.createElement("div",{className:i},r.createElement("div",{style:{clear:"both"}},r.createElement("div",{className:this.question.cssClasses.progressContainer},t,e,n),o,this.renderProgressText()))},t.prototype.renderProgressText=function(){return r.createElement(Ft,{data:{question:this.question}})},t.prototype.rendrerPrevButton=function(){return r.createElement(Qt,{data:{question:this.question}})},t.prototype.rendrerNextButton=function(){return r.createElement(Ht,{data:{question:this.question}})},t.prototype.renderRange=function(){return r.createElement("div",{className:this.question.cssClasses.progress},r.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:this.question.progress},role:"progressbar"}))},t.prototype.renderAddRowButton=function(){return s.Instance.createElement("sv-paneldynamic-add-btn",{data:{question:this.question}})},t.prototype.renderNavigatorV2=function(){if(0===this.question.panelCount||this.question.showLegacyNavigation)return null;if(!this.question.cssClasses.footer)return null;var e=this.question.isRangeShowing&&this.question.isProgressBottomShowing?this.renderRange():null;return r.createElement("div",{className:this.question.cssClasses.footer},r.createElement("hr",{className:this.question.cssClasses.separator}),e,this.question.footerToolbar.visibleActions.length?r.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},r.createElement(D,{model:this.question.footerToolbar})):null)},t.prototype.renderPlaceholder=function(){return this.question.getShowNoEntriesPlaceholder()?r.createElement("div",{className:this.question.cssClasses.noEntriesPlaceholder},r.createElement("span",null,this.renderLocString(this.question.locNoEntriesText)),this.renderAddRowButton()):null},t}(h),Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(){return this.question?this.question.survey:null},t.prototype.getCss=function(){var e=this.getSurvey();return e?e.getCss():{}},t.prototype.render=function(){var t=e.prototype.render.call(this),n=this.renderButton(),o=this.question.isRenderModeList&&this.index<this.question.panelCount-1?r.createElement("hr",{className:this.question.cssClasses.separator}):null;return r.createElement(r.Fragment,null,r.createElement("div",{className:this.question.getPanelWrapperCss()},t,n),o)},t.prototype.renderButton=function(){return"right"!==this.question.panelRemoveButtonLocation||!this.question.canRemovePanel||this.question.isRenderModeList&&this.panel.isCollapsed?null:s.Instance.createElement("sv-paneldynamic-remove-btn",{data:{question:this.question,panel:this.panel}})},t}(we);K.Instance.registerQuestion("paneldynamic",(function(e){return r.createElement(zt,e)}));var Jt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(e){function t(t){return e.call(this,t)||this}return Jt(t,e),Object.defineProperty(t.prototype,"isTop",{get:function(){return this.props.isTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return this.survey.progressValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progressText",{get:function(){return this.survey.progressText},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e={width:this.progress+"%"};return r.createElement("div",{className:this.survey.getProgressCssClasses()},r.createElement("div",{style:e,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100},r.createElement("span",{className:i.SurveyProgressModel.getProgressTextInBarCss(this.css)},this.progressText)),r.createElement("span",{className:i.SurveyProgressModel.getProgressTextUnderBarCss(this.css)},this.progressText))},t}(oe);s.Instance.registerElement("sv-progress-pages",(function(e){return r.createElement(Zt,e)})),s.Instance.registerElement("sv-progress-questions",(function(e){return r.createElement(Zt,e)})),s.Instance.registerElement("sv-progress-correctquestions",(function(e){return r.createElement(Zt,e)})),s.Instance.registerElement("sv-progress-requiredquestions",(function(e){return r.createElement(Zt,e)}));var Gt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xt=function(e){function t(t){var n=e.call(this,t)||this;return n.updateScroller=void 0,n.progressButtonsModel=new i.SurveyProgressButtonsModel(n.survey),n.listContainerRef=r.createRef(),n}return Gt(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.css.progressButtonsContainerCenter},r.createElement("div",{className:this.css.progressButtonsContainer},r.createElement("div",{className:this.getScrollButtonCss(!0),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!0)}}),r.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},r.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),r.createElement("div",{className:this.getScrollButtonCss(!1),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!1)}})))},t.prototype.getListElements=function(){var e=this,t=[];return this.survey.visiblePages.forEach((function(n,r){t.push(e.renderListElement(n,r))})),t},t.prototype.renderListElement=function(e,t){var n=this;return r.createElement("li",{key:"listelement"+t,className:this.getListElementCss(t),onClick:this.isListElementClickable(t)?function(){return n.clickListElement(t)}:void 0},r.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.navigationTitle||e.name},e.navigationTitle||e.name),r.createElement("div",{className:this.css.progressButtonsPageDescription,title:e.navigationDescription},e.navigationDescription))},t.prototype.isListElementClickable=function(e){return this.progressButtonsModel.isListElementClickable(e)},t.prototype.getListElementCss=function(e){return this.progressButtonsModel.getListElementCss(e)},t.prototype.clickListElement=function(e){this.progressButtonsModel.clickListElement(e)},t.prototype.getScrollButtonCss=function(e){return this.progressButtonsModel.getScrollButtonCss(this.state.hasScroller,e)},t.prototype.clickScrollButton=function(e,t){e&&(e.scrollLeft+=70*(t?-1:1))},t.prototype.componentDidMount=function(){var e=this;this.updateScroller=setInterval((function(){e.listContainerRef.current&&e.setState({hasScroller:e.listContainerRef.current.scrollWidth>e.listContainerRef.current.offsetWidth})}),100)},t.prototype.componentWillUnmount=function(){void 0!==this.updateScroller&&(clearInterval(this.updateScroller),this.updateScroller=void 0)},t}(oe);s.Instance.registerElement("sv-progress-buttons",(function(e){return r.createElement(Xt,e)}));var $t=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){t.model.onKeyDown(e)},t}return $t(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;if(!this.item)return null;var t={paddingInlineStart:this.model.getItemIndent(this.item)},n=this.model.getItemClass(this.item),r=[];if(this.item.component){var i=s.Instance.createElement(this.item.component,{item:this.item,key:this.item.id});i&&r.push(i)}else{var a=this.renderLocString(this.item.locTitle,void 0,"locString");if(this.item.iconName){var u=o.a.createElement(b,{key:1,className:this.model.cssClasses.itemIcon,iconName:this.item.iconName,size:24,"aria-label":this.item.title});r.push(u),r.push(o.a.createElement("span",{key:2},a))}else r.push(a)}var l=o.a.createElement("div",{style:t,className:this.model.cssClasses.itemBody},r),c=this.item.needSeparator?o.a.createElement("div",{className:this.model.cssClasses.itemSeparator}):null,p={display:this.model.isItemVisible(this.item)?null:"none"};return ne(o.a.createElement("li",{className:n,role:"option",style:p,id:this.item.elementId,"aria-selected":this.model.isItemSelected(this.item),onClick:function(t){e.model.onItemClick(e.item),t.stopPropagation()},onPointerDown:function(t){return e.model.onPointerDown(t,e.item)}},c,l))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.onLastItemRended(this.item)},t}(c);s.Instance.registerElement("sv-list-item",(function(e){return o.a.createElement(Yt,e)}));var en=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeydown=function(e){n.model.onKeyDown(e)},n.handleMouseMove=function(e){n.model.onMouseMove(e)},n.state={filterString:n.model.filterString||""},n.listContainerRef=o.a.createRef(),n}return en(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.listContainerRef&&this.listContainerRef.current&&this.model.initListContainerHtmlElement(this.listContainerRef.current)},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.model.cssClasses.root,ref:this.listContainerRef},this.searchElementContent(),this.emptyContent(),this.renderList())},t.prototype.renderList=function(){if(!this.model.renderElements)return null;var e=this.renderItems(),t={display:this.model.isEmpty?"none":null};return o.a.createElement("ul",{className:this.model.cssClasses.itemsContainer,style:t,role:"listbox",id:this.model.elementId,onMouseDown:function(e){e.preventDefault()},onKeyDown:this.handleKeydown,onMouseMove:this.handleMouseMove},e)},t.prototype.renderItems=function(){var e=this;if(!this.model)return null;var t=this.model.renderedActions;return t?t.map((function(t,n){return o.a.createElement(Yt,{model:e.model,item:t,key:"item"+n})})):null},t.prototype.searchElementContent=function(){var e=this;if(this.model.showFilter){var t=this.model.showSearchClearButton&&this.model.filterString?o.a.createElement("button",{className:this.model.cssClasses.searchClearButtonIcon,onClick:function(t){e.model.onClickSearchClearButton(t)}},o.a.createElement(b,{iconName:"icon-searchclear",size:"auto"})):null;return o.a.createElement("div",{className:this.model.cssClasses.filter},o.a.createElement("div",{className:this.model.cssClasses.filterIcon},o.a.createElement(b,{iconName:"icon-search",size:"auto"})),o.a.createElement("input",{type:"text",className:this.model.cssClasses.filterInput,"aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onKeyUp:function(t){e.model.goToItems(t)},onChange:function(t){t.target===document.activeElement&&(e.model.filterString=t.target.value)}}),t)}return null},t.prototype.emptyContent=function(){var e={display:this.model.isEmpty?null:"none"};return o.a.createElement("div",{className:this.model.cssClasses.emptyContainer,style:e},o.a.createElement("div",{className:this.model.cssClasses.emptyText,"aria-label":this.model.emptyMessage},this.model.emptyMessage))},t}(c);s.Instance.registerElement("sv-list",(function(e){return o.a.createElement(tn,e)}));var nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nn(t,e),t.prototype.render=function(){var e=Object(i.createTOCListModel)(this.props.model),t=Object(i.getTocRootCss)(this.props.model);return r.createElement("div",{className:t},r.createElement(tn,{model:e}))},t}(oe);s.Instance.registerElement("sv-progress-toc",(function(e){return r.createElement(rn,e)}));var on=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnClick=n.handleOnClick.bind(n),n}return on(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnClick=function(e){this.question.setValueFromClick(e.target.value),this.setState({value:this.question.value})},t.prototype.renderItem=function(e,t){return s.Instance.createElement(this.question.itemComponentName,{question:this.question,item:e,index:t,key:"value"+t,handleOnClick:this.handleOnClick,isDisplayMode:this.isDisplayMode})},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,o=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null;return r.createElement("div",{className:this.question.ratingRootCss,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",{role:"radiogroup"},r.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?r.createElement("span",{className:t.minText},n):null,this.question.renderedRateItems.map((function(t,n){return e.renderItem(t,n)})),this.question.hasMaxLabel?r.createElement("span",{className:t.maxText},o):null))},t}(h);K.Instance.registerQuestion("rating",(function(e){return r.createElement(sn,e)}));var an=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),un=function(e){function t(t){return e.call(this,t)||this}return an(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.renderSelect(e);return r.createElement("div",{className:this.question.cssClasses.rootDropdown},t)},t}(Ue);K.Instance.registerQuestion("sv-rating-dropdown",(function(e){return r.createElement(un,e)})),i.RendererFactory.Instance.registerRenderer("rating","dropdown","sv-rating-dropdown");var ln=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cn=function(e){function t(t){return e.call(this,t)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("div",{id:this.question.inputId,className:t.root,ref:function(t){return e.setControl(t)}},this.question.formatedValue)},t}(h);K.Instance.registerQuestion("expression",(function(e){return r.createElement(cn,e)}));var pn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnExpanded=n.handleOnExpanded.bind(n),n}return pn(t,e),t.prototype.getStateElements=function(){return[this.popup,this.popup.survey]},t.prototype.handleOnExpanded=function(e){this.popup.changeExpandCollapse()},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.popup.isShowing},t.prototype.renderElement=function(){var e=this.renderWindowHeader(),t=this.popup.isExpanded?this.renderBody():null,n={position:"fixed",bottom:3,right:10};return this.popup.renderedWidth&&(n.width=this.popup.renderedWidth,n.maxWidth=this.popup.renderedWidth),r.createElement("div",{className:this.popup.cssRoot,style:n},e,t)},t.prototype.renderWindowHeader=function(){var e={paddingRight:"10px"},t=this.popup.cssButton;t="glyphicon pull-right "+t;var n=c.renderLocString(this.survey.locTitle);return r.createElement("div",{className:this.popup.cssHeaderRoot},r.createElement("span",{onClick:this.handleOnExpanded,style:{width:"100%",cursor:"pointer"}},r.createElement("span",{className:this.popup.cssHeaderTitle,style:e},n),r.createElement("span",{className:t,"aria-hidden":"true"})),this.popup.isExpanded?r.createElement("span",{onClick:this.handleOnExpanded,style:{float:"right",cursor:"pointer"}},r.createElement("span",{className:this.popup.cssHeaderTitle,style:e},"X")):null)},t.prototype.renderBody=function(){return r.createElement("div",{className:this.popup.cssBody},this.doRender())},t.prototype.createSurvey=function(t){t||(t={}),e.prototype.createSurvey.call(this,t),this.popup=new i.PopupSurveyModel(null,this.survey),t.closeOnCompleteTimeout&&(this.popup.closeOnCompleteTimeout=t.closeOnCompleteTimeout),this.popup.isShowing=!0,this.popup.isExpanded||!t.expanded&&!t.isExpanded||this.popup.expand()},t}(te),dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pn(t,e),t}(hn),fn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mn=function(e){function t(t){return e.call(this,t)||this}return fn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss()},r.createElement("legend",{role:"radio","aria-label":this.question.locTitle.renderedHtml}),this.question.hasColumns?this.getColumns(e):this.getItems(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,e)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getItems=function(e){for(var t=[],n=0;n<this.question.visibleChoices.length;n++){var r=this.question.visibleChoices[n],o="item"+n;t.push(this.renderItem(o,r,e))}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return{marginLeft:"3px",display:"inline",position:"static"}},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n){var o=r.createElement(yn,{key:e,question:this.question,item:t,cssClasses:n}),i=this.question.survey,s=null;return i&&(s=a.wrapItemValue(i,o,this.question,t)),null!=s?s:o},t}(h),yn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return fn(t,e),t.prototype.getStateElement=function(){return this.item},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.locImageLink.onChanged=function(){}},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.item.locImageLink.onChanged=function(){e.setState({locImageLinkchanged:e.state&&e.state.locImageLink?e.state.locImageLink+1:1})}},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnChange=function(e){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})},t.prototype.renderElement=function(){var e=this,t=this.item,n=this.question,o=this.cssClasses,i=n.isItemSelected(t),s=n.getItemClass(t),a=null;n.showLabel&&(a=r.createElement("span",{className:n.cssClasses.itemText},t.text?c.renderLocString(t.locText):t.value));var u={objectFit:this.question.imageFit},l=null;if(t.locImageLink.renderedHtml&&"image"===this.question.contentMode&&(l=r.createElement("img",{className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:t.locText.renderedHtml,style:u,onLoad:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),t.locImageLink.renderedHtml&&"video"===this.question.contentMode&&(l=r.createElement("video",{controls:!0,className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:u,onLoadedMetadata:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),!t.locImageLink.renderedHtml||t.contentNotLoaded){var p={width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,objectFit:this.question.imageFit};l=r.createElement("div",{className:o.itemNoImage,style:p},o.itemNoImageSvgIcon?r.createElement(b,{className:o.itemNoImageSvgIcon,iconName:this.question.cssClasses.itemNoImageSvgIconId,size:48}):null)}return r.createElement("div",{className:s},r.createElement("label",{className:o.label},r.createElement("input",{className:o.itemControl,id:this.question.getItemId(t),type:this.question.inputType,name:this.question.questionName,checked:i,value:t.value,disabled:!this.question.getItemEnabled(t),onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("div",{className:this.question.cssClasses.itemDecorator},r.createElement("div",{className:this.question.cssClasses.imageContainer},this.question.cssClasses.checkedItemDecorator?r.createElement("span",{className:this.question.cssClasses.checkedItemDecorator},this.question.cssClasses.checkedItemSvgIconId?r.createElement(b,{size:"auto",className:this.question.cssClasses.checkedItemSvgIcon,iconName:this.question.cssClasses.checkedItemSvgIconId}):null):null,l),a)))},t}(p);K.Instance.registerQuestion("imagepicker",(function(e){return r.createElement(mn,e)}));var vn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gn=function(e){function t(t){return e.call(this,t)||this}return vn(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.locImageLink.onChanged=function(){t.forceUpdate()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.locImageLink.onChanged=function(){}},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.getImageCss(),n={objectFit:this.question.imageFit},o=null;"image"===this.question.renderedMode&&(o=r.createElement("img",{className:t,src:this.question.locImageLink.renderedHtml,alt:this.question.altText||this.question.title,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoad:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"video"===this.question.renderedMode&&(o=r.createElement("video",{controls:!0,className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoadedMetadata:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"youtube"===this.question.renderedMode&&(o=r.createElement("iframe",{className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n}));var i=null;return this.question.imageLink&&!this.question.contentNotLoaded||(i=r.createElement("div",{className:this.question.cssClasses.noImage},r.createElement(b,{iconName:this.question.cssClasses.noImageSvgIconId,size:48}))),r.createElement("div",{className:this.question.cssClasses.root},o,i)},t}(h);K.Instance.registerQuestion("image",(function(e){return r.createElement(gn,e)}));var bn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cn=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return bn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.renderCleanButton();return r.createElement("div",{className:t.root,ref:function(t){return e.setControl(t)},style:{height:this.question.signatureHeight,width:this.question.signatureWidth}},r.createElement("div",{className:t.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.question.placeHolderText),r.createElement("div",null,r.createElement("canvas",{tabIndex:0})),n)},t.prototype.renderCleanButton=function(){var e=this;if(!this.question.canShowClearButton)return null;var t=this.question.cssClasses;return r.createElement("div",{className:t.controls},r.createElement("button",{type:"button",className:t.clearButton,title:this.question.clearButtonCaption,onClick:function(){return e.question.clearValue()}},this.question.cssClasses.clearButtonIconId?r.createElement(b,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):r.createElement("span",null,"✖")))},t}(h);K.Instance.registerQuestion("signaturepad",(function(e){return r.createElement(Cn,e)}));var En=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qn=function(e){function t(t){return e.call(this,t)||this}return En(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.question},t.prototype.renderElement=function(){var e=this.renderItems();return o.a.createElement("div",{className:this.question.cssClasses.root},e)},t.prototype.renderItems=function(){var e=this;return this.question.visibleChoices.map((function(t,n){return o.a.createElement(wn,{key:e.question.inputId+"_"+n,item:t,question:e.question,index:n})}))},t}(h),wn=function(e){function t(t){return e.call(this,t)||this}return En(t,e),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){this.model=new i.ButtonGroupItemModel(this.question,this.item,this.index);var e=this.renderIcon(),t=this.renderInput(),n=this.renderCaption();return o.a.createElement("label",{role:"radio",className:this.model.css.label,title:this.model.caption.renderedHtml},t,o.a.createElement("div",{className:this.model.css.decorator},e,n))},t.prototype.renderIcon=function(){return this.model.iconName?o.a.createElement(b,{className:this.model.css.icon,iconName:this.model.iconName,size:this.model.iconSize||24}):null},t.prototype.renderInput=function(){var e=this;return o.a.createElement("input",{className:this.model.css.control,id:this.model.id,type:"radio",name:this.model.name,checked:this.model.selected,value:this.model.value,disabled:this.model.readOnly,onChange:function(){e.model.onChange()},"aria-required":this.model.isRequired,"aria-label":this.model.caption.renderedHtml,"aria-invalid":this.model.hasErrors,"aria-describedby":this.model.describedBy,role:"radio"})},t.prototype.renderCaption=function(){if(!this.model.showCaption)return null;var e=this.renderLocString(this.model.caption);return o.a.createElement("span",{className:this.model.css.caption,title:this.model.caption.renderedHtml},e)},t}(c),On=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_n=function(e){function t(t){return e.call(this,t)||this}return On(t,e),t.prototype.getStateElements=function(){var t=e.prototype.getStateElements.call(this);return this.question.contentQuestion&&t.push(this.question.contentQuestion),t},t.prototype.renderElement=function(){return ge.renderQuestionBody(this.creator,this.question.contentQuestion)},t}(d),Sn=function(e){function t(t){return e.call(this,t)||this}return On(t,e),t.prototype.canRender=function(){return!!this.question.contentPanel},t.prototype.renderElement=function(){return r.createElement(we,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})},t}(d);K.Instance.registerQuestion("custom",(function(e){return r.createElement(_n,e)})),K.Instance.registerQuestion("composite",(function(e){return r.createElement(Sn,e)}));var In=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pn=function(e){function t(t){return e.call(this,t)||this}return In(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=[];return e.push(o.a.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},o.a.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml,alt:this.survey.locTitle.renderedHtml,width:this.survey.logoWidth?this.survey.logoWidth:void 0,height:this.survey.logoHeight?this.survey.logoHeight:void 0,style:{objectFit:this.survey.logoFit}}))),o.a.createElement(o.a.Fragment,null,e)},t}(o.a.Component);s.Instance.registerElement("sv-logo-image",(function(e){return o.a.createElement(Pn,e)}));var xn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowRemoveClick=n.handleOnRowRemoveClick.bind(n),n}return xn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnRowRemoveClick=function(e){this.question.removeRowUI(this.row)},t.prototype.renderElement=function(){var e=this.renderLocString(this.question.locRemoveRowText);return o.a.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly},e,o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(p);s.Instance.registerElement("sv-matrix-remove-button",(function(e){return o.a.createElement(Rn,e)}));var Nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnShowHideClick=n.handleOnShowHideClick.bind(n),n}return Nn(t,e),t.prototype.getStateElement=function(){return this.props.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnShowHideClick=function(e){this.row.showHideDetailPanelClick()},t.prototype.renderElement=function(){var e=this.row.isDetailPanelShowing,t=e,n=e?this.row.detailPanelId:void 0;return o.a.createElement("button",{type:"button",onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":t,"aria-controls":n},o.a.createElement(b,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))},t}(p);s.Instance.registerElement("sv-matrix-detail-button",(function(e){return o.a.createElement(jn,e)}));var Tn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.removePanelUI(t.data.panel)},t}return Tn(t,e),t.prototype.renderElement=function(){return o.a.createElement("button",{className:this.question.getPanelRemoveButtonCss(),onClick:this.handleClick,type:"button"},o.a.createElement("span",{className:this.question.cssClasses.buttonRemoveText},this.question.panelRemoveText),o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(Bt);s.Instance.registerElement("sv-paneldynamic-remove-btn",(function(e){return o.a.createElement(Dn,e)}));var kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kn(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.item.isVisible},t.prototype.renderElement=function(){return o.a.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})},t}(p);s.Instance.registerElement("sv-nav-btn",(function(e){return o.a.createElement(Mn,e)}));var Bn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bn(t,e),t.prototype.render=function(){var e;return o.a.createElement("div",{className:"sv-skeleton-element",id:null===(e=this.props.element)||void 0===e?void 0:e.id})},t}(o.a.Component);s.Instance.registerElement("sv-skeleton",(function(e){return o.a.createElement(Ln,e)}));var An=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hn=function(e){function t(t){var n=e.call(this,t)||this;return n.onInput=function(e){n.locStr.text=e.target.innerText},n.onClick=function(e){e.preventDefault(),e.stopPropagation()},n.state={changed:0},n}return An(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.locStr){var e=this;this.locStr.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.componentWillUnmount=function(){this.locStr&&(this.locStr.onChanged=function(){})},t.prototype.render=function(){if(!this.locStr)return null;if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.editableRenderer,(function(e){return o.a.createElement(Hn,e)}));var Wn=n(4);function Qn(e){return"function"!=typeof e?e:e()}!function(){function e(){this._result=""}e.prototype.log=function(e){this._result+="->"+e},Object.defineProperty(e.prototype,"result",{get:function(){return this._result},enumerable:!1,configurable:!0})}();var Un=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fn=function(){function e(e,t,n,r){var o=this;void 0===r&&(r=null),this.container=e,this.model=t,this.itemsSelector=n,this.dotsItemSize=r,this.resizeObserver=void 0,this.isInitialized=!1,this.minDimensionConst=56,this.separatorSize=17,this.separatorAddConst=1,this.paddingSizeConst=8,this.dotsSizeConst=48,this.recalcMinDimensionConst=!0,this.getComputedStyle=window.getComputedStyle.bind(window),this.model.updateCallback=function(e){e?o.isInitialized=!1:Object(Wn.setTimeout)((function(){o.process()}),1)},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){return o.process()})),this.resizeObserver.observe(this.container.parentElement))}return e.prototype.getDimensions=function(e){return{scroll:e.scrollWidth,offset:e.offsetWidth}},e.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetWidth;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)),t},e.prototype.calcItemSize=function(e){return e.offsetWidth},e.prototype.calcMinDimension=function(e){var t=this.minDimensionConst;return e.iconSize&&this.recalcMinDimensionConst&&(t=2*e.iconSize+this.paddingSizeConst),e.canShrink?t+(e.needSeparator?this.separatorSize:0):e.maxDimension},e.prototype.calcItemsSizes=function(){var e=this,t=this.model.actions;this.container.querySelectorAll(this.itemsSelector).forEach((function(n,r){var o=t[r];e.calcActionDimensions(o,n)}))},e.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcMinDimension(e)},Object.defineProperty(e.prototype,"isContainerVisible",{get:function(){return!!((e=this.container).offsetWidth||e.offsetHeight||e.getClientRects().length);var e},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e;if(this.isContainerVisible&&!this.model.isResponsivenessDisabled){this.isInitialized||(this.model.setActionsMode("large"),this.calcItemsSizes(),this.isInitialized=!0);var t=this.dotsItemSize;if(!this.dotsItemSize){var n=null===(e=this.container)||void 0===e?void 0:e.querySelector(".sv-dots");t=n&&this.calcItemSize(n)||this.dotsSizeConst}this.model.fit(this.getAvailableSpace(),t)}},e.prototype.dispose=function(){this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect()},e}(),Vn=function(e){function t(t,n,r,o,i){void 0===i&&(i=40);var s=e.call(this,t,n,r,o)||this;return s.minDimensionConst=i,s.recalcMinDimensionConst=!1,s}return Un(t,e),t.prototype.getDimensions=function(){return{scroll:this.container.scrollHeight,offset:this.container.offsetHeight}},t.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetHeight;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)),t},t.prototype.calcItemSize=function(e){return e.offsetHeight},t.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcItemSize(t)},t}(Fn);Object(i.checkLibraryVersion)("1.9.84","survey-react-ui")}])}));
6
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("survey-core"),require("react-dom")):"function"==typeof define&&define.amd?define("survey-react-ui",["react","survey-core","react-dom"],t):"object"==typeof exports?exports["survey-react-ui"]=t(require("react"),require("survey-core"),require("react-dom")):e.SurveyReact=t(e.React,e.Survey,e.ReactDOM)}(this,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(5),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(3))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,s,a,u=1,l={},c=!1,p=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){i.port2.postMessage(e)}):p&&"onreadystatechange"in p.createElement("script")?(o=p.documentElement,r=function(e){var t=p.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&f(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return l[u]=o,r(u),u++},h.clearImmediate=d}function d(e){delete l[e]}function f(e){if(c)setTimeout(f,0,e);else{var t=l[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(3),n(6))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,l=[],c=!1,p=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=a(h);c=!0;for(var t=l.length;t;){for(u=l,l=[];++p<t;)u&&u[p].run();p=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||c||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t),n.d(t,"Survey",(function(){return te})),n.d(t,"attachKey2click",(function(){return ne})),n.d(t,"ReactSurveyElementsWrapper",(function(){return a})),n.d(t,"SurveyNavigationBase",(function(){return oe})),n.d(t,"SurveyTimerPanel",(function(){return se})),n.d(t,"SurveyPage",(function(){return Q})),n.d(t,"SurveyRow",(function(){return m})),n.d(t,"SurveyPanel",(function(){return we})),n.d(t,"SurveyFlowPanel",(function(){return _e})),n.d(t,"SurveyQuestion",(function(){return ge})),n.d(t,"SurveyElementErrors",(function(){return be})),n.d(t,"SurveyQuestionAndErrorsCell",(function(){return Ee})),n.d(t,"ReactSurveyElement",(function(){return p})),n.d(t,"SurveyElementBase",(function(){return c})),n.d(t,"SurveyQuestionElementBase",(function(){return h})),n.d(t,"SurveyQuestionCommentItem",(function(){return pe})),n.d(t,"SurveyQuestionComment",(function(){return ce})),n.d(t,"SurveyQuestionCheckbox",(function(){return Ie})),n.d(t,"SurveyQuestionCheckboxItem",(function(){return Pe})),n.d(t,"SurveyQuestionRanking",(function(){return Re})),n.d(t,"SurveyQuestionRankingItem",(function(){return Ne})),n.d(t,"RatingItem",(function(){return Te})),n.d(t,"RatingItemStar",(function(){return ke})),n.d(t,"RatingItemSmiley",(function(){return Be})),n.d(t,"TagboxFilterString",(function(){return Ae})),n.d(t,"SurveyQuestionOptionItem",(function(){return We})),n.d(t,"SurveyQuestionDropdownBase",(function(){return Ue})),n.d(t,"SurveyQuestionDropdown",(function(){return Ve})),n.d(t,"SurveyQuestionTagboxItem",(function(){return Ke})),n.d(t,"SurveyQuestionTagbox",(function(){return Ze})),n.d(t,"SurveyQuestionDropdownSelect",(function(){return Xe})),n.d(t,"SurveyQuestionMatrix",(function(){return Ye})),n.d(t,"SurveyQuestionMatrixRow",(function(){return et})),n.d(t,"SurveyQuestionHtml",(function(){return nt})),n.d(t,"SurveyQuestionFile",(function(){return ot})),n.d(t,"SurveyQuestionMultipleText",(function(){return st})),n.d(t,"SurveyQuestionRadiogroup",(function(){return ct})),n.d(t,"SurveyQuestionRadioItem",(function(){return pt})),n.d(t,"SurveyQuestionText",(function(){return dt})),n.d(t,"SurveyQuestionBoolean",(function(){return mt})),n.d(t,"SurveyQuestionBooleanCheckbox",(function(){return vt})),n.d(t,"SurveyQuestionBooleanRadio",(function(){return bt})),n.d(t,"SurveyQuestionEmpty",(function(){return Et})),n.d(t,"SurveyQuestionMatrixDropdownCell",(function(){return Rt})),n.d(t,"SurveyQuestionMatrixDropdownBase",(function(){return It})),n.d(t,"SurveyQuestionMatrixDropdown",(function(){return jt})),n.d(t,"SurveyQuestionMatrixDynamic",(function(){return Dt})),n.d(t,"SurveyQuestionMatrixDynamicAddButton",(function(){return kt})),n.d(t,"SurveyQuestionPanelDynamic",(function(){return zt})),n.d(t,"SurveyProgress",(function(){return Zt})),n.d(t,"SurveyProgressButtons",(function(){return Xt})),n.d(t,"SurveyProgressToc",(function(){return rn})),n.d(t,"SurveyQuestionRating",(function(){return sn})),n.d(t,"SurveyQuestionRatingDropdown",(function(){return un})),n.d(t,"SurveyQuestionExpression",(function(){return cn})),n.d(t,"PopupSurvey",(function(){return hn})),n.d(t,"SurveyWindow",(function(){return dn})),n.d(t,"ReactQuestionFactory",(function(){return K})),n.d(t,"ReactElementFactory",(function(){return s})),n.d(t,"SurveyQuestionImagePicker",(function(){return mn})),n.d(t,"SurveyQuestionImage",(function(){return gn})),n.d(t,"SurveyQuestionSignaturePad",(function(){return Cn})),n.d(t,"SurveyQuestionButtonGroup",(function(){return qn})),n.d(t,"SurveyQuestionCustom",(function(){return _n})),n.d(t,"SurveyQuestionComposite",(function(){return Sn})),n.d(t,"Popup",(function(){return P})),n.d(t,"List",(function(){return tn})),n.d(t,"TitleActions",(function(){return L})),n.d(t,"TitleElement",(function(){return H})),n.d(t,"SurveyActionBar",(function(){return D})),n.d(t,"LogoImage",(function(){return Pn})),n.d(t,"SurveyHeader",(function(){return z})),n.d(t,"SvgIcon",(function(){return b})),n.d(t,"SurveyQuestionMatrixDynamicRemoveButton",(function(){return Rn})),n.d(t,"SurveyQuestionMatrixDetailButton",(function(){return jn})),n.d(t,"SurveyQuestionMatrixDynamicDragDropIcon",(function(){return _t})),n.d(t,"SurveyQuestionPanelDynamicAddButton",(function(){return Lt})),n.d(t,"SurveyQuestionPanelDynamicRemoveButton",(function(){return Dn})),n.d(t,"SurveyQuestionPanelDynamicPrevButton",(function(){return Qt})),n.d(t,"SurveyQuestionPanelDynamicNextButton",(function(){return Ht})),n.d(t,"SurveyQuestionPanelDynamicProgressText",(function(){return Ft})),n.d(t,"SurveyNavigationButton",(function(){return Mn})),n.d(t,"MatrixRow",(function(){return wt})),n.d(t,"Skeleton",(function(){return Ln})),n.d(t,"NotifierComponent",(function(){return X})),n.d(t,"ComponentsContainer",(function(){return Y})),n.d(t,"CharacterCounterComponent",(function(){return ue})),n.d(t,"SurveyLocStringViewer",(function(){return F})),n.d(t,"SurveyLocStringEditor",(function(){return Hn})),n.d(t,"SurveyModel",(function(){return i.SurveyModel})),n.d(t,"SurveyWindowModel",(function(){return i.SurveyWindowModel})),n.d(t,"settings",(function(){return i.settings})),n.d(t,"surveyLocalization",(function(){return i.surveyLocalization})),n.d(t,"surveyStrings",(function(){return i.surveyStrings})),n.d(t,"Model",(function(){return i.SurveyModel})),n.d(t,"ResponsivityManager",(function(){return Fn})),n.d(t,"VerticalResponsivityManager",(function(){return Vn})),n.d(t,"unwrap",(function(){return Qn}));var r=n(0),o=n.n(r),i=n(1),s=function(){function e(){this.creatorHash={}}return e.prototype.registerElement=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.isElementRegistered=function(e){return!!this.creatorHash[e]},e.prototype.createElement=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),a=function(){function e(){}return e.wrapRow=function(e,t,n){var r=e.getRowWrapperComponentName(n),o=e.getRowWrapperComponentData(n);return s.Instance.createElement(r,{element:t,row:n,componentData:o})},e.wrapElement=function(e,t,n){var r=e.getElementWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapQuestionContent=function(e,t,n){var r=e.getQuestionContentWrapperComponentName(n),o=e.getElementWrapperComponentData(n);return s.Instance.createElement(r,{element:t,question:n,componentData:o})},e.wrapItemValue=function(e,t,n,r){var o=e.getItemValueWrapperComponentName(r,n),i=e.getItemValueWrapperComponentData(r,n);return s.Instance.createElement(o,{key:null==t?void 0:t.key,element:t,question:n,item:r,componentData:i})},e.wrapMatrixCell=function(e,t,n,r){void 0===r&&(r="cell");var o=e.getElementWrapperComponentName(n,r),i=e.getElementWrapperComponentData(n,r);return s.Instance.createElement(o,{element:t,cell:n,componentData:i})},e}();i.SurveyModel.platform="react";var u,l=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t){var n=e.call(this,t)||this;return n._allowComponentUpdate=!0,n}return l(t,e),t.renderLocString=function(e,t,n){return void 0===t&&(t=null),s.Instance.createElement(e.renderAs,{locStr:e.renderAsData,style:t,key:n})},t.renderQuestionDescription=function(e){var n=t.renderLocString(e.locDescription);return r.createElement("div",{style:e.isDescriptionVisible?void 0:{display:"none"},className:e.cssDescription},n)},t.prototype.componentDidMount=function(){this.makeBaseElementsReact()},t.prototype.componentWillUnmount=function(){this.unMakeBaseElementsReact()},t.prototype.componentDidUpdate=function(e,t){this.makeBaseElementsReact()},t.prototype.allowComponentUpdate=function(){this._allowComponentUpdate=!0,this.forceUpdate()},t.prototype.denyComponentUpdate=function(){this._allowComponentUpdate=!1},t.prototype.shouldComponentUpdate=function(e,t){return this._allowComponentUpdate&&this.unMakeBaseElementsReact(),this._allowComponentUpdate},t.prototype.render=function(){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},t.prototype.wrapElement=function(e){return e},Object.defineProperty(t.prototype,"isRendering",{get:function(){for(var e=0,t=this.getRenderedElements();e<t.length;e++){if(t[e].reactRendering>0)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return this.getStateElements()},t.prototype.startEndRendering=function(e){for(var t=0,n=this.getRenderedElements();t<n.length;t++){var r=n[t];r.reactRendering||(r.reactRendering=0),r.reactRendering+=e}},t.prototype.canRender=function(){return!0},t.prototype.renderElement=function(){return null},Object.defineProperty(t.prototype,"changedStatePropName",{get:function(){return this.changedStatePropNameValue},enumerable:!1,configurable:!0}),t.prototype.makeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)this.makeBaseElementReact(e[t])},t.prototype.unMakeBaseElementsReact=function(){for(var e=this.getStateElements(),t=0;t<e.length;t++)this.unMakeBaseElementReact(e[t])},t.prototype.getStateElements=function(){var e=this.getStateElement();return e?[e]:[]},t.prototype.getStateElement=function(){return null},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!1},enumerable:!1,configurable:!0}),t.prototype.renderLocString=function(e,n,r){return void 0===n&&(n=null),t.renderLocString(e,n,r)},t.prototype.canMakeReact=function(e){return!!e&&!!e.iteratePropertiesHash},t.prototype.makeBaseElementReact=function(e){var t=this;this.canMakeReact(e)&&(e.iteratePropertiesHash((function(e,n){if(t.canUsePropInState(n)){var r=e[n];if(Array.isArray(r))(r=r).onArrayChanged=function(e){t.isRendering||(t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t})))}}})),e.setPropertyValueCoreHandler=function(e,n,r){if(e[n]!==r){if(e[n]=r,!t.canUsePropInState(n))return;if(t.isRendering)return;t.changedStatePropNameValue=n,t.setState((function(e){var t={};return t[n]=r,t}))}})},t.prototype.canUsePropInState=function(e){return!0},t.prototype.unMakeBaseElementReact=function(e){this.canMakeReact(e)&&(e.setPropertyValueCoreHandler=void 0,e.iteratePropertiesHash((function(e,t){var n=e[t];Array.isArray(n)&&((n=n).onArrayChanged=function(){})})))},t}(r.Component),p=function(e){function t(t){return e.call(this,t)||this}return l(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),t}(c),h=function(e){function t(t){return e.call(this,t)||this}return l(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase){var t=this.control;this.questionBase.beforeDestroyQuestionElement(t),t&&t.removeAttribute("data-rendered")}},t.prototype.updateDomElement=function(){var e=this.control;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.questionBase.afterRenderQuestionElement(e))},Object.defineProperty(t.prototype,"questionBase",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getRenderedElements=function(){return[this.questionBase]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.questionBase&&!!this.creator},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&!(this.questionBase.customWidget&&!this.questionBase.customWidgetData.isNeedRender&&!this.questionBase.customWidget.widgetJson.isDefaultRender&&!this.questionBase.customWidget.widgetJson.render)},Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return this.props.isDisplayMode||!!this.questionBase&&this.questionBase.isInputReadOnly||!1},enumerable:!1,configurable:!0}),t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.questionBase.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.setControl=function(e){e&&(this.control=e)},t}(c),d=function(e){function t(t){var n=e.call(this,t)||this;return n.updateValueOnEvent=function(e){i.Helpers.isTwoValueEquals(n.questionBase.value,e.target.value)||n.setValueCore(e.target.value)},n.updateValueOnEvent=n.updateValueOnEvent.bind(n),n}return l(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.setValueCore=function(e){this.questionBase.value=e},t.prototype.getValueCore=function(){return this.questionBase.value},t.prototype.updateDomElement=function(){if(this.control){var t=this.control,n=this.getValueCore();i.Helpers.isTwoValueEquals(n,t.value)||(t.value=this.getValue(n))}e.prototype.updateDomElement.call(this)},t.prototype.getValue=function(e){return i.Helpers.isValueEmpty(e)?"":e},t}(h),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=r.createRef(),n.recalculateCss(),n}return f(t,e),t.prototype.recalculateCss=function(){this.row.visibleElements.map((function(e){return e.cssClasses}))},t.prototype.getStateElement=function(){return this.row},Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.row&&!!this.survey&&!!this.creator&&this.row.visible},t.prototype.renderElementContent=function(){var e=this,t=this.row.visibleElements.map((function(t,n){var o=e.createElement(t,n),i=t.cssClassesValue;return r.createElement("div",{className:i.questionWrapper,style:t.rootStyle,"data-key":o.key,key:o.key,onFocus:function(){var e=t;e&&!e.isDisposed&&e.isQuestion&&e.focusIn()}},e.row.isNeedRender?o:s.Instance.createElement(t.skeletonComponentName,{element:t,css:e.css}))}));return r.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},t)},t.prototype.renderElement=function(){var e=this.survey,t=this.renderElementContent();return a.wrapRow(e,t,this.row)||t},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var n=this.rootRef.current;if(n&&!this.row.isNeedRender){var r=n;setTimeout((function(){t.row.startLazyRendering(r)}),10)}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(t.row!==this.row&&(t.row.isNeedRender=this.row.isNeedRender,this.stopLazyRendering()),this.recalculateCss(),!0)},t.prototype.stopLazyRendering=function(){this.row.stopLazyRendering(),this.row.isNeedRender=!this.row.isLazyRendering()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.stopLazyRendering()},t.prototype.createElement=function(e,t){var n=t?"-"+t:0,r=e.getType();return s.Instance.isElementRegistered(r)||(r="question"),s.Instance.createElement(r,{key:e.name+n,element:e,creator:this.creator,survey:this.survey,css:this.css})},t}(c),y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(e){function t(t){var n=e.call(this,t)||this;return n.renderedRowsCache={},n.rootRef=r.createRef(),n}return y(t,e),t.prototype.getStateElement=function(){return this.panelBase},t.prototype.canUsePropInState=function(t){return"elements"!==t&&e.prototype.canUsePropInState.call(this,t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.getSurvey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.getCss()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelBase",{get:function(){return this.getPanelBase()},enumerable:!1,configurable:!0}),t.prototype.getPanelBase=function(){return this.props.element||this.props.question},t.prototype.getSurvey=function(){return this.props.survey||(this.panelBase?this.panelBase.survey:null)},t.prototype.getCss=function(){return this.props.css},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),t.page&&this.survey&&this.survey.currentPage&&t.page.name===this.survey.currentPage.name||this.doAfterRender()},t.prototype.doAfterRender=function(){var e=this.rootRef.current;e&&this.survey&&(this.panelBase.isPanel?this.survey.afterRenderPanel(this.panelBase,e):this.survey.afterRenderPage(e))},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.survey&&!!this.panelBase&&this.panelBase.isVisible&&!!this.panelBase.survey},t.prototype.renderRows=function(e){"rows"!==this.changedStatePropName&&(this.renderedRowsCache={});for(var t=[],n=this.panelBase.rows,r=0;r<n.length;r++){var o=this.renderedRowsCache[n[r].id];o||(o=this.createRow(n[r],e),this.renderedRowsCache[n[r].id]=o),t.push(o)}return t},t.prototype.createRow=function(e,t){return r.createElement(m,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})},t}(c),g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.svgIconRef=o.a.createRef(),n}return g(t,e),t.prototype.updateSvg=function(){this.props.iconName&&Object(i.createSvg)(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current,this.props.title)},t.prototype.componentDidUpdate=function(){this.updateSvg()},t.prototype.render=function(){var e="sv-svg-icon";return this.props.className&&(e+=" "+this.props.className),this.props.iconName?o.a.createElement("svg",{className:e,style:this.props.style,onClick:this.props.onClick,ref:this.svgIconRef,role:"img","aria-label":this.props.title},o.a.createElement("use",null)):null},t.prototype.componentDidMount=function(){this.updateSvg()},t}(o.a.Component);s.Instance.registerElement("sv-svg-icon",(function(e){return o.a.createElement(b,e)}));var C=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(t){return e.call(this,t)||this}return C(t,e),t.prototype.render=function(){var e="sv-action-bar-separator "+this.props.cssClasses;return o.a.createElement("div",{className:e})},t}(o.a.Component);s.Instance.registerElement("sv-action-bar-separator",(function(e){return o.a.createElement(E,e)}));var q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e=this.item.getActionRootCss(),t=this.item.needSeparator?o.a.createElement(E,null):null,n=s.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return o.a.createElement("div",{className:e,id:this.item.id},o.a.createElement("div",{className:"sv-action__content"},t,n))},t}(c),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){return o.a.createElement(o.a.Fragment,null,this.renderInnerButton())},t.prototype.renderText=function(){if(!this.item.hasTitle)return null;var e=this.item.getActionBarItemTitleCss();return o.a.createElement("span",{className:e},this.item.title)},t.prototype.renderButtonContent=function(){var e=this.renderText(),t=this.item.iconName?o.a.createElement(b,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName,title:this.item.tooltip||this.item.title}):null;return o.a.createElement(o.a.Fragment,null,t,e)},t.prototype.renderInnerButton=function(){var e=this,t=this.item.getActionBarItemCss(),n=this.item.tooltip||this.item.title,r=this.renderButtonContent(),i=this.item.disableTabStop?-1:void 0;return ne(o.a.createElement("button",{className:t,type:"button",disabled:this.item.disabled,onClick:function(t){return e.item.action(e.item,e.item.getIsTrusted(t))},title:n,tabIndex:i,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},r),null,{processEsc:!1})},t}(c);s.Instance.registerElement("sv-action-bar-item",(function(e){return o.a.createElement(O,e)}));var _=n(2),S=n.n(_),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=o.a.createRef(),n.createModel(),n}return I(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.createModel=function(){this.popup=Object(i.createPopupViewModel)(this.props.model,void 0),this.popup.initializePopupContainer()},t.prototype.setTargetElement=function(){if(this.containerRef.current&&!this.popup.isModal){var e=this.popup;if(!e)return;this.containerRef.current.parentElement&&(e.targetElement=this.containerRef.current.parentElement)}},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.popup.initializePopupContainer(),this.setTargetElement()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setTargetElement()},t.prototype.componentWillUnmount=function(){this.popup.unmountPopupContainer()},t.prototype.shouldComponentUpdate=function(t,n){var r;if(!e.prototype.shouldComponentUpdate.call(this,t,n))return!1;var o=t.model!==this.popup.model;return o&&(null===(r=this.popup)||void 0===r||r.dispose(),this.createModel()),o},t.prototype.render=function(){var e;return this.popup.model=this.model,e=this.model.isModal?S.a.createPortal(o.a.createElement(x,{model:this.popup}),this.popup.container):S.a.createPortal(o.a.createElement(R,{model:this.popup}),this.popup.container),o.a.createElement("div",{ref:this.containerRef},e)},t}(c);s.Instance.registerElement("sv-popup",(function(e){return o.a.createElement(P,e)}));var x=function(e){function t(t){var n=e.call(this,t)||this;return n.prevIsVisible=!1,n.handleKeydown=function(e){n.model.onKeyDown(e)},n.clickInside=function(e){e.stopPropagation()},n}return I(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),!this.prevIsVisible&&this.model.isVisible&&this.model.updateOnShowing(),this.prevIsVisible=this.model.isVisible},t.prototype.renderContainer=function(e){var t=this,n=e.showHeader?this.renderHeaderPopup(e):null,r=e.title?this.renderHeaderContent():null,i=this.renderContent(),s=e.showFooter?this.renderFooter(this.model):null;return o.a.createElement("div",{className:"sv-popup__container",style:{left:e.left,top:e.top,height:e.height,width:e.width,minWidth:e.minWidth},onClick:function(e){t.clickInside(e)}},o.a.createElement("div",{className:"sv-popup__shadow"},n,o.a.createElement("div",{className:"sv-popup__body-content"},r,o.a.createElement("div",{className:"sv-popup__scrolling-content"},i),s)))},t.prototype.renderHeaderContent=function(){return o.a.createElement("div",{className:"sv-popup__body-header"},this.model.title)},t.prototype.renderContent=function(){var e=s.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return o.a.createElement("div",{className:"sv-popup__content"},e)},t.prototype.renderHeaderPopup=function(e){return null},t.prototype.renderFooter=function(e){return o.a.createElement("div",{className:"sv-popup__body-footer"},o.a.createElement(D,{model:e.footerToolbar}))},t.prototype.render=function(){var e=this,t=this.renderContainer(this.model),n=(new i.CssClassBuilder).append("sv-popup").append(this.model.styleClass).toString(),r={display:this.model.isVisible?"":"none"};return o.a.createElement("div",{tabIndex:-1,className:n,style:r,onClick:function(t){e.model.clickOutside(),t.stopPropagation()},onKeyDown:this.handleKeydown},t)},t}(c),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t.prototype.renderHeaderPopup=function(e){var t=e;return t?o.a.createElement("span",{style:{left:t.pointerTarget.left,top:t.pointerTarget.top},className:"sv-popup__pointer"}):null},t}(x);i.settings.showModal=function(e,t,n,r,s,a,u){return void 0===u&&(u="popup"),function(e){e.onHide=function(){S.a.unmountComponentAtNode(t.container),t.unmountPopupContainer()};var t=Object(i.createPopupModalViewModel)(e);return S.a.render(o.a.createElement(x,{model:t}),t.container),t.model.isVisible=!0,t}(Object(i.createDialogOptions)(e,t,n,r,void 0,void 0,s,a,u))};var N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(e){function t(t){var n=e.call(this,t)||this;return n.viewModel=new i.ActionDropdownViewModel(n.item),n}return N(t,e),t.prototype.renderButtonContent=function(){var t=e.prototype.renderButtonContent.call(this);return o.a.createElement(o.a.Fragment,null,t,o.a.createElement(P,{model:this.item.popupModel}))},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.viewModel.dispose()},t}(O);s.Instance.registerElement("sv-action-bar-item-dropdown",(function(e){return o.a.createElement(j,e)}));var T=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(e){function t(t){var n=e.call(this,t)||this;return n.rootRef=o.a.createRef(),n}return T(t,e),Object.defineProperty(t.prototype,"handleClick",{get:function(){return void 0===this.props.handleClick||this.props.handleClick},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.model.hasActions){var t=this.rootRef.current;t&&this.model.initResponsivityManager(t)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.hasActions&&this.model.resetResponsivityManager()},t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){if(!this.model.hasActions)return null;var e=this.renderItems();return o.a.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),onClick:this.handleClick?function(e){e.stopPropagation()}:void 0},e)},t.prototype.renderItems=function(){return this.model.renderedActions.map((function(e,t){return o.a.createElement(w,{item:e,key:"item"+t})}))},t}(c);s.Instance.registerElement("sv-action-bar",(function(e){return o.a.createElement(D,e)}));var k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(e){function t(t){return e.call(this,t)||this}return k(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(this.element.isTitleRenderedAsString)return c.renderLocString(this.element.locTitle);var e=this.renderTitleSpans(this.element.getTitleOwner(),this.cssClasses);return o.a.createElement(o.a.Fragment,null,e)},t.prototype.renderTitleSpans=function(e,t){var n=function(e){return o.a.createElement("span",{"data-key":e,key:e}," ")},r=[];e.isRequireTextOnStart&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp")));var i=e.no;return i&&(r.push(o.a.createElement("span",{"data-key":"q_num",key:"q_num",className:t.number||t.panel.number,style:{position:"static"},"aria-hidden":!0},i)),r.push(n("num-sp"))),e.isRequireTextBeforeTitle&&(r.push(this.renderRequireText(e,t)),r.push(n("req-sp"))),r.push(c.renderLocString(e.locTitle,null,"q_title")),e.isRequireTextAfterTitle&&(r.push(n("req-sp")),r.push(this.renderRequireText(e,t))),r},t.prototype.renderRequireText=function(e,t){return o.a.createElement("span",{"data-key":"req-text",key:"req-text",className:t.requiredText||t.panel.requiredText,"aria-hidden":!0},e.requiredText)},t}(o.a.Component),B=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=o.a.createElement(M,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?o.a.createElement("div",{className:"sv-title-actions"},o.a.createElement("span",{className:"sv-title-actions__title"},e),o.a.createElement(D,{model:this.element.getTitleToolbar()})):e},t}(o.a.Component);i.RendererFactory.Instance.registerRenderer("element","title-actions","sv-title-actions"),s.Instance.registerElement("sv-title-actions",(function(e){return o.a.createElement(L,e)}));var A=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(e){function t(t){return e.call(this,t)||this}return A(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element;if(!e||!e.hasTitle)return null;var t=e.titleAriaLabel||void 0,n=o.a.createElement(L,{element:e,cssClasses:e.cssClasses}),r=void 0;e.hasTitleEvents&&(r=function(e){Object(i.doKey2ClickUp)(e.nativeEvent)});var s=e.titleTagName;return o.a.createElement(s,{className:e.cssTitle,id:e.ariaTitleId,"aria-label":t,tabIndex:e.titleTabIndex,"aria-expanded":e.titleAriaExpanded,role:e.titleAriaRole,onClick:void 0,onKeyUp:r},n)},t}(o.a.Component),W=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(e){function t(t){return e.call(this,t)||this}return W(t,e),t.prototype.getPanelBase=function(){return this.props.page},Object.defineProperty(t.prototype,"page",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.renderTitle(),t=this.renderDescription(),n=this.renderRows(this.panelBase.cssClasses);return r.createElement("div",{ref:this.rootRef,className:this.page.cssRoot},e,t,n)},t.prototype.renderTitle=function(){return r.createElement(H,{element:this.page})},t.prototype.renderDescription=function(){if(!this.page._showDescription)return null;var e=c.renderLocString(this.page.locDescription);return r.createElement("div",{className:this.panelBase.cssClasses.page.description},e)},t}(v),U=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e){function t(t){var n=e.call(this,t)||this;return n.onChangedHandler=function(e,t){n.isRendering||n.setState({changed:n.state&&n.state.changed?n.state.changed+1:1})},n.rootRef=o.a.createRef(),n}return U(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.locStr&&this.locStr.onStringChanged.remove(this.onChangedHandler)},t.prototype.componentDidUpdate=function(e,t){e.locStr&&e.locStr.onStringChanged.remove(this.onChangedHandler),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){this.locStr&&this.locStr.onStringChanged.add(this.onChangedHandler)},t.prototype.render=function(){if(!this.locStr)return null;this.isRendering=!0;var e=this.renderString();return this.isRendering=!1,e},t.prototype.renderString=function(){if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{ref:this.rootRef,className:"sv-string-viewer",style:this.style,dangerouslySetInnerHTML:e})}return o.a.createElement("span",{ref:this.rootRef,className:"sv-string-viewer",style:this.style},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.defaultRenderer,(function(e){return o.a.createElement(F,e)}));var V=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),z=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n}return V(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.survey.locLogo.onChanged=function(){e.setState({changed:e.state.changed+1})}},t.prototype.componentWillUnmount=function(){this.survey.locLogo.onChanged=function(){}},t.prototype.renderTitle=function(){if(!this.survey.renderedHasTitle)return null;var e=c.renderLocString(this.survey.locDescription);return o.a.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},o.a.createElement(H,{element:this.survey}),this.survey.renderedHasDescription?o.a.createElement("h5",{className:this.css.description},e):null)},t.prototype.renderLogoImage=function(e){if(!e)return null;var t=this.survey.getElementWrapperComponentName(this.survey,"logo-image"),n=this.survey.getElementWrapperComponentData(this.survey,"logo-image");return s.Instance.createElement(t,{data:n})},t.prototype.render=function(){return this.survey.renderedHasHeader?o.a.createElement("div",{className:this.css.header},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),o.a.createElement("div",{className:this.css.headerClose})):null},t}(o.a.Component);s.Instance.registerElement("survey-header",(function(e){return o.a.createElement(z,e)}));var K=function(){function e(){this.creatorHash={}}return e.prototype.registerQuestion=function(e,t){this.creatorHash[e]=t},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.createQuestion=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),J=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.render=function(){return o.a.createElement("div",{className:"sv-brand-info"},o.a.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"},o.a.createElement("img",{src:"https://surveyjs.io/Content/Images/poweredby.svg"})),o.a.createElement("div",{className:"sv-brand-info__text"},"Try and see how easy it is to ",o.a.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")),o.a.createElement("div",{className:"sv-brand-info__terms"},o.a.createElement("a",{href:"https://surveyjs.io/TermsOfUse"},"Terms of Use & Privacy Statement")))},t}(o.a.Component),G=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){if(!this.notifier.isDisplayed)return null;var e={visibility:this.notifier.active?"visible":"hidden"};return o.a.createElement("div",{className:this.notifier.css,style:e},o.a.createElement("span",null,this.notifier.message),o.a.createElement(D,{model:this.notifier.actionBar}))},t}(c);s.Instance.registerElement("sv-notifier",(function(e){return o.a.createElement(X,e)}));var $=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype.render=function(){var e=this,t=this.props.survey.getContainerContent(this.props.container),n=!1!==this.props.needRenderWrapper;return 0==t.length?null:n?o.a.createElement("div",{className:"sv-components-column"},t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,key:t.id})}))):o.a.createElement(o.a.Fragment,null,t.map((function(t){return s.Instance.createElement(t.component,{survey:e.props.survey,model:t.data,key:t.id})})))},t}(o.a.Component);s.Instance.registerElement("sv-components-container",(function(e){return o.a.createElement(Y,e)}));var ee=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),te=function(e){function t(t){var n=e.call(this,t)||this;return n.previousJSON={},n.isSurveyUpdated=!1,n.createSurvey(t),n.updateSurvey(t,{}),n.rootRef=r.createRef(),n.rootNodeId=t.id||null,n.rootNodeClassName=t.className||"",n}return ee(t,e),Object.defineProperty(t,"cssType",{get:function(){return i.surveyCss.currentType},set:function(e){i.StylesManager.applyTheme(e)},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.survey},t.prototype.onSurveyUpdated=function(){if(this.survey){var e=this.rootRef.current;e&&this.survey.afterRenderSurvey(e),this.survey.startTimerFromUI()}},t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(this.isModelJSONChanged(t)&&(this.destroySurvey(),this.createSurvey(t),this.updateSurvey(t,{}),this.isSurveyUpdated=!0),!0)},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateSurvey(this.props,t),this.isSurveyUpdated&&(this.onSurveyUpdated(),this.isSurveyUpdated=!1)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.onSurveyUpdated()},t.prototype.destroySurvey=function(){this.survey&&(this.survey.stopTimer(),this.survey.destroyResizeObserver())},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.destroySurvey()},t.prototype.doRender=function(){var e;this.survey.needRenderIcons&&i.SvgRegistry.renderIcons(),e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():this.renderSurvey();var t=r.createElement(z,{survey:this.survey}),n=r.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(n=null);var o=this.survey.getRootCss(),s=this.rootNodeClassName?this.rootNodeClassName+" "+o:o,a={backgroundImage:this.survey.renderBackgroundImage},u={backgroundColor:this.survey.renderBackgroundOpacity};return r.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:s,style:a},r.createElement("form",{onSubmit:function(e){e.preventDefault()},style:u},n,r.createElement("div",{className:this.css.container},t,r.createElement(Y,{survey:this.survey,container:"header",needRenderWrapper:!1}),e,r.createElement(Y,{survey:this.survey,container:"footer",needRenderWrapper:!1}))),this.survey.showBrandInfo?r.createElement(Z,null):null,r.createElement(X,{notifier:this.survey.notifier}))},t.prototype.renderElement=function(){return this.doRender()},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},set:function(e){this.survey.css=e},enumerable:!1,configurable:!0}),t.prototype.renderCompleted=function(){if(!this.survey.showCompletedPage)return null;var e={__html:this.survey.processedCompletedHtml};return r.createElement(r.Fragment,null,r.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedCss}))},t.prototype.renderCompletedBefore=function(){var e={__html:this.survey.processedCompletedBeforeHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.css.body})},t.prototype.renderLoading=function(){var e={__html:this.survey.processedLoadingHtml};return r.createElement("div",{dangerouslySetInnerHTML:e,className:this.css.body})},t.prototype.renderSurvey=function(){var e=this.survey.activePage?this.renderPage(this.survey.activePage):null,t=(this.survey.isShowStartingPage,this.survey.activePage?this.survey.activePage.id:""),n=this.survey.bodyCss;e||(n=this.css.bodyEmpty,e=this.renderEmptySurvey());var o={};return this.survey.renderedWidth&&(o.maxWidth=this.survey.renderedWidth),r.createElement("div",{className:this.survey.bodyContainerCss},r.createElement(Y,{survey:this.survey,container:"left"}),r.createElement("div",{id:t,className:n,style:o},r.createElement(Y,{survey:this.survey,container:"contentTop"}),e,r.createElement(Y,{survey:this.survey,container:"contentBottom"})),r.createElement(Y,{survey:this.survey,container:"right"}))},t.prototype.renderPage=function(e){return r.createElement(Q,{survey:this.survey,page:e,css:this.css,creator:this})},t.prototype.renderEmptySurvey=function(){return r.createElement("span",null,this.survey.emptySurveyText)},t.prototype.createSurvey=function(e){e||(e={}),this.previousJSON={},e?e.model?this.survey=e.model:e.json&&(this.previousJSON=e.json,this.survey=new i.SurveyModel(e.json)):this.survey=new i.SurveyModel,e.css&&(this.survey.css=this.css),this.setSurveyEvents()},t.prototype.isModelJSONChanged=function(e){return e.model?this.survey!==e.model:!!e.json&&!i.Helpers.isTwoValueEquals(e.json,this.previousJSON)},t.prototype.updateSurvey=function(e,t){if(e)for(var n in t=t||{},e)"model"!=n&&"children"!=n&&"json"!=n&&("css"!=n?e[n]!==t[n]&&(0==n.indexOf("on")&&this.survey[n]&&this.survey[n].add?(t[n]&&this.survey[n].remove(t[n]),this.survey[n].add(e[n])):this.survey[n]=e[n]):(this.survey.mergeValues(e.css,this.survey.getCss()),this.survey.updateNavigationCss(),this.survey.updateElementCss()))},t.prototype.setSurveyEvents=function(){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((function(t){e.state&&e.setState(e.state)}))},t.prototype.createQuestionElement=function(e){return K.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.renderError=function(e,t,n){return r.createElement("div",{key:e},r.createElement("span",{className:n.error.icon||void 0,"aria-hidden":"true"}),r.createElement("span",{className:n.error.item||void 0},r.createElement(F,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(c);function ne(e,t,n){return void 0===n&&(n={processEsc:!0,disableTabStop:!1}),t&&t.disableTabStop||n&&n.disableTabStop?r.cloneElement(e,{tabIndex:-1}):r.cloneElement(e,{tabIndex:0,onKeyUp:function(e){return e.preventDefault(),e.stopPropagation(),Object(i.doKey2ClickUp)(e,n),!1},onKeyDown:function(e){return Object(i.doKey2ClickDown)(e,n)},onBlur:function(e){return Object(i.doKey2ClickBlur)(e)}})}s.Instance.registerElement("survey",(function(e){return r.createElement(te,e)}));var re=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oe=function(e){function t(t){var n=e.call(this,t)||this;return n.updateStateFunction=null,n.state={update:0},n}return re(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"css",{get:function(){return this.props.css||this.survey.css},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.survey){var e=this;this.updateStateFunction=function(){e.setState({update:e.state.update+1})},this.survey.onPageVisibleChanged.add(this.updateStateFunction)}},t.prototype.componentWillUnmount=function(){this.survey&&this.updateStateFunction&&(this.survey.onPageVisibleChanged.remove(this.updateStateFunction),this.updateStateFunction=null)},t}(r.Component),ie=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),se=function(e){function t(t){var n=e.call(this,t)||this;return n.circleLength=440,n}return ie(t,e),t.prototype.getStateElement=function(){return this.timerModel},Object.defineProperty(t.prototype,"timerModel",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return-this.timerModel.progress*this.circleLength},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.timerModel.isRunning)return null;var e=r.createElement("div",{className:this.timerModel.survey.getCss().timerRoot},this.timerModel.text);if(this.timerModel.showTimerAsClock){var t={strokeDasharray:this.circleLength,strokeDashoffset:this.progress},n=this.timerModel.showProgress?r.createElement(b,{className:this.timerModel.getProgressCss(),style:t,iconName:"icon-timercircle",size:"auto"}):null;e=r.createElement("div",{className:this.timerModel.rootCss},n,r.createElement("div",{className:this.timerModel.textContainerCss},r.createElement("span",{className:this.timerModel.majorTextCss},this.timerModel.clockMajorText),this.timerModel.clockMinorText?r.createElement("span",{className:this.timerModel.minorTextCss},this.timerModel.clockMinorText):null))}return e},t}(p);s.Instance.registerElement("sv-timerpanel",(function(e){return r.createElement(se,e)}));var ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ae(t,e),t.prototype.getStateElement=function(){return this.props.counter},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.props.remainingCharacterCounter},this.props.counter.remainingCharacterCounter)},t}(c);s.Instance.registerElement("sv-character-counter",(function(e){return o.a.createElement(ue,e)}));var le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e){function t(t){return e.call(this,t)||this}return le(t,e),t.prototype.renderElement=function(){var e=this,t=this.question.isInputTextUpdate?void 0:this.updateValueOnEvent,n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(ue,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("textarea",{id:this.question.inputId,className:this.question.className,disabled:this.question.isInputReadOnly,readOnly:this.question.isInputReadOnly,ref:function(t){return e.setControl(t)},maxLength:this.question.getMaxLength(),placeholder:n,onBlur:t,onInput:function(t){e.question.isInputTextUpdate?e.updateValueOnEvent(t):e.question.updateElement();var n=t.target.value;e.question.updateRemainingCharacterCounter(n)},onKeyDown:function(t){e.question.onKeyDown(t)},cols:this.question.cols,rows:this.question.rows,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,style:{resize:this.question.resizeStyle}}),o)},t}(d),pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return le(t,e),t.prototype.canRender=function(){return!!this.props.question},t.prototype.onCommentChange=function(e){this.props.question.onCommentChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onCommentInput(e)},t.prototype.getComment=function(){return this.props.question.comment},t.prototype.getId=function(){return this.props.question.commentId},t.prototype.getPlaceholder=function(){return this.props.question.commentPlaceholder},t.prototype.renderElement=function(){var e=this,t=this.props.question,n=this.props.otherCss||this.cssClasses.comment,o=function(t){e.setState({comment:t.target.value}),e.onCommentChange(t)},i=this.getComment(),s=this.state?this.state.comment:void 0;void 0!==s&&s.trim()!==i&&(s=i);var a=void 0!==s?s:i||"";return t.isReadOnlyRenderDiv()?r.createElement("div",null,a):r.createElement("textarea",{id:this.getId(),className:n,value:a,disabled:this.isDisplayMode,maxLength:t.getOthersMaxLength(),placeholder:this.getPlaceholder(),onChange:o,onBlur:function(t){e.onCommentChange(t),o(t)},onInput:function(t){return e.onCommentInput(t)},"aria-required":t.isRequired,"aria-label":t.locTitle.renderedHtml,style:{resize:t.resizeStyle}})},t}(p),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return le(t,e),t.prototype.onCommentChange=function(e){this.props.question.onOtherValueChange(e)},t.prototype.onCommentInput=function(e){this.props.question.onOtherValueInput(e)},t.prototype.getComment=function(){return this.props.question.otherValue},t.prototype.getId=function(){return this.props.question.otherId},t.prototype.getPlaceholder=function(){return this.props.question.otherPlaceholder},t}(pe);K.Instance.registerQuestion("comment",(function(e){return r.createElement(ce,e)}));var de=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fe=function(e){function t(t){var n=e.call(this,t)||this;return n.widgetRef=r.createRef(),n}return de(t,e),t.prototype._afterRender=function(){if(this.questionBase.customWidget){var e=this.widgetRef.current;e&&(this.questionBase.customWidget.afterRender(this.questionBase,e),this.questionBase.customWidgetData.isNeedRender=!1)}},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.questionBase&&this._afterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n);var r=!!this.questionBase.customWidget&&this.questionBase.customWidget.isDefaultRender;this.questionBase&&!r&&this._afterRender()},t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.questionBase.customWidget){var t=this.widgetRef.current;t&&this.questionBase.customWidget.willUnmount(this.questionBase,t)}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.questionBase.visible},t.prototype.renderElement=function(){var e=this.questionBase.customWidget;if(e.isDefaultRender)return r.createElement("div",{ref:this.widgetRef},this.creator.createQuestionElement(this.questionBase));var t=null;if(e.widgetJson.render)t=e.widgetJson.render(this.questionBase);else if(e.htmlTemplate){var n={__html:e.htmlTemplate};return r.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:n})}return r.createElement("div",{ref:this.widgetRef},t)},t}(h),me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return me(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.element,t=e.hasTitle?o.a.createElement(H,{element:e}):null,n=e.hasDescriptionUnderTitle?c.renderQuestionDescription(this.element):null,r=e.additionalTitleToolbar?o.a.createElement(D,{model:e.additionalTitleToolbar}):null;return o.a.createElement("div",{className:e.cssHeader,onClick:e.clickTitleFunction},t,n,r)},t}(o.a.Component),ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ge=function(e){function t(t){var n=e.call(this,t)||this;return n.isNeedFocus=!1,n.rootRef=r.createRef(),n}return ve(t,e),t.renderQuestionBody=function(e,t){return t.isVisible?t.customWidget?r.createElement(fe,{creator:e,question:t}):e.createQuestionElement(t):null},t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.question&&(this.question.react=this),this.doAfterRender()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.react=null);var t=this.rootRef.current;t&&t.removeAttribute("data-rendered")},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){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"),e.setAttribute("data-name",this.question.name),this.question.afterRender&&this.question.afterRender(e))}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question&&!!this.creator&&this.question.isVisible},t.prototype.renderQuestionContent=function(){var e=this.question,t={display:this.question.isCollapsed?"none":""},n=e.cssClasses,o=this.renderQuestion(),i=this.question.showErrorOnTop?this.renderErrors(n,"top"):null,s=this.question.showErrorOnBottom?this.renderErrors(n,"bottom"):null,a=e&&e.hasComment?this.renderComment(n):null,u=this.question.isErrorsModeTooltip?this.renderErrors(n,"tooltip"):null,l=e.hasDescriptionUnderInput?this.renderDescription():null;return r.createElement("div",{className:e.cssContent||void 0,style:t,role:"presentation"},i,o,a,s,u,l)},t.prototype.renderElement=function(){var e=this.question,t=e.cssClasses,n=this.renderHeader(e),o=e.hasTitleOnLeftTop?n:null,i=e.hasTitleOnBottom?n:null,s=this.question.showErrorsAboveQuestion?this.renderErrors(t,""):null,a=this.question.showErrorsBelowQuestion?this.renderErrors(t,""):null,u=e.getRootStyle(),l=this.wrapQuestionContent(this.renderQuestionContent());return r.createElement(r.Fragment,null,r.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:u,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-labelledby":e.ariaLabelledBy},s,o,l,i,a))},t.prototype.wrapElement=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapElement(t,e,this.question)),null!=n?n:e},t.prototype.wrapQuestionContent=function(e){var t=this.question.survey,n=null;return t&&(n=a.wrapQuestionContent(t,e,this.question)),null!=n?n:e},t.prototype.renderQuestion=function(){return t.renderQuestionBody(this.creator,this.question)},t.prototype.renderDescription=function(){return c.renderQuestionDescription(this.question)},t.prototype.renderComment=function(e){var t=c.renderLocString(this.question.locCommentText);return r.createElement("div",{className:this.question.getCommentAreaCss()},r.createElement("div",null,t),r.createElement(pe,{question:this.question,cssClasses:e,otherCss:e.other,isDisplayMode:this.question.isInputReadOnly}))},t.prototype.renderHeader=function(e){return r.createElement(ye,{element:e})},t.prototype.renderErrors=function(e,t){return r.createElement(be,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})},t}(c);s.Instance.registerElement("question",(function(e){return r.createElement(ge,e)}));var be=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getState(),n.tooltipRef=r.createRef(),n}return ve(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.props.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.props.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),e?{error:e.error+1}:{error:0}},t.prototype.canRender=function(){return!!this.element&&this.element.hasVisibleErrors},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),"tooltip"==this.props.location&&(this.tooltipRef.current&&!this.tooltipManager&&(this.tooltipManager=new i.TooltipManager(this.tooltipRef.current)),this.tooltipManager&&!this.tooltipRef.current&&this.disposeTooltipManager())},t.prototype.componentWillUnmount=function(){this.tooltipManager&&this.disposeTooltipManager()},t.prototype.disposeTooltipManager=function(){var e;null===(e=this.tooltipManager)||void 0===e||e.dispose(),this.tooltipManager=void 0},t.prototype.renderElement=function(){for(var e=[],t=0;t<this.element.errors.length;t++){var n="error"+t;e.push(this.creator.renderError(n,this.element.errors[t],this.cssClasses))}return r.createElement("div",{role:"alert","aria-live":"polite",className:this.element.cssError,id:this.id,ref:this.tooltipRef},e)},t}(p),Ce=function(e){function t(t){return e.call(this,t)||this}return ve(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.getQuestion()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){return this.props.question},Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.props.itemCss},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.doAfterRender()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.doAfterRender()},t.prototype.doAfterRender=function(){},t.prototype.canRender=function(){return!!this.question},t.prototype.renderErrors=function(e){return this.getShowErrors()?r.createElement(be,{element:this.question,cssClasses:this.cssClasses,creator:this.creator,location:e}):null},t.prototype.renderContent=function(){var e=this.creator.questionErrorLocation(),t=this.renderErrors(e),n=this.question.showErrorOnTop?t:null,o=this.question.showErrorOnBottom?t:null,i=this.renderQuestion();return r.createElement(r.Fragment,null,n,i,o)},t.prototype.getShowErrors=function(){return this.question.isVisible},t.prototype.renderQuestion=function(){return ge.renderQuestionBody(this.creator,this.question)},t}(p),Ee=function(e){function t(t){var n=e.call(this,t)||this;return n.cellRef=r.createRef(),n}return ve(t,e),t.prototype.componentWillUnmount=function(){if(e.prototype.componentWillUnmount.call(this),this.question){var t=this.cellRef.current;t&&t.removeAttribute("data-rendered")}},t.prototype.renderElement=function(){var e=this.getCellStyle(),t=this.question.isErrorsModeTooltip?this.renderErrors("tooltip"):null;return r.createElement("td",{ref:this.cellRef,className:this.itemCss,colSpan:this.props.cell.colSpans,"data-responsive-title":this.getHeaderText(),title:this.props.cell.getTitle(),style:e},this.wrapCell(this.props.cell,r.createElement("div",{className:this.cssClasses.cellQuestionWrapper},this.renderContent(),t)))},t.prototype.getCellStyle=function(){return null},t.prototype.getHeaderText=function(){return""},t.prototype.wrapCell=function(e,t){if(!e)return t;var n=this.question.survey,r=null;return n&&(r=a.wrapMatrixCell(n,t,e,this.props.reason)),null!=r?r:t},t}(Ce),qe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),we=function(e){function t(t){var n=e.call(this,t)||this;return n.hasBeenExpanded=!1,n}return qe(t,e),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.renderHeader(),n=r.createElement(be,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),o={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.isCollapsed?"none":void 0},i=null;if(!this.panel.isCollapsed||this.hasBeenExpanded){this.hasBeenExpanded=!0;var s=this.renderRows(this.panelBase.cssClasses),a=this.panelBase.cssClasses.panel.content;i=this.renderContent(o,s,a)}return r.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:function(){e.panelBase&&e.panelBase.focusIn()},id:this.panelBase.id},t,n,i)},t.prototype.renderHeader=function(){return this.panel.hasTitle||this.panel.hasDescription?r.createElement(ye,{element:this.panel}):null},t.prototype.wrapElement=function(e){var t=this.panel.survey,n=null;return t&&(n=a.wrapElement(t,e,this.panel)),null!=n?n:e},t.prototype.renderContent=function(e,t,n){var o=this.renderBottom();return r.createElement("div",{style:e,className:n,id:this.panel.contentId},t,o)},t.prototype.renderTitle=function(){return this.panelBase.title?r.createElement(H,{element:this.panelBase}):null},t.prototype.renderDescription=function(){if(!this.panelBase.description)return null;var e=c.renderLocString(this.panelBase.locDescription);return r.createElement("div",{className:this.panel.cssClasses.panel.description},e)},t.prototype.renderBottom=function(){var e=this.panel.getFooterToolbar();return e.hasActions?r.createElement(D,{model:e}):null},t}(v);s.Instance.registerElement("panel",(function(e){return r.createElement(we,e)}));var Oe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_e=function(e){function t(t){return e.call(this,t)||this}return Oe(t,e),Object.defineProperty(t.prototype,"flowPanel",{get:function(){return this.panel},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=function(){return""},this.flowPanel.onGetHtmlForQuestion=this.renderQuestion)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=null,this.flowPanel.onGetHtmlForQuestion=null)},t.prototype.getQuestion=function(e){return this.flowPanel.getQuestionByName(e)},t.prototype.renderQuestion=function(e){return"<question>"+e.name+"</question>"},t.prototype.renderRows=function(){var e=this.renderHtml();return e?[e]:[]},t.prototype.getNodeIndex=function(){return this.renderedIndex++},t.prototype.renderHtml=function(){if(!this.flowPanel)return null;var e="<span>"+this.flowPanel.produceHtml()+"</span>";if(!DOMParser){var t={__html:e};return r.createElement("div",{dangerouslySetInnerHTML:t})}var n=(new DOMParser).parseFromString(e,"text/xml");return this.renderedIndex=0,this.renderParentNode(n)},t.prototype.renderNodes=function(e){for(var t=[],n=0;n<e.length;n++){var r=this.renderNode(e[n]);r&&t.push(r)}return t},t.prototype.getStyle=function(e){var t={};return"b"===e.toLowerCase()&&(t.fontWeight="bold"),"i"===e.toLowerCase()&&(t.fontStyle="italic"),"u"===e.toLowerCase()&&(t.textDecoration="underline"),t},t.prototype.renderParentNode=function(e){var t=e.nodeName.toLowerCase(),n=this.renderNodes(this.getChildDomNodes(e));return"div"===t?r.createElement("div",{key:this.getNodeIndex()},n):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},n)},t.prototype.renderNode=function(e){if(!this.hasTextChildNodesOnly(e))return this.renderParentNode(e);var t=e.nodeName.toLowerCase();if("question"===t){var n=this.flowPanel.getQuestionByName(e.textContent);if(!n)return null;var o=r.createElement(ge,{key:n.name,element:n,creator:this.creator,css:this.css});return r.createElement("span",{key:this.getNodeIndex()},o)}return"div"===t?r.createElement("div",{key:this.getNodeIndex()},e.textContent):r.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},e.textContent)},t.prototype.getChildDomNodes=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t},t.prototype.hasTextChildNodesOnly=function(e){for(var t=e.childNodes,n=0;n<t.length;n++)if("#text"!==t[n].nodeName.toLowerCase())return!1;return!0},t.prototype.renderContent=function(e,t){return r.createElement("f-panel",{style:e},t)},t}(we);s.Instance.registerElement("flowpanel",(function(e){return r.createElement(_e,e)}));var Se=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ie=function(e){function t(t){return e.call(this,t)||this}return Se(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("fieldset",{role:"presentation",className:this.question.getSelectBaseRootCss(),ref:function(t){return e.setControl(t)}},r.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.getHeader(),this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther():null)},t.prototype.getHeader=function(){var e=this;if(this.question.hasHeadItems)return this.question.headItems.map((function(t,n){return e.renderItem("item_h"+n,t,!1,e.question.cssClasses)}))},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,0===o&&0===r,e,""+o+r)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i="item"+r,s=this.renderItem(i,o,0==r,e,""+r);s&&n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(){var e=this.question.cssClasses;return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(he,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isFirst:n}),u=this.question.survey,l=null;return u&&i&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t}(h),Pe=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.clickItemHandler(n.item,e.target.checked)},n.selectAllChanged=function(e){n.question.toggleSelectAll()},n}return Se(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFirst",{get:function(){return this.props.isFirst},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this.question.isItemSelected(this.item);return this.renderCheckbox(e,null)},Object.defineProperty(t.prototype,"inputStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderCheckbox=function(e,t){var n=this.question.getItemId(this.item),o=(this.hideCaption||this.renderLocString(this.item.locText),this.question.getItemClass(this.item)),i=this.question.getLabelClass(this.item),s=this.item==this.question.selectAllItem?this.selectAllChanged:this.handleOnChange,a=this.hideCaption?null:r.createElement("span",{className:this.cssClasses.controlLabel},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:o,role:"presentation"},r.createElement("label",{className:i,"aria-label":this.question.getAriaItemLabel(this.item)},r.createElement("input",{className:this.cssClasses.itemControl,role:"option",type:"checkbox",name:this.question.name,value:"selectall"!=this.item.value?this.item.value:void 0,id:n,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),checked:e,onChange:s,"aria-describedby":this.question.ariaDescribedBy}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,a),t)},t}(p);s.Instance.registerElement("survey-checkbox-item",(function(e){return r.createElement(Pe,e)})),K.Instance.registerQuestion("checkbox",(function(e){return r.createElement(Ie,e)}));var xe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this;return r.createElement("div",{className:this.question.rootClass,ref:function(t){return e.setControl(t)}},this.getItems())},t.prototype.getItems=function(){for(var e=this,t=[],n=this.question.rankingChoices,r=function(r){var i=n[r];t.push(o.renderItem(i,r,(function(t){e.question.handleKeydown.call(e.question,t,i)}),(function(t){t.persist(),e.question.handlePointerDown.call(e.question,t,i,t.currentTarget)}),o.question.cssClasses,o.question.getItemClass(i),o.question))},o=this,i=0;i<n.length;i++)r(i);return t},t.prototype.renderItem=function(e,t,n,o,i,s,u){var l=e.value+"-"+t+"-item",c=this.renderLocString(e.locText),p=t,h=this.question.getNumberByIndex(t),d=this.question.getItemTabIndex(e),f=r.createElement(Ne,{key:l,text:c,index:p,indexText:h,itemTabIndex:d,handleKeydown:n,handlePointerDown:o,cssClasses:i,itemClass:s,question:u}),m=this.question.survey,y=null;return m&&(y=a.wrapItemValue(m,f,this.question,e)),null!=y?y:f},t}(h),Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.props.text},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indexText",{get:function(){return this.props.indexText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handleKeydown",{get:function(){return this.props.handleKeydown},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handlePointerDown",{get:function(){return this.props.handlePointerDown},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemClass",{get:function(){return this.props.itemClass},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemTabIndex",{get:function(){return this.props.itemTabIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",{tabIndex:this.itemTabIndex,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,"data-sv-drop-target-ranking-item":this.index},r.createElement("div",{tabIndex:-1,style:{outline:"none"}},r.createElement("div",{className:this.cssClasses.itemGhostNode}),r.createElement("div",{className:this.cssClasses.itemContent},r.createElement("div",{className:this.cssClasses.itemIconContainer},r.createElement("svg",{width:"10",height:"16",viewBox:"0 0 10 16",className:this.question.getIconHoverCss(),xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M6 2C6 0.9 6.9 0 8 0C9.1 0 10 0.9 10 2C10 3.1 9.1 4 8 4C6.9 4 6 3.1 6 2ZM2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0ZM8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6ZM2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6ZM8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12ZM2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12Z"})),r.createElement("svg",{width:"10",height:"24",viewBox:"0 0 10 24",className:this.question.getIconFocusCss(),xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M10 5L5 0L0 5H4V9H6V5H10Z"}),r.createElement("path",{d:"M6 19V15H4V19H0L5 24L10 19H6Z"}))),r.createElement("div",{className:this.question.getItemIndexClasses()},this.indexText),r.createElement("div",{className:this.cssClasses.controlLabel},this.text))))},t}(p);K.Instance.registerQuestion("ranking",(function(e){return r.createElement(Re,e)}));var je=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return je(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this.renderLocString(this.item.locText);return o.a.createElement("label",{className:this.question.getItemClassByText(this.item.itemValue,this.item.text)},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement("span",{className:this.question.cssClasses.itemText},e))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t}(c);s.Instance.registerElement("sv-rating-item",(function(e){return o.a.createElement(Te,e)}));var De=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;return o.a.createElement("label",{className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement(b,{className:"sv-star",size:"auto",iconName:"icon-rating-star",title:this.item.text}),o.a.createElement(b,{className:"sv-star-2",size:"auto",iconName:"icon-rating-star-2",title:this.item.text}))},t}(c);s.Instance.registerElement("sv-rating-item-star",(function(e){return o.a.createElement(ke,e)}));var Me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Me(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;return o.a.createElement("label",{style:this.question.getItemStyle(this.item.itemValue,this.item.highlight),className:this.question.getItemClass(this.item.itemValue),onMouseOver:function(t){return e.question.onItemMouseIn(e.item)},onMouseOut:function(t){return e.question.onItemMouseOut(e.item)}},o.a.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.name,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.isDisplayMode,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:function(){},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o.a.createElement(b,{size:"auto",iconName:this.question.getItemSmileyIconName(this.item.itemValue),title:this.item.text}))},t}(c);s.Instance.registerElement("sv-rating-item-smiley",(function(e){return o.a.createElement(Be,e)}));var Le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ae=function(e){function t(t){return e.call(this,t)||this}return Le(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateDomElement()},t.prototype.updateDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.model.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value)||(e.value=this.model.inputStringRendered)}},t.prototype.onChange=function(e){e.target===document.activeElement&&(this.model.inputStringRendered=e.target.value)},t.prototype.keyhandler=function(e){this.model.inputKeyHandler(e)},t.prototype.onBlur=function(e){this.model.onBlur(e)},t.prototype.onFocus=function(e){this.model.onFocus(e)},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),inputMode:this.model.inputMode,ref:function(t){return e.inputElement=t},className:this.question.cssClasses.filterStringInput,disabled:this.question.isInputReadOnly,readOnly:!this.model.searchEnabled||void 0,size:this.model.inputStringRendered?void 0:1,role:this.model.filterStringEnabled?this.question.ariaRole:void 0,"aria-label":this.question.placeholder,"aria-expanded":this.question.ariaExpanded?"true":"false","aria-controls":this.model.listElementId,"aria-activedescendant":this.model.ariaActivedescendant,placeholder:this.model.filterStringPlaceholder,onKeyDown:function(t){e.keyhandler(t)},onChange:function(t){e.onChange(t)},onBlur:function(t){e.onBlur(t)},onFocus:function(t){e.onFocus(t)}})},t}(c);K.Instance.registerQuestion("sv-tagbox-filter",(function(e){return r.createElement(Ae,e)}));var He=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),We=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changed:0},n.setupModel(),n}return He(t,e),t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.setupModel()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item&&(this.item.locText.onChanged=function(){})},t.prototype.setupModel=function(){if(this.item.locText){var e=this;this.item.locText.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item},t.prototype.renderElement=function(){return r.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)},t}(p),Qe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ue=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.click=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClick(e)},t.clear=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onClear(e)},t.keyhandler=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.keyHandler(e)},t.blur=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onBlur(e),t.updateInputDomElement()},t.focus=function(e){var n;null===(n=t.question.dropdownListModel)||void 0===n||n.onFocus(e)},t}return Qe(t,e),t.prototype.getStateElement=function(){return this.question.dropdownListModel},t.prototype.setValueCore=function(e){this.questionBase.renderedValue=e},t.prototype.getValueCore=function(){return this.questionBase.renderedValue},t.prototype.renderSelect=function(e){var t,n,o=null;if(this.question.isReadOnly){var s=this.question.selectedItemLocText?this.renderLocString(this.question.selectedItemLocText):"";o=r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},s,r.createElement("div",null,this.question.readOnlyText))}else this.question.dropdownListModel||(this.question.dropdownListModel=new i.DropdownListModel(this.question)),o=r.createElement(r.Fragment,null,this.renderInput(this.question.dropdownListModel),r.createElement(P,{model:null===(n=null===(t=this.question)||void 0===t?void 0:t.dropdownListModel)||void 0===n?void 0:n.popupModel}));return r.createElement("div",{className:e.selectWrapper},o)},t.prototype.renderValueElement=function(e){return this.question.showInputFieldComponent?s.Instance.createElement(this.question.inputFieldComponentName,{item:e.getSelectedAction(),question:this.question}):this.question.showSelectedItemLocText?this.renderLocString(this.question.selectedItemLocText):null},t.prototype.renderInput=function(e){var t=this,n=this.renderValueElement(e);return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.inputReadOnly?void 0:0,onClick:this.click,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-describedby":this.question.ariaDescribedBy,"aria-expanded":this.question.ariaExpanded?"true":"false","aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},e.showHintPrefix?r.createElement("div",{className:this.question.cssClasses.hintPrefix},r.createElement("span",null,e.hintStringPrefix)):null,r.createElement("div",{className:this.question.cssClasses.controlValue},e.showHintString?r.createElement("div",{className:this.question.cssClasses.hintSuffix},r.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},e.inputStringRendered),r.createElement("span",null,e.hintStringSuffix)):null,n,r.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),ref:function(e){return t.inputElement=e},className:this.question.cssClasses.filterStringInput,role:e.filterStringEnabled?this.question.ariaRole:void 0,"aria-label":this.question.placeholder,"aria-expanded":this.question.ariaExpanded?"true":"false","aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant,placeholder:e.placeholderRendered,readOnly:!e.searchEnabled||void 0,tabIndex:e.inputReadOnly?void 0:-1,disabled:this.question.isInputReadOnly,inputMode:e.inputMode,onChange:function(t){!function(t){t.target===document.activeElement&&(e.inputStringRendered=t.target.value)}(t)},onBlur:this.blur,onFocus:this.focus})),this.createClearButton())},t.prototype.createClearButton=function(){if(!this.question.allowClear||!this.question.cssClasses.cleanButtonIconId)return null;var e={display:this.question.isEmpty()?"none":""};return r.createElement("div",{className:this.question.cssClasses.cleanButton,style:e,onClick:this.clear},r.createElement(b,{className:this.question.cssClasses.cleanButtonSvg,iconName:this.question.cssClasses.cleanButtonIconId,title:this.question.clearCaption,size:"auto"}))},t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(he,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode,isOther:!0}))},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateInputDomElement()},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.updateInputDomElement()},t.prototype.updateInputDomElement=function(){if(this.inputElement){var e=this.inputElement,t=this.question.dropdownListModel.inputStringRendered;i.Helpers.isTwoValueEquals(t,e.value)||(e.value=this.question.dropdownListModel.inputStringRendered)}},t}(d),Fe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ve=function(e){function t(t){return e.call(this,t)||this}return Fe(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t}(Ue);K.Instance.registerQuestion("dropdown",(function(e){return r.createElement(Ve,e)}));var ze=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ke=function(e){function t(t){return e.call(this,t)||this}return ze(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return!!this.item&&!!this.question},t.prototype.renderElement=function(){var e=this,t=this.renderLocString(this.item.locText);return r.createElement("div",{className:"sv-tagbox__item"},r.createElement("div",{className:"sv-tagbox__item-text"},t),r.createElement("div",{className:this.question.cssClasses.cleanItemButton,onClick:function(t){e.question.dropdownListModel.deselectItem(e.item.value),t.stopPropagation()}},r.createElement(b,{className:this.question.cssClasses.cleanItemButtonSvg,iconName:this.question.cssClasses.cleanItemButtonIconId,size:"auto"})))},t}(p),Je=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ze=function(e){function t(t){return e.call(this,t)||this}return Je(t,e),t.prototype.renderItem=function(e,t){return r.createElement(Ke,{key:e,question:this.question,item:t})},t.prototype.renderInput=function(e){var t=this,n=e,o=this.question.selectedChoices.map((function(e,n){return t.renderItem("item"+n,e)}));return r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.inputReadOnly?void 0:0,onClick:this.click,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-describedby":this.question.ariaDescribedBy,"aria-expanded":this.question.ariaExpanded?"true":"false","aria-controls":e.listElementId,"aria-activedescendant":e.ariaActivedescendant},r.createElement("div",{className:this.question.cssClasses.controlValue},o,r.createElement(Ae,{model:n,question:this.question})),this.createClearButton())},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.isOtherSelected?this.renderOther(e):null,n=this.renderSelect(e);return r.createElement("div",{className:this.question.renderCssRoot},n,t)},t}(Ue);K.Instance.registerQuestion("tagbox",(function(e){return r.createElement(Ze,e)}));var Ge=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=function(e){function t(t){return e.call(this,t)||this}return Ge(t,e),t.prototype.renderSelect=function(e){var t=this,n=this.isDisplayMode?r.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):r.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:function(e){return t.setControl(e)},autoComplete:this.question.autocomplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onClick:function(e){t.question.onClick(e)},onKeyUp:function(e){t.question.onKeyUp(e)},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,required:this.question.isRequired},this.question.allowClear?r.createElement("option",{value:""},this.question.placeholder):null,this.question.visibleChoices.map((function(e,t){return r.createElement(We,{key:"item"+t,item:e})})));return r.createElement("div",{className:e.selectWrapper},n)},t}(Ve);K.Instance.registerQuestion("sv-dropdown-select",(function(e){return r.createElement(Xe,e)})),i.RendererFactory.Instance.registerRenderer("dropdown","select","sv-dropdown-select");var $e=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(e){function t(t){var n=e.call(this,t)||this;return n.state={rowsChanged:0},n}return $e(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(e.prototype.componentDidMount.call(this),this.question){var t=this;this.question.visibleRowsChangedCallback=function(){t.setState({rowsChanged:t.state.rowsChanged+1})}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question&&(this.question.visibleRowsChangedCallback=null)},t.prototype.renderElement=function(){for(var e=this,t=this.question.cssClasses,n=this.question.hasRows?r.createElement("td",null):null,o=[],i=0;i<this.question.visibleColumns.length;i++){var s=this.question.visibleColumns[i],a="column"+i,u=this.renderLocString(s.locText),l={};this.question.columnMinWidth&&(l.minWidth=this.question.columnMinWidth,l.width=this.question.columnMinWidth),o.push(r.createElement("th",{className:this.question.cssClasses.headerCell,style:l,key:a},this.wrapCell({column:s},u,"column-header")))}var c=[],p=this.question.visibleRows;for(i=0;i<p.length;i++){var h=p[i];a="row-"+h.name+"-"+i;c.push(r.createElement(et,{key:a,question:this.question,cssClasses:t,isDisplayMode:this.isDisplayMode,row:h,isFirst:0==i}))}var d=this.question.showHeader?r.createElement("thead",null,r.createElement("tr",null,n,o)):null;return r.createElement("div",{className:t.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",null,r.createElement("legend",{"aria-label":this.question.locTitle.renderedHtml}),r.createElement("table",{className:this.question.getTableCss()},d,r.createElement("tbody",null,c))))},t}(h),et=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return $e(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.row},enumerable:!1,configurable:!0}),t.prototype.handleOnChange=function(e){this.row.value=e.target.value,this.setState({value:this.row.value})},t.prototype.wrapCell=function(e,t,n){if(!n)return t;var r=this.question.survey,o=null;return r&&(o=a.wrapMatrixCell(r,t,e,n)),null!=o?o:t},t.prototype.canRender=function(){return!!this.row},t.prototype.renderElement=function(){var e=null;if(this.question.hasRows){var t=this.renderLocString(this.row.locText),n={};this.question.rowTitleWidth&&(n.minWidth=this.question.rowTitleWidth,n.width=this.question.rowTitleWidth),e=r.createElement("td",{style:n,className:this.question.cssClasses.rowTextCell},this.wrapCell({row:this.row},t,"row-header"))}var o=this.generateTds();return r.createElement("tr",{className:this.row.rowClasses||void 0},e,o)},t.prototype.generateTds=function(){for(var e=this,t=[],n=this.row,o=0;o<this.question.visibleColumns.length;o++){var i=null,s=this.question.visibleColumns[o],a="value"+o,u=n.value==s.value,l=this.question.getItemClass(n,s),c=this.question.inputId+"_"+n.name+"_"+o;if(this.question.hasCellText){var p=this.question.isInputReadOnly?null:function(t){return function(){return e.cellClick(n,t)}};i=r.createElement("td",{key:a,className:l,onClick:p?p(s):function(){}},this.renderLocString(this.question.getCellDisplayLocText(n.name,s)))}else i=r.createElement("td",{key:a,"data-responsive-title":s.locText.renderedHtml,className:this.question.cssClasses.cell},r.createElement("label",{className:l},r.createElement("input",{id:c,type:"radio",className:this.cssClasses.itemValue,name:n.fullName,value:s.value,disabled:this.isDisplayMode,checked:u,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":s.locText.renderedHtml,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("span",{className:this.question.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null),r.createElement("span",{style:this.question.isMobile?void 0:{display:"none"},className:this.question.cssClasses.cellResponsiveTitle},this.renderLocString(s.locText))));t.push(i)}return t},t.prototype.cellClick=function(e,t){e.value=t.value,this.setState({value:this.row.value})},t}(p);K.Instance.registerQuestion("matrix",(function(e){return r.createElement(Ye,e)}));var tt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nt=function(e){function t(t){return e.call(this,t)||this}return tt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){this.question.locHtml.onChanged=function(){}},t.prototype.componentDidUpdate=function(e,t){this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.question.locHtml.onChanged=function(){e.setState({changed:e.state&&e.state.changed?e.state.changed+1:1})}},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!!this.question.html},t.prototype.renderElement=function(){var e={__html:this.question.locHtml.renderedHtml};return r.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})},t}(h);K.Instance.registerQuestion("html",(function(e){return r.createElement(nt,e)}));var rt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ot=function(e){function t(t){return e.call(this,t)||this}return rt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e,t=this,n=this.renderPreview(),o=this.renderFileDecorator(),i=this.renderClearButton(this.question.showRemoveButton),s=this.renderClearButton(this.question.showRemoveButtonBottom),a=this.question.mobileFileNavigatorVisible?r.createElement(D,{model:this.question.mobileFileNavigator}):null;return e=this.isDisplayMode?r.createElement("input",{type:"file",disabled:this.isDisplayMode,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?function(){}:this.question.doChange,multiple:this.question.allowMultiple,placeholder:this.question.title,accept:this.question.acceptedTypes}):r.createElement("input",{type:"file",disabled:this.isDisplayMode,tabIndex:-1,className:this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasses.fileInput,id:this.question.inputId,ref:function(e){return t.setControl(e)},style:this.isDisplayMode?{color:"transparent"}:{},onChange:this.isDisplayMode?function(){}:this.question.doChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,multiple:this.question.allowMultiple,title:this.question.inputTitle,accept:this.question.acceptedTypes}),r.createElement("div",{className:this.question.fileRootCss},e,r.createElement("div",{className:this.question.cssClasses.dragArea,onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave,onDragEnter:this.question.onDragEnter},o,i,n,s,a))},t.prototype.renderFileDecorator=function(){this.question.cssClasses;var e,t=null;return e=r.createElement("label",{role:"button",tabIndex:0,className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonCaption},r.createElement("span",null,this.question.chooseButtonCaption),this.question.cssClasses.chooseFileIconId?r.createElement(b,{title:this.question.chooseButtonCaption,iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null),this.question.isEmpty()&&(t=r.createElement("span",{className:this.question.cssClasses.noFileChosen},this.question.noFileChosenCaption)),r.createElement("div",{className:this.question.getFileDecoratorCss()},r.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.question.dragAreaPlaceholder),r.createElement("div",{className:this.question.cssClasses.wrapper},e,t))},t.prototype.renderClearButton=function(e){return e?r.createElement("button",{type:"button",onClick:this.question.doClean,className:e},r.createElement("span",null,this.question.clearButtonCaption),this.question.cssClasses.removeButtonIconId?r.createElement(b,{iconName:this.question.cssClasses.removeButtonIconId,size:"auto",title:this.question.clearButtonCaption}):null):null},t.prototype.renderFileSign=function(e,t){var n=this;return e&&t.name?r.createElement("div",{className:e},r.createElement("a",{href:t.content,onClick:function(e){n.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth}},t.name)):null},t.prototype.renderPreview=function(){var e=this;if(!this.question.previewValue||!this.question.previewValue.length)return null;var t=this.question.previewValue.map((function(t,n){return t?r.createElement("span",{key:e.question.inputId+"_"+n,className:e.question.cssClasses.preview,style:{display:e.question.isPreviewVisible(n)?void 0:"none"}},e.renderFileSign(e.question.cssClasses.fileSign,t),r.createElement("div",{className:e.question.cssClasses.imageWrapper},e.question.canPreviewImage(t)?r.createElement("img",{src:t.content,style:{height:e.question.imageHeight,width:e.question.imageWidth},alt:"File preview"}):e.question.cssClasses.defaultImage?r.createElement(b,{iconName:e.question.cssClasses.defaultImageIconId,size:"auto",className:e.question.cssClasses.defaultImage}):null,t.name&&!e.question.isReadOnly?r.createElement("div",{className:e.question.cssClasses.removeFileButton,onClick:function(){return e.question.doRemoveFile(t)}},r.createElement("span",{className:e.question.cssClasses.removeFile},e.question.removeFileCaption),e.question.cssClasses.removeFileSvgIconId?r.createElement(b,{title:e.question.removeFileCaption,iconName:e.question.cssClasses.removeFileSvgIconId,size:"auto",className:e.question.cssClasses.removeFileSvg}):null):null),e.renderFileSign(e.question.cssClasses.fileSignBottom,t)):null}));return r.createElement("div",{className:this.question.cssClasses.fileList||void 0},t)},t}(h);K.Instance.registerQuestion("file",(function(e){return r.createElement(ot,e)}));var it=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),st=function(e){function t(t){return e.call(this,t)||this}return it(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){for(var e=this.question.cssClasses,t=this.question.getRows(),n=[],o=0;o<t.length;o++)n.push(this.renderRow(o,t[o],e));return r.createElement("table",{className:e.root},r.createElement("tbody",null,n))},t.prototype.renderRow=function(e,t,n){for(var o="item"+e,i=[],s=0;s<t.length;s++){var a=t[s];i.push(r.createElement("td",{key:"item"+s,className:this.question.cssClasses.cell},r.createElement(at,{question:this.question,item:a,creator:this.creator,cssClasses:n})))}return r.createElement("tr",{key:o,className:n.row},i)},t}(h),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return it(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElements=function(){return[this.item,this.item.editor]},Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.item,t=this.cssClasses;return r.createElement("label",{className:this.question.getItemLabelCss(e)},r.createElement("span",{className:t.itemTitle},r.createElement(M,{element:e.editor,cssClasses:e.editor.cssClasses})),r.createElement(ut,{cssClasses:t,itemCss:this.question.getItemCss(),question:e.editor,creator:this.creator}),this.renderItemTooltipError(e,t))},t.prototype.renderItemTooltipError=function(e,t){return this.item.editor.isErrorsModeTooltip?r.createElement(be,{element:e.editor,cssClasses:t,creator:this.creator,location:"tooltip",id:e.editor.id+"_errors"}):null},t}(p),ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return it(t,e),t.prototype.renderElement=function(){return r.createElement("div",{className:this.itemCss},this.renderContent())},t}(Ce);K.Instance.registerQuestion("multipletext",(function(e){return r.createElement(st,e)}));var lt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ct=function(e){function t(t){return e.call(this,t)||this}return lt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=null;return this.question.showClearButtonInContent&&(n=r.createElement("div",null,r.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:function(){return e.question.clearValue()},value:this.question.clearButtonCaption}))),r.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),role:"presentation",ref:function(t){return e.setControl(t)}},this.question.hasColumns?this.getColumnedBody(t):this.getBody(t),this.getFooter(),this.question.isOtherSelected?this.renderOther(t):null,n)},t.prototype.getFooter=function(){var e=this;if(this.question.hasFootItems)return this.question.footItems.map((function(t,n){return e.renderItem("item_f"+n,t,!1,e.question.cssClasses)}))},t.prototype.getColumnedBody=function(e){return r.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))},t.prototype.getColumns=function(e){var t=this,n=this.getStateValue();return this.question.columns.map((function(o,i){var s=o.map((function(r,o){return t.renderItem("item"+i+o,r,n,e,""+i+o)}));return r.createElement("div",{key:"column"+i,className:t.question.getColumnClass(),role:"presentation"},s)}))},t.prototype.getBody=function(e){return this.question.blockedRow?r.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):r.createElement(r.Fragment,null,this.getItems(e,this.question.bodyItems))},t.prototype.getItems=function(e,t){for(var n=[],r=this.getStateValue(),o=0;o<t.length;o++){var i=t[o],s=this.renderItem("item"+o,i,r,e,""+o);n.push(s)}return n},Object.defineProperty(t.prototype,"textStyle",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.renderOther=function(e){return r.createElement("div",{className:this.question.getCommentAreaCss(!0)},r.createElement(he,{question:this.question,otherCss:e.other,cssClasses:e,isDisplayMode:this.isDisplayMode}))},t.prototype.renderItem=function(e,t,n,r,o){var i=s.Instance.createElement(this.question.itemComponent,{key:e,question:this.question,cssClasses:r,isDisplayMode:this.isDisplayMode,item:t,textStyle:this.textStyle,index:o,isChecked:n===t.value}),u=this.question.survey,l=null;return u&&(l=a.wrapItemValue(u,i,this.question,t)),null!=l?l:i},t.prototype.getStateValue=function(){return this.question.isEmpty()?"":this.question.renderedValue},t}(h),pt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return lt(t,e),t.prototype.getStateElement=function(){return this.item},Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textStyle",{get:function(){return this.props.textStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChecked",{get:function(){return this.props.isChecked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideCaption",{get:function(){return!0===this.props.hideCaption},enumerable:!1,configurable:!0}),t.prototype.shouldComponentUpdate=function(t,n){return!!e.prototype.shouldComponentUpdate.call(this,t,n)&&(!!this.question&&!(this.question.customWidget&&!this.question.customWidgetData.isNeedRender&&!this.question.customWidget.widgetJson.isDefaultRender&&!this.question.customWidget.widgetJson.render))},t.prototype.handleOnChange=function(e){this.question.clickItemHandler(this.item)},t.prototype.canRender=function(){return!!this.question&&!!this.item},t.prototype.renderElement=function(){var e=this.question.getItemClass(this.item),t=this.question.getLabelClass(this.item),n=this.question.getControlLabelClass(this.item),o=this.hideCaption?null:r.createElement("span",{className:n},this.renderLocString(this.item.locText,this.textStyle));return r.createElement("div",{className:e,role:"presentation"},r.createElement("label",{className:t,"aria-label":this.question.getAriaItemLabel(this.item)},r.createElement("input",{"aria-describedby":this.question.ariaDescribedBy,className:this.cssClasses.itemControl,id:this.question.getItemId(this.item),type:"radio",name:this.question.questionName,checked:this.isChecked,value:this.item.value,disabled:!this.question.getItemEnabled(this.item),onChange:this.handleOnChange}),this.cssClasses.materialDecorator?r.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:this.cssClasses.itemDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,o))},t}(p);s.Instance.registerElement("survey-radiogroup-item",(function(e){return r.createElement(pt,e)})),K.Instance.registerQuestion("radiogroup",(function(e){return r.createElement(ct,e)}));var ht=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dt=function(e){function t(t){return e.call(this,t)||this}return ht(t,e),t.prototype.renderInput=function(){var e=this,t=this.question.getControlClass(),n=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return r.createElement("div",null,this.question.value);var o=this.question.getMaxLength()?r.createElement(ue,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return r.createElement(r.Fragment,null,r.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:t,type:this.question.inputType,ref:function(t){return e.setControl(t)},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:n,list:this.question.dataListId,autoComplete:this.question.autocomplete,onBlur:this.question.onBlur,onFocus:this.question.onFocus,onChange:this.question.onChange,onKeyUp:this.question.onKeyUp,onKeyDown:this.question.onKeyDown,onCompositionUpdate:function(t){return e.question.onCompositionUpdate(t.nativeEvent)},"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),o)},t.prototype.renderElement=function(){return this.question.dataListId?r.createElement("div",null,this.renderInput(),this.renderDataList()):this.renderInput()},t.prototype.renderDataList=function(){if(!this.question.dataListId)return null;var e=this.question.dataList;if(0==e.length)return null;for(var t=[],n=0;n<e.length;n++)t.push(r.createElement("option",{key:"item"+n,value:e[n]}));return r.createElement("datalist",{id:this.question.dataListId},t)},t}(d);K.Instance.registerQuestion("text",(function(e){return r.createElement(dt,e)}));var ft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n.handleOnClick=n.handleOnClick.bind(n),n.handleOnLabelClick=n.handleOnLabelClick.bind(n),n.handleOnSwitchClick=n.handleOnSwitchClick.bind(n),n.handleOnKeyDown=n.handleOnKeyDown.bind(n),n.checkRef=r.createRef(),n}return ft(t,e),t.prototype.getStateElement=function(){return this.question},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.doCheck=function(e){this.question.booleanValue=e},t.prototype.handleOnChange=function(e){this.doCheck(e.target.checked)},t.prototype.handleOnClick=function(e){this.question.onLabelClick(e,!0)},t.prototype.handleOnSwitchClick=function(e){this.question.onSwitchClickModel(e.nativeEvent)},t.prototype.handleOnLabelClick=function(e,t){this.question.onLabelClick(e,t)},t.prototype.handleOnKeyDown=function(e){this.question.onKeyDownCore(e)},t.prototype.updateDomElement=function(){if(this.question){var t=this.checkRef.current;t&&(t.indeterminate=this.question.isIndeterminate),this.setControl(t),e.prototype.updateDomElement.call(this)}},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.getItemCss();return r.createElement("div",{className:t.root,onKeyDown:this.handleOnKeyDown},r.createElement("label",{className:n,onClick:this.handleOnClick},r.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:t.control,disabled:this.isDisplayMode,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,!1)}},r.createElement("span",{className:this.question.getLabelCss(!1)},this.renderLocString(this.question.locLabelFalse))),r.createElement("div",{className:t.switch,onClick:this.handleOnSwitchClick},r.createElement("span",{className:t.slider},this.question.isDeterminated&&t.sliderText?r.createElement("span",{className:t.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),r.createElement("div",{className:t.sliderGhost,onClick:function(t){return e.handleOnLabelClick(t,!0)}},r.createElement("span",{className:this.question.getLabelCss(!0)},this.renderLocString(this.question.locLabelTrue)))))},t}(h);K.Instance.registerQuestion("boolean",(function(e){return r.createElement(mt,e)}));var yt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vt=function(e){function t(t){return e.call(this,t)||this}return yt(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.getCheckboxItemCss(),n=this.question.canRenderLabelDescription?c.renderQuestionDescription(this.question):null;return r.createElement("div",{className:e.rootCheckbox},r.createElement("div",{className:t},r.createElement("label",{className:e.checkboxLabel},r.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.isDisplayMode,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("span",{className:e.checkboxMaterialDecorator},this.question.svgIcon?r.createElement("svg",{className:e.checkboxItemDecorator},r.createElement("use",{xlinkHref:this.question.svgIcon})):null,r.createElement("span",{className:"check"})),this.question.isLabelRendered&&r.createElement("span",{className:e.checkboxControlLabel,id:this.question.labelRenderedAriaID},r.createElement(L,{element:this.question,cssClasses:this.question.cssClasses}))),n))},t}(mt);K.Instance.registerQuestion("sv-boolean-checkbox",(function(e){return r.createElement(vt,e)})),i.RendererFactory.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");var gt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=function(e){n.question.booleanValue="true"==e.nativeEvent.target.value},n}return gt(t,e),t.prototype.renderRadioItem=function(e,t){var n=this.question.cssClasses;return r.createElement("div",{role:"presentation",className:this.question.getRadioItemClass(n,e)},r.createElement("label",{className:n.radioLabel},r.createElement("input",{type:"radio",name:this.question.name,value:e,"aria-describedby":this.question.ariaDescribedBy,checked:e===this.question.booleanValueRendered,disabled:this.question.isInputReadOnly,className:n.itemRadioControl,onChange:this.handleOnChange}),this.question.cssClasses.materialRadioDecorator?r.createElement("span",{className:n.materialRadioDecorator},this.question.itemSvgIcon?r.createElement("svg",{className:n.itemRadioDecorator},r.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,r.createElement("span",{className:n.radioControlLabel},this.renderLocString(t))))},t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("div",{className:e.rootRadio},r.createElement("fieldset",{role:"presentation",className:e.radioFieldset},this.renderRadioItem(!1,this.question.locLabelFalse),this.renderRadioItem(!0,this.question.locLabelTrue)))},t}(mt);K.Instance.registerQuestion("sv-boolean-radio",(function(e){return r.createElement(bt,e)})),i.RendererFactory.Instance.registerRenderer("boolean","radio","sv-boolean-radio");var Ct=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Et=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return Ct(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement("div",null)},t}(h);K.Instance.registerQuestion("empty",(function(e){return r.createElement(Et,e)}));var qt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(e){function t(t){var n=e.call(this,t)||this;return n.onPointerDownHandler=function(e){n.parentMatrix.onPointerDown(e.nativeEvent,n.model.row)},n}return qt(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentMatrix",{get:function(){return this.props.parentMatrix},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=this.model;return o.a.createElement("tr",{className:t.className,"data-sv-drop-target-matrix-row":t.row&&t.row.id,onPointerDown:function(t){return e.onPointerDownHandler(t)}},this.props.children)},t}(c);s.Instance.registerElement("sv-matrix-row",(function(e){return o.a.createElement(wt,e)}));var Ot=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ot(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return this.question.iconDragElement?o.a.createElement("svg",{className:this.question.cssClasses.dragElementDecorator},o.a.createElement("use",{xlinkHref:this.question.iconDragElement})):o.a.createElement("span",{className:this.question.cssClasses.iconDrag})},t}(p);s.Instance.registerElement("sv-matrix-drag-drop-icon",(function(e){return o.a.createElement(_t,e)}));var St=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),It=function(e){function t(t){var n=e.call(this,t)||this;n.question.renderedTable;return n.state=n.getState(),n}return St(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getState=function(e){return void 0===e&&(e=null),{rowCounter:e?e.rowCounter+1:0}},t.prototype.updateStateOnCallback=function(){this.isRendering||this.setState(this.getState(this.state))},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.visibleRowsChangedCallback=function(){t.updateStateOnCallback()},this.question.onRenderedTableResetCallback=function(){t.question.renderedTable.renderedRowsChangedCallback=function(){t.updateStateOnCallback()},t.updateStateOnCallback()},this.question.renderedTable.renderedRowsChangedCallback=function(){t.updateStateOnCallback()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.visibleRowsChangedCallback=function(){},this.question.onRenderedTableResetCallback=function(){},this.question.renderedTable.renderedRowsChangedCallback=function(){}},t.prototype.renderElement=function(){return this.renderTableDiv()},t.prototype.renderTableDiv=function(){var e=this,t=this.renderHeader(),n=this.renderFooter(),o=this.renderRows(),i=this.question.showHorizontalScroll?{overflowX:"scroll"}:{};return r.createElement("div",{style:i,className:this.question.cssClasses.tableWrapper,ref:function(t){return e.setControl(t)}},r.createElement("table",{className:this.question.getTableCss()},t,o,n))},t.prototype.renderHeader=function(){var e=this.question.renderedTable;if(!e.showHeader)return null;for(var t=[],n=e.headerRow.cells,o=0;o<n.length;o++){var i=n[o],s="column"+o,a={};i.width&&(a.width=i.width),i.minWidth&&(a.minWidth=i.minWidth);var u=this.renderCellContent(i,"column-header",{}),l=i.hasTitle?r.createElement("th",{className:i.className,key:s,style:a}," ",u," "):r.createElement("td",{className:i.className,key:s,style:a});t.push(l)}return r.createElement("thead",null,r.createElement("tr",null,t))},t.prototype.renderFooter=function(){var e=this.question.renderedTable;if(!e.showFooter)return null;var t=this.renderRow("footer",e.footerRow,this.question.cssClasses,"row-footer");return r.createElement("tfoot",null,t)},t.prototype.renderRows=function(){for(var e=this.question.cssClasses,t=[],n=this.question.renderedTable.rows,o=0;o<n.length;o++)t.push(this.renderRow(n[o].id,n[o],e));return r.createElement("tbody",null,t)},t.prototype.renderRow=function(e,t,n,o){for(var i=[],s=t.cells,a=0;a<s.length;a++)i.push(this.renderCell(s[a],a,n,o));var u="row"+e;return r.createElement(r.Fragment,{key:u},r.createElement(wt,{model:t,parentMatrix:this.question},i))},t.prototype.renderCell=function(e,t,n,o){var i="cell"+t;if(e.hasQuestion)return r.createElement(Rt,{key:i,cssClasses:n,cell:e,creator:this.creator,reason:o});var s=o;s||(s=e.hasTitle?"row-header":"");var a=this.renderCellContent(e,s,n),u=null;return(e.width||e.minWidth)&&(u={},e.width&&(u.width=e.width),e.minWidth&&(u.minWidth=e.minWidth)),r.createElement("td",{className:e.className,key:i,style:u,colSpan:e.colSpans,"data-responsive-title":e.headers,title:e.getTitle()},a)},t.prototype.renderCellContent=function(e,t,n){var o=null,i=null;if((e.width||e.minWidth)&&(i={},e.width&&(i.width=e.width),e.minWidth&&(i.minWidth=e.minWidth)),e.hasTitle){t="row-header";var a=this.renderLocString(e.locTitle),u=e.column?r.createElement(xt,{column:e.column,question:this.question}):null;o=r.createElement(r.Fragment,null,a,u)}if(e.isDragHandlerCell&&(o=r.createElement(r.Fragment,null,r.createElement(_t,{item:{data:{row:e.row,question:this.question}}}))),e.isActionsCell&&(o=s.Instance.createElement("sv-matrixdynamic-actions-cell",{question:this.question,cssClasses:n,cell:e,model:e.item.getData()})),e.hasPanel&&(o=r.createElement(we,{key:e.panel.id,element:e.panel,survey:this.question.survey,cssClasses:n,isDisplayMode:this.isDisplayMode,creator:this.creator})),!o)return null;var l=r.createElement(r.Fragment,null,o);return this.wrapCell(e,l,t)},t}(h),Pt=function(e){function t(t){return e.call(this,t)||this}return St(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){return r.createElement(D,{model:this.model,handleClick:!1})},t}(p);s.Instance.registerElement("sv-matrixdynamic-actions-cell",(function(e){return r.createElement(Pt,e)}));var xt=function(e){function t(t){return e.call(this,t)||this}return St(t,e),Object.defineProperty(t.prototype,"column",{get:function(){return this.props.column},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.column},t.prototype.renderElement=function(){return this.column.isRenderedRequired?r.createElement(r.Fragment,null,r.createElement("span",{className:this.question.cssClasses.cellRequiredText},this.column.requiredText)):null},t}(p),Rt=function(e){function t(t){return e.call(this,t)||this}return St(t,e),Object.defineProperty(t.prototype,"cell",{get:function(){return this.props.cell},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemCss",{get:function(){return this.cell?this.cell.className:""},enumerable:!1,configurable:!0}),t.prototype.getQuestion=function(){var t=e.prototype.getQuestion.call(this);return t||(this.cell?this.cell.question:null)},t.prototype.doAfterRender=function(){var e=this.cellRef.current;if(e&&this.cell&&this.question&&this.question.survey&&"r"!==e.getAttribute("data-rendered")){e.setAttribute("data-rendered","r");var 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)}},t.prototype.getShowErrors=function(){return this.question.isVisible&&(!this.cell.isChoice||this.cell.isFirstChoice)},t.prototype.getCellStyle=function(){var t=e.prototype.getCellStyle.call(this);return(this.cell.width||this.cell.minWidth)&&(t||(t={}),this.cell.width&&(t.width=this.cell.width),this.cell.minWidth&&(t.minWidth=this.cell.minWidth)),t},t.prototype.getHeaderText=function(){return this.cell.headers},t.prototype.renderQuestion=function(){return this.cell.isChoice?this.cell.isOtherChoice?this.renderOtherComment():this.cell.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():ge.renderQuestionBody(this.creator,this.question)},t.prototype.renderOtherComment=function(){var e=this.cell.question,t=e.cssClasses||{};return r.createElement(he,{question:e,cssClasses:t,otherCss:t.other,isDisplayMode:e.isInputReadOnly})},t.prototype.renderCellCheckboxButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(Pe,{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})},t.prototype.renderCellRadiogroupButton=function(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return r.createElement(pt,{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})},t}(Ee),Nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jt=function(e){function t(t){return e.call(this,t)||this}return Nt(t,e),t}(It);K.Instance.registerQuestion("matrixdropdown",(function(e){return r.createElement(jt,e)}));var Tt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Tt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.question.renderedTable.showTable?this.renderTableDiv():this.renderNoRowsContent(e);return r.createElement("div",null,this.renderAddRowButtonOnTop(e),t,this.renderAddRowButtonOnBottom(e))},t.prototype.renderAddRowButtonOnTop=function(e){return this.matrix.renderedTable.showAddRowOnTop?this.renderAddRowButton(e):null},t.prototype.renderAddRowButtonOnBottom=function(e){return this.matrix.renderedTable.showAddRowOnBottom?this.renderAddRowButton(e):null},t.prototype.renderNoRowsContent=function(e){var t=this.renderLocString(this.matrix.locEmptyRowsText),n=r.createElement("div",{className:e.emptyRowsText},t),o=this.renderAddRowButton(e,!0);return r.createElement("div",{className:e.emptyRowsSection},n,o)},t.prototype.renderAddRowButton=function(e,t){return void 0===t&&(t=!1),s.Instance.createElement("sv-matrixdynamic-add-btn",{question:this.question,cssClasses:e,isEmptySection:t})},t}(It);K.Instance.registerQuestion("matrixdynamic",(function(e){return r.createElement(Dt,e)}));var kt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowAddClick=n.handleOnRowAddClick.bind(n),n}return Tt(t,e),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnRowAddClick=function(e){this.matrix.addRowUI()},t.prototype.renderElement=function(){var e=this.renderLocString(this.matrix.locAddRowText),t=r.createElement("button",{className:this.matrix.getAddRowButtonCss(this.props.isEmptySection),type:"button",disabled:this.matrix.isInputReadOnly,onClick:this.matrix.isDesignMode?void 0:this.handleOnRowAddClick},e,r.createElement("span",{className:this.props.cssClasses.iconAdd}));return this.props.isEmptySection?t:r.createElement("div",{className:this.props.cssClasses.footer},t)},t}(p);s.Instance.registerElement("sv-matrixdynamic-add-btn",(function(e){return r.createElement(kt,e)}));var Mt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bt=function(e){function t(t){return e.call(this,t)||this}return Mt(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.item&&this.props.item.data||this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item&&this.props.item.data.question||this.props.data.question},enumerable:!1,configurable:!0}),t}(p),Lt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.addPanelUI()},t}return Mt(t,e),t.prototype.renderElement=function(){return this.question.canAddPanel?o.a.createElement("button",{type:"button",className:this.question.getAddButtonCss(),onClick:this.handleClick},o.a.createElement("span",{className:this.question.cssClasses.buttonAddText},this.question.panelAddText)):null},t}(Bt);s.Instance.registerElement("sv-paneldynamic-add-btn",(function(e){return o.a.createElement(Lt,e)}));var At=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ht=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToNextPanel()},t}return At(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelNextText,onClick:this.handleClick,className:this.question.getNextButtonCss()},o.a.createElement(b,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(Bt);s.Instance.registerElement("sv-paneldynamic-next-btn",(function(e){return o.a.createElement(Ht,e)}));var Wt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.goToPrevPanel()},t}return Wt(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{title:this.question.panelPrevText,onClick:this.handleClick,className:this.question.getPrevButtonCss()},o.a.createElement(b,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))},t}(Bt);s.Instance.registerElement("sv-paneldynamic-prev-btn",(function(e){return o.a.createElement(Qt,e)}));var Ut=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ut(t,e),t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)},t}(Bt);s.Instance.registerElement("sv-paneldynamic-progress-text",(function(e){return o.a.createElement(Ft,e)}));var Vt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(e){function t(t){return e.call(this,t)||this}return Vt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.setState({panelCounter:0});var t=this;this.question.panelCountChangedCallback=function(){t.updateQuestionRendering()},this.question.currentIndexChangedCallback=function(){t.updateQuestionRendering()},this.question.renderModeChangedCallback=function(){t.updateQuestionRendering()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.panelCountChangedCallback=function(){},this.question.currentIndexChangedCallback=function(){},this.question.renderModeChangedCallback=function(){}},t.prototype.updateQuestionRendering=function(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})},t.prototype.renderElement=function(){var e=[];if(this.question.isRenderModeList)for(var t=0;t<this.question.panels.length;t++){var n=this.question.panels[t];e.push(r.createElement(Kt,{key:n.id,element:n,question:this.question,index:t,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}else if(null!=this.question.currentPanel){n=this.question.currentPanel;e.push(r.createElement(Kt,{key:this.question.currentIndex,element:n,question:this.question,index:this.question.currentIndex,cssClasses:this.question.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.creator}))}var o=this.question.isRenderModeList&&this.question.showLegacyNavigation?this.renderAddRowButton():null,i=this.question.isProgressTopShowing?this.renderNavigator():null,s=this.question.isProgressBottomShowing?this.renderNavigator():null,a=this.renderNavigatorV2(),u=this.renderPlaceholder();return r.createElement("div",{className:this.question.cssClasses.root},u,i,e,s,o,a)},t.prototype.renderNavigator=function(){if(!this.question.showLegacyNavigation)return this.question.isRangeShowing&&this.question.isProgressTopShowing?this.renderRange():null;var e=this.question.isRangeShowing?this.renderRange():null,t=this.rendrerPrevButton(),n=this.rendrerNextButton(),o=this.renderAddRowButton(),i=this.question.isProgressTopShowing?this.question.cssClasses.progressTop:this.question.cssClasses.progressBottom;return r.createElement("div",{className:i},r.createElement("div",{style:{clear:"both"}},r.createElement("div",{className:this.question.cssClasses.progressContainer},t,e,n),o,this.renderProgressText()))},t.prototype.renderProgressText=function(){return r.createElement(Ft,{data:{question:this.question}})},t.prototype.rendrerPrevButton=function(){return r.createElement(Qt,{data:{question:this.question}})},t.prototype.rendrerNextButton=function(){return r.createElement(Ht,{data:{question:this.question}})},t.prototype.renderRange=function(){return r.createElement("div",{className:this.question.cssClasses.progress},r.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:this.question.progress},role:"progressbar"}))},t.prototype.renderAddRowButton=function(){return s.Instance.createElement("sv-paneldynamic-add-btn",{data:{question:this.question}})},t.prototype.renderNavigatorV2=function(){if(0===this.question.panelCount||this.question.showLegacyNavigation)return null;if(!this.question.cssClasses.footer)return null;var e=this.question.isRangeShowing&&this.question.isProgressBottomShowing?this.renderRange():null;return r.createElement("div",{className:this.question.cssClasses.footer},r.createElement("hr",{className:this.question.cssClasses.separator}),e,this.question.footerToolbar.visibleActions.length?r.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},r.createElement(D,{model:this.question.footerToolbar})):null)},t.prototype.renderPlaceholder=function(){return this.question.getShowNoEntriesPlaceholder()?r.createElement("div",{className:this.question.cssClasses.noEntriesPlaceholder},r.createElement("span",null,this.renderLocString(this.question.locNoEntriesText)),this.renderAddRowButton()):null},t}(h),Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vt(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(){return this.question?this.question.survey:null},t.prototype.getCss=function(){var e=this.getSurvey();return e?e.getCss():{}},t.prototype.render=function(){var t=e.prototype.render.call(this),n=this.renderButton(),o=this.question.isRenderModeList&&this.index<this.question.panelCount-1?r.createElement("hr",{className:this.question.cssClasses.separator}):null;return r.createElement(r.Fragment,null,r.createElement("div",{className:this.question.getPanelWrapperCss()},t,n),o)},t.prototype.renderButton=function(){return"right"!==this.question.panelRemoveButtonLocation||!this.question.canRemovePanel||this.question.isRenderModeList&&this.panel.isCollapsed?null:s.Instance.createElement("sv-paneldynamic-remove-btn",{data:{question:this.question,panel:this.panel}})},t}(we);K.Instance.registerQuestion("paneldynamic",(function(e){return r.createElement(zt,e)}));var Jt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(e){function t(t){return e.call(this,t)||this}return Jt(t,e),Object.defineProperty(t.prototype,"isTop",{get:function(){return this.props.isTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return this.survey.progressValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progressText",{get:function(){return this.survey.progressText},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e={width:this.progress+"%"};return r.createElement("div",{className:this.survey.getProgressCssClasses()},r.createElement("div",{style:e,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100},r.createElement("span",{className:i.SurveyProgressModel.getProgressTextInBarCss(this.css)},this.progressText)),r.createElement("span",{className:i.SurveyProgressModel.getProgressTextUnderBarCss(this.css)},this.progressText))},t}(oe);s.Instance.registerElement("sv-progress-pages",(function(e){return r.createElement(Zt,e)})),s.Instance.registerElement("sv-progress-questions",(function(e){return r.createElement(Zt,e)})),s.Instance.registerElement("sv-progress-correctquestions",(function(e){return r.createElement(Zt,e)})),s.Instance.registerElement("sv-progress-requiredquestions",(function(e){return r.createElement(Zt,e)}));var Gt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xt=function(e){function t(t){var n=e.call(this,t)||this;return n.updateScroller=void 0,n.progressButtonsModel=new i.SurveyProgressButtonsModel(n.survey),n.listContainerRef=r.createRef(),n}return Gt(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",{className:this.css.progressButtonsContainerCenter},r.createElement("div",{className:this.css.progressButtonsContainer},r.createElement("div",{className:this.getScrollButtonCss(!0),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!0)}}),r.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},r.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),r.createElement("div",{className:this.getScrollButtonCss(!1),role:"button",onClick:function(){return e.clickScrollButton(e.listContainerRef.current,!1)}})))},t.prototype.getListElements=function(){var e=this,t=[];return this.survey.visiblePages.forEach((function(n,r){t.push(e.renderListElement(n,r))})),t},t.prototype.renderListElement=function(e,t){var n=this;return r.createElement("li",{key:"listelement"+t,className:this.getListElementCss(t),onClick:this.isListElementClickable(t)?function(){return n.clickListElement(t)}:void 0},r.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.navigationTitle||e.name},e.navigationTitle||e.name),r.createElement("div",{className:this.css.progressButtonsPageDescription,title:e.navigationDescription},e.navigationDescription))},t.prototype.isListElementClickable=function(e){return this.progressButtonsModel.isListElementClickable(e)},t.prototype.getListElementCss=function(e){return this.progressButtonsModel.getListElementCss(e)},t.prototype.clickListElement=function(e){this.progressButtonsModel.clickListElement(e)},t.prototype.getScrollButtonCss=function(e){return this.progressButtonsModel.getScrollButtonCss(this.state.hasScroller,e)},t.prototype.clickScrollButton=function(e,t){e&&(e.scrollLeft+=70*(t?-1:1))},t.prototype.componentDidMount=function(){var e=this;this.updateScroller=setInterval((function(){e.listContainerRef.current&&e.setState({hasScroller:e.listContainerRef.current.scrollWidth>e.listContainerRef.current.offsetWidth})}),100)},t.prototype.componentWillUnmount=function(){void 0!==this.updateScroller&&(clearInterval(this.updateScroller),this.updateScroller=void 0)},t}(oe);s.Instance.registerElement("sv-progress-buttons",(function(e){return r.createElement(Xt,e)}));var $t=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleKeydown=function(e){t.model.onKeyDown(e)},t}return $t(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this;if(!this.item)return null;var t={paddingInlineStart:this.model.getItemIndent(this.item)},n=this.model.getItemClass(this.item),r=[];if(this.item.component){var i=s.Instance.createElement(this.item.component,{item:this.item,key:this.item.id});i&&r.push(i)}else{var a=this.renderLocString(this.item.locTitle,void 0,"locString");if(this.item.iconName){var u=o.a.createElement(b,{key:1,className:this.model.cssClasses.itemIcon,iconName:this.item.iconName,size:24,"aria-label":this.item.title});r.push(u),r.push(o.a.createElement("span",{key:2},a))}else r.push(a)}var l=o.a.createElement("div",{style:t,className:this.model.cssClasses.itemBody},r),c=this.item.needSeparator?o.a.createElement("div",{className:this.model.cssClasses.itemSeparator}):null,p={display:this.model.isItemVisible(this.item)?null:"none"};return ne(o.a.createElement("li",{className:n,role:"option",style:p,id:this.item.elementId,"aria-selected":this.model.isItemSelected(this.item),onClick:function(t){e.model.onItemClick(e.item),t.stopPropagation()},onPointerDown:function(t){return e.model.onPointerDown(t,e.item)}},c,l))},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.onLastItemRended(this.item)},t}(c);s.Instance.registerElement("sv-list-item",(function(e){return o.a.createElement(Yt,e)}));var en=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeydown=function(e){n.model.onKeyDown(e)},n.handleMouseMove=function(e){n.model.onMouseMove(e)},n.state={filterString:n.model.filterString||""},n.listContainerRef=o.a.createRef(),n}return en(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.listContainerRef&&this.listContainerRef.current&&this.model.initListContainerHtmlElement(this.listContainerRef.current)},t.prototype.renderElement=function(){return o.a.createElement("div",{className:this.model.cssClasses.root,ref:this.listContainerRef},this.searchElementContent(),this.emptyContent(),this.renderList())},t.prototype.renderList=function(){if(!this.model.renderElements)return null;var e=this.renderItems(),t={display:this.model.isEmpty?"none":null};return o.a.createElement("ul",{className:this.model.cssClasses.itemsContainer,style:t,role:"listbox",id:this.model.elementId,onMouseDown:function(e){e.preventDefault()},onKeyDown:this.handleKeydown,onMouseMove:this.handleMouseMove},e)},t.prototype.renderItems=function(){var e=this;if(!this.model)return null;var t=this.model.renderedActions;return t?t.map((function(t,n){return o.a.createElement(Yt,{model:e.model,item:t,key:"item"+n})})):null},t.prototype.searchElementContent=function(){var e=this;if(this.model.showFilter){var t=this.model.showSearchClearButton&&this.model.filterString?o.a.createElement("button",{className:this.model.cssClasses.searchClearButtonIcon,onClick:function(t){e.model.onClickSearchClearButton(t)}},o.a.createElement(b,{iconName:"icon-searchclear",size:"auto"})):null;return o.a.createElement("div",{className:this.model.cssClasses.filter},o.a.createElement("div",{className:this.model.cssClasses.filterIcon},o.a.createElement(b,{iconName:"icon-search",size:"auto"})),o.a.createElement("input",{type:"text",className:this.model.cssClasses.filterInput,"aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onKeyUp:function(t){e.model.goToItems(t)},onChange:function(t){t.target===document.activeElement&&(e.model.filterString=t.target.value)}}),t)}return null},t.prototype.emptyContent=function(){var e={display:this.model.isEmpty?null:"none"};return o.a.createElement("div",{className:this.model.cssClasses.emptyContainer,style:e},o.a.createElement("div",{className:this.model.cssClasses.emptyText,"aria-label":this.model.emptyMessage},this.model.emptyMessage))},t}(c);s.Instance.registerElement("sv-list",(function(e){return o.a.createElement(tn,e)}));var nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nn(t,e),t.prototype.render=function(){var e=Object(i.createTOCListModel)(this.props.model),t=Object(i.getTocRootCss)(this.props.model);return r.createElement("div",{className:t},r.createElement(tn,{model:e}))},t}(oe);s.Instance.registerElement("sv-progress-toc",(function(e){return r.createElement(rn,e)}));var on=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnClick=n.handleOnClick.bind(n),n}return on(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.handleOnClick=function(e){this.question.setValueFromClick(e.target.value),this.setState({value:this.question.value})},t.prototype.renderItem=function(e,t){return s.Instance.createElement(this.question.itemComponentName,{question:this.question,item:e,index:t,key:"value"+t,handleOnClick:this.handleOnClick,isDisplayMode:this.isDisplayMode})},t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,o=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null;return r.createElement("div",{className:this.question.ratingRootCss,ref:function(t){return e.setControl(t)}},r.createElement("fieldset",{role:"radiogroup"},r.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?r.createElement("span",{className:t.minText},n):null,this.question.renderedRateItems.map((function(t,n){return e.renderItem(t,n)})),this.question.hasMaxLabel?r.createElement("span",{className:t.maxText},o):null))},t}(h);K.Instance.registerQuestion("rating",(function(e){return r.createElement(sn,e)}));var an=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),un=function(e){function t(t){return e.call(this,t)||this}return an(t,e),t.prototype.renderElement=function(){var e=this.question.cssClasses,t=this.renderSelect(e);return r.createElement("div",{className:this.question.cssClasses.rootDropdown},t)},t}(Ue);K.Instance.registerQuestion("sv-rating-dropdown",(function(e){return r.createElement(un,e)})),i.RendererFactory.Instance.registerRenderer("rating","dropdown","sv-rating-dropdown");var ln=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cn=function(e){function t(t){return e.call(this,t)||this}return ln(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses;return r.createElement("div",{id:this.question.inputId,className:t.root,ref:function(t){return e.setControl(t)}},this.question.formatedValue)},t}(h);K.Instance.registerQuestion("expression",(function(e){return r.createElement(cn,e)}));var pn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnExpanded=n.handleOnExpanded.bind(n),n}return pn(t,e),t.prototype.getStateElements=function(){return[this.popup,this.popup.survey]},t.prototype.handleOnExpanded=function(e){this.popup.changeExpandCollapse()},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&this.popup.isShowing},t.prototype.renderElement=function(){var e=this.renderWindowHeader(),t=this.popup.isExpanded?this.renderBody():null,n={position:"fixed",bottom:3,right:10};return this.popup.renderedWidth&&(n.width=this.popup.renderedWidth,n.maxWidth=this.popup.renderedWidth),r.createElement("div",{className:this.popup.cssRoot,style:n},e,t)},t.prototype.renderWindowHeader=function(){var e={paddingRight:"10px"},t=this.popup.cssButton;t="glyphicon pull-right "+t;var n=c.renderLocString(this.survey.locTitle);return r.createElement("div",{className:this.popup.cssHeaderRoot},r.createElement("span",{onClick:this.handleOnExpanded,style:{width:"100%",cursor:"pointer"}},r.createElement("span",{className:this.popup.cssHeaderTitle,style:e},n),r.createElement("span",{className:t,"aria-hidden":"true"})),this.popup.isExpanded?r.createElement("span",{onClick:this.handleOnExpanded,style:{float:"right",cursor:"pointer"}},r.createElement("span",{className:this.popup.cssHeaderTitle,style:e},"X")):null)},t.prototype.renderBody=function(){return r.createElement("div",{className:this.popup.cssBody},this.doRender())},t.prototype.createSurvey=function(t){t||(t={}),e.prototype.createSurvey.call(this,t),this.popup=new i.PopupSurveyModel(null,this.survey),t.closeOnCompleteTimeout&&(this.popup.closeOnCompleteTimeout=t.closeOnCompleteTimeout),this.popup.isShowing=!0,this.popup.isExpanded||!t.expanded&&!t.isExpanded||this.popup.expand()},t}(te),dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pn(t,e),t}(hn),fn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mn=function(e){function t(t){return e.call(this,t)||this}return fn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this.question.cssClasses;return r.createElement("fieldset",{className:this.question.getSelectBaseRootCss()},r.createElement("legend",{role:"radio","aria-label":this.question.locTitle.renderedHtml}),this.question.hasColumns?this.getColumns(e):this.getItems(e))},t.prototype.getColumns=function(e){var t=this;return this.question.columns.map((function(n,o){var i=n.map((function(n,r){return t.renderItem("item"+r,n,e)}));return r.createElement("div",{key:"column"+o,className:t.question.getColumnClass(),role:"presentation"},i)}))},t.prototype.getItems=function(e){for(var t=[],n=0;n<this.question.visibleChoices.length;n++){var r=this.question.visibleChoices[n],o="item"+n;t.push(this.renderItem(o,r,e))}return t},Object.defineProperty(t.prototype,"textStyle",{get:function(){return{marginLeft:"3px",display:"inline",position:"static"}},enumerable:!1,configurable:!0}),t.prototype.renderItem=function(e,t,n){var o=r.createElement(yn,{key:e,question:this.question,item:t,cssClasses:n}),i=this.question.survey,s=null;return i&&(s=a.wrapItemValue(i,o,this.question,t)),null!=s?s:o},t}(h),yn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnChange=n.handleOnChange.bind(n),n}return fn(t,e),t.prototype.getStateElement=function(){return this.item},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.reactOnStrChanged()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.item.locImageLink.onChanged=function(){}},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.reactOnStrChanged()},t.prototype.reactOnStrChanged=function(){var e=this;this.item.locImageLink.onChanged=function(){e.setState({locImageLinkchanged:e.state&&e.state.locImageLink?e.state.locImageLink+1:1})}},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.props.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),t.prototype.handleOnChange=function(e){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})},t.prototype.renderElement=function(){var e=this,t=this.item,n=this.question,o=this.cssClasses,i=n.isItemSelected(t),s=n.getItemClass(t),a=null;n.showLabel&&(a=r.createElement("span",{className:n.cssClasses.itemText},t.text?c.renderLocString(t.locText):t.value));var u={objectFit:this.question.imageFit},l=null;if(t.locImageLink.renderedHtml&&"image"===this.question.contentMode&&(l=r.createElement("img",{className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:t.locText.renderedHtml,style:u,onLoad:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),t.locImageLink.renderedHtml&&"video"===this.question.contentMode&&(l=r.createElement("video",{controls:!0,className:o.image,src:t.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:u,onLoadedMetadata:function(n){e.question.onContentLoaded(t,n.nativeEvent)},onError:function(e){t.onErrorHandler(t,e.nativeEvent)}})),!t.locImageLink.renderedHtml||t.contentNotLoaded){var p={width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,objectFit:this.question.imageFit};l=r.createElement("div",{className:o.itemNoImage,style:p},o.itemNoImageSvgIcon?r.createElement(b,{className:o.itemNoImageSvgIcon,iconName:this.question.cssClasses.itemNoImageSvgIconId,size:48}):null)}return r.createElement("div",{className:s},r.createElement("label",{className:o.label},r.createElement("input",{className:o.itemControl,id:this.question.getItemId(t),type:this.question.inputType,name:this.question.questionName,checked:i,value:t.value,disabled:!this.question.getItemEnabled(t),onChange:this.handleOnChange,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy}),r.createElement("div",{className:this.question.cssClasses.itemDecorator},r.createElement("div",{className:this.question.cssClasses.imageContainer},this.question.cssClasses.checkedItemDecorator?r.createElement("span",{className:this.question.cssClasses.checkedItemDecorator},this.question.cssClasses.checkedItemSvgIconId?r.createElement(b,{size:"auto",className:this.question.cssClasses.checkedItemSvgIcon,iconName:this.question.cssClasses.checkedItemSvgIconId}):null):null,l),a)))},t}(p);K.Instance.registerQuestion("imagepicker",(function(e){return r.createElement(mn,e)}));var vn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gn=function(e){function t(t){return e.call(this,t)||this}return vn(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.question.locImageLink.onChanged=function(){t.forceUpdate()}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.question.locImageLink.onChanged=function(){}},Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.getImageCss(),n={objectFit:this.question.imageFit},o=null;"image"===this.question.renderedMode&&(o=r.createElement("img",{className:t,src:this.question.locImageLink.renderedHtml,alt:this.question.altText||this.question.title,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoad:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"video"===this.question.renderedMode&&(o=r.createElement("video",{controls:!0,className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n,onLoadedMetadata:function(t){e.question.onLoadHandler()},onError:function(t){e.question.onErrorHandler()}})),"youtube"===this.question.renderedMode&&(o=r.createElement("iframe",{className:t,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:n}));var i=null;return this.question.imageLink&&!this.question.contentNotLoaded||(i=r.createElement("div",{className:this.question.cssClasses.noImage},r.createElement(b,{iconName:this.question.cssClasses.noImageSvgIconId,size:48}))),r.createElement("div",{className:this.question.cssClasses.root},o,i)},t}(h);K.Instance.registerQuestion("image",(function(e){return r.createElement(gn,e)}));var bn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cn=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.question.value},n}return bn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){var e=this,t=this.question.cssClasses,n=this.renderCleanButton();return r.createElement("div",{className:t.root,ref:function(t){return e.setControl(t)},style:{height:this.question.signatureHeight,width:this.question.signatureWidth}},r.createElement("div",{className:t.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.question.placeHolderText),r.createElement("div",null,r.createElement("canvas",{tabIndex:0})),n)},t.prototype.renderCleanButton=function(){var e=this;if(!this.question.canShowClearButton)return null;var t=this.question.cssClasses;return r.createElement("div",{className:t.controls},r.createElement("button",{type:"button",className:t.clearButton,title:this.question.clearButtonCaption,onClick:function(){return e.question.clearValue()}},this.question.cssClasses.clearButtonIconId?r.createElement(b,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):r.createElement("span",null,"✖")))},t}(h);K.Instance.registerQuestion("signaturepad",(function(e){return r.createElement(Cn,e)}));var En=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qn=function(e){function t(t){return e.call(this,t)||this}return En(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.question},t.prototype.renderElement=function(){var e=this.renderItems();return o.a.createElement("div",{className:this.question.cssClasses.root},e)},t.prototype.renderItems=function(){var e=this;return this.question.visibleChoices.map((function(t,n){return o.a.createElement(wn,{key:e.question.inputId+"_"+n,item:t,question:e.question,index:n})}))},t}(h),wn=function(e){function t(t){return e.call(this,t)||this}return En(t,e),Object.defineProperty(t.prototype,"index",{get:function(){return this.props.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){this.model=new i.ButtonGroupItemModel(this.question,this.item,this.index);var e=this.renderIcon(),t=this.renderInput(),n=this.renderCaption();return o.a.createElement("label",{role:"radio",className:this.model.css.label,title:this.model.caption.renderedHtml},t,o.a.createElement("div",{className:this.model.css.decorator},e,n))},t.prototype.renderIcon=function(){return this.model.iconName?o.a.createElement(b,{className:this.model.css.icon,iconName:this.model.iconName,size:this.model.iconSize||24}):null},t.prototype.renderInput=function(){var e=this;return o.a.createElement("input",{className:this.model.css.control,id:this.model.id,type:"radio",name:this.model.name,checked:this.model.selected,value:this.model.value,disabled:this.model.readOnly,onChange:function(){e.model.onChange()},"aria-required":this.model.isRequired,"aria-label":this.model.caption.renderedHtml,"aria-invalid":this.model.hasErrors,"aria-describedby":this.model.describedBy,role:"radio"})},t.prototype.renderCaption=function(){if(!this.model.showCaption)return null;var e=this.renderLocString(this.model.caption);return o.a.createElement("span",{className:this.model.css.caption,title:this.model.caption.renderedHtml},e)},t}(c),On=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_n=function(e){function t(t){return e.call(this,t)||this}return On(t,e),t.prototype.getStateElements=function(){var t=e.prototype.getStateElements.call(this);return this.question.contentQuestion&&t.push(this.question.contentQuestion),t},t.prototype.renderElement=function(){return ge.renderQuestionBody(this.creator,this.question.contentQuestion)},t}(d),Sn=function(e){function t(t){return e.call(this,t)||this}return On(t,e),t.prototype.canRender=function(){return!!this.question.contentPanel},t.prototype.renderElement=function(){return r.createElement(we,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})},t}(d);K.Instance.registerQuestion("custom",(function(e){return r.createElement(_n,e)})),K.Instance.registerQuestion("composite",(function(e){return r.createElement(Sn,e)}));var In=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pn=function(e){function t(t){return e.call(this,t)||this}return In(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=[];return e.push(o.a.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},o.a.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml,alt:this.survey.locTitle.renderedHtml,width:this.survey.logoWidth?this.survey.logoWidth:void 0,height:this.survey.logoHeight?this.survey.logoHeight:void 0,style:{objectFit:this.survey.logoFit}}))),o.a.createElement(o.a.Fragment,null,e)},t}(o.a.Component);s.Instance.registerElement("sv-logo-image",(function(e){return o.a.createElement(Pn,e)}));var xn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnRowRemoveClick=n.handleOnRowRemoveClick.bind(n),n}return xn(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnRowRemoveClick=function(e){this.question.removeRowUI(this.row)},t.prototype.renderElement=function(){var e=this.renderLocString(this.question.locRemoveRowText);return o.a.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly},e,o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(p);s.Instance.registerElement("sv-matrix-remove-button",(function(e){return o.a.createElement(Rn,e)}));var Nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleOnShowHideClick=n.handleOnShowHideClick.bind(n),n}return Nn(t,e),t.prototype.getStateElement=function(){return this.props.item},Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.props.item.data.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.props.item.data.row},enumerable:!1,configurable:!0}),t.prototype.handleOnShowHideClick=function(e){this.row.showHideDetailPanelClick()},t.prototype.renderElement=function(){var e=this.row.isDetailPanelShowing,t=e,n=e?this.row.detailPanelId:void 0;return o.a.createElement("button",{type:"button",onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":t,"aria-controls":n},o.a.createElement(b,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))},t}(p);s.Instance.registerElement("sv-matrix-detail-button",(function(e){return o.a.createElement(jn,e)}));var Tn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){t.question.removePanelUI(t.data.panel)},t}return Tn(t,e),t.prototype.renderElement=function(){return o.a.createElement("button",{className:this.question.getPanelRemoveButtonCss(),onClick:this.handleClick,type:"button"},o.a.createElement("span",{className:this.question.cssClasses.buttonRemoveText},this.question.panelRemoveText),o.a.createElement("span",{className:this.question.cssClasses.iconRemove}))},t}(Bt);s.Instance.registerElement("sv-paneldynamic-remove-btn",(function(e){return o.a.createElement(Dn,e)}));var kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kn(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.item.isVisible},t.prototype.renderElement=function(){return o.a.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})},t}(p);s.Instance.registerElement("sv-nav-btn",(function(e){return o.a.createElement(Mn,e)}));var Bn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bn(t,e),t.prototype.render=function(){var e;return o.a.createElement("div",{className:"sv-skeleton-element",id:null===(e=this.props.element)||void 0===e?void 0:e.id})},t}(o.a.Component);s.Instance.registerElement("sv-skeleton",(function(e){return o.a.createElement(Ln,e)}));var An=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hn=function(e){function t(t){var n=e.call(this,t)||this;return n.onInput=function(e){n.locStr.text=e.target.innerText},n.onClick=function(e){e.preventDefault(),e.stopPropagation()},n.state={changed:0},n}return An(t,e),Object.defineProperty(t.prototype,"locStr",{get:function(){return this.props.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.locStr){var e=this;this.locStr.onChanged=function(){e.setState({changed:e.state.changed+1})}}},t.prototype.componentWillUnmount=function(){this.locStr&&(this.locStr.onChanged=function(){})},t.prototype.render=function(){if(!this.locStr)return null;if(this.locStr.hasHtml){var e={__html:this.locStr.renderedHtml};return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return o.a.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)},t}(o.a.Component);s.Instance.registerElement(i.LocalizableString.editableRenderer,(function(e){return o.a.createElement(Hn,e)}));var Wn=n(4);function Qn(e){return"function"!=typeof e?e:e()}!function(){function e(){this._result=""}e.prototype.log=function(e){this._result+="->"+e},Object.defineProperty(e.prototype,"result",{get:function(){return this._result},enumerable:!1,configurable:!0})}();var Un=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fn=function(){function e(e,t,n,r){var o=this;void 0===r&&(r=null),this.container=e,this.model=t,this.itemsSelector=n,this.dotsItemSize=r,this.resizeObserver=void 0,this.isInitialized=!1,this.minDimensionConst=56,this.separatorSize=17,this.separatorAddConst=1,this.paddingSizeConst=8,this.dotsSizeConst=48,this.recalcMinDimensionConst=!0,this.getComputedStyle=window.getComputedStyle.bind(window),this.model.updateCallback=function(e){e?o.isInitialized=!1:Object(Wn.setTimeout)((function(){o.process()}),1)},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(e){return o.process()})),this.resizeObserver.observe(this.container.parentElement))}return e.prototype.getDimensions=function(e){return{scroll:e.scrollWidth,offset:e.offsetWidth}},e.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetWidth;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)),t},e.prototype.calcItemSize=function(e){return e.offsetWidth},e.prototype.calcMinDimension=function(e){var t=this.minDimensionConst;return e.iconSize&&this.recalcMinDimensionConst&&(t=2*e.iconSize+this.paddingSizeConst),e.canShrink?t+(e.needSeparator?this.separatorSize:0):e.maxDimension},e.prototype.calcItemsSizes=function(){var e=this,t=this.model.actions;this.container.querySelectorAll(this.itemsSelector).forEach((function(n,r){var o=t[r];e.calcActionDimensions(o,n)}))},e.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcMinDimension(e)},Object.defineProperty(e.prototype,"isContainerVisible",{get:function(){return!!((e=this.container).offsetWidth||e.offsetHeight||e.getClientRects().length);var e},enumerable:!1,configurable:!0}),e.prototype.process=function(){var e;if(this.isContainerVisible&&!this.model.isResponsivenessDisabled){this.isInitialized||(this.model.setActionsMode("large"),this.calcItemsSizes(),this.isInitialized=!0);var t=this.dotsItemSize;if(!this.dotsItemSize){var n=null===(e=this.container)||void 0===e?void 0:e.querySelector(".sv-dots");t=n&&this.calcItemSize(n)||this.dotsSizeConst}this.model.fit(this.getAvailableSpace(),t)}},e.prototype.dispose=function(){this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect()},e}(),Vn=function(e){function t(t,n,r,o,i){void 0===i&&(i=40);var s=e.call(this,t,n,r,o)||this;return s.minDimensionConst=i,s.recalcMinDimensionConst=!1,s}return Un(t,e),t.prototype.getDimensions=function(){return{scroll:this.container.scrollHeight,offset:this.container.offsetHeight}},t.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetHeight;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)),t},t.prototype.calcItemSize=function(e){return e.offsetHeight},t.prototype.calcActionDimensions=function(e,t){e.maxDimension=this.calcItemSize(t),e.minDimension=this.calcItemSize(t)},t}(Fn);Object(i.checkLibraryVersion)("1.9.85","survey-react-ui")}])}));