survey-creator-react 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,8 +1,13 @@
1
1
  Devsoft Baltic OÜ
2
- Commercial developer license for SurveyJS Creator, SurveyJS Pdf Generator and SurveyJS Dashboard libraries.
3
- Copyright (C) 2015-2025 DEVSOFT BALTIC OÜ.
2
+
3
+ Commercial developer license for SurveyJS Creator, SurveyJS PDF Generator and SurveyJS Dashboard libraries.
4
+
5
+ SurveyJS Creator, SurveyJS PDF Generator and SurveyJS Dashboard libraries are referred further as SurveyJS Commercial Libraries.
6
+
7
+ Copyright (C) 2015-2026 DEVSOFT BALTIC OÜ.
4
8
 
5
9
  END-USER LICENSE AGREEMENT
10
+
6
11
  FOR ALL SOFTWARE DEVELOPMENT PRODUCT(S) INCLUDED IN THIS DISTRIBUTION
7
12
 
8
13
  IMPORTANT - PLEASE READ THIS END-USER LICENSE AGREEMENT ("AGREEMENT") CAREFULLY BEFORE USING THE SOFTWARE DEVELOPMENT PRODUCT(S) INCLUDED IN THIS DISTRIBUTION/INSTALLATION.
@@ -15,77 +20,114 @@ If you do not agree to any of the terms and conditions of this AGREEMENT or if y
15
20
 
16
21
  All SOFTWARE DEVELOPMENT PRODUCT(S) is licensed, not sold.
17
22
 
18
- 1. GRANT OF LICENSE.
19
- Subject to all the terms and conditions of this AGREEMENT, DEVSOFTBALTIC grants LICENSEE a non-exclusive, non-transferable license to install and use the SOFTWARE DEVELOPMENT PRODUCT(S) included in this distribution as authorized in sections 1.1 through 1.2 below:
23
+ 1. GRANT OF LICENSE. Subject to all the terms and conditions of this AGREEMENT, DEVSOFTBALTIC grants LICENSEE a non-exclusive, non-transferable license to install and use the SOFTWARE DEVELOPMENT PRODUCT(S) included in this distribution as authorized in sections 1.1 through 1.2 below:
20
24
 
21
25
  1.1 INDIVIDUAL USE LICENSE.
22
- If you are an individual, you may install, copy, and use the SOFTWARE DEVELOPMENT PRODUCT(S) by purchasing a SurveyJS Creator license(s) from DEVSOFTBALTIC or its authorized resellers, in accordance with Section 4 of this AGREEMENT.
26
+
27
+ If you are an individual, you may install, copy, and use the SOFTWARE DEVELOPMENT PRODUCT(S) by purchasing a SurveyJS Commercial Libraries license(s) from DEVSOFTBALTIC or its authorized resellers, in accordance with Section 4 of this AGREEMENT.
23
28
 
24
29
  1.2 BUSINESS AND GOVERNMENT USE LICENSE.
25
- DEVSOFTBALTIC licenses the SOFTWARE DEVELOPMENT PRODUCT(S) on a per-developer basis. If you represent a business and/or government entity, you or your employees may install, copy, and use the SOFTWARE DEVELOPMENT PRODUCT(S) by purchasing SurveyJS Creator license(s) from DEVSOFTBALTIC or its authorized resellers for each developer using the SOFTWARE DEVELOPMENT PRODUCT(S), in accordance with Section 4 of this AGREEMENT. The number of licensed developers using the SOFTWARE DEVELOPMENT PRODUCT(S) must equal or be less than the number of seats purchased from DEVSOFTBALTIC or its authorized resellers.
26
- DEVSOFTBALTIC grants to Licensee a paid up, perpetual world-wide, irrevocable (except in the case of Licensee’s uncured breach) non-exclusive and non-transferable license to the SOFTWARE DEVELOPMENT PRODUCT(S), including the Redistributables, to use, test, demonstrate, develop derivative works, use for technical support, provide training, host and embed the Redistributables , in executable form only (the “DEVSOFTBALTIC Component”) , in all current and future versions of the Application (the "License"). This license grant extends to all Licensee distributors and resellers (collectively, “the Licensees”). By way of clarification, there is no limit on the number of customers or users (including users of Licensee’s resellers, distributors, and licensees) that Licensees can use the Redistributables for. Further, DEVSOFTBALTIC agrees that Licensee’s third-party contractors and hosting partners may access and use the Redistributables, subject to the same restrictions and solely for the purposes contemplated hereunder. The foregoing license grant applies to all corrections, patches, updates and future versions of the DEVSOFTBALTIC Component (collectively, “Updates”).
30
+
31
+ DEVSOFTBALTIC licenses the SOFTWARE DEVELOPMENT PRODUCT(S) on a per-developer basis. If you represent a business and/or government entity, you or your employees may install, copy, and use the SOFTWARE DEVELOPMENT PRODUCT(S) by purchasing SurveyJS Commercial Libraries license(s) from DEVSOFTBALTIC or its authorized resellers for each developer using the SOFTWARE DEVELOPMENT PRODUCT(S), in accordance with Section 4 of this AGREEMENT. The number of licensed developers using the SOFTWARE DEVELOPMENT PRODUCT(S) must equal or be less than the number of seats purchased from DEVSOFTBALTIC or its authorized resellers.
32
+
33
+ DEVSOFTBALTIC grants to Licensee a paid up, perpetual world-wide, irrevocable (except in the case of Licensee’s uncured breach) non-exclusive and non-transferable license to the SOFTWARE DEVELOPMENT PRODUCT(S), including the Redistributables, to use, test, demonstrate, develop derivative works, use for technical support, provide training, host and embed the Redistributables , in executable form only (the “DEVSOFTBALTIC Component”) , in all current and future versions of the Application (the "License"). This license grant extends to all Licensee distributors and resellers (collectively, “the Licensees”). By way of clarification, there is no limit on the number of customers or users (including users of Licensee’s resellers, distributors, and licensees) that Licensees can use the Redistributables for. Further, DEVSOFTBALTIC agrees that Licensee’s third-party contractors and hosting partners may access and use the Redistributables, subject to the same restrictions and solely for the purposes contemplated hereunder. The foregoing license grant applies to all corrections, patches, updates and future versions of the DEVSOFTBALTIC Component (collectively, “Updates”).
27
34
 
28
35
  2. RENTAL.
36
+
29
37
  You may not rent, lease, or lend the SOFTWARE DEVELOPMENT PRODUCT(S).
30
38
 
31
39
  3. TRANSFER.
32
- You may NOT permanently or temporarily transfer ANY of your rights under this AGREEMENT to any individual or business or government entity without prior written approval from DEVSOFTBALTIC. Regardless of any modifications which you make and regardless of how you might compile, link, and/or package your programs, under no circumstances may the libraries, Redistributables, and/or files included in the SOFTWARE DEVELOPMENT PRODUCT(S) (including any portions thereof) be used for developing programs by anyone other than you. Only you as the LICENSEE have the right to use the libraries, redistributables, or other files of the SOFTWARE DEVELOPMENT PRODUCT(S) (or any portions thereof) for developing programs created with the SOFTWARE DEVELOPMENT PRODUCT(S). You may not share copies of the Redistributables with other co-developers.
40
+
41
+ Regardless of any modifications which you make and regardless of how you might compile, link, and/or package your programs, under no circumstances may the libraries, Redistributables, and/or files included in the SOFTWARE DEVELOPMENT PRODUCT(S) (including any portions thereof) be used for developing programs by anyone other than you. Only you as the LICENSEE have the right to use the libraries, redistributables, or other files of the SOFTWARE DEVELOPMENT PRODUCT(S) (or any portions thereof) for developing programs created with the SOFTWARE DEVELOPMENT PRODUCT(S). You may not share copies of the Redistributables with other co-developers.
33
42
 
34
43
  4. RECEIVE UPDATES DURING TWELVE (12) MONTHS SINCE ORIGINAL PURCHASE.
35
- LICENSEE will be eligible to receive all major and minor updates for the SOFTWARE DEVELOPMENT PRODUCT(S) during this 12-month period. Upon 12 months plus 1 day after original purchase date, and each subsequent year thereafter, Licensee may elect to continue receiving major and minor updates of the SOFTWARE DEVELOPMENT PRODUCT(S) from DEVSOFTBALTIC by paying the annual support fees which will be about forty percent (40%) of the original license fee the SOFTWARE DEVELOPMENT PRODUCT(S).
44
+
45
+ During this 12-month period, LICENSEE will be eligible to receive all major and minor updates for the SOFTWARE DEVELOPMENT PRODUCT(S), along with technical support.
46
+
47
+ At any time in the future, LICENSEE may elect to pay the annual support fee with a discount of up to 60% of the current license fee in order to continue receiving all updates and technical support. The discount varies from 60% to 10% depending on the number of full calendar months from the current expiration date.
48
+
49
+ If LICENSEE updates their renewal subscription (for the SOFTWARE DEVELOPMENT PRODUCT(S) and technical support) within these 12 full calendar months of initial purchase, LICENSEE will be entitled for the maximum discount of 60% of the current license fee. Beyond the first 12 full calendar months since the first-time license purchase, the discount for renewal fee is applied based on the number of elapsed months since the current expiration date. A late renewal discount of 10% is guaranteed regardless of the time passed since the current expiration date.
50
+
51
+ Failure to renew the subscription for updates and technical support consecutively will result in the imposition of a user fee on LICENSEE. The fee occurs when a LICENSEE purchases a renewal subscription for a license with a past expiration date or gets an upgrade for their current plan - whether with an active and expired access to product updates or technical support - and elects to extend its expiration date.
36
52
 
37
53
  If the SOFTWARE DEVELOPMENT PRODUCT(S) is labeled as an update, you must be properly licensed to obtain the updated SOFTWARE DEVELOPMENT PRODUCT(S). A SOFTWARE DEVELOPMENT PRODUCT(S) labeled as an update replaces and/or supplements the SOFTWARE DEVELOPMENT PRODUCT(S) that formed the basis for your eligibility for the update, and together constitutes a single PRODUCT(S). You may only use the updated PRODUCT(S) in accordance with all the terms of this AGREEMENT.
38
54
 
39
- Pricing for the SOFTWARE DEVELOPMENT PRODUCT(S) license and any subsequent upgrade of the license subject to change with or without notice.
55
+ Pricing for the SOFTWARE DEVELOPMENT PRODUCT(S) license and any subsequent upgrade of the license subject to change with or without notice. Saying that, DEVSOFTBALTIC keeps prices reasonable and fair to be able to support their customers and continue investing in product development.
40
56
 
41
- DEVSOFTBALTIC reserves the right to discontinue the SOFTWARE DEVELOPMENT PRODUCT(S) or its constituents, at any time. In the event this occurs LICENSEE has the right to use the discontinued SOFTWARE PRODUCT for unlimited period and get support for 24 months since the purchase date. LICENSEE shall be entitled to get full refund if the purchase was made in 90 days, 75% if the purchase was made in 180 days, 50% if the purchase was made in 270 days and 25% if the purchase was made within a year.
57
+ DEVSOFTBALTIC reserves the right to discontinue the SOFTWARE DEVELOPMENT PRODUCT(S) or its constituents, at any time. Nevertheless, all rights agreed in the Agreement remain to be valid until the end of the licensing term. DEVSOFTBALTIC will immediately notify the LICENSEE about such changes when they become known by DEVSOFTBALTIC. In the event this occurs LICENSEE has the right to use the discontinued SOFTWARE PRODUCT for an unlimited period and get support for 24 months from the purchase date. LICENSEE shall be entitled to get full refund if the purchase was made in 90 days, 75% if the purchase was made in 180 days, 50% if the purchase was made in 270 days and 25% if the purchase was made within a year.
42
58
 
43
59
  5. REDISTRIBUTION.
60
+
44
61
  The SOFTWARE DEVELOPMENT PRODUCT(s) may include certain files ("REDISTRIBUTABLE(s)") intended for distribution by you to the users of software applications which you create. Redistributables include, for example, those files identified in printed or on-line documentation as redistributable files or those files preselected for deployment by an install utility provided with the SOFTWARE DEVELOPMENT PRODUCT(S) (if any). In all circumstances, the REDISTRIBUTABLES for the SOFTWARE DEVELOPMENT PRODUCT(S) are only those files specifically designated as such by DEVSOFTBALTIC.
62
+
45
63
  AT NO TIME MAY LICENSEE CREATE ANY TOOL, REDISTRIBUTABLE, OR PRODUCT THAT DIRECTLY OR INDIRECTLY COMPETES WITH THE SOFTWARE DEVELOPMENT PRODUCT(S) BY UTILIZING ALL OR ANY PORTION OF THE DEVSOFTBALTIC SOFTWARE DEVELOPMENT PRODUCT(S).
64
+
46
65
  The LICENSEE may NOT distribute the SOFTWARE DEVELOPMENT PRODUCT(S), in any format, to others for development or application compilation purposes.
66
+
67
+ The LICENSEE may distribute the SOFTWARE DEVELOPMENT PRODUCT(S) to any web server or cloud as part of their web applications, including SaaS applications, provided that these applications do not directly or indirectly compete with the SOFTWARE DEVELOPMENT PRODUCT(S) by providing a tool used by developers to build their own system using the same codebase as the SOFTWARE DEVELOPMENT PRODUCT(S).
68
+
47
69
  If you have purchased a license as described in Section 4 of this AGREEMENT, you may reproduce and distribute copies of the REDISTRIBUTABLES, provided that such copies are made from the original copy of the REDISTRIBUTABLES included with the SOFTWARE DEVELOPMENT PRODUCT(S) or modified versions of the REDISTRIBUTABLES which are provided to you by DEVSOFTBALTIC or those which you create. Copies of REDISTRIBUTABLES may only be distributed with and for the sole purpose of executing application programs permitted under this AGREEMENT that you have created using the SOFTWARE DEVELOPMENT PRODUCT(S).
48
70
 
49
71
  The following files in the SOFTWARE DEVELOPMENT PRODUCT(S) distribution are considered REDISTRIBUTABLES under this AGREEMENT. Refer to Section 4 of this AGREEMENT for licensing terms:
50
72
 
51
73
  *.css, *.js, fonts\*.*, *.d.ts
52
74
 
53
- 6. THIRD-PARTY SOFTWARE PRODUCTS/LIBRARIES
54
- DEVSOFTBALTIC represents and warrants that the DEVSOFTBALTIC SOFTWARE PRODUCTS, including Redistributables, do not and will not contain any third-party libraries or open-source software other than that open-source software licensed through MIT.
75
+ 6. THIRD-PARTY SOFTWARE PRODUCTS/LIBRARIES DEVSOFTBALTIC represents and warrants that the DEVSOFTBALTIC SOFTWARE PRODUCTS, including Redistributables, do not and will not contain any third-party libraries or open-source software other than that open-source software licensed through MIT (https://en.wikipedia.org/wiki/MIT_License).
76
+
55
77
  7. COPYRIGHT.
78
+
56
79
  All title and copyrights in and to the SOFTWARE DEVELOPMENT PRODUCT(S) (including but not limited to any DEVSOFTBALTIC trademarks, copywritten images, demos, source code, intermediate files, packages, photographs, redistributables, animations, video, audio, music, text, and "applets" incorporated into the SOFTWARE DEVELOPMENT PRODUCT(S) the accompanying printed materials, and any copies of the SOFTWARE DEVELOPMENT PRODUCT(S)) are owned by DEVSOFTBALTIC or its subsidiaries.
80
+
57
81
  The SOFTWARE DEVELOPMENT PRODUCT(S) is protected by copyright laws and international treaty provisions and therefore, you must treat the SOFTWARE DEVELOPMENT PRODUCT(S) like any other copyrighted material except that you may install and use the SOFTWARE DEVELOPMENT PRODUCT(S) as described in this AGREEMENT.
58
82
 
59
83
  8. DOWNLOAD of SOFTWARE DEVELOPMENT PRODUCT(S).
84
+
60
85
  The SOFTWARE DEVELOPMENT PRODUCT(S) will be made available for download from “SurveyJS Project” websites or installing SurveyJS packages using https://www.npmjs.com/ package installer.
61
86
 
62
87
  9. DISCLAIMER OF WARRANTY.
88
+
63
89
  DEVSOFTBALTIC expressly disclaims any warranty for the SOFTWARE DEVELOPMENT PRODUCT(S). THE SOFTWARE DEVELOPMENT PRODUCT(S) AND ANY RELATED DOCUMENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. DEVSOFTBALTIC DOES NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE DEVELOPMENT PRODUCT(S) IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE DEVELOPMENT PRODUCT(S) REMAINS WITH YOU. No oral or written information or advice given by DEVSOFTBALTIC or its employees shall create a warranty or in any way increase the scope of this warranty.
64
90
 
65
91
  10. LIMITATIONS ON LIABILITY.
66
- To the maximum extent permitted by applicable law, in no event shall either party be liable for any special, incidental, indirect, or consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use the SOFTWARE DEVELOPMENT PRODUCT(S) or the provision of or failure to provide SUPPORT SERVICES, even if DEVSOFTBALTIC has been advised of the possibility of such damages.
67
-
68
- LICENSEE understands that the SOFTWARE DEVELOPMENT PRODUCT(S) may produce inaccurate results because of a failure or fault within the SOFTWARE DEVELOPMENT PRODUCT(S) or failure by LICENSEE to properly use and or deploy the SOFTWARE DEVELOPMENT PRODUCT(S). LICENSEE assumes full and sole responsibility for any use of the SOFTWARE DEVELOPMENT PRODUCT(S) and bears the entire risk for failures or faults within the SOFTWARE DEVELOPMENT PRODUCT(S). You agree that regardless of the cause of failure or fault or the form of any claim, THE SOLE REMEDY AND EITHER PARTIES SOLE OBLIGATION SHALL BE GOVERNED BY THIS AGREEMENT AND IN NO EVENT SHALL EITHER PARTIES LIABILITY EXCEED THE PRICE PAID TO DEVSOFTBALTIC FOR THE SOFTWARE DEVELOPMENT PRODUCT(S). This Limited Warranty is void if failure of the SOFTWARE DEVELOPMENT PRODUCT(S) has resulted from accident, abuse, alteration, unauthorized use, or misapplication of the SOFTWARE DEVELOPMENT PRODUCT(S). Nothing in this Agreement will limit any liability either party may have to the other: (a) for willful default or fraud; or (b) for any unauthorized use of the other party’s INTELLECTUAL PROPERTY or PERSONAL DATA.
92
+
93
+ To the maximum extent permitted by applicable law, in no event shall either party be liable for any special, incidental, indirect, or consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use the SOFTWARE DEVELOPMENT PRODUCT(S) or the provision of or failure to provide SUPPORT SERVICES, even if DEVSOFTBALTIC has been advised of the possibility of such damages.
94
+
95
+ LICENSEE understands that the SOFTWARE DEVELOPMENT PRODUCT(S) may produce inaccurate results because of a failure or fault within the SOFTWARE DEVELOPMENT PRODUCT(S) or failure by LICENSEE to properly use and or deploy the SOFTWARE DEVELOPMENT PRODUCT(S). LICENSEE assumes full and sole responsibility for any use of the SOFTWARE DEVELOPMENT PRODUCT(S) and bears the entire risk for failures or faults within the SOFTWARE DEVELOPMENT PRODUCT(S). You agree that regardless of the cause of failure or fault or the form of any claim, THE SOLE REMEDY AND EITHER PARTIES SOLE OBLIGATION SHALL BE GOVERNED BY THIS AGREEMENT AND IN NO EVENT SHALL EITHER PARTIES LIABILITY EXCEED THE PRICE PAID TO DEVSOFTBALTIC FOR THE SOFTWARE DEVELOPMENT PRODUCT(S). This Limited Warranty is void if failure of the SOFTWARE DEVELOPMENT PRODUCT(S) has resulted from accident, abuse, alteration, unauthorized use, or misapplication of the SOFTWARE DEVELOPMENT PRODUCT(S). Nothing in this Agreement will limit any liability either party may have to the other: (a) for willful default or fraud; or (b) for any unauthorized use of the other party’s INTELLECTUAL PROPERTY or PERSONAL DATA.
69
96
 
70
97
  11. INDEMNIFICATION.
71
- You hereby agree to indemnify DEVSOFTBALTIC and its officers, directors, employees, agents, and representatives from each and every demand, claim, loss, liability, or damage of any kind, including actual attorney's fees, whether in tort or contract, that it or any of them may incur by reason of, or arising out of, any claim which is made by any third party with respect to any breach or violation of this AGREEMENT by you or any claims based on the Applications and the SOFTWARE DEVELOPMENT PRODUCT(S) included herein, including without limitation any claims asserted by your end user customers.
98
+
99
+ Each party ("Indemnifying Party") shall defend, indemnify and hold the other party and its directors, officers and employees harmless from and against any and all third party claims, suits, actions, or demands for liability, and any associated damages, losses, costs and expenses (including the reasonable costs and expenses of attorneys and other professionals) payable to third parties to the extent arising out of or resulting from the (i) negligence or willful misconduct of the Indemnifying Party, (ii) the inaccuracy of any representation, or (iii) the breach by the Indemnifying Party of any warranty, covenant or agreement contained in this Agreement.
100
+
72
101
  12. SUPPORT SERVICES.
102
+
73
103
  DEVSOFTBALTIC may provide you with support services related to the SOFTWARE DEVELOPMENT PRODUCT(S) ("SUPPORT SERVICES"). Use of SUPPORT SERVICES is governed by DEVSOFTBALTIC policies and programs described in the user manual, in "online" documentation and/or other DEVSOFTBALTIC provided materials. DEVSOFTBALTIC may restrict or otherwise discontinue SUPPORT SERVICES provided to you if Your use of SUPPORT SERVICES is deemed by DEVSOFTBALTIC, in its sole and reasonable discretion, to be excessive and beyond the scope of fair use.
74
104
 
75
105
  Any supplemental SOFTWARE DEVELOPMENT PRODUCT(S) provided to you as part of the SUPPORT SERVICES shall be considered part of the SOFTWARE DEVELOPMENT PRODUCT(S) and subject to the terms and conditions of this AGREEMENT. With respect to technical information, you provide to DEVSOFTBALTIC as part of the SUPPORT SERVICES, DEVSOFTBALTIC may use such information for its business purposes, including for SOFTWARE DEVELOPMENT PRODUCT(S) support and development.
76
106
 
77
107
  13. TERMINATION.
78
- Without prejudice to any other rights or remedies, DEVSOFTBALTIC will terminate this AGREEMENT upon your failure to comply with all the terms and conditions of this AGREEMENT. In such events, LICENSEE must destroy all copies of the SOFTWARE DEVELOPMENT PRODUCT(S) and all of its component parts including any related documentation and must remove ANY and ALL use of DEVSOFTBALTIC intellectual property from any applications distributed by LICENSEE, whether in native, altered or compiled states.
79
- LICENSEE has an unconditional right to terminate before the first ninety (90) days of purchase of the SOFTWARE DEVELOPMENT PRODUCT(S) and shall be entitled to a full refund.
108
+
109
+ Without prejudice to any other rights or remedies, DEVSOFTBALTIC will terminate this AGREEMENT upon your failure to comply with all the terms and conditions of this AGREEMENT. In such events, LICENSEE must destroy all copies of the SOFTWARE DEVELOPMENT PRODUCT(S) and all of its component parts including any related documentation and must remove ANY and ALL use of DEVSOFTBALTIC intellectual property from any applications distributed by LICENSEE, whether in native, altered or compiled states. LICENSEE has an unconditional right to terminate before the first ninety (90) days of purchase of the SOFTWARE DEVELOPMENT PRODUCT(S) and shall be entitled to a full refund.
110
+
80
111
  14. PERSONAL DATA.
112
+
81
113
  All Information DEVSOFTBALTIC collects from You is stored and maintained on servers utilizing reasonable and appropriate data security safeguards. DEVSOFTBALTIC does not lend, lease, sell, or market information it obtains from its customers or those who provide us personally identifiable information. DEVSOFTBALTIC does not disclose purchase information or licensing information to third parties.
82
- DEVSOFTBALTIC collects personally identifiable information whenever You purchase/license a DEVSOFTBALTIC product or service. Information includes Name, Address, Phone Number, Email address, Payment Information, Product Purchases, Licenses Owned, Employee/Contact Details, etc.
114
+
115
+ DEVSOFTBALTIC collects personally identifiable information whenever You purchase/license a DEVSOFTBALTIC product or service. Information includes Name, Address, Phone Number, Email address, Payment Information, Product Purchases, Licenses Owned, Employee/Contact Details, etc.
83
116
 
84
117
  DEVSOFTBALTIC collects personally identifiable information whenever You purchase/license a DEVSOFTBALTIC product or service. Information includes Name, Address, Phone Number, Email address, Payment Information, Product Purchases, Licenses Owned, Employee/Contact Details, etc. The information we collect allows DEVSOFTBALTIC to communicate with You regarding upcoming product updates, new product releases, company news and other important business matters.
85
118
 
86
- DEVSOFTBALTIC does not wish to receive, act to procure, nor desire to solicit, confidential or proprietary materials and information from You through the use of the SOFTWARE DEVELOPMENT PRODUCT(S) or SUPPORT SERVICES. Any and all materials, attachments, or information submitted by You as part of error submissions, or divulged during chats, online discussions, or made available to DEVSOFTBALTIC in any manner will be deemed NOT to be confidential by DEVSOFTBALTIC. You acknowledge that submissions to DEVSOFTBALTIC will not be considered confidential or proprietary and that DEVSOFTBALTIC will be under no obligation to keep such information confidential.
119
+ Any and all materials, attachments, or information submitted by You as part of error submissions, or divulged during chats, online discussions, or made available to DEVSOFTBALTIC in any manner will be deemed NOT to be confidential by DEVSOFTBALTIC. You acknowledge that submissions to DEVSOFTBALTIC will not be considered confidential or proprietary and that DEVSOFTBALTIC will be under no obligation to keep such information confidential.
120
+
121
+ “Confidential Information” - means all technical and non-technical information in any form disclosed by one party to the other party by any means, if and for so long as the data and information are protectable as trade secrets by the disclosing party under applicable law, or are otherwise subject to legal rights that give the disclosing Party independent of contract, a right to control use and disclosure of the data and information. A non-exhaustive list of examples includes but is not limited to, information regarding a party’s financial condition and financial projections, business and marketing plans, product plans, product, the results of product testing, research data, market intelligence, technical designs and specifications, secret methods, manufacturing processes, source code of proprietary software, the content of unpublished patent applications, customer lists, vendor lists, internal cost data, the terms of contracts with employees and third parties. Information may be Confidential Information regardless of the medium or manner by which it is disclosed, including disclosures orally, electronically, visually or in writing.
122
+
123
+ The Parties agree not to disclose or permit access to the owner’s Confidential Information, except to the parties’ and their Affiliates’ employees and agents.
87
124
 
88
125
  15. MISCELLANEOUS.
126
+
89
127
  This AGREEMENT may only be modified in writing signed by you and an authorized officer of Devsoft Baltic OÜ. If any provision of this AGREEMENT is found void or unenforceable, the remainder will remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in the Limited Warranty shall remain in effect.
90
- This Agreement shall be governed by and construed in accordance with the laws of any of the following jurisdictions based on LICENSEE choice: European Union, United States of America, Canada, England and Wales, Australia, or New Zealand.
128
+
129
+ This Agreement shall be governed by and construed in accordance with the laws of Estonia, without giving effect to any choice of law or conflict of law provisions.
130
+
131
+ Any dispute, controversy or claim arising out of or relating to this contract, or the breach, termination or validity thereof, shall be finally settled by arbitration in accordance with the Arbitration Rules of the Arbitration Court of the Estonian Chamber of Commerce and Industry. The language of the arbitration shall be English.
132
+
91
133
  DEVSOFTBALTIC reserves all rights not specifically granted in this AGREEMENT.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v3.2.0
2
+ * SurveyJS Creator v3.2.1
3
3
  * (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -3615,8 +3615,8 @@ ReactElementFactory.Instance.registerElement("sv-fileedit-button", (props) => {
3615
3615
  });
3616
3616
 
3617
3617
  let Version;
3618
- Version = `${"3.2.0"}`;
3619
- checkLibraryVersion(`${"3.2.0"}`, "survey-creator-react");
3618
+ Version = `${"3.2.1"}`;
3619
+ checkLibraryVersion(`${"3.2.1"}`, "survey-creator-react");
3620
3620
 
3621
3621
  export { ActionButton, AdaptiveToolbox, AddQuestionButtonComponent, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, CollabRowComponent, ComponentContainer, CreatorSurveyPageComponent, FloatingPanelComponent, IconItem, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SideBarLaunchCard, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionFileEditorButton, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyResults, SurveyResultsByRow, SurveySimulator, SurveySpinEditorButton, SwitcherComponent, TabButtonComponent, TabContainerComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicComponent, TabPreviewSurveyComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationDropdownQuestionComponent, TranslationLineSkeleton, TranslationLocaleItemComponent, VariablesViewerComponent, Version };
3622
3622
  //# sourceMappingURL=survey-creator-react.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-creator-react",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Embeddable SurveyJS drag-and-drop form builder for JSON-based forms in React. Create dynamic surveys, polls, quizzes, and other forms, configure conditional logic and validation, and customize the editor UI.",
5
5
  "author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
6
6
  "homepage": "https://surveyjs.io/",
@@ -67,9 +67,9 @@
67
67
  "ace-builds": "^1.4.12",
68
68
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
69
69
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
70
- "survey-core": "3.2.0",
71
- "survey-react-ui": "3.2.0",
72
- "survey-creator-core": "3.2.0"
70
+ "survey-core": "3.2.1",
71
+ "survey-react-ui": "3.2.1",
72
+ "survey-creator-core": "3.2.1"
73
73
  },
74
74
  "peerDependenciesMeta": {
75
75
  "ace-builds": {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v3.2.0
2
+ * SurveyJS Creator v3.2.1
3
3
  * (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -3176,8 +3176,8 @@
3176
3176
  });
3177
3177
 
3178
3178
  exports.Version = void 0;
3179
- exports.Version = `${"3.2.0"}`;
3180
- surveyCore.checkLibraryVersion(`${"3.2.0"}`, "survey-creator-react");
3179
+ exports.Version = `${"3.2.1"}`;
3180
+ surveyCore.checkLibraryVersion(`${"3.2.1"}`, "survey-creator-react");
3181
3181
 
3182
3182
  Object.defineProperty(exports, "PropertyGridEditorCollection", {
3183
3183
  enumerable: true,
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * SurveyJS Creator v3.2.0
2
+ * SurveyJS Creator v3.2.1
3
3
  * (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
6
6
  */
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("survey-react-ui"),require("survey-creator-core"),require("react-dom"),require("survey-core")):"function"==typeof define&&define.amd?define(["exports","react","survey-react-ui","survey-creator-core","react-dom","survey-core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SurveyCreator={},e.React,e.SurveyReact,e.SurveyCreatorCore,e.ReactDOM,e.Survey)}(this,function(e,t,r,n,s,o){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var i=a(t),l=a(s);class c extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}constructor(e){super(e),this.rootRef=i.createRef()}renderElement(){const e=this.model.renderedActions.map(e=>i.createElement(m,{item:e,key:e.renderedId}));return i.createElement("div",{ref:this.rootRef,className:"svc-tabbed-menu",role:"tablist",style:this.model.getRootStyle()},e)}componentDidUpdate(e,t){super.componentDidUpdate(e,t);const r=this.rootRef.current;r&&this.model.initResponsivityManager(r)}componentDidMount(){super.componentDidMount();const e=this.rootRef.current;e&&this.model.initResponsivityManager(e)}componentWillUnmount(){this.model.resetResponsivityManager(),super.componentWillUnmount()}}class m extends r.SurveyElementBase{constructor(e){super(e),this.ref=i.createRef(),this.state={changed:0}}get item(){return this.props.item}getStateElement(){return this.item}renderElement(){let e="svc-tabbed-menu-item-container";this.item.css&&(e+=" "+this.item.css),e+=this.item.isVisible?"":" svc-tabbed-menu-item-container--hidden";const t=r.ReactElementFactory.Instance.createElement(this.item.component||"svc-tabbed-menu-item",{item:this.item});return i.createElement("span",{key:this.item.id,className:e,ref:this.ref},i.createElement("div",{className:"svc-tabbed-menu-item-container__content"},t))}componentDidMount(){super.componentDidMount(),this.item.updateModeCallback=(e,t)=>{const r=()=>{this.item.mode==e?this.setState({changed:this.state.changed+1}):this.item.mode=e};queueMicrotask(()=>{l.flushSync?l.flushSync(()=>{r()}):r(),queueMicrotask(()=>{t(e,this.ref.current)})})},this.item.afterRender()}componentWillUnmount(){super.componentWillUnmount(),this.item.updateModeCallback=void 0}}class d extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}render(){const e=this.item;return r.attachKey2click(i.createElement("div",{role:"tab",id:"tab-"+e.id,"aria-selected":e.active,"aria-controls":"scrollableDiv-"+e.id,className:e.getRootCss(),onClick:()=>e.doAction()},e.hasTitle?i.createElement("span",{className:e.getTitleCss()},e.title):null,e.hasIcon?i.createElement(r.SvgIcon,{iconName:e.iconName,className:e.getIconCss(),size:"auto",title:e.tooltip||e.title}):null))}}r.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item",e=>i.createElement(d,e));class u extends r.SurveyElementBase{constructor(e){super(e),this.rootNode=i.createRef()}get creator(){return this.props.creator}getStateElement(){return this.creator}get style(){return this.props.style}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.creator!==e.creator&&(e.creator&&e.creator.unsubscribeRootElement(),this.creator&&this.rootNode.current&&this.creator.setRootElement(this.rootNode.current))}componentDidMount(){super.componentDidMount(),this.creator.setRootElement(this.rootNode.current)}componentWillUnmount(){super.componentWillUnmount(),this.creator.unsubscribeRootElement()}renderElement(){const e=this.props.creator;if(e.isCreatorDisposed)return null;const t="svc-full-container svc-creator__area svc-flex-column"+(this.props.creator.haveCommercialLicense?"":" svc-creator__area--with-banner"),s="svc-creator__content-wrapper svc-flex-row"+(this.props.creator.isMobileView?" svc-creator__content-wrapper--footer-toolbar":""),o="svc-flex-row svc-full-container svc-creator__side-bar--"+this.creator.sidebarLocation,a={};n.assign(a,this.style,this.props.creator.themeVariables);let l=null;if(!this.props.creator.haveCommercialLicense){const e={__html:this.props.creator.licenseText};l=i.createElement("div",{className:"svc-creator__banner"},i.createElement("span",{className:"svc-creator__non-commercial-text",dangerouslySetInnerHTML:e}))}return i.createElement("div",{className:this.creator.getRootCss(),ref:this.rootNode,style:a},i.createElement(r.SvgBundleComponent,null),i.createElement(r.PopupModal,null),i.createElement("div",{className:t},this.renderCollabBar(),i.createElement("div",{className:o},i.createElement("div",{className:"svc-flex-column svc-flex-row__element svc-flex-row__element--growing"},i.createElement("div",{className:"svc-top-bar"},e.showTabs?i.createElement("div",{className:"svc-tabbed-menu-wrapper"},i.createElement(c,{model:e.tabbedMenu})):null,e.showToolbar?i.createElement("div",{className:"svc-toolbar-wrapper"},i.createElement(r.SurveyActionBar,{model:e.toolbar})):null),i.createElement("div",{className:s},i.createElement("div",{className:"svc-creator__content-holder svc-flex-column"},this.renderActiveTab())),i.createElement("div",{className:"svc-footer-bar"},e.isMobileView?i.createElement("div",{className:"svc-toolbar-wrapper"},i.createElement(r.SurveyActionBar,{model:e.footerToolbar})):null)),this.renderSidebar()),l,i.createElement(r.NotifierComponent,{notifier:e.notifier})))}renderCollabBar(){const e=this.creator.collabBar;return e?r.ReactElementFactory.Instance.createElement("svc-component-container",{model:e.container}):null}renderActiveTab(){const e=this.props.creator;return this.renderCreatorTab(e.activeTabMenuItem)}renderCreatorTab(e){if(!e)return null;const t=this.props.creator,n=e.renderTab?e.renderTab():r.ReactElementFactory.Instance.createElement(e.componentContent,{creator:t,survey:t.survey,data:e.data.model,model:e.data.model}),s="svc-creator-tab"+("right"==t.toolboxLocation?" svc-creator__toolbox--right":"");return i.createElement("div",{role:"tabpanel",key:e.id,id:"scrollableDiv-"+e.id,"aria-labelledby":"tab-"+e.id,className:s},n)}renderSidebar(){return this.creator.isSidebarVisible?r.ReactElementFactory.Instance.createElement("svc-side-bar",{model:this.creator.sidebar}):null}}class h extends n.SurveyCreatorModel{constructor(e={},t){super(e,t)}render(e){console.error("The render method is deprecated. Use SurveyCreatorComponent instead.")}createQuestionElement(e){return r.ReactQuestionFactory.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isReadOnly,creator:this})}renderError(e,t,n){return i.createElement("div",{key:e},i.createElement("span",{className:n.error.icon,"aria-hidden":"true"}),i.createElement("span",{className:n.error.item},i.createElement(r.SurveyLocStringViewer,{model:t.locText})))}questionTitleLocation(){return this.survey.questionTitleLocation}questionErrorLocation(){return this.survey.questionErrorLocation}}r.ReactElementFactory.Instance.registerElement("survey-widget",e=>i.createElement(r.Survey,e));class p extends r.SurveyElementBase{constructor(e){super(e),this.createModel(e)}shouldComponentUpdate(e,t){const r=super.shouldComponentUpdate(e,t);return r&&this.needUpdateModel(e)&&this.createModel(e),r}createModel(e){}needUpdateModel(e){const t=this.getUpdatedModelProps();if(!Array.isArray(t))return!0;for(var r=0;r<t.length;r++){const n=t[r];if("object"==typeof n){const t=this.props[n.name],r=e[n.name];if(n.deepEqual){if(this.props[n.name]===e[n.name])return!1;const s=Object.keys(t||{});return s.length!==Object.keys(r||{}).length||s.some(e=>t[e]!=r[e])}return t!==r}if(this.props[n]!==e[n])return!0}return!1}getUpdatedModelProps(){}}class v extends p{constructor(e){super(e)}createModel(e){this.model&&this.model.dispose(),this.model=new n.RowViewModel(e.componentData.creator,e.row,null)}getUpdatedModelProps(){return["row",{name:"componentData",deepEqual:!0}]}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.subscribeElementChanges()}componentWillUnmount(){this.model.unsubscribeElementChanges(),super.componentWillUnmount()}render(){return i.createElement("div",{key:"svc-row-"+this.props.row.id,className:this.model.cssClasses},i.createElement("div",{className:"svc-row__drop-indicator svc-row__drop-indicator--top"}),i.createElement("div",{className:"svc-row__drop-indicator svc-row__drop-indicator--bottom"}),this.props.element)}}r.ReactElementFactory.Instance.registerElement("svc-row",e=>i.createElement(v,e));class E{constructor(e){this.event=e}stopPropagation(){this.event.stopPropagation()}preventDefault(){this.event.preventDefault()}get cancelBubble(){return!1}set cancelBubble(e){}get target(){return this.event.target}get currentTarget(){return this.event.currentTarget}get clientX(){return this.event.clientX}get clientY(){return this.event.clientY}get offsetX(){return this.event.nativeEvent.offsetX}get offsetY(){return this.event.nativeEvent.offsetY}}const g=i.memo(function(e){return e.element});g.displayName="QuestionElementContent";class y extends p{constructor(e){super(e),this.rootRef=i.createRef()}createModel(e){this.model?this.model.attachToUI(e.question,this.rootRef.current):this.modelValue=this.createQuestionViewModel(e)}createQuestionViewModel(e){return new n.QuestionAdornerViewModel(e.componentData,e.question,null)}getUpdatedModelProps(){return["question","componentData"]}get model(){return this.modelValue}getStateElement(){return this.model}renderElement(){const e=this.model.element.isInteractiveDesignElement,t=this.renderQuestionTitle(),r=this.renderContent(e);return i.createElement("div",{ref:this.rootRef,"data-sv-drop-target-survey-element":this.model.element.name||null,className:this.model.rootCss(),onDoubleClick:t=>{e&&this.model.dblclick(t.nativeEvent),t.stopPropagation()},onMouseLeave:t=>e&&this.model.hover(t.nativeEvent,t.currentTarget),onMouseOver:t=>e&&this.model.hover(t.nativeEvent,t.currentTarget)},t,r)}disableTabStop(){return!0}renderContent(e){var t=this.model.needToRenderContent?this.renderElementContent():null;return r.attachKey2click(i.createElement("div",{className:this.model.css(),onClick:e=>this.model.select(this.model,new E(e))},i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--left"}),i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--right"}),i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--top"}),i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--bottom"}),e?this.renderHeader():null,t,this.model.needToRenderContent?this.renderFooter():null),void 0,{disableTabStop:this.disableTabStop()})}renderHeader(){return r.ReactElementFactory.Instance.createElement("svc-question-header",{model:this.model})}renderFooter(){return this.model.element.isInteractiveDesignElement?r.ReactElementFactory.Instance.createElement("svc-question-footer",{className:"svc-question__content-actions",model:this.model}):null}renderCarryForwardBanner(){return this.model.isBannerShowing?r.ReactElementFactory.Instance.createElement("svc-question-banner",this.model.createBannerParams()):null}renderQuestionTitle(){if(!this.model.showHiddenTitle)return null;const e=this.model.element;return i.createElement("div",{ref:e=>e&&(this.model.renderedCollapsed?e.removeAttribute("inert"):e.setAttribute("inert","")),className:this.model.cssCollapsedHiddenHeader},e.hasTitle?i.createElement(r.TitleElement,{element:e,renderActions:!1}):i.createElement("div",{className:this.model.cssCollapsedHiddenTitle},i.createElement("span",{className:"svc-fake-title"},e.name)))}renderElementContent(){return i.createElement(i.Fragment,null,i.createElement(g,{element:this.props.element}),this.renderElementPlaceholder(),this.renderCarryForwardBanner())}componentDidMount(){super.componentDidMount(),this.model.attachToUI(this.props.question,this.rootRef.current)}renderElementPlaceholder(){return this.model.isEmptyElement?i.createElement("div",{className:"svc-panel__placeholder_frame-wrapper"},i.createElement("div",{className:"svc-panel__placeholder_frame"},i.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText))):null}componentWillUnmount(){super.componentWillUnmount(),this.model.detachFromUI()}}r.ReactElementFactory.Instance.registerElement("svc-question",e=>i.createElement(y,e));class b extends i.Component{render(){return this.props.model.allowDragging?i.createElement("div",{className:"svc-question__drag-area",onPointerDown:e=>this.props.model.onPointerDown(e)},i.createElement(r.SvgIcon,{className:"svc-question__drag-element",size:"auto",iconName:"icon-drag-area-indicator_24x16"}),i.createElement("div",{className:"svc-question__top-actions"},i.createElement(r.SurveyActionBar,{model:this.props.model.topActionContainer,handleClick:!1}))):null}}r.ReactElementFactory.Instance.registerElement("svc-question-header",e=>i.createElement(b,e));class _ extends i.Component{render(){return i.createElement("div",{className:this.props.className,onFocus:e=>this.props.model.select(this.props.model,new E(e))},i.createElement(r.SurveyActionBar,{model:this.props.model.actionContainer,handleClick:!1}))}}r.ReactElementFactory.Instance.registerElement("svc-question-footer",e=>i.createElement(_,e));class C extends r.SurveyElementBase{renderElement(){const e=o.toCssClasses(this.props.classes,"svc-action-button",!!this.props.selected&&"svc-action-button--selected",!!this.props.disabled&&"svc-action-button--disabled");return this.props.iconName?this.renderIcon(e):this.renderButtonText(e)}renderButtonText(e){return this.props.disabled?i.createElement("span",{className:e},this.props.text):i.createElement(i.Fragment,null,r.attachKey2click(i.createElement("span",{role:"button",className:e,onClick:e=>{this.props.allowBubble||e.stopPropagation(),this.props.click()},title:this.props.title},this.props.text)))}renderIcon(e){return e+=" svc-action-button--icon",this.props.disabled?i.createElement("span",{className:e},i.createElement(r.SvgIcon,{size:"auto",iconName:this.props.iconName})):i.createElement(i.Fragment,null,r.attachKey2click(i.createElement("span",{className:e,onClick:e=>{this.props.allowBubble||e.stopPropagation(),this.props.click()},title:this.props.title},i.createElement(r.SvgIcon,{size:"auto",iconName:this.props.iconName}))))}}r.ReactElementFactory.Instance.registerElement("svc-action-button",e=>i.createElement(C,e));class N extends i.Component{render(){return i.createElement("div",{className:"svc-carry-forward-panel-wrapper"},i.createElement("div",{className:"svc-carry-forward-panel"},i.createElement("span",null,this.props.text," "),i.createElement("span",{className:"svc-carry-forward-panel__link"},i.createElement(C,{click:()=>this.props.onClick(),text:this.props.actionText}))))}}r.ReactElementFactory.Instance.registerElement("svc-question-banner",e=>i.createElement(N,e));class S extends y{constructor(e){super(e)}createQuestionViewModel(e){return new n.QuestionDropdownAdornerViewModel(e.componentData,e.question,null)}get dropdownModel(){return this.model}get question(){return this.dropdownModel.question}renderElementPlaceholder(){const e=this.question.textStyle;return i.createElement("div",{className:"svc-question__dropdown-choices--wrapper"},i.createElement("div",null,i.createElement("div",{className:"svc-question__dropdown-choices"},(this.dropdownModel.getRenderedItems()||[]).map((t,n)=>i.createElement("div",{className:this.dropdownModel.getChoiceCss(),key:`editable_choice_${n}`},r.ReactSurveyElementsWrapper.wrapItemValue(this.question.survey,r.ReactElementFactory.Instance.createElement(this.dropdownModel.itemComponent,{key:t.value,question:this.question,cssClasses:this.question.cssClasses,isDisplayMode:!0,item:t,textStyle:e,index:n,isChecked:this.question.value===t.value}),this.question,t)))),this.dropdownModel.needToCollapse?r.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:this.dropdownModel.collapseAction}):null))}}r.ReactElementFactory.Instance.registerElement("svc-dropdown-question",e=>i.createElement(S,e));class x extends y{createQuestionViewModel(e){return new n.QuestionImageAdornerViewModel(e.componentData,e.question,null)}get imageModel(){return this.model}renderHeader(){return i.createElement(i.Fragment,null,i.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:this.imageModel.acceptedTypes,className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),super.renderHeader())}renderLoadingPlaceholder(){return i.createElement("div",{className:"svc-image-question__loading-placeholder"},i.createElement("div",{className:"svc-image-question__loading"},i.createElement(r.LoadingIndicatorComponent,null)))}renderChooseButton(){return i.createElement(r.SurveyActionBar,{model:this.imageModel.imageActionsContainer})}renderElementPlaceholder(){return this.imageModel.isUploading?this.renderLoadingPlaceholder():this.renderChooseButton()}getStateElements(){return[this.model,this.imageModel.filePresentationModel]}renderElementContent(){if(this.imageModel.isEmptyElement){const e=r.ReactQuestionFactory.Instance.createQuestion("file",{creator:this.imageModel.question.survey,isDisplayMode:!1,question:this.imageModel.filePresentationModel});return i.createElement(i.Fragment,null,e)}return i.createElement(i.Fragment,null,this.props.element,this.renderElementPlaceholder())}}r.ReactElementFactory.Instance.registerElement("svc-image-question",e=>i.createElement(x,e));class f extends p{createModel(e){this.modelValue=this.createQuestionViewModel(e)}createQuestionViewModel(e){return new n.QuestionRatingAdornerViewModel(e.componentData,e.question,null)}getUpdatedModelProps(){return["question","componentData"]}get ratingModel(){return this.model}get model(){return this.modelValue}getStateElement(){return this.model}renderElement(){const e=this.ratingModel;return i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-rating-question-content"},i.createElement(r.SurveyActionBar,{model:e.rateActionsContainer}),this.props.element))}}r.ReactElementFactory.Instance.registerElement("svc-rating-question",e=>i.createElement(f,e)),r.ReactElementFactory.Instance.registerElement("svc-rating-question-content",e=>i.createElement(f,e));class I extends y{createQuestionViewModel(e){return new n.QuestionAdornerViewModel(e.componentData,e.question,null)}get widgetModel(){return this.model}renderElementContent(){return i.createElement("div",{className:"svc-widget__content"},this.props.element)}}r.ReactElementFactory.Instance.registerElement("svc-widget-question",e=>i.createElement(I,e));class w extends p{createModel(e){this.model=new n.QuestionAdornerViewModel(e.componentData,e.question,null)}getStateElement(){return this.model}getUpdatedModelProps(){return["question","componentData"]}render(){return i.createElement(i.Fragment,null,i.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},i.createElement("div",{className:" svc-question__content--in-popup svc-question__content"},this.props.element)))}}r.ReactElementFactory.Instance.registerElement("svc-cell-question",e=>i.createElement(w,e));class R extends p{createModel(e){this.model=new n.QuestionAdornerViewModel(e.componentData,e.question,null)}getUpdatedModelProps(){return["question","componentData"]}getStateElement(){return this.model}render(){const e=this.props.question,t=this.props.question.textStyle;return i.createElement(i.Fragment,null,i.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},i.createElement("div",{className:" svc-question__content--in-popup svc-question__content"},this.props.element,i.createElement("div",{className:"svc-question__dropdown-choices"},e.visibleChoices.map((n,s)=>i.createElement("div",{className:"svc-question__dropdown-choice",key:`editable_choice_${s}`},r.ReactSurveyElementsWrapper.wrapItemValue(e.survey,r.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:n,textStyle:t,index:s,isChecked:e.value===n.value}),e,n)))))))}}r.ReactElementFactory.Instance.registerElement("svc-cell-dropdown-question",e=>i.createElement(R,e));class M extends p{createModel(e){this.model&&this.model.dispose(),this.model=new n.TranslationDropdownViewModel(e.question,e.componentData?e.componentData.translation:void 0)}getUpdatedModelProps(){return["question","componentData"]}getStateElement(){return this.model}componentWillUnmount(){super.componentWillUnmount(),this.model.dispose()}renderElement(){const e=this.props.question,t=this.props.question.textStyle;return i.createElement(i.Fragment,null,this.props.element,i.createElement("div",{className:"st-dropdown-choices--wrapper"},i.createElement("div",{className:"svc-question__dropdown-choices"},this.model.getRenderedItems().map((n,s)=>i.createElement("div",{className:this.model.getChoiceCss(),key:`translation_choice_${s}`},r.ReactElementFactory.Instance.createElement(this.model.itemComponent,{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:n,textStyle:t,index:s,isChecked:!1})))),this.model.needToCollapse?r.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:this.model.collapseAction}):null))}}r.ReactElementFactory.Instance.registerElement(n.translationDropdownComponentName,e=>i.createElement(M,e));const q=i.memo(({page:e,survey:t,creator:n})=>i.createElement(r.SurveyPage,{page:e,survey:t,creator:n}));q.displayName="PageElementContent";class D extends p{constructor(e){super(e),this.rootRef=i.createRef()}createModel(e){var t;this.model&&this.model.dispose(),this.model=this.createPageAdorner(e.creator,e.page),this.model.isGhost=this.props.isGhost,(null===(t=this.rootRef)||void 0===t?void 0:t.current)&&this.model.attachToUI(e.page,this.rootRef.current)}createPageAdorner(e,t){return new n.PageAdorner(e,t)}shouldComponentUpdate(e,t){const r=super.shouldComponentUpdate(e,t);return this.model&&(this.model.isGhost=this.props.isGhost),r}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.model.attachToUI(this.props.page,this.rootRef.current)}getUpdatedModelProps(){return["creator","page"]}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.attachToUI(this.props.page,this.rootRef.current),this.model.isGhost=this.props.isGhost}componentWillUnmount(){super.componentWillUnmount(),this.model.detachFromUI()}canRender(){return super.canRender()}renderElement(){return this.props.page?r.attachKey2click(i.createElement("div",{ref:this.rootRef,id:this.props.page.id,"data-sv-drop-target-survey-page":this.model.dropTargetName,className:"svc-page__content "+this.model.css,onClick:e=>this.model.select(this.model,new E(e)),onDoubleClick:e=>this.model.dblclick(e.nativeEvent),onMouseLeave:e=>this.model.hover(e.nativeEvent,e.currentTarget),onMouseOver:e=>this.model.hover(e.nativeEvent,e.currentTarget)},i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--top"}),i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--bottom"}),this.renderContent(),this.renderPlaceholder(),this.renderHeader(),this.renderFooter())):null}renderPlaceholder(){return this.model.showPlaceholder?i.createElement("div",{className:"svc-page__placeholder_frame"},i.createElement("div",{className:"svc-panel__placeholder_frame"},i.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText))):null}renderContent(){return this.model.needRenderContent?i.createElement(q,{page:this.props.page,survey:this.props.survey,creator:this.props.creator}):i.createElement("div",{className:"svc-page__loading-content"},i.createElement(r.LoadingIndicatorComponent,null))}renderHeader(){const e=i.createElement("div",{className:"svc-page__content-actions"},i.createElement(r.SurveyActionBar,{model:this.model.actionContainer}),this.model.topActionContainer.hasActions?i.createElement(r.SurveyActionBar,{model:this.model.topActionContainer}):null);return this.model.isGhost||!this.model.allowDragging?e:i.createElement("div",{className:"svc-question__drag-area",onPointerDown:e=>this.model.onPointerDown(e)},i.createElement(r.SvgIcon,{className:"svc-question__drag-element",size:"auto",iconName:"icon-drag-area-indicator_24x16"}),e)}renderFooter(){return i.createElement(r.SurveyActionBar,{model:this.model.footerActionsBar})}}r.ReactElementFactory.Instance.registerElement("svc-page",e=>i.createElement(D,e));class T extends r.SurveyElementBase{get model(){return this.item.data}get item(){return this.props.item}getStateElement(){return this.item}renderTypeSelector(){return i.createElement("div",{className:this.item.cssClasses.itemTypeSelector},r.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown",{item:this.model.questionTypeSelectorModel}))}renderElement(){return i.createElement(i.Fragment,null,r.attachKey2click(i.createElement("div",{className:this.item.getActionBarItemCss(),onClick:e=>{e.stopPropagation(),this.model.addNewQuestion(this.model,new E(e))},onMouseOver:e=>this.model.hoverStopper&&this.model.hoverStopper(e.nativeEvent,e.currentTarget)},i.createElement("span",{className:this.item.getActionBarItemTitleCss()},this.model.addNewQuestionText),this.renderTypeSelector())))}}r.ReactElementFactory.Instance.registerElement("svc-add-new-question-btn",e=>i.createElement(T,e));class F extends y{renderElementPlaceholder(){return this.model.isEmptyElement?i.createElement("div",{className:"svc-panel__placeholder_frame-wrapper"},i.createElement("div",{className:"svc-panel__placeholder_frame"},i.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText),this.model.showAddQuestionButton?i.createElement(r.SurveyActionBar,{model:this.model.addQuestionActionsContainer}):null)):null}disableTabStop(){return!0}createQuestionViewModel(e){return new n.PanelAdornerViewModel(e.componentData,e.question,null)}renderFooter(){return i.createElement(i.Fragment,null,!this.model.isEmptyElement&&this.model.element.isPanel&&this.model.showAddQuestionButton?i.createElement(r.SurveyActionBar,{model:this.model.addQuestionActionsContainer,handleClick:!1}):null,super.renderFooter())}}r.ReactElementFactory.Instance.registerElement("svc-panel",e=>i.createElement(F,e));class B extends p{constructor(e){super(e),this.rootRef=i.createRef()}createModel(e){let t=null;this.model&&(t=this.model.root),this.model=new n.LogoImageViewModel(e.data,t)}getUpdatedModelProps(){return["data"]}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.root=this.rootRef.current}renderButtons(){return i.createElement(r.SurveyActionBar,{model:this.model.actionsContainer})}renderImage(){return i.createElement("div",{className:this.model.containerCss},this.renderButtons(),i.createElement(r.LogoImage,{data:this.props.data.survey}))}renderPlaceHolder(){return this.model.allowEdit&&!this.model.isUploading?r.attachKey2click(i.createElement("div",{className:"svc-logo-image-placeholder",onClick:()=>this.model.chooseFile(this.model)},i.createElement("svg",null,i.createElement("use",{xlinkHref:"#icon-image-48x48"})))):null}renderInput(){return i.createElement("input",{"aria-hidden":"true",type:"file",tabIndex:-1,accept:this.model.acceptedTypes,className:"svc-choose-file-input"})}renderLoadingIndicator(){return i.createElement("div",{className:"svc-logo-image__loading"},i.createElement(r.LoadingIndicatorComponent,null))}render(){let e=null;return e=this.model.survey.locLogo.renderedHtml&&!this.model.isUploading?this.renderImage():this.model.isUploading?this.renderLoadingIndicator():this.renderPlaceHolder(),i.createElement("div",{ref:this.rootRef,className:"svc-logo-image"},this.renderInput(),e)}}r.ReactElementFactory.Instance.registerElement("svc-logo-image",e=>i.createElement(B,e));class k extends r.SurveyQuestionElementBase{get question(){return this.questionBase}renderClear(){const e=this.questionBase.showClear;return!this.questionBase.isReadOnly&&e?i.createElement(C,{classes:this.question.linkClearButtonCssClasses,click:()=>this.question.doClearClick(),text:n.editorLocalization.getString("pe.clear")}):null}renderElement(){return i.createElement(i.Fragment,null,i.createElement(C,{classes:this.question.linkSetButtonCssClasses,click:()=>this.question.doLinkClick(),selected:this.question.isSelected,disabled:!this.question.isClickable,text:this.question.linkValueText,title:this.question.tooltip,iconName:this.question.iconName}),this.renderClear())}}r.ReactQuestionFactory.Instance.registerQuestion("linkvalue",e=>i.createElement(k,e));class P extends r.SurveyQuestionElementBase{constructor(){super(...arguments),this.rootRef=i.createRef()}get embeddedSurvey(){const e=this.props.element||this.props.question;if(!e)return null;const t=e.embeddedSurvey;return t&&t.currentPage?t:null}get creator(){return this.props.creator}componentDidMount(){super.componentDidMount(),this.embeddedSurvey&&(this.embeddedSurvey.rootElement=this.rootRef.current)}render(){const e=this.embeddedSurvey;return e?i.createElement("div",{style:{display:"contents"},ref:this.rootRef},i.createElement(r.SurveyPage,{survey:e,page:e.currentPage,css:e.css,creator:this.creator})):null}}r.ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey",e=>i.createElement(P,e));class U extends i.Component{get survey(){return this.props.survey}createQuestionElement(e){return r.ReactQuestionFactory.Instance.createQuestion(!e.isDefaultRendering||e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})}questionTitleLocation(){return this.survey.questionTitleLocation}questionErrorLocation(){return this.survey.questionErrorLocation}renderError(e,t,r){return null}render(){const e=this.survey.getAllQuestions()[0];return i.createElement("div",{style:this.props.style},i.createElement(r.SurveyQuestion,{creator:this,element:e}))}}r.ReactElementFactory.Instance.registerElement("svc-question-editor-content",e=>i.createElement(U,e));class A extends p{constructor(e){super(e),this.onBlur=e=>{this.model.onFocusOut(e.nativeEvent)},this.rootRef=i.createRef()}createModel(e){this.model=new n.ItemValueWrapperViewModel(e.componentData.creator,e.question,e.item)}getUpdatedModelProps(){return["question","item"]}getStateElement(){return this.model}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.props.item.setRootElement(this.rootRef.current),e.item!==this.props.item&&e.item&&e.item.setRootElement(void 0)}componentDidMount(){super.componentDidMount(),this.props.item.setRootElement(this.rootRef.current)}componentWillUnmount(){super.componentWillUnmount(),this.props.item.setRootElement(void 0)}renderButton(e){return r.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:e})}render(){this.model.item=this.props.item;const e=this.model.allowAdd?this.renderButton(this.model.addAction):i.createElement(i.Fragment,null," ",this.model.isDraggable?i.createElement("span",{className:"svc-item-value-controls__drag"},i.createElement(r.SvgIcon,{className:"svc-item-value-controls__drag-icon",size:"auto",iconName:"icon-drag-24x24",title:this.model.dragTooltip})):null,this.model.allowRemove?this.renderButton(this.model.removeAction):null),t=this.props.element.key+(this.model.allowAdd?"_new":"");return i.createElement(i.Fragment,null,i.createElement("div",{ref:this.rootRef,className:"svc-item-value-wrapper"+(this.model.allowAdd?" svc-item-value--new":"")+(this.model.isDragging?" svc-item-value--dragging":"")+(this.model.isDragDropGhost?" svc-item-value--ghost":"")+(this.model.isDragDropMoveDown?" svc-item-value--movedown":"")+(this.model.isDragDropMoveUp?" svc-item-value--moveup":""),key:t,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:e=>this.model.onPointerDown(e)},i.createElement("div",{className:"svc-item-value__ghost"}),i.createElement("div",{className:"svc-item-value-controls",onBlur:this.onBlur},e),i.createElement("div",{className:"svc-item-value__item",onClick:e=>this.model.select(this.model,e.nativeEvent)},this.props.element),this.renderPanelAction()),this.renderPanel())}renderPanelAction(){if(!this.model.canShowPanel())return null;const e=this.renderButton(this.model.expandPanelAction);return i.createElement("div",{className:"svc-item-value-controls svc-choice-elements-button-container"},e)}renderPanel(){if(!this.model.renderedShowPanel)return null;const e=this.model.creator,t=e.survey;return i.createElement(L,{element:this.model.item.panel,survey:t,creator:e,css:t.getCss()})}}const L=i.memo(({element:e,survey:t,creator:n,css:s})=>i.createElement(r.SurveyPanel,{element:e,survey:t,creator:n,cssClasses:s}));L.displayName="ChoiceItemPanel",r.ReactElementFactory.Instance.registerElement("svc-item-value",e=>i.createElement(A,e));class V extends p{constructor(e){super(e),this.preventDragHandler=e=>{e.preventDefault()},this.rootRef=i.createRef()}createModel(e){this.model=new n.ImageItemValueWrapperViewModel(e.componentData.creator,e.question,e.item,null,null)}getUpdatedModelProps(){return["question","item"]}getStateElement(){return this.model}get question(){return this.props.question}componentDidMount(){super.componentDidMount(),this.model.itemsRoot=this.rootRef.current}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.model.itemsRoot=this.rootRef.current}renderLoadingIndicator(){return i.createElement("div",{className:"svc-image-item-value__loading"},i.createElement(r.LoadingIndicatorComponent,null))}renderNewItemControls(){const e=i.createElement(r.SurveyActionBar,{model:this.model.actionsContainer}),t=this.model.showPlaceholder?i.createElement("span",{className:"svc-image-item-value__placeholder"},this.model.placeholderText):null;return i.createElement(i.Fragment,null,t,e)}render(){this.model.item=this.props.item;const e=!this.props.question.isItemInList(this.props.item);this.model.isNew=e;const t=this.model.getIsNewItemSingle()?null:{width:this.question.renderedImageWidth,height:this.question.renderedImageHeight};let n=null;return n=e||this.model.isUploading?i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-image-item-value__item"},i.createElement("div",{className:"sd-imagepicker__item sd-imagepicker__item--inline"},i.createElement("label",{className:"sd-imagepicker__label"},i.createElement("div",{style:t,className:"sd-imagepicker__image"},this.model.isUploading?this.renderLoadingIndicator():null)))),this.model.allowAdd&&!this.model.isUploading?i.createElement("div",{className:"svc-image-item-value-controls"},this.renderNewItemControls()):null):i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-image-item-value__item"},this.props.element),this.model.canRenderControls?i.createElement(r.SurveyActionBar,{model:this.model.topActionsContainer}):null),i.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),key:this.props.element.key,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:e=>this.model.onPointerDown(e),onDragStart:this.preventDragHandler,onDrop:this.model.onDrop,onDragEnter:this.model.onDragEnter,onDragOver:this.model.onDragOver,onDragLeave:this.model.onDragLeave},i.createElement("div",{className:"svc-image-item-value-wrapper__ghost",style:t}),i.createElement("div",{className:"svc-image-item-value-wrapper__content"},i.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:this.model.acceptedTypes,className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),n))}}class Q extends r.SurveyElementBase{renderElement(){return i.createElement("span",{className:this.props.item.getActionBarItemCss(),onPointerDown:e=>this.props.item.data.model.onPointerDown(e)},i.createElement(r.SvgIcon,{size:"auto",iconName:this.props.item.iconName,className:this.props.item.cssClasses.itemIcon}))}}r.ReactElementFactory.Instance.registerElement("svc-image-item-drag-action",e=>i.createElement(Q,e)),r.ReactElementFactory.Instance.registerElement("svc-image-item-value",e=>i.createElement(V,e));class H extends p{createModel(e){var t;const r=e.componentData;let s=!1;this.model&&(s=this.model.isSelected),this.model=new n.MatrixCellWrapperViewModel(r.creator,r.element,r.question,r.row,r.column||(null===(t=r.element.cell)||void 0===t?void 0:t.column)),this.model.isSelected=s}getUpdatedModelProps(){return["componentData"]}componentDidUpdate(e,t){var r,n;super.componentDidUpdate(e,t);const s=this.props.componentData;this.model.templateData=s.element,this.model.row=s.row,this.model.column=s.column||(null===(n=null===(r=s.element)||void 0===r?void 0:r.cell)||void 0===n?void 0:n.column),this.model.question=s.question}getStateElement(){return this.model}render(){let e=null;return this.model.isSupportCellEditor&&(e=i.createElement("div",{className:"svc-matrix-cell__question-controls"},r.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:this.model.editAction}))),i.createElement("div",{className:"svc-matrix-cell",tabIndex:-1,key:this.props.element.key,onClick:e=>!this.props.question&&this.model.selectContext(this.model,e),onMouseOut:e=>this.model.hover(e.nativeEvent,e.currentTarget),onMouseOver:e=>this.model.hover(e.nativeEvent,e.currentTarget)},i.createElement("div",{className:"svc-matrix-cell--selected"+(this.model.isSelected?" svc-visible":"")}),this.props.element,e)}}r.ReactElementFactory.Instance.registerElement("svc-matrix-cell",e=>i.createElement(H,e));class W extends p{createModel(e){this.props.survey&&(this.model=new n.SurveyResultsModel(e.survey))}getUpdatedModelProps(){return["survey"]}getStateElement(){return this.model}render(){return this.model?i.createElement("div",{className:"svd-test-results"},i.createElement("div",{className:"svd-test-results__content"},i.createElement("div",{className:"svd-test-results__header"},i.createElement("div",{className:"svd-test-results__header-text"},this.model.surveyResultsText),i.createElement("div",{className:"svd-test-results__header-types"},i.createElement(C,{click:()=>this.model.selectTableClick(),text:this.model.surveyResultsTableText,selected:this.model.isTableSelected,disabled:!1}),i.createElement(C,{click:()=>this.model.selectJsonClick(),text:this.model.surveyResultsJsonText,selected:this.model.isJsonSelected,disabled:!1}))),this.renderResultAsText(),this.renderResultAsTable())):null}renderResultAsText(){return"text"!==this.model.resultViewType?null:i.createElement("div",{className:"svd-test-results__text svd-light-bg-color"},i.createElement("div",null,this.model.resultText))}renderResultAsTable(){return"table"!==this.model.resultViewType?null:i.createElement("div",{className:"svd-test-results__table svd-light-bg-color"},i.createElement("table",null,i.createElement("thead",null,i.createElement("tr",{className:"svd-light-background-color"},i.createElement("th",{key:1,className:"svd-dark-border-color"},this.model.resultsTitle),i.createElement("th",{key:2,className:"svd-dark-border-color"},this.model.resultsDisplayValue))),i.createElement("tbody",null,W.renderRows(this.model.resultData))))}static renderRows(e){const t=[];for(var r=0;r<e.length;r++)t.push(i.createElement(O,{key:r+1,row:e[r]}));return t}}class O extends p{get row(){return this.props.row}getStateElement(){return this.row}render(){return i.createElement(i.Fragment,null,r.attachKey2click(i.createElement("tr",{onClick:()=>this.row.toggle()},i.createElement("td",{key:1,style:{paddingLeft:this.row.textMargin},className:"svd-dark-border-color"},this.row.isNode?i.createElement("span",{style:{left:this.row.markerMargin},className:"svd-test-results__marker "+(this.row.collapsed?"":"svd-test-results__marker--expanded")},i.createElement(r.SvgIcon,{iconName:"icon-expand_16x16",size:16})):null,this.row.question?i.createElement(r.SurveyLocStringViewer,{model:this.row.question.locTitle}):i.createElement("span",null,this.row.title)),i.createElement("td",{key:2,className:this.row.isNode?"svd-test-results__node-value":"svd-dark-border-color"},this.row.getString(this.row.displayValue)))),this.row.isNode&&!this.row.collapsed?W.renderRows(this.row.data):null)}}class j extends p{constructor(e){super(e),this.rootRef=i.createRef()}createModel(e){this.model=new n.ToolboxToolViewModel(e.item,e.creator,e.parentModel)}getUpdatedModelProps(){return["creator","item"]}get item(){return this.props.item}get creator(){return this.props.creator}get isCompact(){return this.props.isCompact}getStateElement(){return this.item}render(){const e=this.item,t=r.ReactElementFactory.Instance.createElement(this.model.itemComponent,{item:e,creator:this.creator,parentModel:this.creator.toolbox,model:this.model,isCompact:this.isCompact});return i.createElement("div",{className:e.css,key:e.id,ref:this.rootRef},e.needSeparator&&!this.creator.toolbox.showCategoryTitles?i.createElement("div",{className:"svc-toolbox__category-separator"}):null,i.createElement("div",{className:"svc-toolbox__tool-content",onPointerDown:e=>{e.persist(),this.model.onPointerDown(e)}},t))}componentWillUnmount(){super.componentWillUnmount(),this.item.updateModeCallback=void 0}componentDidMount(){super.componentDidMount(),this.item.updateModeCallback=(e,t)=>{queueMicrotask(()=>{l.flushSync?l.flushSync(()=>{this.item.mode=e}):this.item.mode=e,queueMicrotask(()=>{t(e,this.rootRef.current)})})},this.item.afterRender()}}class K extends p{constructor(e){super(e)}getUpdatedModelProps(){return["creator","item"]}get item(){return this.props.item}get creator(){return this.props.creator}get model(){return this.props.model}getStateElement(){return this.model}render(){const e=this.props.isCompact?i.createElement("span",{className:"svc-toolbox__item-banner",onClick:e=>{e.persist(),this.model.click(e)}},i.createElement(r.SvgIcon,{size:"auto",iconName:this.item.iconName,className:"svc-toolbox__item-icon",title:this.item.getTooltip()}),i.createElement("span",null,this.item.title)):null,t=r.attachKey2click(i.createElement("div",{className:this.item.renderedCss,tabIndex:0,role:"button","aria-label":this.item.getTooltip(),onClick:e=>{e.persist(),this.model.click(e)}},i.createElement("span",{className:"svc-toolbox__item-container"},this.item.iconName?i.createElement(r.SvgIcon,{size:"auto",iconName:this.item.iconName,className:"svc-toolbox__item-icon"}):null),this.props.isCompact?null:i.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)),void 0,{disableTabStop:!this.model.toolboxItem.enabled});return i.createElement(i.Fragment,null,t,e)}}r.ReactElementFactory.Instance.registerElement("svc-toolbox-item",e=>t.createElement(K,e));class z extends p{constructor(e){super(e)}getUpdatedModelProps(){return["creator","item"]}get item(){return this.props.item}get model(){return this.props.model}get creator(){return this.props.creator}get isCompact(){return this.props.isCompact}get parentModel(){return this.props.parentModel}getStateElement(){return this.item}render(){return i.createElement(i.Fragment,null,i.createElement(K,{item:this.item,creator:this.creator,model:this.model,parentModel:this.parentModel,isCompact:this.isCompact}),i.createElement("div",{className:"svc-toolbox__item-submenu-button",onMouseOver:e=>this.model.onMouseOver(this.item,e),onMouseLeave:e=>this.model.onMouseLeave(this.item,e)},i.createElement(r.SvgIcon,{size:"auto",iconName:this.item.subitemsButtonIcon}),i.createElement(r.Popup,{model:this.item.popupModel})))}}r.ReactElementFactory.Instance.registerElement("svc-toolbox-item-group",e=>i.createElement(z,e));class G extends r.SurveyElementBase{get category(){return this.props.category}get toolbox(){return this.props.toolbox}get class(){return"svc-toolbox__category"+(this.category.collapsed?" svc-toolbox__category--collapsed":"")+(this.category.empty?" svc-toolbox__category--empty":"")}getStateElement(){return this.category}render(){const e=this.renderCategoryHeader(),t=this.renderCategoryContent();return i.createElement("div",{className:this.class,key:this.category.name},i.createElement("div",{className:"svc-toolbox__category-header-wrapper"},e),t)}renderCategoryHeader(){let e="svc-toolbox__category-header";this.toolbox.canCollapseCategories&&(e+=" svc-toolbox__category-header--collapsed");const t=this.renderLocString(this.category.locTitle);return r.attachKey2click(i.createElement("div",{className:e,onClick:e=>this.category.toggleState()},i.createElement("span",{className:"svc-toolbox__category-title"},t),this.renderButton()))}renderButton(){if(!this.toolbox.canCollapseCategories)return null;const e=this.category.iconName;return i.createElement("div",{className:"svc-toolbox__category-header__controls"},i.createElement(r.SvgIcon,{className:this.category.iconClassName,iconName:e,size:"auto"}))}renderCategoryContent(){return this.renderItems(this.category.items)}renderItems(e,t=!1){return e.map((e,r)=>i.createElement(j,{item:e,creator:this.toolbox.creator,parentModel:this.toolbox,isCompact:t,key:"item"+r}))}}r.ReactElementFactory.Instance.registerElement("svc-toolbox-category",e=>i.createElement(G,e));class J extends r.SurveyElementBase{constructor(e){super(e)}get model(){return this.props.model}get creator(){return this.props.creator}getStateElement(){return this.model}render(){if(!this.model||!this.model.renderElements)return null;const e=this.renderItems();return i.createElement("div",{className:this.model.cssClasses.root},e)}renderItems(){return this.model.renderedActions.map((e,t)=>i.createElement(j,{item:e,creator:this.creator,parentModel:this.model,isCompact:!1,key:"item"+t}))}}r.ReactElementFactory.Instance.registerElement("svc-toolbox-list",e=>i.createElement(J,e));class X extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}constructor(e){super(e),this.state={filterString:this.model.filterString||""}}renderElement(){if(!this.model.isVisible)return null;return i.createElement("div",{className:"svc-search"},i.createElement("div",{className:"svc-search__search-icon"},i.createElement(r.SvgIcon,{iconName:"icon-search",size:"auto"})),i.createElement("input",{type:"text",className:"svc-search__input","aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onChange:e=>{const t=e.target,r=(null==t?void 0:t.getRootNode())||o.settings.environment.root;(r instanceof Document||r instanceof ShadowRoot)&&t===r.activeElement&&(this.model.filterString=t.value)},tabIndex:this.model.getTabIndex()}),i.createElement("div",{className:"svc-search__toolbar"},i.createElement("div",{className:"svc-search__toolbar-counter"},this.model.matchCounterText),i.createElement(r.SurveyActionBar,{model:this.model.searchActionBar})))}}r.ReactElementFactory.Instance.registerElement("svc-search",e=>i.createElement(X,e));class Y extends r.SurveyElementBase{constructor(e){super(e),this.rootRef=i.createRef()}componentDidUpdate(e,t){super.componentDidUpdate(e,t);const r=this.rootRef.current;r&&this.toolbox.afterRender(r)}componentDidMount(){super.componentDidMount();const e=this.rootRef.current;e&&this.toolbox.afterRender(e)}componentWillUnmount(){this.toolbox.beforeDestroy(),super.componentWillUnmount()}get creator(){return this.props.model}get toolbox(){return this.creator.toolbox}getStateElement(){return this.toolbox}renderItems(e,t=!1){return e.map((e,r)=>i.createElement(j,{item:e,creator:this.creator,parentModel:this.toolbox,isCompact:t,key:e.renderedId}))}renderCategories(){return this.toolbox.categories.map((e,t)=>r.ReactElementFactory.Instance.createElement("svc-toolbox-category",{category:e,toolbox:this.toolbox,key:"category"+t}))}renderSearch(){const e=this.toolbox.isCompactRendered?i.createElement(i.Fragment,null,i.createElement(j,{item:this.toolbox.searchItem,creator:this.creator,parentModel:this.toolbox,isCompact:this.toolbox.isCompactRendered,key:"searchitem"})):null;return i.createElement("div",{className:"svc-toolbox__search-container"},e,i.createElement(X,{model:this.toolbox.searchManager}),i.createElement("div",{className:"svc-toolbox__category-separator svc-toolbox__category-separator--search"}))}render(){const e=this.toolbox.showSearch?this.renderSearch():null,t=this.toolbox.showPlaceholder?i.createElement("div",{className:"svc-toolbox__placeholder"},this.toolbox.toolboxNoResultsFound):null;return i.createElement("div",{ref:this.rootRef,className:this.toolbox.classNames,style:this.toolbox.getRootStyle()},i.createElement("div",{onBlur:e=>this.toolbox.focusOut(e),className:"svc-toolbox__panel"},e,t,i.createElement(r.Scroll,null,this.toolbox.showInSingleCategory?i.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.renderedActions,this.toolbox.isCompactRendered)):this.renderCategories())))}}r.ReactElementFactory.Instance.registerElement("svc-toolbox",e=>i.createElement(Y,e));class Z extends r.SurveyElementBase{constructor(){super(...arguments),this.onPropChangedHandler=(e,t)=>{if(this.isRendering)return;const r=["showProgressBar","progressBarType","currentPageValue"];if(!(r.indexOf(t.name)<0)){for(var n={},s=0;s<r.length;s++){var o=r[s];n[o]=this.survey[o]}this.setState(n)}}}componentDidMount(){super.componentDidMount(),this.setHandler()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.setHandler()}setHandler(){this.survey&&!this.survey.onPropertyChanged.hasFunc(this.onPropChangedHandler)&&this.survey.onPropertyChanged.add(this.onPropChangedHandler)}componentWillUnmount(){super.componentWillUnmount(),this.survey&&this.survey.onPropertyChanged.remove(this.onPropChangedHandler)}get survey(){return this.props.survey}get location(){return this.props.location}get isTop(){return"top"==this.location}canRender(){return this.isTop?this.survey.isShowProgressBarOnTop:this.survey.isShowProgressBarOnBottom}renderElement(){return r.ReactElementFactory.Instance.createElement(this.survey.getProgressTypeComponent(),{survey:this.survey,css:this.survey.css,isTop:this.isTop})}}class $ extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.props.model}renderElement(){if(!this.props.model.visible)return null;const e=r.ReactElementFactory.Instance.createElement(this.props.model.component||"sv-action-bar-item",{item:this.props.model});return i.createElement("div",{className:"svc-sidebar-tabs__item"},e)}}class ee extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.props.model}canRender(){return!!this.props.model&&super.canRender()}renderElement(){return i.createElement("div",{className:this.props.model.sideBarClassName},i.createElement("div",{className:"svc-sidebar-tabs__top-container"},i.createElement("div",{className:"svc-sidebar-tabs__collapse-button"},i.createElement($,{model:this.props.model.expandCollapseAction})),i.createElement("div",{className:"svc-sidebar-tabs__separator"},i.createElement("div",null)),i.createElement(r.Scroll,null,i.createElement("div",{className:"svc-sidebar-tabs__items"},i.createElement(te,{model:this.props.model.topToolbar})))),i.createElement("div",{className:"svc-sidebar-tabs__bottom-container"},i.createElement("div",{className:"svc-sidebar-tabs__items"},i.createElement(r.SurveyActionBar,{model:this.props.model.bottomToolbar}))))}}r.ReactElementFactory.Instance.registerElement("svc-tab-control",e=>i.createElement(ee,e));class te extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.props.model}renderElement(){return i.createElement(i.Fragment,null,this.props.model.actions.map((e,t)=>i.createElement($,{model:e,key:"item"+t})))}}class re extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}renderElement(){const e=this.model.title?i.createElement("div",{className:"svc-side-bar__container-title"},this.model.title):null;return i.createElement("div",{className:"svc-side-bar__container-header"},i.createElement("div",{className:"svc-side-bar__container-actions"},i.createElement(r.SurveyActionBar,{model:this.model.toolbar})),e)}}r.ReactElementFactory.Instance.registerElement("svc-side-bar-default-header",e=>i.createElement(re,e));class ne extends r.SurveyElementBase{get objectSelectionAction(){return this.props.model}getStateElement(){return this.objectSelectionAction}renderElement(){const e=r.attachKey2click(i.createElement("div",{className:this.objectSelectionAction.getActionBarItemCss()+" svc-sidebar__header-object-selector",onClick:()=>this.objectSelectionAction.action()},i.createElement("div",{className:"svc-sidebar__header-caption"},i.createElement("span",{className:"svc-sidebar__header-title"},this.objectSelectionAction.title),i.createElement("span",{className:"svc-sidebar__header-subtitle"},this.objectSelectionAction.tooltip))),this.props.model);return i.createElement("div",{className:"svc-sidebar__header svc-sidebar__header--tabbed"},i.createElement("div",{className:"svc-sidebar__header-container svc-sidebar__header-container--with-subtitle"},i.createElement("div",{className:"svc-sidebar__header-content"},e,i.createElement(r.Popup,{model:this.objectSelectionAction.popupModel}))))}}r.ReactElementFactory.Instance.registerElement("svc-side-bar-property-grid-header",e=>i.createElement(ne,e));class se extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}renderElement(){return i.createElement("div",{className:"svc-side-bar__container-header svc-sidebar__header-container"},this.model.subTitle?i.createElement("div",{className:"svc-sidebar__header-caption"},i.createElement("span",{className:"svc-sidebar__header-title"},this.model.title),i.createElement("span",{className:"svc-sidebar__header-subtitle"},this.model.subTitle)):i.createElement("div",{className:"svc-side-bar__container-title"},this.model.title))}}r.ReactElementFactory.Instance.registerElement("svc-side-bar-header",e=>i.createElement(se,e));class oe extends r.SurveyElementBase{get model(){return this.props.model}constructor(e){super(e),this.containerRef=i.createRef()}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.initResizeManager(this.containerRef.current)}componentWillUnmount(){super.componentWillUnmount(),this.model.resetResizeManager()}canRender(){return!!this.model&&super.canRender()}renderElement(){const e={display:this.model.renderRoot?"":"none"},t={display:this.model.renderContainer?"":"none"},n=this.model.pages.map(e=>i.createElement(ae,{page:e,key:e.id})),s=r.ReactElementFactory.Instance.createElement(this.model.header.component,{model:this.model.header.componentModel});let o=null;return this.model.sideAreaComponentName&&(o=r.ReactElementFactory.Instance.createElement(this.model.sideAreaComponentName,{model:this.model.sideAreaComponentData})),i.createElement("div",{className:this.model.rootCss,style:e},i.createElement("div",{className:"svc-side-bar__shadow",onClick:()=>this.model.collapseSidebar(),style:t}),i.createElement("div",{className:"svc-flex-row svc-side-bar__wrapper"},i.createElement("div",{className:"svc-side-bar__container-wrapper",style:t},i.createElement("div",{ref:this.containerRef,className:"svc-side-bar__container"},s,i.createElement("div",{className:"svc-side-bar__container-content"},n))),o))}}class ae extends r.SurveyElementBase{get page(){return this.props.page}getStateElement(){return this.page}renderElement(){if(!this.page.visible)return null;return r.ReactElementFactory.Instance.createElement(this.page.componentName,{model:this.page.componentData})}}r.ReactQuestionFactory.Instance.registerQuestion("svc-side-bar-page",e=>i.createElement(ae,e)),r.ReactElementFactory.Instance.registerElement("svc-side-bar",e=>i.createElement(oe,e));class ie extends i.Component{render(){const e=this.props.model;return e?i.createElement("div",{className:"spg-launch"},i.createElement("button",{className:"spg-launch__card",onClick:e.onClick},i.createElement("div",{className:"spg-launch__container"},i.createElement("div",{className:"spg-launch__text"},e.title),i.createElement("div",{className:"spg-launch__text2"},e.description)),i.createElement("div",{className:"spg-launch__icon"},i.createElement("div",{className:"spg-launch__chevron-right-16-x-16"},i.createElement("div",{className:"spg-launch__icon2"},i.createElement(r.SvgIcon,{size:"auto",iconName:"chevrondown-24x24"})))))):null}}r.ReactElementFactory.Instance.registerElement("svc-side-bar-launch-card",e=>i.createElement(ie,e));class le extends i.Component{render(){return i.createElement("div",{className:"sd-translation-line-skeleton"})}}r.ReactElementFactory.Instance.registerElement("sd-translation-line-skeleton",e=>i.createElement(le,e));class ce extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}renderElement(){const e=this.item;return i.createElement("div",{className:e.data.containerCss},i.createElement("span",{className:e.data.additionalTitleCss},e.data.additionalTitle),r.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown",{item:this.item}))}}r.ReactElementFactory.Instance.registerElement("svc-translate-from-action",e=>i.createElement(ce,e));class me extends p{constructor(e){var t;super(e),this.onChangedHandler=(e,t)=>{this.setState({changed:this.state&&this.state.changed?this.state.changed+1:1})},this.onBlur=e=>(this.svStringEditorRef.current&&(this.svStringEditorRef.current.spellcheck=!1),this.locString.__isEditing=!1,this.justFocused=!1,this.baseModel.onBlur(e.nativeEvent),this.baseModel.errorText),this.onCompositionStart=e=>{this.baseModel.onCompositionStart(e.nativeEvent)},this.onCompositionEnd=e=>{this.baseModel.onCompositionEnd(e.nativeEvent)},this.onBeforeInput=e=>{this.baseModel.onBeforeInput(e)},this.onInput=e=>{this.baseModel.onInput(e.nativeEvent)},this.onPaste=e=>{this.baseModel.onPaste(e.nativeEvent)},this.justFocused=!1,this.onFocus=e=>{this.baseModel.onFocus(e.nativeEvent),this.justFocused=!0},this.onKeyDown=e=>this.baseModel.onKeyDown(e.nativeEvent),this.onKeyUp=e=>this.baseModel.onKeyUp(e.nativeEvent),this.onMouseUp=e=>this.baseModel.onMouseUp(e.nativeEvent),this.done=e=>{this.baseModel.done(e),this.locString.__isEditing=!1},this.edit=e=>{this.svStringEditorRef.current.focus(),this.locString.__isEditing=!0,this.baseModel.onClick(e)},this.htmlValue={__html:null===(t=this.locString)||void 0===t?void 0:t.renderedHtml},this.state={changed:0},this.svStringEditorRef=i.createRef()}createModel(e){this.baseModel&&this.baseModel.dispose(),this.baseModel=new n.StringEditorViewModelBase(this.locString,this.creator)}getUpdatedModelProps(){return["creator","locString"]}get locString(){return this.props.model.locStr}get creator(){return this.props.model.creator}get style(){return this.props.style}getStateElement(){return this.baseModel}get errorText(){return this.baseModel.errorText}componentDidMount(){super.componentDidMount(),this.locString&&(this.baseModel.setLocString(this.locString),this.baseModel.getEditorElement=()=>this.svStringEditorRef.current,this.baseModel.blurEditor=()=>{this.svStringEditorRef.current.blur(),this.svStringEditorRef.current.spellcheck=!1},this.baseModel.afterRender(),this.locString.onStringChanged.add(this.onChangedHandler),this.locString.__isEditing&&this.svStringEditorRef.current.focus())}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.baseModel.setLocString(this.locString),this.baseModel.afterRender(),this.locString.onStringChanged.add(this.onChangedHandler)}componentWillUnmount(){super.componentWillUnmount(),this.baseModel.detachFromUI(),this.locString&&this.locString.onStringChanged.remove(this.onChangedHandler)}get placeholder(){return this.baseModel.placeholder}get contentEditable(){return this.baseModel.contentEditable}get className(){return this.baseModel.className(this.locString.renderedHtml)}render(){if(!this.locString)return null;let e=null;this.locString.hasHtml?(this.htmlValue.__html!==this.locString.renderedHtml&&(this.htmlValue={__html:this.locString.renderedHtml}),e=i.createElement("span",{role:"textbox",ref:this.svStringEditorRef,className:"sv-string-editor sv-string-editor--html",contentEditable:this.contentEditable,spellCheck:!1,"aria-placeholder":this.placeholder,"aria-label":this.placeholder||"content editable",suppressContentEditableWarning:!0,tabIndex:this.baseModel.tabIndex,dangerouslySetInnerHTML:this.htmlValue,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onClick:this.edit})):e=i.createElement("span",{role:"textbox",ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,tabIndex:this.baseModel.tabIndex,spellCheck:!1,"aria-placeholder":this.placeholder,"aria-label":this.placeholder||"content editable",suppressContentEditableWarning:!0,key:this.locString.renderedHtml,onBlur:this.onBlur,onBeforeInput:this.onBeforeInput,onInput:this.onInput,onPaste:this.onPaste,onCompositionStart:this.onCompositionStart,onCompositionEnd:this.onCompositionEnd,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onMouseUp:this.onMouseUp,onClick:this.edit},this.locString.renderedHtml);const t=this.baseModel.showCharacterCounter?i.createElement(r.CharacterCounterComponent,{counter:this.baseModel.characterCounter,remainingCharacterCounter:this.baseModel.getCharacterCounterClass}):null;return i.createElement("span",{className:this.className},i.createElement("span",{className:"svc-string-editor__content"},i.createElement("div",{className:"svc-string-editor__border svc-string-editor__border--hover",onClick:this.edit}),i.createElement("div",{className:"svc-string-editor__border svc-string-editor__border--focus",onClick:this.edit}),i.createElement("span",{className:"svc-string-editor__input"},e,i.createElement("div",{className:"svc-string-editor__controls",onClick:this.edit}),t)),this.errorText?i.createElement("span",{className:"svc-string-editor__error"},this.errorText):"")}}r.ReactElementFactory.Instance.registerElement(n.editableStringRendererName,e=>i.createElement(me,e));class de extends i.Component{render(){return i.createElement("div",null,i.createElement(r.SvgIcon,{"aria-hidden":"true",iconName:"icon-alert_24x24",size:"auto",className:this.props.cssClasses.error.icon}),i.createElement("span",{className:this.props.cssClasses.error.item||void 0},i.createElement(r.SurveyLocStringViewer,{model:this.props.error.locText})))}}r.ReactElementFactory.Instance.registerElement("svc-question-error",e=>i.createElement(de,e));class ue extends r.SurveyQuestionDropdown{constructor(e){super(e)}renderInput(){const e=this.question;n.initLogicOperator(e);const t=e.locReadOnlyText?this.renderLocString(e.locReadOnlyText):"",r=this.question.dropdownListModel;return i.createElement("div",{id:this.question.inputId,className:e.getControlClass(),tabIndex:this.question.isInputReadOnly?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onKeyUp:this.keyhandler,role:r.ariaQuestionRole,"aria-required":r.ariaQuestionRequired,"aria-invalid":r.ariaQuestionInvalid,"aria-errormessage":r.ariaQuestionErrorMessage,"aria-expanded":r.ariaQuestionExpanded,"aria-label":r.ariaQuestionLabel,"aria-labelledby":r.ariaQuestionLabelledby,"aria-controls":r.ariaQuestionControls},i.createElement("div",{className:this.question.cssClasses.controlValue},t))}renderEditorButtons(){return null}}r.ReactQuestionFactory.Instance.registerQuestion("sv-logic-operator",e=>i.createElement(ue,e)),o.RendererFactory.Instance.registerRenderer("dropdown","logicoperator","sv-logic-operator");class he extends p{constructor(e){super(e),this.containerRef=i.createRef()}createModel(e){this.model&&this.model.dispose(),this.model=new n.PageNavigatorViewModel(e.pagesController,e.pageEditMode)}getUpdatedModelProps(){return["pagesController","pageEditMode"]}getStateElement(){return this.model}componentDidMount(){super.componentDidMount();const e=this.containerRef.current;this.model.attachToUI(e)}componentWillUnmount(){super.componentWillUnmount(),this.model.stopItemsContainerHeightObserver(),this.model.setScrollableContainer(void 0)}renderElement(){return i.createElement("div",{className:"svc-page-navigator",ref:this.containerRef,style:{display:this.model.visible?"flex":"none"}},i.createElement("div",null,r.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown",{item:this.model.selectorAction})),i.createElement("div",null,this.model.visibleItems.map(e=>i.createElement(pe,{key:e.id,item:e}))))}}class pe extends p{getStateElement(){return this.props.item}renderElement(){const e=this.props.item;let t="svc-page-navigator-item-content";return o.unwrap(e.active)&&(t+=" svc-page-navigator-item--selected"),o.unwrap(e.disabled)&&(t+=" svc-page-navigator-item--disabled"),i.createElement("div",{className:"svc-page-navigator-item"},r.attachKey2click(i.createElement("div",{role:"button",className:t,onClick:t=>{e.action(e),t.stopPropagation()}},i.createElement("div",{className:"svc-page-navigator-item__dot",title:e.title},i.createElement("div",{className:"svc-page-navigator-item__dot-content"})),i.createElement("div",{className:"svc-page-navigator-item__banner"},i.createElement("span",{className:"svc-page-navigator-item__text"},e.title),i.createElement("span",{className:"svc-page-navigator-item__dot"},i.createElement("span",{className:"svc-page-navigator-item__dot-content"}))))))}}class ve extends i.Component{constructor(e){super(e)}render(){return i.createElement("div",{className:"svc-surface-placeholder"},i.createElement("div",{className:"svc-surface-placeholder__image svc-surface-placeholder__image--"+this.props.name}),i.createElement("div",{className:"svc-surface-placeholder__text"},i.createElement("div",{className:"svc-surface-placeholder__title"},this.props.placeholderTitleText),i.createElement("div",{className:"svc-surface-placeholder__description"},this.props.placeholderDescriptionText)))}}r.ReactElementFactory.Instance.registerElement("svc-surface-placeholder",e=>i.createElement(ve,e));class Ee extends r.SurveyElementBase{constructor(){super(...arguments),this.denyUpdate=()=>{this.denyComponentUpdate()},this.allowUpdate=()=>{this.allowComponentUpdate()},this.addDragDropEvents=()=>{this.creator.onDragStart.add(this.denyUpdate),this.creator.onDragClear.add(this.allowUpdate)},this.clearDragDropEvents=()=>{this.creator.onDragStart.remove(this.denyUpdate),this.creator.onDragClear.remove(this.allowUpdate)}}get model(){return this.props.data}get creator(){return this.model.creator}componentDidMount(){super.componentDidMount(),this.addDragDropEvents()}componentWillUnmount(){super.componentWillUnmount(),this.clearDragDropEvents(),super.componentWillUnmount()}getStateElements(){return[this.model,this.model.survey,this.model.pagesController]}getRenderedPages(){const e=[];if("bypage"!==this.creator.pageEditMode){this.model.pages.forEach(t=>{e.push(this.createRenderedPage(t,"svc-page",t==this.model.newPage))})}else{const t=this.model.pagesController.page2Display;t&&e.push(this.createRenderedPage(t,"svc-page",this.model.newPage===t))}return e}createRenderedPage(e,t,r){return i.createElement(ge,{key:null==e?void 0:e.id,page:e,isGhost:r,creator:this.creator,className:t})}renderElement(){const e="svc-tab-designer "+this.model.getRootCss();return i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-flex-column"},this.model.isToolboxVisible?r.ReactElementFactory.Instance.createElement("svc-toolbox",{model:this.creator}):null),i.createElement("div",{className:e,onClick:()=>this.model.clickDesigner()},i.createElement(r.Scroll,null,i.createElement("div",{className:"svc-tab-designer_content"},this.model.showPlaceholder?this.renderPlaceHolder():this.renderTabContent()))))}renderHeader(e){if(!e)return null;const t=this.creator.survey;return i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-designer-header"},i.createElement(r.SurveyHeader,{survey:t})))}renderPlaceHolder(){const e=this.renderHeader(this.creator.showSurveyHeader&&this.creator.showHeaderInEmptySurvey);return i.createElement(i.Fragment,null,e,i.createElement("div",{className:"svc-designer__placeholder-container","data-sv-drop-target-survey-element":"newGhostPage"},this.renderPlaceHolderContent(),this.createRenderedPage(this.model.newPage,"svc-designer-placeholder-page",!0)))}renderPlaceHolderContent(){return i.createElement(ve,{name:"designer",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})}renderTabContent(){const e=this.creator.survey,t=this.renderHeader(this.creator.showSurveyHeader),r={...this.model.surfaceCssVariables};r.maxWidth=e.renderedWidth;const n=this.renderTabTools();return i.createElement(i.Fragment,null,i.createElement("div",{className:this.model.designerCss,style:r},t,this.getRenderedPages()),n)}renderTabTools(){if(!this.model.showSurfaceTools)return null;const e=this.creator.showPageNavigator?i.createElement("div",{className:"svc-tab-designer__page-navigator"},i.createElement(he,{pagesController:this.model.pagesController,pageEditMode:this.model.creator.pageEditMode})):null,t=this.model.showSurfaceToolbar?i.createElement(r.SurveyActionBar,{model:this.model.surfaceToolbar,handleClick:!1}):null;return i.createElement("div",{className:"svc-tab-designer__tools"},e,t)}}r.ReactElementFactory.Instance.registerElement("svc-tab-designer",e=>i.createElement(Ee,e));class ge extends i.Component{constructor(e){super(e),this.id="PageWrapperCallback_"+ ++ge.ID,this.state={changed:0}}render(){var e,t;const n=this.props.page?r.ReactElementFactory.Instance.createElement("svc-page",{survey:this.props.creator.survey,page:this.props.page,creator:this.props.creator,isGhost:this.props.isGhost}):null;return i.createElement("div",{className:this.props.className,"data-sv-drop-target-page":null===(e=this.props.page)||void 0===e?void 0:e.name,"data-sv-drop-target-survey-element":this.props.isGhost?"newGhostPage":null===(t=this.props.page)||void 0===t?void 0:t.name},n)}setupCallback(e){e&&e.registerFunctionOnPropertyValueChanged("name",()=>{this.setState({changed:this.state&&this.state.changed?this.state.changed+1:1})},this.id)}clearCallback(e){e&&e.unRegisterFunctionOnPropertyValueChanged("name")}componentDidUpdate(e,t){e.page!==this.props.page&&(this.clearCallback(e.page),this.setupCallback(this.props.page))}componentDidMount(){this.setupCallback(this.props.page)}componentWillUnmount(){this.clearCallback(this.props.page)}}ge.ID=0;class ye extends r.SurveyElementBase{getStateElement(){return this.model}get model(){return this.props.data}renderElement(){return i.createElement("div",{className:"svc-json-editor-tab__errros_list",style:{display:this.model.hasErrors?"block":"none"}},i.createElement(r.List,{model:this.model.errorList}))}}class be extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.model}get model(){return this.props.data}renderElement(){const e=e=>{this.model.textElement=e},t=i.createElement(ye,{data:this.model});return i.createElement("div",{className:"svc-creator-tab__content"},i.createElement("div",{className:"svc-json-editor-tab__content"},i.createElement("textarea",{ref:t=>e(t),className:"svc-json-editor-tab__content-area",value:this.model.text,onChange:e=>this.model.text=e.target.value,onKeyDown:e=>this.model.checkKey(e,e),disabled:this.model.readOnly,"aria-label":this.model.ariaLabel}),t))}}r.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-textarea",e=>i.createElement(be,e));class _e extends r.SurveyElementBase{constructor(e){super(e),this.aceEditorrRef=i.createRef()}getStateElement(){return this.model}get model(){return this.props.data}componentDidMount(){this.model.init(ace.edit(this.aceEditorrRef.current))}renderElement(){const e=i.createElement(ye,{data:this.model});return i.createElement("div",{className:"svc-creator-tab__content"},i.createElement("div",{className:"svc-json-editor-tab__content"},i.createElement("div",{className:"svc-json-editor-tab__ace-editor",ref:this.aceEditorrRef}),e))}}r.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-ace",e=>i.createElement(_e,e));class Ce extends r.SurveyElementBase{get model(){return this.props.data}getStateElement(){return this.model}renderElement(){this.model;var e=this.renderViewContent();return i.createElement("div",{className:"svc-creator-tab__content svc-logic-tab"},e)}renderViewContent(){const e="svc-plugin-tab__content svc-logic-tab svc-logic-tab__content "+(this.model.hasItems?"":"svc-logic-tab--empty"),n=this.model.readOnly?void 0:i.createElement(r.SurveyActionBar,{model:this.model.contentActionsContainer});return i.createElement(t.Fragment,null,i.createElement("div",{className:e},this.model.hasItems?i.createElement(i.Fragment,null,i.createElement(r.Survey,{model:this.model.itemsSurvey}),n):i.createElement("div",{className:"svc-logic-tab__content-empty"},i.createElement(ve,{name:"logic",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText}),n)))}}r.ReactElementFactory.Instance.registerElement("svc-tab-logic",e=>i.createElement(Ce,e));class Ne extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.queueSurveyLayoutRefresh()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.model.queueSurveyLayoutRefresh()}componentWillUnmount(){this.model.cancelSurveyLayoutRefresh(),super.componentWillUnmount()}renderElement(){const e=this.model.getRootCss(),t=(n=this.model.popupOverlayHeight)?{"--sv-popup-overlay-height":n}:{};var n;return this.model.survey?this.model.hasFrame?i.createElement("div",{className:e,onKeyDown:e=>this.model.tryToZoom(e,e),onMouseEnter:"desktop"===this.model.device?null:this.model.activateZoom,onMouseLeave:"desktop"===this.model.device?null:this.model.deactivateZoom},i.createElement("div",{className:"svd-simulator-wrapper",id:"svd-simulator-wrapper",style:{width:this.model.simulatorFrame.frameWidth+"px",height:this.model.simulatorFrame.frameHeight+"px"}},i.createElement("div",{className:"svd-simulator",style:{width:this.model.simulatorFrame.deviceWidth+"px",height:this.model.simulatorFrame.deviceHeight+"px",transform:"scale("+this.model.simulatorFrame.scale+") translate(-50%, -50%)"}},i.createElement("div",{className:"svd-simulator-content",style:t},i.createElement(r.Survey,{model:this.model.survey}))))):i.createElement("div",{className:e},i.createElement("div",{className:"svd-simulator-content",style:t},i.createElement(r.Survey,{model:this.model.survey}))):i.createElement("div",{className:e})}}class Se extends r.SurveyElementBase{constructor(e){super(e)}get model(){return this.props.data}getStateElement(){return this.model}renderPlaceholder(){return i.createElement(ve,{name:"preview",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})}renderSimulator(){return i.createElement("div",{className:"svc-plugin-tab__content"},i.createElement(Ne,{model:this.model.simulator}),this.model.showResults?i.createElement(W,{survey:this.model.simulator.survey}):null)}renderElement(){const e="svc-creator-tab__content svc-test-tab__content "+this.model.tabContentAdditionalCss;return i.createElement("div",{className:e},this.model.simulator.survey.isEmpty?this.renderPlaceholder():this.renderSimulator(),this.getBottomToolbar())}getBottomToolbar(){return this.model.isPageToolbarVisible?i.createElement("div",{className:"svc-test-tab__content-actions"},i.createElement(r.SurveyActionBar,{model:this.model.pages})):null}}r.ReactElementFactory.Instance.registerElement("svc-tab-preview",e=>i.createElement(Se,e));class xe extends i.Component{render(){return i.createElement("div",{className:"svc-property-grid-placeholder"},i.createElement("div",{className:"svc-property-grid-placeholder__header"},i.createElement("span",{className:"svc-property-grid-placeholder__title"},n.editorLocalization.getString("ed.propertyGridPlaceholderTitle")),i.createElement("span",{className:"svc-property-grid-placeholder__description"},n.editorLocalization.getString("ed.propertyGridPlaceholderDescription"))),i.createElement("div",{className:"svc-property-grid-placeholder__content"},i.createElement("div",{className:"svc-property-grid-placeholder__gap"}),i.createElement("div",{className:"svc-property-grid-placeholder__image"})))}}r.ReactElementFactory.Instance.registerElement("svc-property-grid-placeholder",e=>i.createElement(xe,e));class fe extends r.SurveyElementBase{get model(){return this.props.data}getStateElement(){return this.model}renderPlaceholder(){return i.createElement(ve,{name:"theme",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})}renderSimulator(){return i.createElement("div",{className:"svc-plugin-tab__content"},i.createElement(Ne,{model:this.model.simulator}),this.model.showResults?i.createElement(W,{survey:this.model.simulator.survey}):null)}renderElement(){const e="svc-creator-tab__content svc-test-tab__content "+this.model.tabContentAdditionalCss;return i.createElement("div",{className:e},this.model.simulator.survey.isEmpty?this.renderPlaceholder():this.renderSimulator(),this.getBottomToolbar())}getBottomToolbar(){return this.model.isPageToolbarVisible?i.createElement("div",{className:"svc-test-tab__content-actions"},i.createElement(r.SurveyActionBar,{model:this.model.pages})):null}}r.ReactElementFactory.Instance.registerElement("svc-tab-theme",e=>i.createElement(fe,e));class Ie extends r.SurveyElementBase{get model(){return this.props.data||this.props.model}getStateElement(){return this.model}renderElement(){return this.model?i.createElement("div",{className:"svc-creator-tab__content svc-translation-tab"+(this.model.isEmpty?" svc-translation-tab--empty":"")},this.renderElementContent()):null}renderElementContent(){return this.model.isEmpty?i.createElement(ve,{name:"translation",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText}):this.model.isSideBySideForm?this.renderSideBySideContent(this.model):this.renderStringsContent(this.model)}renderStringsContent(e){var t,n;return i.createElement("div",{className:"st-content"},i.createElement("div",{className:"svc-flex-column st-strings-wrapper"},i.createElement("div",{className:"svc-flex-row st-strings-header"},i.createElement(r.Survey,{key:null===(t=e.stringsHeaderSurvey)||void 0===t?void 0:t.elementIdPrefix,model:e.stringsHeaderSurvey})),i.createElement("div",{className:"svc-flex-row svc-plugin-tab__content st-strings"},i.createElement(r.Survey,{key:null===(n=e.stringsSurvey)||void 0===n?void 0:n.elementIdPrefix,model:e.stringsSurvey}))))}renderSideBySideContent(e){var t;const n=e.targetSurvey;return i.createElement("div",{className:e.sideBySideRootCss},i.createElement("div",{className:"st-side-by-side__panes"},i.createElement("div",{key:null===(t=e.sourceSurvey)||void 0===t?void 0:t.elementIdPrefix,className:"st-side-by-side__source",ref:t=>{e.setSourceScrollElement(t)}},i.createElement(r.Survey,{model:e.sourceSurvey})),n?i.createElement("div",{key:n.elementIdPrefix,className:"st-side-by-side__target",ref:t=>{e.setTargetScrollElement(t)}},i.createElement(r.Survey,{model:n})):null))}}r.ReactElementFactory.Instance.registerElement("svc-tab-translation",e=>i.createElement(Ie,e));class we extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}renderElement(){const e=this.item;if(!e)return null;const t=n.getTranslationLocaleProgress(e);return i.createElement("div",{className:"svc-translation-locale-item"},i.createElement("span",{className:"svc-translation-locale-item__name"},this.renderLocString(e.locTitle,void 0,"locString")),t?i.createElement("span",{className:"svc-translation-locale-item__progress"},t):null)}}r.ReactElementFactory.Instance.registerElement(n.translationLocaleItemComponentName,e=>i.createElement(we,e));class Re extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}renderElement(){return this.model.isVisible?i.createElement(r.List,{model:this.model.list}):null}}r.ReactElementFactory.Instance.registerElement("svc-object-selector",e=>i.createElement(Re,e));class Me extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}canRender(){return!!this.model&&super.canRender()}renderElement(){return i.createElement("div",{className:this.model.rootCss},i.createElement(X,{model:this.model.searchManager}),i.createElement(r.Survey,{model:this.model.survey}))}}r.ReactElementFactory.Instance.registerElement("svc-property-grid",e=>i.createElement(Me,e));class qe extends i.Component{constructor(e){super(e)}render(){const e=this.props.model.elements.map((e,t)=>r.ReactElementFactory.Instance.createElement(e.componentName,{...e.componentData,key:t})),t=this.props.model.scrollable?i.createElement(r.Scroll,null," ",e," "):e;return this.props.model.wrapped?i.createElement("div",{className:this.props.model.cssClass}," ",t," "):i.createElement(i.Fragment,null,t)}}r.ReactElementFactory.Instance.registerElement("svc-component-container",e=>i.createElement(qe,e));class De extends i.Component{render(){const e=this.props.model;return i.createElement("div",{className:"svc-variables-viewer"},i.createElement("textarea",{className:"svc-variables-viewer__text",value:e.text,readOnly:!0,spellCheck:!1,"aria-label":e.ariaLabel}))}}r.ReactElementFactory.Instance.registerElement("svc-variables-viewer",e=>i.createElement(De,e));class Te extends i.Component{render(){const e=this.props.item;return e?i.createElement("div",{className:"svc-icon-item"},i.createElement(r.SvgIcon,{className:"svc-icon-item__icon",size:"auto",iconName:e.value}),i.createElement("span",{className:"svc-icon-item__text"},e.title)):null}}r.ReactElementFactory.Instance.registerElement("svc-presets-icon-item",e=>i.createElement(Te,e));class Fe extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}renderElement(){const e=this.item.tooltip||this.item.title,t=this.item.hasTitle?i.createElement("span",{className:"svc-switcher__title"},this.item.title):null;return r.attachKey2click(i.createElement("button",{className:this.item.getActionBarItemCss(),type:"button",disabled:this.item.disabled,onClick:e=>this.item.action(this.item,this.item.getIsTrusted(e)),title:e,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},i.createElement("div",{className:this.item.getSwitcherIconCss()},i.createElement("div",{className:"svc-switcher__icon-thumb"})),t),this.item,{processEsc:!1})}}r.ReactElementFactory.Instance.registerElement("svc-switcher",e=>i.createElement(Fe,e));class Be extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}canRender(){return!!this.item&&this.item.visible&&super.canRender()}renderMarker(){const e=this.item;return e.hasMarkerText?i.createElement("span",{className:e.markerCss},e.markerText):e.hasMarkerIcon?i.createElement("span",{className:"svc-collab-row__icon"},i.createElement(r.SvgIcon,{iconName:e.markerIconName,size:e.markerIconSize})):null}renderElement(){const e=this.item;return i.createElement("div",{className:e.rowCss,role:e.rowRole||void 0,"aria-expanded":e.ariaExpanded},this.renderMarker(),i.createElement("span",{className:"svc-collab-row__title"},e.title),e.hasSubtitle?i.createElement("span",{className:"svc-collab-row__subtitle"},e.subtitle):null)}}r.ReactElementFactory.Instance.registerElement("svc-collab-row",e=>i.createElement(Be,e));class ke extends r.SurveyElementBase{constructor(e){super(e),this.root=i.createRef()}get model(){return this.props.model}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.setComponentElement(this.root.current)}componentWillUnmount(){super.componentWillUnmount(),this.model.resetComponentElement()}renderElement(){const e=this.model,t=r.ReactElementFactory.Instance.createElement(e.contentComponentName,e.contentComponentData);return i.createElement("div",{ref:this.root,className:e.rootCss,style:e.style,role:"dialog","aria-modal":!1,"aria-labelledby":e.titleId,tabIndex:-1,onPointerDownCapture:()=>e.bringToFront()},i.createElement("div",{className:e.headerCss,onPointerDown:t=>e.onPointerDown(t.nativeEvent)},i.createElement("span",{id:e.titleId,className:"svc-floating-panel__title"},e.titleText),i.createElement("span",{className:"svc-floating-panel__drag","aria-hidden":"true"},i.createElement(r.SvgIcon,{iconName:"icon-draghorizontal-24x16",size:"auto"})),i.createElement(r.SurveyActionBar,{model:e.headerToolbar})),i.createElement("div",{className:e.bodyCss},t))}}r.ReactElementFactory.Instance.registerElement("svc-floating-panel",e=>i.createElement(ke,e));let Pe=class extends r.SurveyElementBase{render(){const e=this.props.item;return i.createElement(i.Fragment,null,i.createElement(r.SvgIcon,{iconName:e.iconName,size:e.iconSize,className:"svc-json-error__icon"}),i.createElement("div",{className:"svc-json-error__container"},i.createElement("div",{className:"svc-json-error__title"},i.createElement("span",{key:2},this.renderLocString(e.locTitle,void 0,"locString"))),this.renderFixButton()))}renderFixButton(){if(!this.props.item.data.showFixButton)return null;const e=this.props.item;return r.attachKey2click(i.createElement("button",{type:"button",onClick:t=>{t.stopPropagation(),e.data.fixError()},title:e.data.fixButtonTitle,className:"svc-json-error__fix-button"},i.createElement(r.SvgIcon,{iconName:e.data.fixButtonIcon,size:"auto"})))}};r.ReactElementFactory.Instance.registerElement("json-error-item",e=>i.createElement(Pe,e));class Ue extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.model}get model(){return this.props.data}renderElement(){return i.createElement(qe,{model:this.model.containerModel})}}r.ReactElementFactory.Instance.registerElement("svc-tab-container",e=>i.createElement(Ue,e));class Ae extends r.SurveyQuestionText{constructor(e){super(e)}get question(){return this.questionBase}renderInput(){return i.createElement(i.Fragment,null,i.createElement("input",{role:"spinbutton",id:this.question.inputId,disabled:this.isDisplayMode,className:this.question.cssClasses.control,ref:e=>this.setControl(e),placeholder:this.question.renderedPlaceholder,autoComplete:"off",onBlur:e=>this.question.onBlur(e.nativeEvent),onFocus:e=>this.question.onFocus(e.nativeEvent),onChange:this.question.onChange,onBeforeInput:e=>this.question.onBeforeInput(e.nativeEvent),onKeyUp:e=>this.question.onKeyUp(e.nativeEvent),onKeyDown:e=>this.question.onInputKeyDown(e.nativeEvent),"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}))}renderElement(){return i.createElement("div",{className:this.question.cssClasses.root,onKeyDown:e=>this.question.onKeyDown(e.nativeEvent)},this.renderInput(),this.renderButtons())}getValueCore(){return this.question.renderedValue}renderButtons(){return i.createElement(r.SurveyActionBar,{model:this.question.inputActionsContainer})}}class Le extends r.SurveyElementBase{get item(){return this.props.item}get itemAction(){return this.props.item}getStateElement(){return this.itemAction}get question(){return this.item.data.question}renderElement(){return i.createElement("button",{tabIndex:-1,"aria-hidden":"true",className:this.itemAction.getActionBarItemCss(),disabled:this.itemAction.disabled,onClick:()=>this.item.action(),onMouseDown:this.item.data.onMouseDown,onMouseUp:this.question.onButtonMouseUp,onMouseLeave:this.question.onButtonMouseLeave,onBlur:e=>this.question.onBlur(e.nativeEvent),onFocus:e=>this.question.onFocus(e.nativeEvent)},i.createElement(r.SvgIcon,{className:this.itemAction.cssClasses.itemIcon,iconName:this.item.iconName,size:"auto"}))}}r.ReactElementFactory.Instance.registerElement("sv-spinedit-button",e=>i.createElement(Le,e)),r.ReactQuestionFactory.Instance.registerQuestion("spinedit",e=>i.createElement(Ae,e));class Ve extends i.Component{get rootClassName(){var e;return null!==(e=this.props.className)&&void 0!==e?e:"sd-color-swatch"}get rootStyle(){return{backgroundColor:this.props.color}}renderIcon(){var e,t;return this.props.showIcon?i.createElement(r.SvgIcon,{iconName:null!==(e=this.props.swatchIcon)&&void 0!==e?e:"icon-dropper-16x16",size:"auto",className:null!==(t=this.props.iconClassName)&&void 0!==t?t:"sd-color-swatch__icon"}):null}renderColorInput(){const{onColorInputChange:e,colorInputValue:t,colorInputClassName:r,inputDisabled:n,arias:s}=this.props;return e?i.createElement("input",{type:"color",disabled:n,value:t,className:r,onChange:e,tabIndex:-1,...s}):null}render(){const e=i.createElement("div",{className:"sd-color-swatch__content",style:this.rootStyle},this.renderIcon(),this.renderColorInput());return this.props.onColorInputChange?i.createElement("label",{className:this.rootClassName},e):i.createElement("div",{className:this.rootClassName},e)}}class Qe extends r.SurveyElementBase{render(){const e=this.props.item;return i.createElement("div",{className:"sd-color-swatch-item"},i.createElement("div",{className:"sd-color-swatch-item__label"},i.createElement("span",{key:2,className:"sd-color-swatch-item__caption"},this.renderLocString(e.locTitle,void 0,"locString"))),i.createElement(Ve,{color:e.value}))}}r.ReactElementFactory.Instance.registerElement("color-item",e=>i.createElement(Qe,e));class He extends r.SurveyQuestionText{constructor(e){super(e)}get question(){return this.questionBase}renderInput(){return i.createElement(i.Fragment,null,i.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:this.question.cssClasses.control,ref:e=>this.setControl(e),placeholder:this.question.renderedPlaceholder,autoComplete:"off",onKeyUp:e=>this.question.onKeyUp(e.nativeEvent),onBlur:e=>this.question.onBlur(e.nativeEvent),onChange:this.question.onChange,onBeforeInput:e=>this.question.onBeforeInput(e.nativeEvent),"aria-required":this.question.a11y_input_ariaRequired,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-label":this.question.a11y_input_ariaLabel,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy}))}renderElement(){return i.createElement("div",{className:this.question.cssClasses.rootWrapper},i.createElement("div",{className:this.question.cssClasses.root,onKeyDown:e=>this.question.onKeyDown(e.nativeEvent)},this.renderColorSwatch(),this.renderInput(),this.renderButtons()))}getValueCore(){return this.question.renderedValue}renderColorSwatch(){const e=this.question;return i.createElement("div",{className:e.cssClasses.colorSwatch},i.createElement(Ve,{className:e.getSwatchCss(),swatchIcon:e.cssClasses.swatchIcon,iconClassName:e.cssClasses.iconClassName,color:e.renderedValue,showIcon:!0,colorInputValue:e.renderedColorValue,colorInputClassName:e.cssClasses.colorInput,inputDisabled:this.isDisplayMode,onColorInputChange:t=>e.onColorInputChange(t.nativeEvent),arias:{"aria-required":e.a11y_input_ariaRequired,"aria-labelledby":e.a11y_input_ariaLabelledBy,"aria-label":e.a11y_input_ariaLabel,"aria-invalid":e.a11y_input_ariaInvalid,"aria-describedby":e.a11y_input_ariaDescribedBy}}))}renderButtons(){return this.question.hasVisibleInputActions?i.createElement(r.SurveyActionBar,{model:this.question.inputActionsContainer}):null}}r.ReactQuestionFactory.Instance.registerQuestion("color",e=>i.createElement(He,e));class We extends r.SurveyQuestionText{constructor(e){super(e)}get questionFile(){return this.questionBase}getValueCore(){return this.question.renderedValue}renderInput(){return i.createElement(i.Fragment,null,i.createElement("input",{disabled:this.question.isTextInputReadOnly,className:this.questionFile.cssClasses.control,placeholder:this.questionFile.renderedPlaceholder,ref:e=>this.setControl(e),autoComplete:"off",type:"text",onBlur:e=>this.questionFile.onInputBlur(e.nativeEvent),onChange:e=>this.questionFile.onInputChange(e.nativeEvent)}))}renderButtons(){return this.question.hasVisibleInputActions?i.createElement(r.SurveyActionBar,{model:this.questionFile.inputActionsContainer}):null}renderElement(){return i.createElement("div",{className:this.questionFile.cssClasses.root,ref:e=>this.setContent(e),onDragEnter:this.questionFile.onDragEnter,onDragOver:this.questionFile.onDragOver,onDrop:this.questionFile.onDrop,onDragLeave:this.questionFile.onDragLeave,onKeyDown:e=>this.question.onKeyDown(e.nativeEvent)},this.renderInput(),this.renderButtons())}}class Oe extends r.SurveyElementBase{get item(){return this.props.item}get question(){return this.props.item.data.question}getStateElement(){return this.item}renderElement(){return i.createElement("div",null,r.attachKey2click(i.createElement("label",{onClick:e=>this.question.chooseFiles(e.nativeEvent),className:this.item.getActionBarItemCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonCaption},i.createElement(r.SvgIcon,{iconName:this.item.iconName,size:"auto",title:this.item.title,className:this.item.cssClasses.itemIcon}),i.createElement("span",{className:"sv-visuallyhidden"},this.question.chooseButtonCaption))),i.createElement("input",{type:"file",disabled:this.item.disabled,className:this.question.cssClasses.fileInput,id:this.question.inputId,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,multiple:!1,title:this.question.inputTitle,accept:this.question.acceptedTypes,tabIndex:-1,onChange:e=>this.question.onFileInputChange(e.nativeEvent)}))}}r.ReactQuestionFactory.Instance.registerQuestion("fileedit",e=>i.createElement(We,e)),r.ReactElementFactory.Instance.registerElement("sv-fileedit-button",e=>i.createElement(Oe,e)),e.Version=void 0,e.Version="3.2.0",o.checkLibraryVersion("3.2.0","survey-creator-react"),Object.defineProperty(e,"PropertyGridEditorCollection",{enumerable:!0,get:function(){return n.PropertyGridEditorCollection}}),Object.defineProperty(e,"SurveyLogic",{enumerable:!0,get:function(){return n.SurveyLogic}}),Object.defineProperty(e,"SurveyLogicUI",{enumerable:!0,get:function(){return n.SurveyLogicUI}}),Object.defineProperty(e,"SurveyQuestionEditorDefinition",{enumerable:!0,get:function(){return n.SurveyQuestionEditorDefinition}}),Object.defineProperty(e,"ToolboxToolViewModel",{enumerable:!0,get:function(){return n.ToolboxToolViewModel}}),Object.defineProperty(e,"editorLocalization",{enumerable:!0,get:function(){return n.editorLocalization}}),Object.defineProperty(e,"localization",{enumerable:!0,get:function(){return n.localization}}),Object.defineProperty(e,"settings",{enumerable:!0,get:function(){return n.settings}}),Object.defineProperty(e,"svgBundle",{enumerable:!0,get:function(){return n.svgBundle}}),e.ActionButton=C,e.AdaptiveToolbox=Y,e.AddQuestionButtonComponent=T,e.CellQuestionAdornerComponent=w,e.CellQuestionDropdownAdornerComponent=R,e.CollabRowComponent=Be,e.ComponentContainer=qe,e.CreatorSurveyPageComponent=D,e.FloatingPanelComponent=ke,e.IconItem=Te,e.ImageItemValueAdornerComponent=V,e.ItemValueAdornerComponent=A,e.LogoImageComponent=B,e.MatrixCellAdornerComponent=H,e.PanelAdornerComponent=F,e.PropertyGridComponent=Me,e.PropertyGridPlaceholderComponent=xe,e.QuestionAdornerComponent=y,e.QuestionBanner=N,e.QuestionDropdownAdornerComponent=S,e.QuestionEditorContentComponent=U,e.QuestionErrorComponent=de,e.QuestionImageAdornerComponent=x,e.QuestionRatingAdornerComponent=f,e.QuestionWidgetAdornerComponent=I,e.QuestionWrapperFooter=_,e.QuestionWrapperHeader=b,e.ReactDragEvent=class extends E{constructor(e){super(e),this.event=e}get dataTransfer(){return this.event.dataTransfer}},e.ReactMouseEvent=E,e.RowWrapper=v,e.SearchComponent=X,e.SideBarDefaultHeader=re,e.SideBarLaunchCard=ie,e.SidebarComponent=oe,e.SurveyCreator=h,e.SurveyCreatorComponent=u,e.SurveyCreatorToolboxCategory=G,e.SurveyCreatorToolboxItem=K,e.SurveyCreatorToolboxItemGroup=z,e.SurveyCreatorToolboxTool=j,e.SurveyElementEmbeddedSurvey=P,e.SurveyLocStringEditor=me,e.SurveyLogicOpertor=ue,e.SurveyNavigation=Z,e.SurveyQuestionColor=He,e.SurveyQuestionFileEditor=We,e.SurveyQuestionFileEditorButton=Oe,e.SurveyQuestionLinkValue=k,e.SurveyQuestionSpinEditor=Ae,e.SurveyResults=W,e.SurveyResultsByRow=O,e.SurveySimulator=Ne,e.SurveySpinEditorButton=Le,e.SwitcherComponent=Fe,e.TabButtonComponent=$,e.TabContainerComponent=Ue,e.TabDesignerComponent=Ee,e.TabJsonEditorAceComponent=_e,e.TabJsonEditorErrorsComponent=ye,e.TabJsonEditorTextareaComponent=be,e.TabLogicComponent=Ce,e.TabPreviewSurveyComponent=Se,e.TabThemeSurveyComponent=fe,e.TabTranslationComponent=Ie,e.TabbedMenuComponent=c,e.TabbedMenuItemComponent=d,e.ToolboxList=J,e.TranslateFromAction=ce,e.TranslationDropdownQuestionComponent=M,e.TranslationLineSkeleton=le,e.TranslationLocaleItemComponent=we,e.VariablesViewerComponent=De});
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("survey-react-ui"),require("survey-creator-core"),require("react-dom"),require("survey-core")):"function"==typeof define&&define.amd?define(["exports","react","survey-react-ui","survey-creator-core","react-dom","survey-core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SurveyCreator={},e.React,e.SurveyReact,e.SurveyCreatorCore,e.ReactDOM,e.Survey)}(this,function(e,t,r,n,s,o){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var i=a(t),l=a(s);class c extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}constructor(e){super(e),this.rootRef=i.createRef()}renderElement(){const e=this.model.renderedActions.map(e=>i.createElement(m,{item:e,key:e.renderedId}));return i.createElement("div",{ref:this.rootRef,className:"svc-tabbed-menu",role:"tablist",style:this.model.getRootStyle()},e)}componentDidUpdate(e,t){super.componentDidUpdate(e,t);const r=this.rootRef.current;r&&this.model.initResponsivityManager(r)}componentDidMount(){super.componentDidMount();const e=this.rootRef.current;e&&this.model.initResponsivityManager(e)}componentWillUnmount(){this.model.resetResponsivityManager(),super.componentWillUnmount()}}class m extends r.SurveyElementBase{constructor(e){super(e),this.ref=i.createRef(),this.state={changed:0}}get item(){return this.props.item}getStateElement(){return this.item}renderElement(){let e="svc-tabbed-menu-item-container";this.item.css&&(e+=" "+this.item.css),e+=this.item.isVisible?"":" svc-tabbed-menu-item-container--hidden";const t=r.ReactElementFactory.Instance.createElement(this.item.component||"svc-tabbed-menu-item",{item:this.item});return i.createElement("span",{key:this.item.id,className:e,ref:this.ref},i.createElement("div",{className:"svc-tabbed-menu-item-container__content"},t))}componentDidMount(){super.componentDidMount(),this.item.updateModeCallback=(e,t)=>{const r=()=>{this.item.mode==e?this.setState({changed:this.state.changed+1}):this.item.mode=e};queueMicrotask(()=>{l.flushSync?l.flushSync(()=>{r()}):r(),queueMicrotask(()=>{t(e,this.ref.current)})})},this.item.afterRender()}componentWillUnmount(){super.componentWillUnmount(),this.item.updateModeCallback=void 0}}class d extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}render(){const e=this.item;return r.attachKey2click(i.createElement("div",{role:"tab",id:"tab-"+e.id,"aria-selected":e.active,"aria-controls":"scrollableDiv-"+e.id,className:e.getRootCss(),onClick:()=>e.doAction()},e.hasTitle?i.createElement("span",{className:e.getTitleCss()},e.title):null,e.hasIcon?i.createElement(r.SvgIcon,{iconName:e.iconName,className:e.getIconCss(),size:"auto",title:e.tooltip||e.title}):null))}}r.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item",e=>i.createElement(d,e));class u extends r.SurveyElementBase{constructor(e){super(e),this.rootNode=i.createRef()}get creator(){return this.props.creator}getStateElement(){return this.creator}get style(){return this.props.style}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.creator!==e.creator&&(e.creator&&e.creator.unsubscribeRootElement(),this.creator&&this.rootNode.current&&this.creator.setRootElement(this.rootNode.current))}componentDidMount(){super.componentDidMount(),this.creator.setRootElement(this.rootNode.current)}componentWillUnmount(){super.componentWillUnmount(),this.creator.unsubscribeRootElement()}renderElement(){const e=this.props.creator;if(e.isCreatorDisposed)return null;const t="svc-full-container svc-creator__area svc-flex-column"+(this.props.creator.haveCommercialLicense?"":" svc-creator__area--with-banner"),s="svc-creator__content-wrapper svc-flex-row"+(this.props.creator.isMobileView?" svc-creator__content-wrapper--footer-toolbar":""),o="svc-flex-row svc-full-container svc-creator__side-bar--"+this.creator.sidebarLocation,a={};n.assign(a,this.style,this.props.creator.themeVariables);let l=null;if(!this.props.creator.haveCommercialLicense){const e={__html:this.props.creator.licenseText};l=i.createElement("div",{className:"svc-creator__banner"},i.createElement("span",{className:"svc-creator__non-commercial-text",dangerouslySetInnerHTML:e}))}return i.createElement("div",{className:this.creator.getRootCss(),ref:this.rootNode,style:a},i.createElement(r.SvgBundleComponent,null),i.createElement(r.PopupModal,null),i.createElement("div",{className:t},this.renderCollabBar(),i.createElement("div",{className:o},i.createElement("div",{className:"svc-flex-column svc-flex-row__element svc-flex-row__element--growing"},i.createElement("div",{className:"svc-top-bar"},e.showTabs?i.createElement("div",{className:"svc-tabbed-menu-wrapper"},i.createElement(c,{model:e.tabbedMenu})):null,e.showToolbar?i.createElement("div",{className:"svc-toolbar-wrapper"},i.createElement(r.SurveyActionBar,{model:e.toolbar})):null),i.createElement("div",{className:s},i.createElement("div",{className:"svc-creator__content-holder svc-flex-column"},this.renderActiveTab())),i.createElement("div",{className:"svc-footer-bar"},e.isMobileView?i.createElement("div",{className:"svc-toolbar-wrapper"},i.createElement(r.SurveyActionBar,{model:e.footerToolbar})):null)),this.renderSidebar()),l,i.createElement(r.NotifierComponent,{notifier:e.notifier})))}renderCollabBar(){const e=this.creator.collabBar;return e?r.ReactElementFactory.Instance.createElement("svc-component-container",{model:e.container}):null}renderActiveTab(){const e=this.props.creator;return this.renderCreatorTab(e.activeTabMenuItem)}renderCreatorTab(e){if(!e)return null;const t=this.props.creator,n=e.renderTab?e.renderTab():r.ReactElementFactory.Instance.createElement(e.componentContent,{creator:t,survey:t.survey,data:e.data.model,model:e.data.model}),s="svc-creator-tab"+("right"==t.toolboxLocation?" svc-creator__toolbox--right":"");return i.createElement("div",{role:"tabpanel",key:e.id,id:"scrollableDiv-"+e.id,"aria-labelledby":"tab-"+e.id,className:s},n)}renderSidebar(){return this.creator.isSidebarVisible?r.ReactElementFactory.Instance.createElement("svc-side-bar",{model:this.creator.sidebar}):null}}class h extends n.SurveyCreatorModel{constructor(e={},t){super(e,t)}render(e){console.error("The render method is deprecated. Use SurveyCreatorComponent instead.")}createQuestionElement(e){return r.ReactQuestionFactory.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isReadOnly,creator:this})}renderError(e,t,n){return i.createElement("div",{key:e},i.createElement("span",{className:n.error.icon,"aria-hidden":"true"}),i.createElement("span",{className:n.error.item},i.createElement(r.SurveyLocStringViewer,{model:t.locText})))}questionTitleLocation(){return this.survey.questionTitleLocation}questionErrorLocation(){return this.survey.questionErrorLocation}}r.ReactElementFactory.Instance.registerElement("survey-widget",e=>i.createElement(r.Survey,e));class p extends r.SurveyElementBase{constructor(e){super(e),this.createModel(e)}shouldComponentUpdate(e,t){const r=super.shouldComponentUpdate(e,t);return r&&this.needUpdateModel(e)&&this.createModel(e),r}createModel(e){}needUpdateModel(e){const t=this.getUpdatedModelProps();if(!Array.isArray(t))return!0;for(var r=0;r<t.length;r++){const n=t[r];if("object"==typeof n){const t=this.props[n.name],r=e[n.name];if(n.deepEqual){if(this.props[n.name]===e[n.name])return!1;const s=Object.keys(t||{});return s.length!==Object.keys(r||{}).length||s.some(e=>t[e]!=r[e])}return t!==r}if(this.props[n]!==e[n])return!0}return!1}getUpdatedModelProps(){}}class v extends p{constructor(e){super(e)}createModel(e){this.model&&this.model.dispose(),this.model=new n.RowViewModel(e.componentData.creator,e.row,null)}getUpdatedModelProps(){return["row",{name:"componentData",deepEqual:!0}]}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.subscribeElementChanges()}componentWillUnmount(){this.model.unsubscribeElementChanges(),super.componentWillUnmount()}render(){return i.createElement("div",{key:"svc-row-"+this.props.row.id,className:this.model.cssClasses},i.createElement("div",{className:"svc-row__drop-indicator svc-row__drop-indicator--top"}),i.createElement("div",{className:"svc-row__drop-indicator svc-row__drop-indicator--bottom"}),this.props.element)}}r.ReactElementFactory.Instance.registerElement("svc-row",e=>i.createElement(v,e));class E{constructor(e){this.event=e}stopPropagation(){this.event.stopPropagation()}preventDefault(){this.event.preventDefault()}get cancelBubble(){return!1}set cancelBubble(e){}get target(){return this.event.target}get currentTarget(){return this.event.currentTarget}get clientX(){return this.event.clientX}get clientY(){return this.event.clientY}get offsetX(){return this.event.nativeEvent.offsetX}get offsetY(){return this.event.nativeEvent.offsetY}}const g=i.memo(function(e){return e.element});g.displayName="QuestionElementContent";class y extends p{constructor(e){super(e),this.rootRef=i.createRef()}createModel(e){this.model?this.model.attachToUI(e.question,this.rootRef.current):this.modelValue=this.createQuestionViewModel(e)}createQuestionViewModel(e){return new n.QuestionAdornerViewModel(e.componentData,e.question,null)}getUpdatedModelProps(){return["question","componentData"]}get model(){return this.modelValue}getStateElement(){return this.model}renderElement(){const e=this.model.element.isInteractiveDesignElement,t=this.renderQuestionTitle(),r=this.renderContent(e);return i.createElement("div",{ref:this.rootRef,"data-sv-drop-target-survey-element":this.model.element.name||null,className:this.model.rootCss(),onDoubleClick:t=>{e&&this.model.dblclick(t.nativeEvent),t.stopPropagation()},onMouseLeave:t=>e&&this.model.hover(t.nativeEvent,t.currentTarget),onMouseOver:t=>e&&this.model.hover(t.nativeEvent,t.currentTarget)},t,r)}disableTabStop(){return!0}renderContent(e){var t=this.model.needToRenderContent?this.renderElementContent():null;return r.attachKey2click(i.createElement("div",{className:this.model.css(),onClick:e=>this.model.select(this.model,new E(e))},i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--left"}),i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--right"}),i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--top"}),i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--bottom"}),e?this.renderHeader():null,t,this.model.needToRenderContent?this.renderFooter():null),void 0,{disableTabStop:this.disableTabStop()})}renderHeader(){return r.ReactElementFactory.Instance.createElement("svc-question-header",{model:this.model})}renderFooter(){return this.model.element.isInteractiveDesignElement?r.ReactElementFactory.Instance.createElement("svc-question-footer",{className:"svc-question__content-actions",model:this.model}):null}renderCarryForwardBanner(){return this.model.isBannerShowing?r.ReactElementFactory.Instance.createElement("svc-question-banner",this.model.createBannerParams()):null}renderQuestionTitle(){if(!this.model.showHiddenTitle)return null;const e=this.model.element;return i.createElement("div",{ref:e=>e&&(this.model.renderedCollapsed?e.removeAttribute("inert"):e.setAttribute("inert","")),className:this.model.cssCollapsedHiddenHeader},e.hasTitle?i.createElement(r.TitleElement,{element:e,renderActions:!1}):i.createElement("div",{className:this.model.cssCollapsedHiddenTitle},i.createElement("span",{className:"svc-fake-title"},e.name)))}renderElementContent(){return i.createElement(i.Fragment,null,i.createElement(g,{element:this.props.element}),this.renderElementPlaceholder(),this.renderCarryForwardBanner())}componentDidMount(){super.componentDidMount(),this.model.attachToUI(this.props.question,this.rootRef.current)}renderElementPlaceholder(){return this.model.isEmptyElement?i.createElement("div",{className:"svc-panel__placeholder_frame-wrapper"},i.createElement("div",{className:"svc-panel__placeholder_frame"},i.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText))):null}componentWillUnmount(){super.componentWillUnmount(),this.model.detachFromUI()}}r.ReactElementFactory.Instance.registerElement("svc-question",e=>i.createElement(y,e));class b extends i.Component{render(){return this.props.model.allowDragging?i.createElement("div",{className:"svc-question__drag-area",onPointerDown:e=>this.props.model.onPointerDown(e)},i.createElement(r.SvgIcon,{className:"svc-question__drag-element",size:"auto",iconName:"icon-drag-area-indicator_24x16"}),i.createElement("div",{className:"svc-question__top-actions"},i.createElement(r.SurveyActionBar,{model:this.props.model.topActionContainer,handleClick:!1}))):null}}r.ReactElementFactory.Instance.registerElement("svc-question-header",e=>i.createElement(b,e));class _ extends i.Component{render(){return i.createElement("div",{className:this.props.className,onFocus:e=>this.props.model.select(this.props.model,new E(e))},i.createElement(r.SurveyActionBar,{model:this.props.model.actionContainer,handleClick:!1}))}}r.ReactElementFactory.Instance.registerElement("svc-question-footer",e=>i.createElement(_,e));class C extends r.SurveyElementBase{renderElement(){const e=o.toCssClasses(this.props.classes,"svc-action-button",!!this.props.selected&&"svc-action-button--selected",!!this.props.disabled&&"svc-action-button--disabled");return this.props.iconName?this.renderIcon(e):this.renderButtonText(e)}renderButtonText(e){return this.props.disabled?i.createElement("span",{className:e},this.props.text):i.createElement(i.Fragment,null,r.attachKey2click(i.createElement("span",{role:"button",className:e,onClick:e=>{this.props.allowBubble||e.stopPropagation(),this.props.click()},title:this.props.title},this.props.text)))}renderIcon(e){return e+=" svc-action-button--icon",this.props.disabled?i.createElement("span",{className:e},i.createElement(r.SvgIcon,{size:"auto",iconName:this.props.iconName})):i.createElement(i.Fragment,null,r.attachKey2click(i.createElement("span",{className:e,onClick:e=>{this.props.allowBubble||e.stopPropagation(),this.props.click()},title:this.props.title},i.createElement(r.SvgIcon,{size:"auto",iconName:this.props.iconName}))))}}r.ReactElementFactory.Instance.registerElement("svc-action-button",e=>i.createElement(C,e));class N extends i.Component{render(){return i.createElement("div",{className:"svc-carry-forward-panel-wrapper"},i.createElement("div",{className:"svc-carry-forward-panel"},i.createElement("span",null,this.props.text," "),i.createElement("span",{className:"svc-carry-forward-panel__link"},i.createElement(C,{click:()=>this.props.onClick(),text:this.props.actionText}))))}}r.ReactElementFactory.Instance.registerElement("svc-question-banner",e=>i.createElement(N,e));class S extends y{constructor(e){super(e)}createQuestionViewModel(e){return new n.QuestionDropdownAdornerViewModel(e.componentData,e.question,null)}get dropdownModel(){return this.model}get question(){return this.dropdownModel.question}renderElementPlaceholder(){const e=this.question.textStyle;return i.createElement("div",{className:"svc-question__dropdown-choices--wrapper"},i.createElement("div",null,i.createElement("div",{className:"svc-question__dropdown-choices"},(this.dropdownModel.getRenderedItems()||[]).map((t,n)=>i.createElement("div",{className:this.dropdownModel.getChoiceCss(),key:`editable_choice_${n}`},r.ReactSurveyElementsWrapper.wrapItemValue(this.question.survey,r.ReactElementFactory.Instance.createElement(this.dropdownModel.itemComponent,{key:t.value,question:this.question,cssClasses:this.question.cssClasses,isDisplayMode:!0,item:t,textStyle:e,index:n,isChecked:this.question.value===t.value}),this.question,t)))),this.dropdownModel.needToCollapse?r.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:this.dropdownModel.collapseAction}):null))}}r.ReactElementFactory.Instance.registerElement("svc-dropdown-question",e=>i.createElement(S,e));class x extends y{createQuestionViewModel(e){return new n.QuestionImageAdornerViewModel(e.componentData,e.question,null)}get imageModel(){return this.model}renderHeader(){return i.createElement(i.Fragment,null,i.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:this.imageModel.acceptedTypes,className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),super.renderHeader())}renderLoadingPlaceholder(){return i.createElement("div",{className:"svc-image-question__loading-placeholder"},i.createElement("div",{className:"svc-image-question__loading"},i.createElement(r.LoadingIndicatorComponent,null)))}renderChooseButton(){return i.createElement(r.SurveyActionBar,{model:this.imageModel.imageActionsContainer})}renderElementPlaceholder(){return this.imageModel.isUploading?this.renderLoadingPlaceholder():this.renderChooseButton()}getStateElements(){return[this.model,this.imageModel.filePresentationModel]}renderElementContent(){if(this.imageModel.isEmptyElement){const e=r.ReactQuestionFactory.Instance.createQuestion("file",{creator:this.imageModel.question.survey,isDisplayMode:!1,question:this.imageModel.filePresentationModel});return i.createElement(i.Fragment,null,e)}return i.createElement(i.Fragment,null,this.props.element,this.renderElementPlaceholder())}}r.ReactElementFactory.Instance.registerElement("svc-image-question",e=>i.createElement(x,e));class f extends p{createModel(e){this.modelValue=this.createQuestionViewModel(e)}createQuestionViewModel(e){return new n.QuestionRatingAdornerViewModel(e.componentData,e.question,null)}getUpdatedModelProps(){return["question","componentData"]}get ratingModel(){return this.model}get model(){return this.modelValue}getStateElement(){return this.model}renderElement(){const e=this.ratingModel;return i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-rating-question-content"},i.createElement(r.SurveyActionBar,{model:e.rateActionsContainer}),this.props.element))}}r.ReactElementFactory.Instance.registerElement("svc-rating-question",e=>i.createElement(f,e)),r.ReactElementFactory.Instance.registerElement("svc-rating-question-content",e=>i.createElement(f,e));class I extends y{createQuestionViewModel(e){return new n.QuestionAdornerViewModel(e.componentData,e.question,null)}get widgetModel(){return this.model}renderElementContent(){return i.createElement("div",{className:"svc-widget__content"},this.props.element)}}r.ReactElementFactory.Instance.registerElement("svc-widget-question",e=>i.createElement(I,e));class w extends p{createModel(e){this.model=new n.QuestionAdornerViewModel(e.componentData,e.question,null)}getStateElement(){return this.model}getUpdatedModelProps(){return["question","componentData"]}render(){return i.createElement(i.Fragment,null,i.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},i.createElement("div",{className:" svc-question__content--in-popup svc-question__content"},this.props.element)))}}r.ReactElementFactory.Instance.registerElement("svc-cell-question",e=>i.createElement(w,e));class R extends p{createModel(e){this.model=new n.QuestionAdornerViewModel(e.componentData,e.question,null)}getUpdatedModelProps(){return["question","componentData"]}getStateElement(){return this.model}render(){const e=this.props.question,t=this.props.question.textStyle;return i.createElement(i.Fragment,null,i.createElement("div",{"data-sv-drop-target-survey-element":this.model.element.name,className:"svc-question__adorner"},i.createElement("div",{className:" svc-question__content--in-popup svc-question__content"},this.props.element,i.createElement("div",{className:"svc-question__dropdown-choices"},e.visibleChoices.map((n,s)=>i.createElement("div",{className:"svc-question__dropdown-choice",key:`editable_choice_${s}`},r.ReactSurveyElementsWrapper.wrapItemValue(e.survey,r.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:n,textStyle:t,index:s,isChecked:e.value===n.value}),e,n)))))))}}r.ReactElementFactory.Instance.registerElement("svc-cell-dropdown-question",e=>i.createElement(R,e));class M extends p{createModel(e){this.model&&this.model.dispose(),this.model=new n.TranslationDropdownViewModel(e.question,e.componentData?e.componentData.translation:void 0)}getUpdatedModelProps(){return["question","componentData"]}getStateElement(){return this.model}componentWillUnmount(){super.componentWillUnmount(),this.model.dispose()}renderElement(){const e=this.props.question,t=this.props.question.textStyle;return i.createElement(i.Fragment,null,this.props.element,i.createElement("div",{className:"st-dropdown-choices--wrapper"},i.createElement("div",{className:"svc-question__dropdown-choices"},this.model.getRenderedItems().map((n,s)=>i.createElement("div",{className:this.model.getChoiceCss(),key:`translation_choice_${s}`},r.ReactElementFactory.Instance.createElement(this.model.itemComponent,{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:n,textStyle:t,index:s,isChecked:!1})))),this.model.needToCollapse?r.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:this.model.collapseAction}):null))}}r.ReactElementFactory.Instance.registerElement(n.translationDropdownComponentName,e=>i.createElement(M,e));const q=i.memo(({page:e,survey:t,creator:n})=>i.createElement(r.SurveyPage,{page:e,survey:t,creator:n}));q.displayName="PageElementContent";class D extends p{constructor(e){super(e),this.rootRef=i.createRef()}createModel(e){var t;this.model&&this.model.dispose(),this.model=this.createPageAdorner(e.creator,e.page),this.model.isGhost=this.props.isGhost,(null===(t=this.rootRef)||void 0===t?void 0:t.current)&&this.model.attachToUI(e.page,this.rootRef.current)}createPageAdorner(e,t){return new n.PageAdorner(e,t)}shouldComponentUpdate(e,t){const r=super.shouldComponentUpdate(e,t);return this.model&&(this.model.isGhost=this.props.isGhost),r}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.model.attachToUI(this.props.page,this.rootRef.current)}getUpdatedModelProps(){return["creator","page"]}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.attachToUI(this.props.page,this.rootRef.current),this.model.isGhost=this.props.isGhost}componentWillUnmount(){super.componentWillUnmount(),this.model.detachFromUI()}canRender(){return super.canRender()}renderElement(){return this.props.page?r.attachKey2click(i.createElement("div",{ref:this.rootRef,id:this.props.page.id,"data-sv-drop-target-survey-page":this.model.dropTargetName,className:"svc-page__content "+this.model.css,onClick:e=>this.model.select(this.model,new E(e)),onDoubleClick:e=>this.model.dblclick(e.nativeEvent),onMouseLeave:e=>this.model.hover(e.nativeEvent,e.currentTarget),onMouseOver:e=>this.model.hover(e.nativeEvent,e.currentTarget)},i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--top"}),i.createElement("div",{className:"svc-question__drop-indicator svc-question__drop-indicator--bottom"}),this.renderContent(),this.renderPlaceholder(),this.renderHeader(),this.renderFooter())):null}renderPlaceholder(){return this.model.showPlaceholder?i.createElement("div",{className:"svc-page__placeholder_frame"},i.createElement("div",{className:"svc-panel__placeholder_frame"},i.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText))):null}renderContent(){return this.model.needRenderContent?i.createElement(q,{page:this.props.page,survey:this.props.survey,creator:this.props.creator}):i.createElement("div",{className:"svc-page__loading-content"},i.createElement(r.LoadingIndicatorComponent,null))}renderHeader(){const e=i.createElement("div",{className:"svc-page__content-actions"},i.createElement(r.SurveyActionBar,{model:this.model.actionContainer}),this.model.topActionContainer.hasActions?i.createElement(r.SurveyActionBar,{model:this.model.topActionContainer}):null);return this.model.isGhost||!this.model.allowDragging?e:i.createElement("div",{className:"svc-question__drag-area",onPointerDown:e=>this.model.onPointerDown(e)},i.createElement(r.SvgIcon,{className:"svc-question__drag-element",size:"auto",iconName:"icon-drag-area-indicator_24x16"}),e)}renderFooter(){return i.createElement(r.SurveyActionBar,{model:this.model.footerActionsBar})}}r.ReactElementFactory.Instance.registerElement("svc-page",e=>i.createElement(D,e));class T extends r.SurveyElementBase{get model(){return this.item.data}get item(){return this.props.item}getStateElement(){return this.item}renderTypeSelector(){return i.createElement("div",{className:this.item.cssClasses.itemTypeSelector},r.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown",{item:this.model.questionTypeSelectorModel}))}renderElement(){return i.createElement(i.Fragment,null,r.attachKey2click(i.createElement("div",{className:this.item.getActionBarItemCss(),onClick:e=>{e.stopPropagation(),this.model.addNewQuestion(this.model,new E(e))},onMouseOver:e=>this.model.hoverStopper&&this.model.hoverStopper(e.nativeEvent,e.currentTarget)},i.createElement("span",{className:this.item.getActionBarItemTitleCss()},this.model.addNewQuestionText),this.renderTypeSelector())))}}r.ReactElementFactory.Instance.registerElement("svc-add-new-question-btn",e=>i.createElement(T,e));class F extends y{renderElementPlaceholder(){return this.model.isEmptyElement?i.createElement("div",{className:"svc-panel__placeholder_frame-wrapper"},i.createElement("div",{className:"svc-panel__placeholder_frame"},i.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText),this.model.showAddQuestionButton?i.createElement(r.SurveyActionBar,{model:this.model.addQuestionActionsContainer}):null)):null}disableTabStop(){return!0}createQuestionViewModel(e){return new n.PanelAdornerViewModel(e.componentData,e.question,null)}renderFooter(){return i.createElement(i.Fragment,null,!this.model.isEmptyElement&&this.model.element.isPanel&&this.model.showAddQuestionButton?i.createElement(r.SurveyActionBar,{model:this.model.addQuestionActionsContainer,handleClick:!1}):null,super.renderFooter())}}r.ReactElementFactory.Instance.registerElement("svc-panel",e=>i.createElement(F,e));class B extends p{constructor(e){super(e),this.rootRef=i.createRef()}createModel(e){let t=null;this.model&&(t=this.model.root),this.model=new n.LogoImageViewModel(e.data,t)}getUpdatedModelProps(){return["data"]}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.root=this.rootRef.current}renderButtons(){return i.createElement(r.SurveyActionBar,{model:this.model.actionsContainer})}renderImage(){return i.createElement("div",{className:this.model.containerCss},this.renderButtons(),i.createElement(r.LogoImage,{data:this.props.data.survey}))}renderPlaceHolder(){return this.model.allowEdit&&!this.model.isUploading?r.attachKey2click(i.createElement("div",{className:"svc-logo-image-placeholder",onClick:()=>this.model.chooseFile(this.model)},i.createElement("svg",null,i.createElement("use",{xlinkHref:"#icon-image-48x48"})))):null}renderInput(){return i.createElement("input",{"aria-hidden":"true",type:"file",tabIndex:-1,accept:this.model.acceptedTypes,className:"svc-choose-file-input"})}renderLoadingIndicator(){return i.createElement("div",{className:"svc-logo-image__loading"},i.createElement(r.LoadingIndicatorComponent,null))}render(){let e=null;return e=this.model.survey.locLogo.renderedHtml&&!this.model.isUploading?this.renderImage():this.model.isUploading?this.renderLoadingIndicator():this.renderPlaceHolder(),i.createElement("div",{ref:this.rootRef,className:"svc-logo-image"},this.renderInput(),e)}}r.ReactElementFactory.Instance.registerElement("svc-logo-image",e=>i.createElement(B,e));class k extends r.SurveyQuestionElementBase{get question(){return this.questionBase}renderClear(){const e=this.questionBase.showClear;return!this.questionBase.isReadOnly&&e?i.createElement(C,{classes:this.question.linkClearButtonCssClasses,click:()=>this.question.doClearClick(),text:n.editorLocalization.getString("pe.clear")}):null}renderElement(){return i.createElement(i.Fragment,null,i.createElement(C,{classes:this.question.linkSetButtonCssClasses,click:()=>this.question.doLinkClick(),selected:this.question.isSelected,disabled:!this.question.isClickable,text:this.question.linkValueText,title:this.question.tooltip,iconName:this.question.iconName}),this.renderClear())}}r.ReactQuestionFactory.Instance.registerQuestion("linkvalue",e=>i.createElement(k,e));class P extends r.SurveyQuestionElementBase{constructor(){super(...arguments),this.rootRef=i.createRef()}get embeddedSurvey(){const e=this.props.element||this.props.question;if(!e)return null;const t=e.embeddedSurvey;return t&&t.currentPage?t:null}get creator(){return this.props.creator}componentDidMount(){super.componentDidMount(),this.embeddedSurvey&&(this.embeddedSurvey.rootElement=this.rootRef.current)}render(){const e=this.embeddedSurvey;return e?i.createElement("div",{style:{display:"contents"},ref:this.rootRef},i.createElement(r.SurveyPage,{survey:e,page:e.currentPage,css:e.css,creator:this.creator})):null}}r.ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey",e=>i.createElement(P,e));class U extends i.Component{get survey(){return this.props.survey}createQuestionElement(e){return r.ReactQuestionFactory.Instance.createQuestion(!e.isDefaultRendering||e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})}questionTitleLocation(){return this.survey.questionTitleLocation}questionErrorLocation(){return this.survey.questionErrorLocation}renderError(e,t,r){return null}render(){const e=this.survey.getAllQuestions()[0];return i.createElement("div",{style:this.props.style},i.createElement(r.SurveyQuestion,{creator:this,element:e}))}}r.ReactElementFactory.Instance.registerElement("svc-question-editor-content",e=>i.createElement(U,e));class A extends p{constructor(e){super(e),this.onBlur=e=>{this.model.onFocusOut(e.nativeEvent)},this.rootRef=i.createRef()}createModel(e){this.model=new n.ItemValueWrapperViewModel(e.componentData.creator,e.question,e.item)}getUpdatedModelProps(){return["question","item"]}getStateElement(){return this.model}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.props.item.setRootElement(this.rootRef.current),e.item!==this.props.item&&e.item&&e.item.setRootElement(void 0)}componentDidMount(){super.componentDidMount(),this.props.item.setRootElement(this.rootRef.current)}componentWillUnmount(){super.componentWillUnmount(),this.props.item.setRootElement(void 0)}renderButton(e){return r.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:e})}render(){this.model.item=this.props.item;const e=this.model.allowAdd?this.renderButton(this.model.addAction):i.createElement(i.Fragment,null," ",this.model.isDraggable?i.createElement("span",{className:"svc-item-value-controls__drag"},i.createElement(r.SvgIcon,{className:"svc-item-value-controls__drag-icon",size:"auto",iconName:"icon-drag-24x24",title:this.model.dragTooltip})):null,this.model.allowRemove?this.renderButton(this.model.removeAction):null),t=this.props.element.key+(this.model.allowAdd?"_new":"");return i.createElement(i.Fragment,null,i.createElement("div",{ref:this.rootRef,className:"svc-item-value-wrapper"+(this.model.allowAdd?" svc-item-value--new":"")+(this.model.isDragging?" svc-item-value--dragging":"")+(this.model.isDragDropGhost?" svc-item-value--ghost":"")+(this.model.isDragDropMoveDown?" svc-item-value--movedown":"")+(this.model.isDragDropMoveUp?" svc-item-value--moveup":""),key:t,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:e=>this.model.onPointerDown(e)},i.createElement("div",{className:"svc-item-value__ghost"}),i.createElement("div",{className:"svc-item-value-controls",onBlur:this.onBlur},e),i.createElement("div",{className:"svc-item-value__item",onClick:e=>this.model.select(this.model,e.nativeEvent)},this.props.element),this.renderPanelAction()),this.renderPanel())}renderPanelAction(){if(!this.model.canShowPanel())return null;const e=this.renderButton(this.model.expandPanelAction);return i.createElement("div",{className:"svc-item-value-controls svc-choice-elements-button-container"},e)}renderPanel(){if(!this.model.renderedShowPanel)return null;const e=this.model.creator,t=e.survey;return i.createElement(L,{element:this.model.item.panel,survey:t,creator:e,css:t.getCss()})}}const L=i.memo(({element:e,survey:t,creator:n,css:s})=>i.createElement(r.SurveyPanel,{element:e,survey:t,creator:n,cssClasses:s}));L.displayName="ChoiceItemPanel",r.ReactElementFactory.Instance.registerElement("svc-item-value",e=>i.createElement(A,e));class V extends p{constructor(e){super(e),this.preventDragHandler=e=>{e.preventDefault()},this.rootRef=i.createRef()}createModel(e){this.model=new n.ImageItemValueWrapperViewModel(e.componentData.creator,e.question,e.item,null,null)}getUpdatedModelProps(){return["question","item"]}getStateElement(){return this.model}get question(){return this.props.question}componentDidMount(){super.componentDidMount(),this.model.itemsRoot=this.rootRef.current}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.model.itemsRoot=this.rootRef.current}renderLoadingIndicator(){return i.createElement("div",{className:"svc-image-item-value__loading"},i.createElement(r.LoadingIndicatorComponent,null))}renderNewItemControls(){const e=i.createElement(r.SurveyActionBar,{model:this.model.actionsContainer}),t=this.model.showPlaceholder?i.createElement("span",{className:"svc-image-item-value__placeholder"},this.model.placeholderText):null;return i.createElement(i.Fragment,null,t,e)}render(){this.model.item=this.props.item;const e=!this.props.question.isItemInList(this.props.item);this.model.isNew=e;const t=this.model.getIsNewItemSingle()?null:{width:this.question.renderedImageWidth,height:this.question.renderedImageHeight};let n=null;return n=e||this.model.isUploading?i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-image-item-value__item"},i.createElement("div",{className:"sd-imagepicker__item sd-imagepicker__item--inline"},i.createElement("label",{className:"sd-imagepicker__label"},i.createElement("div",{style:t,className:"sd-imagepicker__image"},this.model.isUploading?this.renderLoadingIndicator():null)))),this.model.allowAdd&&!this.model.isUploading?i.createElement("div",{className:"svc-image-item-value-controls"},this.renderNewItemControls()):null):i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-image-item-value__item"},this.props.element),this.model.canRenderControls?i.createElement(r.SurveyActionBar,{model:this.model.topActionsContainer}):null),i.createElement("div",{ref:this.rootRef,className:this.model.getRootCss(),key:this.props.element.key,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:e=>this.model.onPointerDown(e),onDragStart:this.preventDragHandler,onDrop:this.model.onDrop,onDragEnter:this.model.onDragEnter,onDragOver:this.model.onDragOver,onDragLeave:this.model.onDragLeave},i.createElement("div",{className:"svc-image-item-value-wrapper__ghost",style:t}),i.createElement("div",{className:"svc-image-item-value-wrapper__content"},i.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:this.model.acceptedTypes,className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),n))}}class Q extends r.SurveyElementBase{renderElement(){return i.createElement("span",{className:this.props.item.getActionBarItemCss(),onPointerDown:e=>this.props.item.data.model.onPointerDown(e)},i.createElement(r.SvgIcon,{size:"auto",iconName:this.props.item.iconName,className:this.props.item.cssClasses.itemIcon}))}}r.ReactElementFactory.Instance.registerElement("svc-image-item-drag-action",e=>i.createElement(Q,e)),r.ReactElementFactory.Instance.registerElement("svc-image-item-value",e=>i.createElement(V,e));class H extends p{createModel(e){var t;const r=e.componentData;let s=!1;this.model&&(s=this.model.isSelected),this.model=new n.MatrixCellWrapperViewModel(r.creator,r.element,r.question,r.row,r.column||(null===(t=r.element.cell)||void 0===t?void 0:t.column)),this.model.isSelected=s}getUpdatedModelProps(){return["componentData"]}componentDidUpdate(e,t){var r,n;super.componentDidUpdate(e,t);const s=this.props.componentData;this.model.templateData=s.element,this.model.row=s.row,this.model.column=s.column||(null===(n=null===(r=s.element)||void 0===r?void 0:r.cell)||void 0===n?void 0:n.column),this.model.question=s.question}getStateElement(){return this.model}render(){let e=null;return this.model.isSupportCellEditor&&(e=i.createElement("div",{className:"svc-matrix-cell__question-controls"},r.ReactElementFactory.Instance.createElement("sv-action-bar-item",{item:this.model.editAction}))),i.createElement("div",{className:"svc-matrix-cell",tabIndex:-1,key:this.props.element.key,onClick:e=>!this.props.question&&this.model.selectContext(this.model,e),onMouseOut:e=>this.model.hover(e.nativeEvent,e.currentTarget),onMouseOver:e=>this.model.hover(e.nativeEvent,e.currentTarget)},i.createElement("div",{className:"svc-matrix-cell--selected"+(this.model.isSelected?" svc-visible":"")}),this.props.element,e)}}r.ReactElementFactory.Instance.registerElement("svc-matrix-cell",e=>i.createElement(H,e));class W extends p{createModel(e){this.props.survey&&(this.model=new n.SurveyResultsModel(e.survey))}getUpdatedModelProps(){return["survey"]}getStateElement(){return this.model}render(){return this.model?i.createElement("div",{className:"svd-test-results"},i.createElement("div",{className:"svd-test-results__content"},i.createElement("div",{className:"svd-test-results__header"},i.createElement("div",{className:"svd-test-results__header-text"},this.model.surveyResultsText),i.createElement("div",{className:"svd-test-results__header-types"},i.createElement(C,{click:()=>this.model.selectTableClick(),text:this.model.surveyResultsTableText,selected:this.model.isTableSelected,disabled:!1}),i.createElement(C,{click:()=>this.model.selectJsonClick(),text:this.model.surveyResultsJsonText,selected:this.model.isJsonSelected,disabled:!1}))),this.renderResultAsText(),this.renderResultAsTable())):null}renderResultAsText(){return"text"!==this.model.resultViewType?null:i.createElement("div",{className:"svd-test-results__text svd-light-bg-color"},i.createElement("div",null,this.model.resultText))}renderResultAsTable(){return"table"!==this.model.resultViewType?null:i.createElement("div",{className:"svd-test-results__table svd-light-bg-color"},i.createElement("table",null,i.createElement("thead",null,i.createElement("tr",{className:"svd-light-background-color"},i.createElement("th",{key:1,className:"svd-dark-border-color"},this.model.resultsTitle),i.createElement("th",{key:2,className:"svd-dark-border-color"},this.model.resultsDisplayValue))),i.createElement("tbody",null,W.renderRows(this.model.resultData))))}static renderRows(e){const t=[];for(var r=0;r<e.length;r++)t.push(i.createElement(O,{key:r+1,row:e[r]}));return t}}class O extends p{get row(){return this.props.row}getStateElement(){return this.row}render(){return i.createElement(i.Fragment,null,r.attachKey2click(i.createElement("tr",{onClick:()=>this.row.toggle()},i.createElement("td",{key:1,style:{paddingLeft:this.row.textMargin},className:"svd-dark-border-color"},this.row.isNode?i.createElement("span",{style:{left:this.row.markerMargin},className:"svd-test-results__marker "+(this.row.collapsed?"":"svd-test-results__marker--expanded")},i.createElement(r.SvgIcon,{iconName:"icon-expand_16x16",size:16})):null,this.row.question?i.createElement(r.SurveyLocStringViewer,{model:this.row.question.locTitle}):i.createElement("span",null,this.row.title)),i.createElement("td",{key:2,className:this.row.isNode?"svd-test-results__node-value":"svd-dark-border-color"},this.row.getString(this.row.displayValue)))),this.row.isNode&&!this.row.collapsed?W.renderRows(this.row.data):null)}}class j extends p{constructor(e){super(e),this.rootRef=i.createRef()}createModel(e){this.model=new n.ToolboxToolViewModel(e.item,e.creator,e.parentModel)}getUpdatedModelProps(){return["creator","item"]}get item(){return this.props.item}get creator(){return this.props.creator}get isCompact(){return this.props.isCompact}getStateElement(){return this.item}render(){const e=this.item,t=r.ReactElementFactory.Instance.createElement(this.model.itemComponent,{item:e,creator:this.creator,parentModel:this.creator.toolbox,model:this.model,isCompact:this.isCompact});return i.createElement("div",{className:e.css,key:e.id,ref:this.rootRef},e.needSeparator&&!this.creator.toolbox.showCategoryTitles?i.createElement("div",{className:"svc-toolbox__category-separator"}):null,i.createElement("div",{className:"svc-toolbox__tool-content",onPointerDown:e=>{e.persist(),this.model.onPointerDown(e)}},t))}componentWillUnmount(){super.componentWillUnmount(),this.item.updateModeCallback=void 0}componentDidMount(){super.componentDidMount(),this.item.updateModeCallback=(e,t)=>{queueMicrotask(()=>{l.flushSync?l.flushSync(()=>{this.item.mode=e}):this.item.mode=e,queueMicrotask(()=>{t(e,this.rootRef.current)})})},this.item.afterRender()}}class K extends p{constructor(e){super(e)}getUpdatedModelProps(){return["creator","item"]}get item(){return this.props.item}get creator(){return this.props.creator}get model(){return this.props.model}getStateElement(){return this.model}render(){const e=this.props.isCompact?i.createElement("span",{className:"svc-toolbox__item-banner",onClick:e=>{e.persist(),this.model.click(e)}},i.createElement(r.SvgIcon,{size:"auto",iconName:this.item.iconName,className:"svc-toolbox__item-icon",title:this.item.getTooltip()}),i.createElement("span",null,this.item.title)):null,t=r.attachKey2click(i.createElement("div",{className:this.item.renderedCss,tabIndex:0,role:"button","aria-label":this.item.getTooltip(),onClick:e=>{e.persist(),this.model.click(e)}},i.createElement("span",{className:"svc-toolbox__item-container"},this.item.iconName?i.createElement(r.SvgIcon,{size:"auto",iconName:this.item.iconName,className:"svc-toolbox__item-icon"}):null),this.props.isCompact?null:i.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)),void 0,{disableTabStop:!this.model.toolboxItem.enabled});return i.createElement(i.Fragment,null,t,e)}}r.ReactElementFactory.Instance.registerElement("svc-toolbox-item",e=>t.createElement(K,e));class z extends p{constructor(e){super(e)}getUpdatedModelProps(){return["creator","item"]}get item(){return this.props.item}get model(){return this.props.model}get creator(){return this.props.creator}get isCompact(){return this.props.isCompact}get parentModel(){return this.props.parentModel}getStateElement(){return this.item}render(){return i.createElement(i.Fragment,null,i.createElement(K,{item:this.item,creator:this.creator,model:this.model,parentModel:this.parentModel,isCompact:this.isCompact}),i.createElement("div",{className:"svc-toolbox__item-submenu-button",onMouseOver:e=>this.model.onMouseOver(this.item,e),onMouseLeave:e=>this.model.onMouseLeave(this.item,e)},i.createElement(r.SvgIcon,{size:"auto",iconName:this.item.subitemsButtonIcon}),i.createElement(r.Popup,{model:this.item.popupModel})))}}r.ReactElementFactory.Instance.registerElement("svc-toolbox-item-group",e=>i.createElement(z,e));class G extends r.SurveyElementBase{get category(){return this.props.category}get toolbox(){return this.props.toolbox}get class(){return"svc-toolbox__category"+(this.category.collapsed?" svc-toolbox__category--collapsed":"")+(this.category.empty?" svc-toolbox__category--empty":"")}getStateElement(){return this.category}render(){const e=this.renderCategoryHeader(),t=this.renderCategoryContent();return i.createElement("div",{className:this.class,key:this.category.name},i.createElement("div",{className:"svc-toolbox__category-header-wrapper"},e),t)}renderCategoryHeader(){let e="svc-toolbox__category-header";this.toolbox.canCollapseCategories&&(e+=" svc-toolbox__category-header--collapsed");const t=this.renderLocString(this.category.locTitle);return r.attachKey2click(i.createElement("div",{className:e,onClick:e=>this.category.toggleState()},i.createElement("span",{className:"svc-toolbox__category-title"},t),this.renderButton()))}renderButton(){if(!this.toolbox.canCollapseCategories)return null;const e=this.category.iconName;return i.createElement("div",{className:"svc-toolbox__category-header__controls"},i.createElement(r.SvgIcon,{className:this.category.iconClassName,iconName:e,size:"auto"}))}renderCategoryContent(){return this.renderItems(this.category.items)}renderItems(e,t=!1){return e.map((e,r)=>i.createElement(j,{item:e,creator:this.toolbox.creator,parentModel:this.toolbox,isCompact:t,key:"item"+r}))}}r.ReactElementFactory.Instance.registerElement("svc-toolbox-category",e=>i.createElement(G,e));class J extends r.SurveyElementBase{constructor(e){super(e)}get model(){return this.props.model}get creator(){return this.props.creator}getStateElement(){return this.model}render(){if(!this.model||!this.model.renderElements)return null;const e=this.renderItems();return i.createElement("div",{className:this.model.cssClasses.root},e)}renderItems(){return this.model.renderedActions.map((e,t)=>i.createElement(j,{item:e,creator:this.creator,parentModel:this.model,isCompact:!1,key:"item"+t}))}}r.ReactElementFactory.Instance.registerElement("svc-toolbox-list",e=>i.createElement(J,e));class X extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}constructor(e){super(e),this.state={filterString:this.model.filterString||""}}renderElement(){if(!this.model.isVisible)return null;return i.createElement("div",{className:"svc-search"},i.createElement("div",{className:"svc-search__search-icon"},i.createElement(r.SvgIcon,{iconName:"icon-search",size:"auto"})),i.createElement("input",{type:"text",className:"svc-search__input","aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onChange:e=>{const t=e.target,r=(null==t?void 0:t.getRootNode())||o.settings.environment.root;(r instanceof Document||r instanceof ShadowRoot)&&t===r.activeElement&&(this.model.filterString=t.value)},tabIndex:this.model.getTabIndex()}),i.createElement("div",{className:"svc-search__toolbar"},i.createElement("div",{className:"svc-search__toolbar-counter"},this.model.matchCounterText),i.createElement(r.SurveyActionBar,{model:this.model.searchActionBar})))}}r.ReactElementFactory.Instance.registerElement("svc-search",e=>i.createElement(X,e));class Y extends r.SurveyElementBase{constructor(e){super(e),this.rootRef=i.createRef()}componentDidUpdate(e,t){super.componentDidUpdate(e,t);const r=this.rootRef.current;r&&this.toolbox.afterRender(r)}componentDidMount(){super.componentDidMount();const e=this.rootRef.current;e&&this.toolbox.afterRender(e)}componentWillUnmount(){this.toolbox.beforeDestroy(),super.componentWillUnmount()}get creator(){return this.props.model}get toolbox(){return this.creator.toolbox}getStateElement(){return this.toolbox}renderItems(e,t=!1){return e.map((e,r)=>i.createElement(j,{item:e,creator:this.creator,parentModel:this.toolbox,isCompact:t,key:e.renderedId}))}renderCategories(){return this.toolbox.categories.map((e,t)=>r.ReactElementFactory.Instance.createElement("svc-toolbox-category",{category:e,toolbox:this.toolbox,key:"category"+t}))}renderSearch(){const e=this.toolbox.isCompactRendered?i.createElement(i.Fragment,null,i.createElement(j,{item:this.toolbox.searchItem,creator:this.creator,parentModel:this.toolbox,isCompact:this.toolbox.isCompactRendered,key:"searchitem"})):null;return i.createElement("div",{className:"svc-toolbox__search-container"},e,i.createElement(X,{model:this.toolbox.searchManager}),i.createElement("div",{className:"svc-toolbox__category-separator svc-toolbox__category-separator--search"}))}render(){const e=this.toolbox.showSearch?this.renderSearch():null,t=this.toolbox.showPlaceholder?i.createElement("div",{className:"svc-toolbox__placeholder"},this.toolbox.toolboxNoResultsFound):null;return i.createElement("div",{ref:this.rootRef,className:this.toolbox.classNames,style:this.toolbox.getRootStyle()},i.createElement("div",{onBlur:e=>this.toolbox.focusOut(e),className:"svc-toolbox__panel"},e,t,i.createElement(r.Scroll,null,this.toolbox.showInSingleCategory?i.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.renderedActions,this.toolbox.isCompactRendered)):this.renderCategories())))}}r.ReactElementFactory.Instance.registerElement("svc-toolbox",e=>i.createElement(Y,e));class Z extends r.SurveyElementBase{constructor(){super(...arguments),this.onPropChangedHandler=(e,t)=>{if(this.isRendering)return;const r=["showProgressBar","progressBarType","currentPageValue"];if(!(r.indexOf(t.name)<0)){for(var n={},s=0;s<r.length;s++){var o=r[s];n[o]=this.survey[o]}this.setState(n)}}}componentDidMount(){super.componentDidMount(),this.setHandler()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.setHandler()}setHandler(){this.survey&&!this.survey.onPropertyChanged.hasFunc(this.onPropChangedHandler)&&this.survey.onPropertyChanged.add(this.onPropChangedHandler)}componentWillUnmount(){super.componentWillUnmount(),this.survey&&this.survey.onPropertyChanged.remove(this.onPropChangedHandler)}get survey(){return this.props.survey}get location(){return this.props.location}get isTop(){return"top"==this.location}canRender(){return this.isTop?this.survey.isShowProgressBarOnTop:this.survey.isShowProgressBarOnBottom}renderElement(){return r.ReactElementFactory.Instance.createElement(this.survey.getProgressTypeComponent(),{survey:this.survey,css:this.survey.css,isTop:this.isTop})}}class $ extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.props.model}renderElement(){if(!this.props.model.visible)return null;const e=r.ReactElementFactory.Instance.createElement(this.props.model.component||"sv-action-bar-item",{item:this.props.model});return i.createElement("div",{className:"svc-sidebar-tabs__item"},e)}}class ee extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.props.model}canRender(){return!!this.props.model&&super.canRender()}renderElement(){return i.createElement("div",{className:this.props.model.sideBarClassName},i.createElement("div",{className:"svc-sidebar-tabs__top-container"},i.createElement("div",{className:"svc-sidebar-tabs__collapse-button"},i.createElement($,{model:this.props.model.expandCollapseAction})),i.createElement("div",{className:"svc-sidebar-tabs__separator"},i.createElement("div",null)),i.createElement(r.Scroll,null,i.createElement("div",{className:"svc-sidebar-tabs__items"},i.createElement(te,{model:this.props.model.topToolbar})))),i.createElement("div",{className:"svc-sidebar-tabs__bottom-container"},i.createElement("div",{className:"svc-sidebar-tabs__items"},i.createElement(r.SurveyActionBar,{model:this.props.model.bottomToolbar}))))}}r.ReactElementFactory.Instance.registerElement("svc-tab-control",e=>i.createElement(ee,e));class te extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.props.model}renderElement(){return i.createElement(i.Fragment,null,this.props.model.actions.map((e,t)=>i.createElement($,{model:e,key:"item"+t})))}}class re extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}renderElement(){const e=this.model.title?i.createElement("div",{className:"svc-side-bar__container-title"},this.model.title):null;return i.createElement("div",{className:"svc-side-bar__container-header"},i.createElement("div",{className:"svc-side-bar__container-actions"},i.createElement(r.SurveyActionBar,{model:this.model.toolbar})),e)}}r.ReactElementFactory.Instance.registerElement("svc-side-bar-default-header",e=>i.createElement(re,e));class ne extends r.SurveyElementBase{get objectSelectionAction(){return this.props.model}getStateElement(){return this.objectSelectionAction}renderElement(){const e=r.attachKey2click(i.createElement("div",{className:this.objectSelectionAction.getActionBarItemCss()+" svc-sidebar__header-object-selector",onClick:()=>this.objectSelectionAction.action()},i.createElement("div",{className:"svc-sidebar__header-caption"},i.createElement("span",{className:"svc-sidebar__header-title"},this.objectSelectionAction.title),i.createElement("span",{className:"svc-sidebar__header-subtitle"},this.objectSelectionAction.tooltip))),this.props.model);return i.createElement("div",{className:"svc-sidebar__header svc-sidebar__header--tabbed"},i.createElement("div",{className:"svc-sidebar__header-container svc-sidebar__header-container--with-subtitle"},i.createElement("div",{className:"svc-sidebar__header-content"},e,i.createElement(r.Popup,{model:this.objectSelectionAction.popupModel}))))}}r.ReactElementFactory.Instance.registerElement("svc-side-bar-property-grid-header",e=>i.createElement(ne,e));class se extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}renderElement(){return i.createElement("div",{className:"svc-side-bar__container-header svc-sidebar__header-container"},this.model.subTitle?i.createElement("div",{className:"svc-sidebar__header-caption"},i.createElement("span",{className:"svc-sidebar__header-title"},this.model.title),i.createElement("span",{className:"svc-sidebar__header-subtitle"},this.model.subTitle)):i.createElement("div",{className:"svc-side-bar__container-title"},this.model.title))}}r.ReactElementFactory.Instance.registerElement("svc-side-bar-header",e=>i.createElement(se,e));class oe extends r.SurveyElementBase{get model(){return this.props.model}constructor(e){super(e),this.containerRef=i.createRef()}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.initResizeManager(this.containerRef.current)}componentWillUnmount(){super.componentWillUnmount(),this.model.resetResizeManager()}canRender(){return!!this.model&&super.canRender()}renderElement(){const e={display:this.model.renderRoot?"":"none"},t={display:this.model.renderContainer?"":"none"},n=this.model.pages.map(e=>i.createElement(ae,{page:e,key:e.id})),s=r.ReactElementFactory.Instance.createElement(this.model.header.component,{model:this.model.header.componentModel});let o=null;return this.model.sideAreaComponentName&&(o=r.ReactElementFactory.Instance.createElement(this.model.sideAreaComponentName,{model:this.model.sideAreaComponentData})),i.createElement("div",{className:this.model.rootCss,style:e},i.createElement("div",{className:"svc-side-bar__shadow",onClick:()=>this.model.collapseSidebar(),style:t}),i.createElement("div",{className:"svc-flex-row svc-side-bar__wrapper"},i.createElement("div",{className:"svc-side-bar__container-wrapper",style:t},i.createElement("div",{ref:this.containerRef,className:"svc-side-bar__container"},s,i.createElement("div",{className:"svc-side-bar__container-content"},n))),o))}}class ae extends r.SurveyElementBase{get page(){return this.props.page}getStateElement(){return this.page}renderElement(){if(!this.page.visible)return null;return r.ReactElementFactory.Instance.createElement(this.page.componentName,{model:this.page.componentData})}}r.ReactQuestionFactory.Instance.registerQuestion("svc-side-bar-page",e=>i.createElement(ae,e)),r.ReactElementFactory.Instance.registerElement("svc-side-bar",e=>i.createElement(oe,e));class ie extends i.Component{render(){const e=this.props.model;return e?i.createElement("div",{className:"spg-launch"},i.createElement("button",{className:"spg-launch__card",onClick:e.onClick},i.createElement("div",{className:"spg-launch__container"},i.createElement("div",{className:"spg-launch__text"},e.title),i.createElement("div",{className:"spg-launch__text2"},e.description)),i.createElement("div",{className:"spg-launch__icon"},i.createElement("div",{className:"spg-launch__chevron-right-16-x-16"},i.createElement("div",{className:"spg-launch__icon2"},i.createElement(r.SvgIcon,{size:"auto",iconName:"chevrondown-24x24"})))))):null}}r.ReactElementFactory.Instance.registerElement("svc-side-bar-launch-card",e=>i.createElement(ie,e));class le extends i.Component{render(){return i.createElement("div",{className:"sd-translation-line-skeleton"})}}r.ReactElementFactory.Instance.registerElement("sd-translation-line-skeleton",e=>i.createElement(le,e));class ce extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}renderElement(){const e=this.item;return i.createElement("div",{className:e.data.containerCss},i.createElement("span",{className:e.data.additionalTitleCss},e.data.additionalTitle),r.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown",{item:this.item}))}}r.ReactElementFactory.Instance.registerElement("svc-translate-from-action",e=>i.createElement(ce,e));class me extends p{constructor(e){var t;super(e),this.onChangedHandler=(e,t)=>{this.setState({changed:this.state&&this.state.changed?this.state.changed+1:1})},this.onBlur=e=>(this.svStringEditorRef.current&&(this.svStringEditorRef.current.spellcheck=!1),this.locString.__isEditing=!1,this.justFocused=!1,this.baseModel.onBlur(e.nativeEvent),this.baseModel.errorText),this.onCompositionStart=e=>{this.baseModel.onCompositionStart(e.nativeEvent)},this.onCompositionEnd=e=>{this.baseModel.onCompositionEnd(e.nativeEvent)},this.onBeforeInput=e=>{this.baseModel.onBeforeInput(e)},this.onInput=e=>{this.baseModel.onInput(e.nativeEvent)},this.onPaste=e=>{this.baseModel.onPaste(e.nativeEvent)},this.justFocused=!1,this.onFocus=e=>{this.baseModel.onFocus(e.nativeEvent),this.justFocused=!0},this.onKeyDown=e=>this.baseModel.onKeyDown(e.nativeEvent),this.onKeyUp=e=>this.baseModel.onKeyUp(e.nativeEvent),this.onMouseUp=e=>this.baseModel.onMouseUp(e.nativeEvent),this.done=e=>{this.baseModel.done(e),this.locString.__isEditing=!1},this.edit=e=>{this.svStringEditorRef.current.focus(),this.locString.__isEditing=!0,this.baseModel.onClick(e)},this.htmlValue={__html:null===(t=this.locString)||void 0===t?void 0:t.renderedHtml},this.state={changed:0},this.svStringEditorRef=i.createRef()}createModel(e){this.baseModel&&this.baseModel.dispose(),this.baseModel=new n.StringEditorViewModelBase(this.locString,this.creator)}getUpdatedModelProps(){return["creator","locString"]}get locString(){return this.props.model.locStr}get creator(){return this.props.model.creator}get style(){return this.props.style}getStateElement(){return this.baseModel}get errorText(){return this.baseModel.errorText}componentDidMount(){super.componentDidMount(),this.locString&&(this.baseModel.setLocString(this.locString),this.baseModel.getEditorElement=()=>this.svStringEditorRef.current,this.baseModel.blurEditor=()=>{this.svStringEditorRef.current.blur(),this.svStringEditorRef.current.spellcheck=!1},this.baseModel.afterRender(),this.locString.onStringChanged.add(this.onChangedHandler),this.locString.__isEditing&&this.svStringEditorRef.current.focus())}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.baseModel.setLocString(this.locString),this.baseModel.afterRender(),this.locString.onStringChanged.add(this.onChangedHandler)}componentWillUnmount(){super.componentWillUnmount(),this.baseModel.detachFromUI(),this.locString&&this.locString.onStringChanged.remove(this.onChangedHandler)}get placeholder(){return this.baseModel.placeholder}get contentEditable(){return this.baseModel.contentEditable}get className(){return this.baseModel.className(this.locString.renderedHtml)}render(){if(!this.locString)return null;let e=null;this.locString.hasHtml?(this.htmlValue.__html!==this.locString.renderedHtml&&(this.htmlValue={__html:this.locString.renderedHtml}),e=i.createElement("span",{role:"textbox",ref:this.svStringEditorRef,className:"sv-string-editor sv-string-editor--html",contentEditable:this.contentEditable,spellCheck:!1,"aria-placeholder":this.placeholder,"aria-label":this.placeholder||"content editable",suppressContentEditableWarning:!0,tabIndex:this.baseModel.tabIndex,dangerouslySetInnerHTML:this.htmlValue,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onClick:this.edit})):e=i.createElement("span",{role:"textbox",ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,tabIndex:this.baseModel.tabIndex,spellCheck:!1,"aria-placeholder":this.placeholder,"aria-label":this.placeholder||"content editable",suppressContentEditableWarning:!0,key:this.locString.renderedHtml,onBlur:this.onBlur,onBeforeInput:this.onBeforeInput,onInput:this.onInput,onPaste:this.onPaste,onCompositionStart:this.onCompositionStart,onCompositionEnd:this.onCompositionEnd,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onMouseUp:this.onMouseUp,onClick:this.edit},this.locString.renderedHtml);const t=this.baseModel.showCharacterCounter?i.createElement(r.CharacterCounterComponent,{counter:this.baseModel.characterCounter,remainingCharacterCounter:this.baseModel.getCharacterCounterClass}):null;return i.createElement("span",{className:this.className},i.createElement("span",{className:"svc-string-editor__content"},i.createElement("div",{className:"svc-string-editor__border svc-string-editor__border--hover",onClick:this.edit}),i.createElement("div",{className:"svc-string-editor__border svc-string-editor__border--focus",onClick:this.edit}),i.createElement("span",{className:"svc-string-editor__input"},e,i.createElement("div",{className:"svc-string-editor__controls",onClick:this.edit}),t)),this.errorText?i.createElement("span",{className:"svc-string-editor__error"},this.errorText):"")}}r.ReactElementFactory.Instance.registerElement(n.editableStringRendererName,e=>i.createElement(me,e));class de extends i.Component{render(){return i.createElement("div",null,i.createElement(r.SvgIcon,{"aria-hidden":"true",iconName:"icon-alert_24x24",size:"auto",className:this.props.cssClasses.error.icon}),i.createElement("span",{className:this.props.cssClasses.error.item||void 0},i.createElement(r.SurveyLocStringViewer,{model:this.props.error.locText})))}}r.ReactElementFactory.Instance.registerElement("svc-question-error",e=>i.createElement(de,e));class ue extends r.SurveyQuestionDropdown{constructor(e){super(e)}renderInput(){const e=this.question;n.initLogicOperator(e);const t=e.locReadOnlyText?this.renderLocString(e.locReadOnlyText):"",r=this.question.dropdownListModel;return i.createElement("div",{id:this.question.inputId,className:e.getControlClass(),tabIndex:this.question.isInputReadOnly?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onKeyUp:this.keyhandler,role:r.ariaQuestionRole,"aria-required":r.ariaQuestionRequired,"aria-invalid":r.ariaQuestionInvalid,"aria-errormessage":r.ariaQuestionErrorMessage,"aria-expanded":r.ariaQuestionExpanded,"aria-label":r.ariaQuestionLabel,"aria-labelledby":r.ariaQuestionLabelledby,"aria-controls":r.ariaQuestionControls},i.createElement("div",{className:this.question.cssClasses.controlValue},t))}renderEditorButtons(){return null}}r.ReactQuestionFactory.Instance.registerQuestion("sv-logic-operator",e=>i.createElement(ue,e)),o.RendererFactory.Instance.registerRenderer("dropdown","logicoperator","sv-logic-operator");class he extends p{constructor(e){super(e),this.containerRef=i.createRef()}createModel(e){this.model&&this.model.dispose(),this.model=new n.PageNavigatorViewModel(e.pagesController,e.pageEditMode)}getUpdatedModelProps(){return["pagesController","pageEditMode"]}getStateElement(){return this.model}componentDidMount(){super.componentDidMount();const e=this.containerRef.current;this.model.attachToUI(e)}componentWillUnmount(){super.componentWillUnmount(),this.model.stopItemsContainerHeightObserver(),this.model.setScrollableContainer(void 0)}renderElement(){return i.createElement("div",{className:"svc-page-navigator",ref:this.containerRef,style:{display:this.model.visible?"flex":"none"}},i.createElement("div",null,r.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown",{item:this.model.selectorAction})),i.createElement("div",null,this.model.visibleItems.map(e=>i.createElement(pe,{key:e.id,item:e}))))}}class pe extends p{getStateElement(){return this.props.item}renderElement(){const e=this.props.item;let t="svc-page-navigator-item-content";return o.unwrap(e.active)&&(t+=" svc-page-navigator-item--selected"),o.unwrap(e.disabled)&&(t+=" svc-page-navigator-item--disabled"),i.createElement("div",{className:"svc-page-navigator-item"},r.attachKey2click(i.createElement("div",{role:"button",className:t,onClick:t=>{e.action(e),t.stopPropagation()}},i.createElement("div",{className:"svc-page-navigator-item__dot",title:e.title},i.createElement("div",{className:"svc-page-navigator-item__dot-content"})),i.createElement("div",{className:"svc-page-navigator-item__banner"},i.createElement("span",{className:"svc-page-navigator-item__text"},e.title),i.createElement("span",{className:"svc-page-navigator-item__dot"},i.createElement("span",{className:"svc-page-navigator-item__dot-content"}))))))}}class ve extends i.Component{constructor(e){super(e)}render(){return i.createElement("div",{className:"svc-surface-placeholder"},i.createElement("div",{className:"svc-surface-placeholder__image svc-surface-placeholder__image--"+this.props.name}),i.createElement("div",{className:"svc-surface-placeholder__text"},i.createElement("div",{className:"svc-surface-placeholder__title"},this.props.placeholderTitleText),i.createElement("div",{className:"svc-surface-placeholder__description"},this.props.placeholderDescriptionText)))}}r.ReactElementFactory.Instance.registerElement("svc-surface-placeholder",e=>i.createElement(ve,e));class Ee extends r.SurveyElementBase{constructor(){super(...arguments),this.denyUpdate=()=>{this.denyComponentUpdate()},this.allowUpdate=()=>{this.allowComponentUpdate()},this.addDragDropEvents=()=>{this.creator.onDragStart.add(this.denyUpdate),this.creator.onDragClear.add(this.allowUpdate)},this.clearDragDropEvents=()=>{this.creator.onDragStart.remove(this.denyUpdate),this.creator.onDragClear.remove(this.allowUpdate)}}get model(){return this.props.data}get creator(){return this.model.creator}componentDidMount(){super.componentDidMount(),this.addDragDropEvents()}componentWillUnmount(){super.componentWillUnmount(),this.clearDragDropEvents(),super.componentWillUnmount()}getStateElements(){return[this.model,this.model.survey,this.model.pagesController]}getRenderedPages(){const e=[];if("bypage"!==this.creator.pageEditMode){this.model.pages.forEach(t=>{e.push(this.createRenderedPage(t,"svc-page",t==this.model.newPage))})}else{const t=this.model.pagesController.page2Display;t&&e.push(this.createRenderedPage(t,"svc-page",this.model.newPage===t))}return e}createRenderedPage(e,t,r){return i.createElement(ge,{key:null==e?void 0:e.id,page:e,isGhost:r,creator:this.creator,className:t})}renderElement(){const e="svc-tab-designer "+this.model.getRootCss();return i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-flex-column"},this.model.isToolboxVisible?r.ReactElementFactory.Instance.createElement("svc-toolbox",{model:this.creator}):null),i.createElement("div",{className:e,onClick:()=>this.model.clickDesigner()},i.createElement(r.Scroll,null,i.createElement("div",{className:"svc-tab-designer_content"},this.model.showPlaceholder?this.renderPlaceHolder():this.renderTabContent()))))}renderHeader(e){if(!e)return null;const t=this.creator.survey;return i.createElement(i.Fragment,null,i.createElement("div",{className:"svc-designer-header"},i.createElement(r.SurveyHeader,{survey:t})))}renderPlaceHolder(){const e=this.renderHeader(this.creator.showSurveyHeader&&this.creator.showHeaderInEmptySurvey);return i.createElement(i.Fragment,null,e,i.createElement("div",{className:"svc-designer__placeholder-container","data-sv-drop-target-survey-element":"newGhostPage"},this.renderPlaceHolderContent(),this.createRenderedPage(this.model.newPage,"svc-designer-placeholder-page",!0)))}renderPlaceHolderContent(){return i.createElement(ve,{name:"designer",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})}renderTabContent(){const e=this.creator.survey,t=this.renderHeader(this.creator.showSurveyHeader),r={...this.model.surfaceCssVariables};r.maxWidth=e.renderedWidth;const n=this.renderTabTools();return i.createElement(i.Fragment,null,i.createElement("div",{className:this.model.designerCss,style:r},t,this.getRenderedPages()),n)}renderTabTools(){if(!this.model.showSurfaceTools)return null;const e=this.creator.showPageNavigator?i.createElement("div",{className:"svc-tab-designer__page-navigator"},i.createElement(he,{pagesController:this.model.pagesController,pageEditMode:this.model.creator.pageEditMode})):null,t=this.model.showSurfaceToolbar?i.createElement(r.SurveyActionBar,{model:this.model.surfaceToolbar,handleClick:!1}):null;return i.createElement("div",{className:"svc-tab-designer__tools"},e,t)}}r.ReactElementFactory.Instance.registerElement("svc-tab-designer",e=>i.createElement(Ee,e));class ge extends i.Component{constructor(e){super(e),this.id="PageWrapperCallback_"+ ++ge.ID,this.state={changed:0}}render(){var e,t;const n=this.props.page?r.ReactElementFactory.Instance.createElement("svc-page",{survey:this.props.creator.survey,page:this.props.page,creator:this.props.creator,isGhost:this.props.isGhost}):null;return i.createElement("div",{className:this.props.className,"data-sv-drop-target-page":null===(e=this.props.page)||void 0===e?void 0:e.name,"data-sv-drop-target-survey-element":this.props.isGhost?"newGhostPage":null===(t=this.props.page)||void 0===t?void 0:t.name},n)}setupCallback(e){e&&e.registerFunctionOnPropertyValueChanged("name",()=>{this.setState({changed:this.state&&this.state.changed?this.state.changed+1:1})},this.id)}clearCallback(e){e&&e.unRegisterFunctionOnPropertyValueChanged("name")}componentDidUpdate(e,t){e.page!==this.props.page&&(this.clearCallback(e.page),this.setupCallback(this.props.page))}componentDidMount(){this.setupCallback(this.props.page)}componentWillUnmount(){this.clearCallback(this.props.page)}}ge.ID=0;class ye extends r.SurveyElementBase{getStateElement(){return this.model}get model(){return this.props.data}renderElement(){return i.createElement("div",{className:"svc-json-editor-tab__errros_list",style:{display:this.model.hasErrors?"block":"none"}},i.createElement(r.List,{model:this.model.errorList}))}}class be extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.model}get model(){return this.props.data}renderElement(){const e=e=>{this.model.textElement=e},t=i.createElement(ye,{data:this.model});return i.createElement("div",{className:"svc-creator-tab__content"},i.createElement("div",{className:"svc-json-editor-tab__content"},i.createElement("textarea",{ref:t=>e(t),className:"svc-json-editor-tab__content-area",value:this.model.text,onChange:e=>this.model.text=e.target.value,onKeyDown:e=>this.model.checkKey(e,e),disabled:this.model.readOnly,"aria-label":this.model.ariaLabel}),t))}}r.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-textarea",e=>i.createElement(be,e));class _e extends r.SurveyElementBase{constructor(e){super(e),this.aceEditorrRef=i.createRef()}getStateElement(){return this.model}get model(){return this.props.data}componentDidMount(){this.model.init(ace.edit(this.aceEditorrRef.current))}renderElement(){const e=i.createElement(ye,{data:this.model});return i.createElement("div",{className:"svc-creator-tab__content"},i.createElement("div",{className:"svc-json-editor-tab__content"},i.createElement("div",{className:"svc-json-editor-tab__ace-editor",ref:this.aceEditorrRef}),e))}}r.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-ace",e=>i.createElement(_e,e));class Ce extends r.SurveyElementBase{get model(){return this.props.data}getStateElement(){return this.model}renderElement(){this.model;var e=this.renderViewContent();return i.createElement("div",{className:"svc-creator-tab__content svc-logic-tab"},e)}renderViewContent(){const e="svc-plugin-tab__content svc-logic-tab svc-logic-tab__content "+(this.model.hasItems?"":"svc-logic-tab--empty"),n=this.model.readOnly?void 0:i.createElement(r.SurveyActionBar,{model:this.model.contentActionsContainer});return i.createElement(t.Fragment,null,i.createElement("div",{className:e},this.model.hasItems?i.createElement(i.Fragment,null,i.createElement(r.Survey,{model:this.model.itemsSurvey}),n):i.createElement("div",{className:"svc-logic-tab__content-empty"},i.createElement(ve,{name:"logic",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText}),n)))}}r.ReactElementFactory.Instance.registerElement("svc-tab-logic",e=>i.createElement(Ce,e));class Ne extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.queueSurveyLayoutRefresh()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.model.queueSurveyLayoutRefresh()}componentWillUnmount(){this.model.cancelSurveyLayoutRefresh(),super.componentWillUnmount()}renderElement(){const e=this.model.getRootCss(),t=(n=this.model.popupOverlayHeight)?{"--sv-popup-overlay-height":n}:{};var n;return this.model.survey?this.model.hasFrame?i.createElement("div",{className:e,onKeyDown:e=>this.model.tryToZoom(e,e),onMouseEnter:"desktop"===this.model.device?null:this.model.activateZoom,onMouseLeave:"desktop"===this.model.device?null:this.model.deactivateZoom},i.createElement("div",{className:"svd-simulator-wrapper",id:"svd-simulator-wrapper",style:{width:this.model.simulatorFrame.frameWidth+"px",height:this.model.simulatorFrame.frameHeight+"px"}},i.createElement("div",{className:"svd-simulator",style:{width:this.model.simulatorFrame.deviceWidth+"px",height:this.model.simulatorFrame.deviceHeight+"px",transform:"scale("+this.model.simulatorFrame.scale+") translate(-50%, -50%)"}},i.createElement("div",{className:"svd-simulator-content",style:t},i.createElement(r.Survey,{model:this.model.survey}))))):i.createElement("div",{className:e},i.createElement("div",{className:"svd-simulator-content",style:t},i.createElement(r.Survey,{model:this.model.survey}))):i.createElement("div",{className:e})}}class Se extends r.SurveyElementBase{constructor(e){super(e)}get model(){return this.props.data}getStateElement(){return this.model}renderPlaceholder(){return i.createElement(ve,{name:"preview",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})}renderSimulator(){return i.createElement("div",{className:"svc-plugin-tab__content"},i.createElement(Ne,{model:this.model.simulator}),this.model.showResults?i.createElement(W,{survey:this.model.simulator.survey}):null)}renderElement(){const e="svc-creator-tab__content svc-test-tab__content "+this.model.tabContentAdditionalCss;return i.createElement("div",{className:e},this.model.simulator.survey.isEmpty?this.renderPlaceholder():this.renderSimulator(),this.getBottomToolbar())}getBottomToolbar(){return this.model.isPageToolbarVisible?i.createElement("div",{className:"svc-test-tab__content-actions"},i.createElement(r.SurveyActionBar,{model:this.model.pages})):null}}r.ReactElementFactory.Instance.registerElement("svc-tab-preview",e=>i.createElement(Se,e));class xe extends i.Component{render(){return i.createElement("div",{className:"svc-property-grid-placeholder"},i.createElement("div",{className:"svc-property-grid-placeholder__header"},i.createElement("span",{className:"svc-property-grid-placeholder__title"},n.editorLocalization.getString("ed.propertyGridPlaceholderTitle")),i.createElement("span",{className:"svc-property-grid-placeholder__description"},n.editorLocalization.getString("ed.propertyGridPlaceholderDescription"))),i.createElement("div",{className:"svc-property-grid-placeholder__content"},i.createElement("div",{className:"svc-property-grid-placeholder__gap"}),i.createElement("div",{className:"svc-property-grid-placeholder__image"})))}}r.ReactElementFactory.Instance.registerElement("svc-property-grid-placeholder",e=>i.createElement(xe,e));class fe extends r.SurveyElementBase{get model(){return this.props.data}getStateElement(){return this.model}renderPlaceholder(){return i.createElement(ve,{name:"theme",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText})}renderSimulator(){return i.createElement("div",{className:"svc-plugin-tab__content"},i.createElement(Ne,{model:this.model.simulator}),this.model.showResults?i.createElement(W,{survey:this.model.simulator.survey}):null)}renderElement(){const e="svc-creator-tab__content svc-test-tab__content "+this.model.tabContentAdditionalCss;return i.createElement("div",{className:e},this.model.simulator.survey.isEmpty?this.renderPlaceholder():this.renderSimulator(),this.getBottomToolbar())}getBottomToolbar(){return this.model.isPageToolbarVisible?i.createElement("div",{className:"svc-test-tab__content-actions"},i.createElement(r.SurveyActionBar,{model:this.model.pages})):null}}r.ReactElementFactory.Instance.registerElement("svc-tab-theme",e=>i.createElement(fe,e));class Ie extends r.SurveyElementBase{get model(){return this.props.data||this.props.model}getStateElement(){return this.model}renderElement(){return this.model?i.createElement("div",{className:"svc-creator-tab__content svc-translation-tab"+(this.model.isEmpty?" svc-translation-tab--empty":"")},this.renderElementContent()):null}renderElementContent(){return this.model.isEmpty?i.createElement(ve,{name:"translation",placeholderTitleText:this.model.placeholderTitleText,placeholderDescriptionText:this.model.placeholderDescriptionText}):this.model.isSideBySideForm?this.renderSideBySideContent(this.model):this.renderStringsContent(this.model)}renderStringsContent(e){var t,n;return i.createElement("div",{className:"st-content"},i.createElement("div",{className:"svc-flex-column st-strings-wrapper"},i.createElement("div",{className:"svc-flex-row st-strings-header"},i.createElement(r.Survey,{key:null===(t=e.stringsHeaderSurvey)||void 0===t?void 0:t.elementIdPrefix,model:e.stringsHeaderSurvey})),i.createElement("div",{className:"svc-flex-row svc-plugin-tab__content st-strings"},i.createElement(r.Survey,{key:null===(n=e.stringsSurvey)||void 0===n?void 0:n.elementIdPrefix,model:e.stringsSurvey}))))}renderSideBySideContent(e){var t;const n=e.targetSurvey;return i.createElement("div",{className:e.sideBySideRootCss},i.createElement("div",{className:"st-side-by-side__panes"},i.createElement("div",{key:null===(t=e.sourceSurvey)||void 0===t?void 0:t.elementIdPrefix,className:"st-side-by-side__source",ref:t=>{e.setSourceScrollElement(t)}},i.createElement(r.Survey,{model:e.sourceSurvey})),n?i.createElement("div",{key:n.elementIdPrefix,className:"st-side-by-side__target",ref:t=>{e.setTargetScrollElement(t)}},i.createElement(r.Survey,{model:n})):null))}}r.ReactElementFactory.Instance.registerElement("svc-tab-translation",e=>i.createElement(Ie,e));class we extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}renderElement(){const e=this.item;if(!e)return null;const t=n.getTranslationLocaleProgress(e);return i.createElement("div",{className:"svc-translation-locale-item"},i.createElement("span",{className:"svc-translation-locale-item__name"},this.renderLocString(e.locTitle,void 0,"locString")),t?i.createElement("span",{className:"svc-translation-locale-item__progress"},t):null)}}r.ReactElementFactory.Instance.registerElement(n.translationLocaleItemComponentName,e=>i.createElement(we,e));class Re extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}renderElement(){return this.model.isVisible?i.createElement(r.List,{model:this.model.list}):null}}r.ReactElementFactory.Instance.registerElement("svc-object-selector",e=>i.createElement(Re,e));class Me extends r.SurveyElementBase{get model(){return this.props.model}getStateElement(){return this.model}canRender(){return!!this.model&&super.canRender()}renderElement(){return i.createElement("div",{className:this.model.rootCss},i.createElement(X,{model:this.model.searchManager}),i.createElement(r.Survey,{model:this.model.survey}))}}r.ReactElementFactory.Instance.registerElement("svc-property-grid",e=>i.createElement(Me,e));class qe extends i.Component{constructor(e){super(e)}render(){const e=this.props.model.elements.map((e,t)=>r.ReactElementFactory.Instance.createElement(e.componentName,{...e.componentData,key:t})),t=this.props.model.scrollable?i.createElement(r.Scroll,null," ",e," "):e;return this.props.model.wrapped?i.createElement("div",{className:this.props.model.cssClass}," ",t," "):i.createElement(i.Fragment,null,t)}}r.ReactElementFactory.Instance.registerElement("svc-component-container",e=>i.createElement(qe,e));class De extends i.Component{render(){const e=this.props.model;return i.createElement("div",{className:"svc-variables-viewer"},i.createElement("textarea",{className:"svc-variables-viewer__text",value:e.text,readOnly:!0,spellCheck:!1,"aria-label":e.ariaLabel}))}}r.ReactElementFactory.Instance.registerElement("svc-variables-viewer",e=>i.createElement(De,e));class Te extends i.Component{render(){const e=this.props.item;return e?i.createElement("div",{className:"svc-icon-item"},i.createElement(r.SvgIcon,{className:"svc-icon-item__icon",size:"auto",iconName:e.value}),i.createElement("span",{className:"svc-icon-item__text"},e.title)):null}}r.ReactElementFactory.Instance.registerElement("svc-presets-icon-item",e=>i.createElement(Te,e));class Fe extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}renderElement(){const e=this.item.tooltip||this.item.title,t=this.item.hasTitle?i.createElement("span",{className:"svc-switcher__title"},this.item.title):null;return r.attachKey2click(i.createElement("button",{className:this.item.getActionBarItemCss(),type:"button",disabled:this.item.disabled,onClick:e=>this.item.action(this.item,this.item.getIsTrusted(e)),title:e,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,role:this.item.ariaRole},i.createElement("div",{className:this.item.getSwitcherIconCss()},i.createElement("div",{className:"svc-switcher__icon-thumb"})),t),this.item,{processEsc:!1})}}r.ReactElementFactory.Instance.registerElement("svc-switcher",e=>i.createElement(Fe,e));class Be extends r.SurveyElementBase{get item(){return this.props.item}getStateElement(){return this.item}canRender(){return!!this.item&&this.item.visible&&super.canRender()}renderMarker(){const e=this.item;return e.hasMarkerText?i.createElement("span",{className:e.markerCss},e.markerText):e.hasMarkerIcon?i.createElement("span",{className:"svc-collab-row__icon"},i.createElement(r.SvgIcon,{iconName:e.markerIconName,size:e.markerIconSize})):null}renderElement(){const e=this.item;return i.createElement("div",{className:e.rowCss,role:e.rowRole||void 0,"aria-expanded":e.ariaExpanded},this.renderMarker(),i.createElement("span",{className:"svc-collab-row__title"},e.title),e.hasSubtitle?i.createElement("span",{className:"svc-collab-row__subtitle"},e.subtitle):null)}}r.ReactElementFactory.Instance.registerElement("svc-collab-row",e=>i.createElement(Be,e));class ke extends r.SurveyElementBase{constructor(e){super(e),this.root=i.createRef()}get model(){return this.props.model}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.model.setComponentElement(this.root.current)}componentWillUnmount(){super.componentWillUnmount(),this.model.resetComponentElement()}renderElement(){const e=this.model,t=r.ReactElementFactory.Instance.createElement(e.contentComponentName,e.contentComponentData);return i.createElement("div",{ref:this.root,className:e.rootCss,style:e.style,role:"dialog","aria-modal":!1,"aria-labelledby":e.titleId,tabIndex:-1,onPointerDownCapture:()=>e.bringToFront()},i.createElement("div",{className:e.headerCss,onPointerDown:t=>e.onPointerDown(t.nativeEvent)},i.createElement("span",{id:e.titleId,className:"svc-floating-panel__title"},e.titleText),i.createElement("span",{className:"svc-floating-panel__drag","aria-hidden":"true"},i.createElement(r.SvgIcon,{iconName:"icon-draghorizontal-24x16",size:"auto"})),i.createElement(r.SurveyActionBar,{model:e.headerToolbar})),i.createElement("div",{className:e.bodyCss},t))}}r.ReactElementFactory.Instance.registerElement("svc-floating-panel",e=>i.createElement(ke,e));let Pe=class extends r.SurveyElementBase{render(){const e=this.props.item;return i.createElement(i.Fragment,null,i.createElement(r.SvgIcon,{iconName:e.iconName,size:e.iconSize,className:"svc-json-error__icon"}),i.createElement("div",{className:"svc-json-error__container"},i.createElement("div",{className:"svc-json-error__title"},i.createElement("span",{key:2},this.renderLocString(e.locTitle,void 0,"locString"))),this.renderFixButton()))}renderFixButton(){if(!this.props.item.data.showFixButton)return null;const e=this.props.item;return r.attachKey2click(i.createElement("button",{type:"button",onClick:t=>{t.stopPropagation(),e.data.fixError()},title:e.data.fixButtonTitle,className:"svc-json-error__fix-button"},i.createElement(r.SvgIcon,{iconName:e.data.fixButtonIcon,size:"auto"})))}};r.ReactElementFactory.Instance.registerElement("json-error-item",e=>i.createElement(Pe,e));class Ue extends r.SurveyElementBase{constructor(e){super(e)}getStateElement(){return this.model}get model(){return this.props.data}renderElement(){return i.createElement(qe,{model:this.model.containerModel})}}r.ReactElementFactory.Instance.registerElement("svc-tab-container",e=>i.createElement(Ue,e));class Ae extends r.SurveyQuestionText{constructor(e){super(e)}get question(){return this.questionBase}renderInput(){return i.createElement(i.Fragment,null,i.createElement("input",{role:"spinbutton",id:this.question.inputId,disabled:this.isDisplayMode,className:this.question.cssClasses.control,ref:e=>this.setControl(e),placeholder:this.question.renderedPlaceholder,autoComplete:"off",onBlur:e=>this.question.onBlur(e.nativeEvent),onFocus:e=>this.question.onFocus(e.nativeEvent),onChange:this.question.onChange,onBeforeInput:e=>this.question.onBeforeInput(e.nativeEvent),onKeyUp:e=>this.question.onKeyUp(e.nativeEvent),onKeyDown:e=>this.question.onInputKeyDown(e.nativeEvent),"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}))}renderElement(){return i.createElement("div",{className:this.question.cssClasses.root,onKeyDown:e=>this.question.onKeyDown(e.nativeEvent)},this.renderInput(),this.renderButtons())}getValueCore(){return this.question.renderedValue}renderButtons(){return i.createElement(r.SurveyActionBar,{model:this.question.inputActionsContainer})}}class Le extends r.SurveyElementBase{get item(){return this.props.item}get itemAction(){return this.props.item}getStateElement(){return this.itemAction}get question(){return this.item.data.question}renderElement(){return i.createElement("button",{tabIndex:-1,"aria-hidden":"true",className:this.itemAction.getActionBarItemCss(),disabled:this.itemAction.disabled,onClick:()=>this.item.action(),onMouseDown:this.item.data.onMouseDown,onMouseUp:this.question.onButtonMouseUp,onMouseLeave:this.question.onButtonMouseLeave,onBlur:e=>this.question.onBlur(e.nativeEvent),onFocus:e=>this.question.onFocus(e.nativeEvent)},i.createElement(r.SvgIcon,{className:this.itemAction.cssClasses.itemIcon,iconName:this.item.iconName,size:"auto"}))}}r.ReactElementFactory.Instance.registerElement("sv-spinedit-button",e=>i.createElement(Le,e)),r.ReactQuestionFactory.Instance.registerQuestion("spinedit",e=>i.createElement(Ae,e));class Ve extends i.Component{get rootClassName(){var e;return null!==(e=this.props.className)&&void 0!==e?e:"sd-color-swatch"}get rootStyle(){return{backgroundColor:this.props.color}}renderIcon(){var e,t;return this.props.showIcon?i.createElement(r.SvgIcon,{iconName:null!==(e=this.props.swatchIcon)&&void 0!==e?e:"icon-dropper-16x16",size:"auto",className:null!==(t=this.props.iconClassName)&&void 0!==t?t:"sd-color-swatch__icon"}):null}renderColorInput(){const{onColorInputChange:e,colorInputValue:t,colorInputClassName:r,inputDisabled:n,arias:s}=this.props;return e?i.createElement("input",{type:"color",disabled:n,value:t,className:r,onChange:e,tabIndex:-1,...s}):null}render(){const e=i.createElement("div",{className:"sd-color-swatch__content",style:this.rootStyle},this.renderIcon(),this.renderColorInput());return this.props.onColorInputChange?i.createElement("label",{className:this.rootClassName},e):i.createElement("div",{className:this.rootClassName},e)}}class Qe extends r.SurveyElementBase{render(){const e=this.props.item;return i.createElement("div",{className:"sd-color-swatch-item"},i.createElement("div",{className:"sd-color-swatch-item__label"},i.createElement("span",{key:2,className:"sd-color-swatch-item__caption"},this.renderLocString(e.locTitle,void 0,"locString"))),i.createElement(Ve,{color:e.value}))}}r.ReactElementFactory.Instance.registerElement("color-item",e=>i.createElement(Qe,e));class He extends r.SurveyQuestionText{constructor(e){super(e)}get question(){return this.questionBase}renderInput(){return i.createElement(i.Fragment,null,i.createElement("input",{id:this.question.inputId,disabled:this.isDisplayMode,className:this.question.cssClasses.control,ref:e=>this.setControl(e),placeholder:this.question.renderedPlaceholder,autoComplete:"off",onKeyUp:e=>this.question.onKeyUp(e.nativeEvent),onBlur:e=>this.question.onBlur(e.nativeEvent),onChange:this.question.onChange,onBeforeInput:e=>this.question.onBeforeInput(e.nativeEvent),"aria-required":this.question.a11y_input_ariaRequired,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-label":this.question.a11y_input_ariaLabel,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-describedby":this.question.a11y_input_ariaDescribedBy}))}renderElement(){return i.createElement("div",{className:this.question.cssClasses.rootWrapper},i.createElement("div",{className:this.question.cssClasses.root,onKeyDown:e=>this.question.onKeyDown(e.nativeEvent)},this.renderColorSwatch(),this.renderInput(),this.renderButtons()))}getValueCore(){return this.question.renderedValue}renderColorSwatch(){const e=this.question;return i.createElement("div",{className:e.cssClasses.colorSwatch},i.createElement(Ve,{className:e.getSwatchCss(),swatchIcon:e.cssClasses.swatchIcon,iconClassName:e.cssClasses.iconClassName,color:e.renderedValue,showIcon:!0,colorInputValue:e.renderedColorValue,colorInputClassName:e.cssClasses.colorInput,inputDisabled:this.isDisplayMode,onColorInputChange:t=>e.onColorInputChange(t.nativeEvent),arias:{"aria-required":e.a11y_input_ariaRequired,"aria-labelledby":e.a11y_input_ariaLabelledBy,"aria-label":e.a11y_input_ariaLabel,"aria-invalid":e.a11y_input_ariaInvalid,"aria-describedby":e.a11y_input_ariaDescribedBy}}))}renderButtons(){return this.question.hasVisibleInputActions?i.createElement(r.SurveyActionBar,{model:this.question.inputActionsContainer}):null}}r.ReactQuestionFactory.Instance.registerQuestion("color",e=>i.createElement(He,e));class We extends r.SurveyQuestionText{constructor(e){super(e)}get questionFile(){return this.questionBase}getValueCore(){return this.question.renderedValue}renderInput(){return i.createElement(i.Fragment,null,i.createElement("input",{disabled:this.question.isTextInputReadOnly,className:this.questionFile.cssClasses.control,placeholder:this.questionFile.renderedPlaceholder,ref:e=>this.setControl(e),autoComplete:"off",type:"text",onBlur:e=>this.questionFile.onInputBlur(e.nativeEvent),onChange:e=>this.questionFile.onInputChange(e.nativeEvent)}))}renderButtons(){return this.question.hasVisibleInputActions?i.createElement(r.SurveyActionBar,{model:this.questionFile.inputActionsContainer}):null}renderElement(){return i.createElement("div",{className:this.questionFile.cssClasses.root,ref:e=>this.setContent(e),onDragEnter:this.questionFile.onDragEnter,onDragOver:this.questionFile.onDragOver,onDrop:this.questionFile.onDrop,onDragLeave:this.questionFile.onDragLeave,onKeyDown:e=>this.question.onKeyDown(e.nativeEvent)},this.renderInput(),this.renderButtons())}}class Oe extends r.SurveyElementBase{get item(){return this.props.item}get question(){return this.props.item.data.question}getStateElement(){return this.item}renderElement(){return i.createElement("div",null,r.attachKey2click(i.createElement("label",{onClick:e=>this.question.chooseFiles(e.nativeEvent),className:this.item.getActionBarItemCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonCaption},i.createElement(r.SvgIcon,{iconName:this.item.iconName,size:"auto",title:this.item.title,className:this.item.cssClasses.itemIcon}),i.createElement("span",{className:"sv-visuallyhidden"},this.question.chooseButtonCaption))),i.createElement("input",{type:"file",disabled:this.item.disabled,className:this.question.cssClasses.fileInput,id:this.question.inputId,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-describedby":this.question.ariaDescribedBy,multiple:!1,title:this.question.inputTitle,accept:this.question.acceptedTypes,tabIndex:-1,onChange:e=>this.question.onFileInputChange(e.nativeEvent)}))}}r.ReactQuestionFactory.Instance.registerQuestion("fileedit",e=>i.createElement(We,e)),r.ReactElementFactory.Instance.registerElement("sv-fileedit-button",e=>i.createElement(Oe,e)),e.Version=void 0,e.Version="3.2.1",o.checkLibraryVersion("3.2.1","survey-creator-react"),Object.defineProperty(e,"PropertyGridEditorCollection",{enumerable:!0,get:function(){return n.PropertyGridEditorCollection}}),Object.defineProperty(e,"SurveyLogic",{enumerable:!0,get:function(){return n.SurveyLogic}}),Object.defineProperty(e,"SurveyLogicUI",{enumerable:!0,get:function(){return n.SurveyLogicUI}}),Object.defineProperty(e,"SurveyQuestionEditorDefinition",{enumerable:!0,get:function(){return n.SurveyQuestionEditorDefinition}}),Object.defineProperty(e,"ToolboxToolViewModel",{enumerable:!0,get:function(){return n.ToolboxToolViewModel}}),Object.defineProperty(e,"editorLocalization",{enumerable:!0,get:function(){return n.editorLocalization}}),Object.defineProperty(e,"localization",{enumerable:!0,get:function(){return n.localization}}),Object.defineProperty(e,"settings",{enumerable:!0,get:function(){return n.settings}}),Object.defineProperty(e,"svgBundle",{enumerable:!0,get:function(){return n.svgBundle}}),e.ActionButton=C,e.AdaptiveToolbox=Y,e.AddQuestionButtonComponent=T,e.CellQuestionAdornerComponent=w,e.CellQuestionDropdownAdornerComponent=R,e.CollabRowComponent=Be,e.ComponentContainer=qe,e.CreatorSurveyPageComponent=D,e.FloatingPanelComponent=ke,e.IconItem=Te,e.ImageItemValueAdornerComponent=V,e.ItemValueAdornerComponent=A,e.LogoImageComponent=B,e.MatrixCellAdornerComponent=H,e.PanelAdornerComponent=F,e.PropertyGridComponent=Me,e.PropertyGridPlaceholderComponent=xe,e.QuestionAdornerComponent=y,e.QuestionBanner=N,e.QuestionDropdownAdornerComponent=S,e.QuestionEditorContentComponent=U,e.QuestionErrorComponent=de,e.QuestionImageAdornerComponent=x,e.QuestionRatingAdornerComponent=f,e.QuestionWidgetAdornerComponent=I,e.QuestionWrapperFooter=_,e.QuestionWrapperHeader=b,e.ReactDragEvent=class extends E{constructor(e){super(e),this.event=e}get dataTransfer(){return this.event.dataTransfer}},e.ReactMouseEvent=E,e.RowWrapper=v,e.SearchComponent=X,e.SideBarDefaultHeader=re,e.SideBarLaunchCard=ie,e.SidebarComponent=oe,e.SurveyCreator=h,e.SurveyCreatorComponent=u,e.SurveyCreatorToolboxCategory=G,e.SurveyCreatorToolboxItem=K,e.SurveyCreatorToolboxItemGroup=z,e.SurveyCreatorToolboxTool=j,e.SurveyElementEmbeddedSurvey=P,e.SurveyLocStringEditor=me,e.SurveyLogicOpertor=ue,e.SurveyNavigation=Z,e.SurveyQuestionColor=He,e.SurveyQuestionFileEditor=We,e.SurveyQuestionFileEditorButton=Oe,e.SurveyQuestionLinkValue=k,e.SurveyQuestionSpinEditor=Ae,e.SurveyResults=W,e.SurveyResultsByRow=O,e.SurveySimulator=Ne,e.SurveySpinEditorButton=Le,e.SwitcherComponent=Fe,e.TabButtonComponent=$,e.TabContainerComponent=Ue,e.TabDesignerComponent=Ee,e.TabJsonEditorAceComponent=_e,e.TabJsonEditorErrorsComponent=ye,e.TabJsonEditorTextareaComponent=be,e.TabLogicComponent=Ce,e.TabPreviewSurveyComponent=Se,e.TabThemeSurveyComponent=fe,e.TabTranslationComponent=Ie,e.TabbedMenuComponent=c,e.TabbedMenuItemComponent=d,e.ToolboxList=J,e.TranslateFromAction=ce,e.TranslationDropdownQuestionComponent=M,e.TranslationLineSkeleton=le,e.TranslationLocaleItemComponent=we,e.VariablesViewerComponent=De});