@kbss-cvut/s-forms 0.4.2-alpha-14d9c45.0 → 0.4.2-alpha-e0aa03d.0

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/dist/s-forms.css CHANGED
@@ -1,2 +1,2 @@
1
- .checkbox label{font-weight:700}.panel-title .checkbox label{font-weight:400}.answerable-question{background-color:#e6f9fb;border:1px solid #dfdfdf;border-bottom-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;color:#000;padding:.75rem 1.25rem}.answerable-subquestions{border:1px solid #dfdfdf;border-bottom-left-radius:4px;border-bottom-right-radius:4px;margin-bottom:1.11rem;padding:1rem}.answerable-question .form-group{margin-bottom:0}.answerable-question .form-group .form-check-input{margin-top:.37rem}.answerable-section .form-group .form-check-label{font-weight:500;margin-left:.11rem}.answerable-section .card-header .col-10{flex-basis:auto;padding-right:0;width:auto}.overlay-comment{position:absolute;z-index:10}svg{fill:currentColor}.comment-delete,.question-comment{cursor:pointer}.caret-square-down,.caret-square-up,.info-circle,.question-circle,.question-comment{height:1rem;margin-bottom:.15rem}.close-icon,.external-link-icon,.question-circle,.question-comment,.recycle-bin-icon{fill:grey}.text-white .external-link-icon,.text-white .question-circle,.text-white .question-comment{fill:#fff}.caret-square-down,.caret-square-up{margin-left:-.3125rem;margin-right:.2rem}.has-unit-label{font-weight:700;margin-left:.75rem;margin-top:.75rem}.tooltip-content{white-space:pre-wrap}.collapse-toggle{line-height:.9;margin-right:.3rem}.form-label{font-weight:500;white-space:nowrap}input:disabled{cursor:not-allowed}.cursor-pointer{cursor:pointer}.accordion>.card{overflow:visible}.react-datepicker-wrapper{display:block}.react-datepicker__navigation:focus{outline:none}.wizard-step{min-height:40.625rem}.wizard-step-content{min-height:37.5rem}.list-group-item.active{font-weight:500}.question-category-1{background-color:rgba(8,255,0,.05)}.question-category-2{background-color:rgba(230,127,0,.05)}.question-category-3{background-color:rgba(222,0,230,.05)}.question-category-4{background-color:rgba(0,84,230,.05)}.question-category-5{background-color:rgba(0,230,222,.05)}.answer{align-items:center;display:flex;position:relative}.answer>.answer-content{flex-grow:1;max-width:31.25rem}.card-header{min-height:3rem}.card-header:first-child{line-height:24px}.card-header.bg-info{background-color:#e6f9fb!important}.card-header.section-background{background-color:#e6f9fb}.question-header{align-items:center;display:flex}.question-header h6{margin:0}.icon-list-items{display:flex;margin:0;padding-left:0}.icon-list-item{list-style-type:none}.card-header .form-group{margin-bottom:0}.emphasise-on-relevant-icon{-webkit-animation:emphasiseOnRelevantIcon .5s ease-in;animation:emphasiseOnRelevantIcon .5s ease-in}.emphasise-on-relevant{-webkit-animation:emphasiseOnRelevant 1.2s ease-in;animation:emphasiseOnRelevant 1.2s ease-in}.card-header.emphasise-on-relevant{-webkit-animation:emphasiseOnRelevantSection 1.2s ease-in;animation:emphasiseOnRelevantSection 1.2s ease-in}.comment-tooltip>.tooltip-inner{background-color:#cbeef6;border:2px solid #afafaf;border-radius:0;color:#000;max-width:none;padding:0;width:30vw}.close-comment-icon{cursor:pointer;height:24px;margin-left:auto;width:24px}#comment-form{display:flex;width:100%}#comment-form textarea{overflow-y:hidden;resize:none}.comment-form-control{border-radius:0}.btn.comment-form-button{align-items:center;bottom:2px;display:flex;height:25px;justify-content:center;padding:0;position:absolute;right:2px;width:25px}.comment-content{padding:.5rem;text-align:left}.comment-delete{align-items:center;display:flex;flex-direction:column;justify-content:center}.comment-content .comment-author{font-weight:700}.comment-content .comment-value{white-space:pre-line}.comment-list-items{max-height:25rem;overflow:hidden scroll}.comment-timestamp{color:#696969;font-style:italic}.comment-badge{bottom:13px;font-size:.5625rem;position:relative;right:7px}.show-irrelevant{opacity:50%}.show-irrelevant,.show-irrelevant .form-check-input,.show-irrelevant .form-check-label{pointer-events:none}.show-irrelevant .card-header,.show-irrelevant.list-group-item{pointer-events:auto}@-webkit-keyframes emphasiseOnRelevant{0%{display:none;opacity:0}1%{background-color:#ff0;display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:transparent;display:block;opacity:1}}@keyframes emphasiseOnRelevant{0%{display:none;opacity:0}1%{background-color:#ff0;display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:transparent;display:block;opacity:1}}@-webkit-keyframes emphasiseOnRelevantSection{0%{display:none;opacity:0}1%{background-color:#ff0;display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:#e6f9fb;display:block;opacity:1}}@keyframes emphasiseOnRelevantSection{0%{display:none;opacity:0}1%{background-color:#ff0;display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:#e6f9fb;display:block;opacity:1}}@-webkit-keyframes emphasiseOnRelevantIcon{0%{display:none;opacity:0}1%{display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:transparent;display:block;opacity:1}}@keyframes emphasiseOnRelevantIcon{0%{display:none;opacity:0}1%{display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:transparent;display:block;opacity:1}}
1
+ .checkbox label{font-weight:700}.panel-title .checkbox label{font-weight:400}.answerable-question{background-color:#e6f9fb;border:1px solid #dfdfdf;border-bottom-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;color:#000;padding:.75rem 1.25rem}.answerable-subquestions{border:1px solid #dfdfdf;border-bottom-left-radius:4px;border-bottom-right-radius:4px;margin-bottom:1.11rem;padding:1rem}.answerable-question .form-group{margin-bottom:0}.answerable-question .form-group .form-check-input{margin-top:.37rem}.answerable-section .form-group .form-check-label{font-weight:500;margin-left:.11rem}.answerable-section .card-header .col-10{flex-basis:auto;padding-right:0;width:auto}.overlay-comment{position:absolute;z-index:10}svg{fill:currentColor}.comment-delete,.question-comment{cursor:pointer}.caret-square-down,.caret-square-up,.info-circle,.question-circle,.question-comment{height:1rem;margin-bottom:.15rem}.close-icon,.external-link-icon,.question-circle,.question-comment,.recycle-bin-icon{fill:grey}.text-white .external-link-icon,.text-white .question-circle,.text-white .question-comment{fill:#fff}.caret-square-down,.caret-square-up{margin-left:-.3125rem;margin-right:.2rem}.has-unit-label{font-weight:700;margin-left:.75rem;margin-top:.75rem}.tooltip-content{white-space:pre-wrap}.collapse-toggle{line-height:.9;margin-right:.3rem}.form-label{font-weight:500;white-space:nowrap}input:disabled{cursor:not-allowed}.cursor-pointer{cursor:pointer}.accordion>.card{overflow:visible}.react-datepicker-wrapper{display:block}.react-datepicker__navigation:focus{outline:none}.wizard-step{min-height:40.625rem}.wizard-step-content{min-height:37.5rem}.list-group-item.active{font-weight:500}.question-category-1{background-color:rgba(8,255,0,.05)}.question-category-2{background-color:rgba(230,127,0,.05)}.question-category-3{background-color:rgba(222,0,230,.05)}.question-category-4{background-color:rgba(0,84,230,.05)}.question-category-5{background-color:rgba(0,230,222,.05)}.answer{align-items:center;display:flex;position:relative}.answer>.answer-content{flex-grow:1;max-width:31.25rem}.card-header{min-height:3rem}.card-header:first-child{line-height:24px}.card-header.bg-info{background-color:#e6f9fb!important}.card-header.section-background{background-color:#e6f9fb}.question-header{align-items:center;display:flex}.question-header h6{margin:0}.icon-list-items{display:flex;margin:0;padding-left:0}.icon-list-item{list-style-type:none}.card-header .form-group{margin-bottom:0}.emphasise-on-relevant-icon{-webkit-animation:emphasiseOnRelevantIcon .5s ease-in;animation:emphasiseOnRelevantIcon .5s ease-in}.emphasise-on-relevant{-webkit-animation:emphasiseOnRelevant 1.2s ease-in;animation:emphasiseOnRelevant 1.2s ease-in}.card-header.emphasise-on-relevant{-webkit-animation:emphasiseOnRelevantSection 1.2s ease-in;animation:emphasiseOnRelevantSection 1.2s ease-in}.comment-tooltip>.tooltip-inner{background-color:#cbeef6;border:2px solid #afafaf;border-radius:0;color:#000;max-width:none;padding:0;width:30vw}.close-comment-icon{cursor:pointer;height:24px;margin-left:auto;width:24px}#comment-form{display:flex;width:100%}#comment-form textarea{overflow-y:hidden;resize:none}.comment-form-control{border-radius:0}.btn.comment-form-button{align-items:center;bottom:2px;display:flex;height:25px;justify-content:center;padding:0;position:absolute;right:2px;width:25px}.comment-content{padding:.5rem;text-align:left}.comment-delete{align-items:center;display:flex;flex-direction:column;justify-content:center}.comment-content .comment-author{font-weight:700}.comment-content .comment-value{white-space:pre-line}.comment-list-items{max-height:25rem;overflow:hidden scroll}.comment-timestamp{color:#696969;font-style:italic}.comment-badge{bottom:13px;font-size:.5625rem;position:relative;right:7px}.show-irrelevant{opacity:50%}.show-irrelevant,.show-irrelevant .form-check-input,.show-irrelevant .form-check-label{pointer-events:none}.show-irrelevant .card-header,.show-irrelevant.list-group-item{pointer-events:auto}.media-content{overflow:hidden}.media-content-items{display:flex;flex-direction:row;flex-wrap:wrap}.media-content-item{padding:.5rem}.media-content-item .media-content-image{max-height:150px;max-width:300px;position:relative}.media-content-item-image{border:2px solid gray;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.media-content-item iframe{border:2px solid gray}.media-content-item .media-content-image .media-content-link{position:absolute;z-index:10}.media-content-item .media-content-link:hover{opacity:.8}@-webkit-keyframes emphasiseOnRelevant{0%{display:none;opacity:0}1%{background-color:#ff0;display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:transparent;display:block;opacity:1}}@keyframes emphasiseOnRelevant{0%{display:none;opacity:0}1%{background-color:#ff0;display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:transparent;display:block;opacity:1}}@-webkit-keyframes emphasiseOnRelevantSection{0%{display:none;opacity:0}1%{background-color:#ff0;display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:#e6f9fb;display:block;opacity:1}}@keyframes emphasiseOnRelevantSection{0%{display:none;opacity:0}1%{background-color:#ff0;display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:#e6f9fb;display:block;opacity:1}}@-webkit-keyframes emphasiseOnRelevantIcon{0%{display:none;opacity:0}1%{display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:transparent;display:block;opacity:1}}@keyframes emphasiseOnRelevantIcon{0%{display:none;opacity:0}1%{display:block;opacity:0}25%{display:block;opacity:0}75%{display:block;opacity:1}to{background-color:transparent;display:block;opacity:1}}
2
2
  /*# sourceMappingURL=s-forms.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["s-forms.css"],"names":[],"mappings":"AAAA,gBACE,eACF,CAEA,6BACE,eACF,CAEA,qBAEE,wBAAyB,CAEzB,wBAAoC,CAApC,+BAAoC,CAEpC,0BAA2B,CAD3B,2BAA4B,CAJ5B,UAAY,CAMZ,sBACF,CAEA,yBAEE,wBAAyB,CACzB,6BAA8B,CAC9B,8BAA+B,CAC/B,qBAAsB,CAJtB,YAKF,CAEA,iCACE,eACF,CAEA,mDACE,iBACF,CAEA,kDAEE,eAAgB,CADhB,kBAEF,CAEA,yCAEE,eAAgB,CAChB,eAAgB,CAFhB,UAGF,CAEA,iBACE,iBAAkB,CAClB,UACF,CAEA,IACE,iBACF,CAEA,kCAEE,cACF,CAEA,oFAKE,WAAY,CACZ,oBACF,CAEA,qFAKE,SACF,CAEA,2FAGE,SACF,CAEA,oCAGE,qBAAuB,CADvB,kBAEF,CAEA,gBACE,eAAiB,CAEjB,kBAAoB,CADpB,iBAEF,CAEA,iBACE,oBACF,CAEA,iBAEE,cAAgB,CADhB,kBAEF,CAEA,YACE,eAAgB,CAChB,kBACF,CAEA,eACE,kBACF,CAEA,gBACE,cACF,CAEA,iBACE,gBACF,CAEA,0BACE,aACF,CAEA,oCACE,YACF,CAEA,aACE,oBACF,CAEA,qBACE,kBACF,CAEA,wBACE,eACF,CAEA,qBACE,kCACF,CAEA,qBACE,oCACF,CAEA,qBACE,oCACF,CAEA,qBACE,mCACF,CAEA,qBACE,oCACF,CAEA,QAGE,kBAAmB,CAFnB,YAAa,CACb,iBAEF,CAEA,wBACE,WAAY,CACZ,kBACF,CAEA,aACE,eACF,CAEA,yBACE,gBACF,CAEA,qBACE,kCACF,CAEA,gCACE,wBACF,CAEA,iBAEE,kBAAmB,CADnB,YAEF,CAEA,oBACE,QACF,CAEA,iBACE,YAAa,CAEb,QAAS,CADT,cAEF,CAEA,gBACE,oBACF,CAEA,yBACE,eACF,CAEA,4BACE,qDAA+C,CAA/C,6CACF,CAEA,uBACE,kDAA2C,CAA3C,0CACF,CAEA,mCACE,yDAAkD,CAAlD,iDACF,CAEA,gCAIE,wBAAyB,CADzB,wBAAyB,CAIzB,eAAgB,CAFhB,UAAc,CAJd,cAAe,CAKf,SAAU,CAJV,UAMF,CAEA,oBACE,cAAe,CACf,WAAY,CAEZ,gBAAiB,CADjB,UAEF,CAEA,cACE,YAAa,CACb,UACF,CAEA,uBAEE,iBAAkB,CADlB,WAEF,CAEA,sBACE,eACF,CAEA,yBAIE,kBAAmB,CAEnB,UAAW,CAJX,YAAa,CAKb,WAAY,CAJZ,sBAAuB,CAMvB,SAAU,CARV,iBAAkB,CAIlB,SAAU,CAGV,UAEF,CAEA,iBAEE,aAAe,CADf,eAEF,CAEA,gBAGE,kBAAmB,CAFnB,YAAa,CACb,qBAAsB,CAEtB,sBACF,CAEA,iCACE,eACF,CAEA,gCACE,oBACF,CAEA,oBAEE,gBAAiB,CADjB,sBAEF,CAEA,mBACE,aAAc,CACd,iBACF,CAEA,eAEE,WAAY,CAEZ,kBAAoB,CAHpB,iBAAkB,CAElB,SAEF,CAEA,iBACE,WAEF,CAEA,uFAHE,mBAMF,CAEA,+DAEE,mBACF,CAEA,uCACE,GACE,YAAa,CACb,SACF,CAEA,GAGE,qBAAwB,CAFxB,aAAc,CACd,SAEF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,4BAA6B,CAF7B,aAAc,CACd,SAEF,CACF,CA3BA,+BACE,GACE,YAAa,CACb,SACF,CAEA,GAGE,qBAAwB,CAFxB,aAAc,CACd,SAEF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,4BAA6B,CAF7B,aAAc,CACd,SAEF,CACF,CAEA,8CACE,GACE,YAAa,CACb,SACF,CAEA,GAGE,qBAAwB,CAFxB,aAAc,CACd,SAEF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,wBAAyB,CAFzB,aAAc,CACd,SAEF,CACF,CA3BA,sCACE,GACE,YAAa,CACb,SACF,CAEA,GAGE,qBAAwB,CAFxB,aAAc,CACd,SAEF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,wBAAyB,CAFzB,aAAc,CACd,SAEF,CACF,CAEA,2CACE,GACE,YAAa,CACb,SACF,CAEA,GACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,4BAA6B,CAF7B,aAAc,CACd,SAEF,CACF,CA1BA,mCACE,GACE,YAAa,CACb,SACF,CAEA,GACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,4BAA6B,CAF7B,aAAc,CACd,SAEF,CACF","file":"s-forms.css","sourcesContent":[".checkbox label {\n font-weight: bold;\n}\n\n.panel-title .checkbox label {\n font-weight: normal;\n}\n\n.answerable-question {\n color: black;\n background-color: #e6f9fb;\n border: 1px solid #dfdfdf;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n padding: 0.75rem 1.25rem;\n}\n\n.answerable-subquestions {\n padding: 1rem;\n border: 1px solid #dfdfdf;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-bottom: 1.11rem;\n}\n\n.answerable-question .form-group {\n margin-bottom: 0;\n}\n\n.answerable-question .form-group .form-check-input {\n margin-top: 0.37rem;\n}\n\n.answerable-section .form-group .form-check-label {\n margin-left: 0.11rem;\n font-weight: 500;\n}\n\n.answerable-section .card-header .col-10 {\n width: auto;\n flex-basis: auto;\n padding-right: 0;\n}\n\n.overlay-comment {\n position: absolute;\n z-index: 10;\n}\n\nsvg {\n fill: currentColor;\n}\n\n.question-comment,\n.comment-delete {\n cursor: pointer;\n}\n\n.caret-square-up,\n.caret-square-down,\n.question-circle,\n.question-comment,\n.info-circle {\n height: 1rem;\n margin-bottom: 0.15rem;\n}\n\n.question-circle,\n.question-comment,\n.external-link-icon,\n.close-icon,\n.recycle-bin-icon {\n fill: grey;\n}\n\n.text-white .question-circle,\n.text-white .question-comment,\n.text-white .external-link-icon {\n fill: white;\n}\n\n.caret-square-up,\n.caret-square-down {\n margin-right: 0.2rem;\n margin-left: -0.3125rem;\n}\n\n.has-unit-label {\n font-weight: bold;\n margin-top: 0.75rem;\n margin-left: 0.75rem;\n}\n\n.tooltip-content {\n white-space: pre-wrap;\n}\n\n.collapse-toggle {\n margin-right: 0.3rem;\n line-height: 0.9;\n}\n\n.form-label {\n font-weight: 500;\n white-space: nowrap;\n}\n\ninput:disabled {\n cursor: not-allowed;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.accordion > .card {\n overflow: visible;\n}\n\n.react-datepicker-wrapper {\n display: block;\n}\n\n.react-datepicker__navigation:focus {\n outline: none;\n}\n\n.wizard-step {\n min-height: 40.625rem;\n}\n\n.wizard-step-content {\n min-height: 37.5rem;\n}\n\n.list-group-item.active {\n font-weight: 500;\n}\n\n.question-category-1 {\n background-color: rgba(8, 255, 0, 0.05);\n}\n\n.question-category-2 {\n background-color: rgba(230, 127, 0, 0.05);\n}\n\n.question-category-3 {\n background-color: rgba(222, 0, 230, 0.05);\n}\n\n.question-category-4 {\n background-color: rgba(0, 84, 230, 0.05);\n}\n\n.question-category-5 {\n background-color: rgba(0, 230, 222, 0.05);\n}\n\n.answer {\n display: flex;\n position: relative;\n align-items: center;\n}\n\n.answer > .answer-content {\n flex-grow: 1;\n max-width: 31.25rem;\n}\n\n.card-header {\n min-height: 3rem;\n}\n\n.card-header:first-child {\n line-height: 24px;\n}\n\n.card-header.bg-info {\n background-color: #e6f9fb !important;\n}\n\n.card-header.section-background {\n background-color: #e6f9fb;\n}\n\n.question-header {\n display: flex;\n align-items: center;\n}\n\n.question-header h6 {\n margin: 0;\n}\n\n.icon-list-items {\n display: flex;\n padding-left: 0;\n margin: 0;\n}\n\n.icon-list-item {\n list-style-type: none;\n}\n\n.card-header .form-group {\n margin-bottom: 0;\n}\n\n.emphasise-on-relevant-icon {\n animation: emphasiseOnRelevantIcon 0.5s ease-in;\n}\n\n.emphasise-on-relevant {\n animation: emphasiseOnRelevant 1.2s ease-in;\n}\n\n.card-header.emphasise-on-relevant {\n animation: emphasiseOnRelevantSection 1.2s ease-in;\n}\n\n.comment-tooltip > .tooltip-inner {\n max-width: none;\n width: 30vw;\n border: solid 2px #afafaf;\n background-color: #cbeef6;\n color: #000000;\n padding: 0;\n border-radius: 0;\n}\n\n.close-comment-icon {\n cursor: pointer;\n height: 24px;\n width: 24px;\n margin-left: auto;\n}\n\n#comment-form {\n display: flex;\n width: 100%;\n}\n\n#comment-form textarea {\n resize: none;\n overflow-y: hidden;\n}\n\n.comment-form-control {\n border-radius: 0;\n}\n\n.btn.comment-form-button {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n right: 2px;\n bottom: 2px;\n height: 25px;\n width: 25px;\n padding: 0;\n}\n\n.comment-content {\n text-align: left;\n padding: 0.5rem;\n}\n\n.comment-delete {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.comment-content .comment-author {\n font-weight: bold;\n}\n\n.comment-content .comment-value {\n white-space: pre-line;\n}\n\n.comment-list-items {\n overflow: hidden scroll;\n max-height: 25rem;\n}\n\n.comment-timestamp {\n color: #696969;\n font-style: italic;\n}\n\n.comment-badge {\n position: relative;\n bottom: 13px;\n right: 7px;\n font-size: 0.5625rem;\n}\n\n.show-irrelevant {\n opacity: 50%;\n pointer-events: none;\n}\n\n.show-irrelevant .form-check-input,\n.show-irrelevant .form-check-label {\n pointer-events: none;\n}\n\n.show-irrelevant .card-header,\n.show-irrelevant.list-group-item {\n pointer-events: auto;\n}\n\n@keyframes emphasiseOnRelevant {\n 0% {\n display: none;\n opacity: 0;\n }\n\n 1% {\n display: block;\n opacity: 0;\n background-color: yellow;\n }\n\n 25% {\n display: block;\n opacity: 0;\n }\n\n 75% {\n display: block;\n opacity: 1;\n }\n\n 100% {\n display: block;\n opacity: 1;\n background-color: transparent;\n }\n}\n\n@keyframes emphasiseOnRelevantSection {\n 0% {\n display: none;\n opacity: 0;\n }\n\n 1% {\n display: block;\n opacity: 0;\n background-color: yellow;\n }\n\n 25% {\n display: block;\n opacity: 0;\n }\n\n 75% {\n display: block;\n opacity: 1;\n }\n\n 100% {\n display: block;\n opacity: 1;\n background-color: #e6f9fb;\n }\n}\n\n@keyframes emphasiseOnRelevantIcon {\n 0% {\n display: none;\n opacity: 0;\n }\n\n 1% {\n display: block;\n opacity: 0;\n }\n\n 25% {\n display: block;\n opacity: 0;\n }\n\n 75% {\n display: block;\n opacity: 1;\n }\n\n 100% {\n display: block;\n opacity: 1;\n background-color: transparent;\n }\n}\n"]}
1
+ {"version":3,"sources":["s-forms.css"],"names":[],"mappings":"AAAA,gBACE,eACF,CAEA,6BACE,eACF,CAEA,qBAEE,wBAAyB,CAEzB,wBAAoC,CAApC,+BAAoC,CAEpC,0BAA2B,CAD3B,2BAA4B,CAJ5B,UAAY,CAMZ,sBACF,CAEA,yBAEE,wBAAyB,CACzB,6BAA8B,CAC9B,8BAA+B,CAC/B,qBAAsB,CAJtB,YAKF,CAEA,iCACE,eACF,CAEA,mDACE,iBACF,CAEA,kDAEE,eAAgB,CADhB,kBAEF,CAEA,yCAEE,eAAgB,CAChB,eAAgB,CAFhB,UAGF,CAEA,iBACE,iBAAkB,CAClB,UACF,CAEA,IACE,iBACF,CAEA,kCAEE,cACF,CAEA,oFAKE,WAAY,CACZ,oBACF,CAEA,qFAKE,SACF,CAEA,2FAGE,SACF,CAEA,oCAGE,qBAAuB,CADvB,kBAEF,CAEA,gBACE,eAAiB,CAEjB,kBAAoB,CADpB,iBAEF,CAEA,iBACE,oBACF,CAEA,iBAEE,cAAgB,CADhB,kBAEF,CAEA,YACE,eAAgB,CAChB,kBACF,CAEA,eACE,kBACF,CAEA,gBACE,cACF,CAEA,iBACE,gBACF,CAEA,0BACE,aACF,CAEA,oCACE,YACF,CAEA,aACE,oBACF,CAEA,qBACE,kBACF,CAEA,wBACE,eACF,CAEA,qBACE,kCACF,CAEA,qBACE,oCACF,CAEA,qBACE,oCACF,CAEA,qBACE,mCACF,CAEA,qBACE,oCACF,CAEA,QAGE,kBAAmB,CAFnB,YAAa,CACb,iBAEF,CAEA,wBACE,WAAY,CACZ,kBACF,CAEA,aACE,eACF,CAEA,yBACE,gBACF,CAEA,qBACE,kCACF,CAEA,gCACE,wBACF,CAEA,iBAEE,kBAAmB,CADnB,YAEF,CAEA,oBACE,QACF,CAEA,iBACE,YAAa,CAEb,QAAS,CADT,cAEF,CAEA,gBACE,oBACF,CAEA,yBACE,eACF,CAEA,4BACE,qDAA+C,CAA/C,6CACF,CAEA,uBACE,kDAA2C,CAA3C,0CACF,CAEA,mCACE,yDAAkD,CAAlD,iDACF,CAEA,gCAIE,wBAAyB,CADzB,wBAAyB,CAIzB,eAAgB,CAFhB,UAAc,CAJd,cAAe,CAKf,SAAU,CAJV,UAMF,CAEA,oBACE,cAAe,CACf,WAAY,CAEZ,gBAAiB,CADjB,UAEF,CAEA,cACE,YAAa,CACb,UACF,CAEA,uBAEE,iBAAkB,CADlB,WAEF,CAEA,sBACE,eACF,CAEA,yBAIE,kBAAmB,CAEnB,UAAW,CAJX,YAAa,CAKb,WAAY,CAJZ,sBAAuB,CAMvB,SAAU,CARV,iBAAkB,CAIlB,SAAU,CAGV,UAEF,CAEA,iBAEE,aAAe,CADf,eAEF,CAEA,gBAGE,kBAAmB,CAFnB,YAAa,CACb,qBAAsB,CAEtB,sBACF,CAEA,iCACE,eACF,CAEA,gCACE,oBACF,CAEA,oBAEE,gBAAiB,CADjB,sBAEF,CAEA,mBACE,aAAc,CACd,iBACF,CAEA,eAEE,WAAY,CAEZ,kBAAoB,CAHpB,iBAAkB,CAElB,SAEF,CAEA,iBACE,WAEF,CAEA,uFAHE,mBAMF,CAEA,+DAEE,mBACF,CAEA,eACE,eACF,CAEA,qBACE,YAAa,CACb,kBAAmB,CACnB,cACF,CAEA,oBACE,aACF,CAEA,yCAEE,gBAAiB,CACjB,eAAgB,CAFhB,iBAGF,CAEA,0BAOE,qBAAsB,CAJtB,QAAS,CACT,MAAO,CAEP,WAAY,CALZ,iBAAkB,CAIlB,OAAQ,CAHR,KAMF,CAEA,2BACE,qBACF,CAEA,6DACE,iBAAkB,CAClB,UACF,CAEA,8CACE,UACF,CAEA,uCACE,GACE,YAAa,CACb,SACF,CAEA,GAGE,qBAAwB,CAFxB,aAAc,CACd,SAEF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,4BAA6B,CAF7B,aAAc,CACd,SAEF,CACF,CA3BA,+BACE,GACE,YAAa,CACb,SACF,CAEA,GAGE,qBAAwB,CAFxB,aAAc,CACd,SAEF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,4BAA6B,CAF7B,aAAc,CACd,SAEF,CACF,CAEA,8CACE,GACE,YAAa,CACb,SACF,CAEA,GAGE,qBAAwB,CAFxB,aAAc,CACd,SAEF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,wBAAyB,CAFzB,aAAc,CACd,SAEF,CACF,CA3BA,sCACE,GACE,YAAa,CACb,SACF,CAEA,GAGE,qBAAwB,CAFxB,aAAc,CACd,SAEF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,wBAAyB,CAFzB,aAAc,CACd,SAEF,CACF,CAEA,2CACE,GACE,YAAa,CACb,SACF,CAEA,GACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,4BAA6B,CAF7B,aAAc,CACd,SAEF,CACF,CA1BA,mCACE,GACE,YAAa,CACb,SACF,CAEA,GACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,IACE,aAAc,CACd,SACF,CAEA,GAGE,4BAA6B,CAF7B,aAAc,CACd,SAEF,CACF","file":"s-forms.css","sourcesContent":[".checkbox label {\n font-weight: bold;\n}\n\n.panel-title .checkbox label {\n font-weight: normal;\n}\n\n.answerable-question {\n color: black;\n background-color: #e6f9fb;\n border: 1px solid #dfdfdf;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n padding: 0.75rem 1.25rem;\n}\n\n.answerable-subquestions {\n padding: 1rem;\n border: 1px solid #dfdfdf;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-bottom: 1.11rem;\n}\n\n.answerable-question .form-group {\n margin-bottom: 0;\n}\n\n.answerable-question .form-group .form-check-input {\n margin-top: 0.37rem;\n}\n\n.answerable-section .form-group .form-check-label {\n margin-left: 0.11rem;\n font-weight: 500;\n}\n\n.answerable-section .card-header .col-10 {\n width: auto;\n flex-basis: auto;\n padding-right: 0;\n}\n\n.overlay-comment {\n position: absolute;\n z-index: 10;\n}\n\nsvg {\n fill: currentColor;\n}\n\n.question-comment,\n.comment-delete {\n cursor: pointer;\n}\n\n.caret-square-up,\n.caret-square-down,\n.question-circle,\n.question-comment,\n.info-circle {\n height: 1rem;\n margin-bottom: 0.15rem;\n}\n\n.question-circle,\n.question-comment,\n.external-link-icon,\n.close-icon,\n.recycle-bin-icon {\n fill: grey;\n}\n\n.text-white .question-circle,\n.text-white .question-comment,\n.text-white .external-link-icon {\n fill: white;\n}\n\n.caret-square-up,\n.caret-square-down {\n margin-right: 0.2rem;\n margin-left: -0.3125rem;\n}\n\n.has-unit-label {\n font-weight: bold;\n margin-top: 0.75rem;\n margin-left: 0.75rem;\n}\n\n.tooltip-content {\n white-space: pre-wrap;\n}\n\n.collapse-toggle {\n margin-right: 0.3rem;\n line-height: 0.9;\n}\n\n.form-label {\n font-weight: 500;\n white-space: nowrap;\n}\n\ninput:disabled {\n cursor: not-allowed;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.accordion > .card {\n overflow: visible;\n}\n\n.react-datepicker-wrapper {\n display: block;\n}\n\n.react-datepicker__navigation:focus {\n outline: none;\n}\n\n.wizard-step {\n min-height: 40.625rem;\n}\n\n.wizard-step-content {\n min-height: 37.5rem;\n}\n\n.list-group-item.active {\n font-weight: 500;\n}\n\n.question-category-1 {\n background-color: rgba(8, 255, 0, 0.05);\n}\n\n.question-category-2 {\n background-color: rgba(230, 127, 0, 0.05);\n}\n\n.question-category-3 {\n background-color: rgba(222, 0, 230, 0.05);\n}\n\n.question-category-4 {\n background-color: rgba(0, 84, 230, 0.05);\n}\n\n.question-category-5 {\n background-color: rgba(0, 230, 222, 0.05);\n}\n\n.answer {\n display: flex;\n position: relative;\n align-items: center;\n}\n\n.answer > .answer-content {\n flex-grow: 1;\n max-width: 31.25rem;\n}\n\n.card-header {\n min-height: 3rem;\n}\n\n.card-header:first-child {\n line-height: 24px;\n}\n\n.card-header.bg-info {\n background-color: #e6f9fb !important;\n}\n\n.card-header.section-background {\n background-color: #e6f9fb;\n}\n\n.question-header {\n display: flex;\n align-items: center;\n}\n\n.question-header h6 {\n margin: 0;\n}\n\n.icon-list-items {\n display: flex;\n padding-left: 0;\n margin: 0;\n}\n\n.icon-list-item {\n list-style-type: none;\n}\n\n.card-header .form-group {\n margin-bottom: 0;\n}\n\n.emphasise-on-relevant-icon {\n animation: emphasiseOnRelevantIcon 0.5s ease-in;\n}\n\n.emphasise-on-relevant {\n animation: emphasiseOnRelevant 1.2s ease-in;\n}\n\n.card-header.emphasise-on-relevant {\n animation: emphasiseOnRelevantSection 1.2s ease-in;\n}\n\n.comment-tooltip > .tooltip-inner {\n max-width: none;\n width: 30vw;\n border: solid 2px #afafaf;\n background-color: #cbeef6;\n color: #000000;\n padding: 0;\n border-radius: 0;\n}\n\n.close-comment-icon {\n cursor: pointer;\n height: 24px;\n width: 24px;\n margin-left: auto;\n}\n\n#comment-form {\n display: flex;\n width: 100%;\n}\n\n#comment-form textarea {\n resize: none;\n overflow-y: hidden;\n}\n\n.comment-form-control {\n border-radius: 0;\n}\n\n.btn.comment-form-button {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n right: 2px;\n bottom: 2px;\n height: 25px;\n width: 25px;\n padding: 0;\n}\n\n.comment-content {\n text-align: left;\n padding: 0.5rem;\n}\n\n.comment-delete {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.comment-content .comment-author {\n font-weight: bold;\n}\n\n.comment-content .comment-value {\n white-space: pre-line;\n}\n\n.comment-list-items {\n overflow: hidden scroll;\n max-height: 25rem;\n}\n\n.comment-timestamp {\n color: #696969;\n font-style: italic;\n}\n\n.comment-badge {\n position: relative;\n bottom: 13px;\n right: 7px;\n font-size: 0.5625rem;\n}\n\n.show-irrelevant {\n opacity: 50%;\n pointer-events: none;\n}\n\n.show-irrelevant .form-check-input,\n.show-irrelevant .form-check-label {\n pointer-events: none;\n}\n\n.show-irrelevant .card-header,\n.show-irrelevant.list-group-item {\n pointer-events: auto;\n}\n\n.media-content {\n overflow: hidden;\n}\n\n.media-content-items {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.media-content-item {\n padding: 0.5rem;\n}\n\n.media-content-item .media-content-image {\n position: relative;\n max-height: 150px;\n max-width: 300px;\n}\n\n.media-content-item-image {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n border: gray solid 2px;\n}\n\n.media-content-item iframe {\n border: gray solid 2px;\n}\n\n.media-content-item .media-content-image .media-content-link {\n position: absolute;\n z-index: 10;\n}\n\n.media-content-item .media-content-link:hover {\n opacity: 0.8;\n}\n\n@keyframes emphasiseOnRelevant {\n 0% {\n display: none;\n opacity: 0;\n }\n\n 1% {\n display: block;\n opacity: 0;\n background-color: yellow;\n }\n\n 25% {\n display: block;\n opacity: 0;\n }\n\n 75% {\n display: block;\n opacity: 1;\n }\n\n 100% {\n display: block;\n opacity: 1;\n background-color: transparent;\n }\n}\n\n@keyframes emphasiseOnRelevantSection {\n 0% {\n display: none;\n opacity: 0;\n }\n\n 1% {\n display: block;\n opacity: 0;\n background-color: yellow;\n }\n\n 25% {\n display: block;\n opacity: 0;\n }\n\n 75% {\n display: block;\n opacity: 1;\n }\n\n 100% {\n display: block;\n opacity: 1;\n background-color: #e6f9fb;\n }\n}\n\n@keyframes emphasiseOnRelevantIcon {\n 0% {\n display: none;\n opacity: 0;\n }\n\n 1% {\n display: block;\n opacity: 0;\n }\n\n 25% {\n display: block;\n opacity: 0;\n }\n\n 75% {\n display: block;\n opacity: 1;\n }\n\n 100% {\n display: block;\n opacity: 1;\n background-color: transparent;\n }\n}\n"]}
package/dist/s-forms.js CHANGED
@@ -1,2 +1,2 @@
1
- import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.promise.js";import"core-js/modules/es.array.some.js";import e,{useState as t,useMemo as n,useEffect as o,useContext as r,useRef as s,forwardRef as i}from"react";import a from"prop-types";import"core-js/modules/es.object.assign.js";import l from"jsonld";import"core-js/modules/es.array.concat.js";import"core-js/modules/es.array.find.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.array.map.js";import u from"jsonld-utils";import"core-js/modules/es.array.sort.js";import"core-js/modules/es.array.for-each.js";import"core-js/modules/web.dom-collections.for-each.js";import c from"tsort";import"core-js/modules/es.number.max-safe-integer.js";import"core-js/modules/es.number.constructor.js";import p from"react-dom";import{Form as m,FormGroup as d,FormControl as h,FormText as f,OverlayTrigger as E,Tooltip as v,Col as g,Row as S,Button as A,Badge as _,Overlay as C,Popover as T,ListGroup as N,ListGroupItem as I,Card as O,Accordion as w,ButtonToolbar as y,Nav as b,NavItem as L,NavLink as R,Modal as H}from"react-bootstrap";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.array.iterator.js";import"core-js/modules/es.set.js";import"core-js/modules/es.string.iterator.js";import"core-js/modules/esnext.set.add-all.js";import"core-js/modules/esnext.set.delete-all.js";import"core-js/modules/esnext.set.difference.js";import"core-js/modules/esnext.set.every.js";import"core-js/modules/esnext.set.filter.js";import"core-js/modules/esnext.set.find.js";import"core-js/modules/esnext.set.intersection.js";import"core-js/modules/esnext.set.is-disjoint-from.js";import"core-js/modules/esnext.set.is-subset-of.js";import"core-js/modules/esnext.set.is-superset-of.js";import"core-js/modules/esnext.set.join.js";import"core-js/modules/esnext.set.map.js";import"core-js/modules/esnext.set.reduce.js";import"core-js/modules/esnext.set.some.js";import"core-js/modules/esnext.set.symmetric-difference.js";import"core-js/modules/esnext.set.union.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.array.every.js";import"core-js/modules/es.array.is-array.js";import"core-js/modules/es.array.find-index.js";import"core-js/modules/es.date.to-string.js";import x from"react-datepicker";import{format as D}from"date-fns";import"core-js/modules/es.object.get-own-property-names.js";import"core-js/modules/es.array.index-of.js";import"core-js/modules/es.array.slice.js";import V from"yasgui-yasqe";import"@triply/yasgui/build/yasgui.min.css";import"core-js/modules/web.timers.js";import U from"inputmask-core";import"core-js/modules/es.symbol.js";import"core-js/modules/es.symbol.description.js";import"core-js/modules/es.function.name.js";import M,{components as j}from"react-select";import{FixedSizeList as P}from"react-window";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.date.now.js";import"core-js/modules/es.array.splice.js";import{jsx as q,jsxs as Q}from"react/jsx-runtime";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.string.replace.js";import"core-js/modules/es.object.values.js";import"core-js/modules/es.parse-int.js";import F from"javascript-time-ago";import z from"javascript-time-ago/locale/en";import k from"javascript-time-ago/locale/cs";import{motion as B}from"framer-motion/dist/framer-motion";import{Rings as W}from"react-loader-spinner";import"core-js/modules/es.string.trim.js";import{useIntl as X,IntlProvider as G}from"react-intl";import Y from"classnames";import J from"react-bootstrap/Card";function K(){return K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)}function Z(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$(e,t)}function $(e,t){return $=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},$(e,t)}function ee(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(n=s[o])>=0||(r[n]=e[n]);return r}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function ne(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var oe=/*#__PURE__*/function(){function e(){}return e.log=function(e){console.log(e)},e.warn=function(e){console.warn?console.warn(e):console.log("WARNING: "+e)},e.error=function(e){console.error?console.error(e):console.log("ERROR: "+e)},e}(),re=["children"],se=/*#__PURE__*/e.createContext({}),ie=function(o){var r=o.children,s=ee(o,re),i=t({}),a=i[0],u=i[1],c=function(e,t){try{var n=a[e];return n&&n.length?Promise.resolve(n):Promise.resolve(s.fetchTypeAheadValues(t)).then(function(t){return t.length?new Promise(function(n){l.frame(t,{},null,function(t,o){var r=o["@graph"];return u(function(t){var n;return Object.assign({},t,((n={})[e]=r,n))}),n(r)})}):(oe.warn("No data received when loading options using id "+e),[])})}catch(e){return Promise.reject(e)}},p=function(e){return a[e]||[]},m=n(function(){return{loadFormOptions:c,getOptions:p}},[c,p]);/*#__PURE__*/return e.createElement(se.Provider,K({value:m},s),r)};ie.propTypes={children:a.element.isRequired,fetchTypeAheadValues:a.func};var ae=function(){};ae.COLUMN_COUNT=12,ae.INPUT_LENGTH_THRESHOLD=50,ae.DATETIME_NUMBER_FORMAT="x",ae.FORM="http://onto.fel.cvut.cz/ontologies/documentation/form",ae.HAS_SUBQUESTION="http://onto.fel.cvut.cz/ontologies/documentation/has_related_question",ae.HAS_ANSWER="http://onto.fel.cvut.cz/ontologies/documentation/has_answer",ae.HAS_OPTION="http://onto.fel.cvut.cz/ontologies/form/has-possible-value",ae.HAS_OPTIONS_QUERY="http://onto.fel.cvut.cz/ontologies/form/has-possible-values-query",ae.HAS_VALUE_TYPE="http://onto.fel.cvut.cz/ontologies/form/has-value-type",ae.IS_DISABLED="http://onto.fel.cvut.cz/ontologies/aviation/form-376/is-disabled",ae.INPUT_MASK="http://onto.fel.cvut.cz/ontologies/form/has-input-mask",ae.LAYOUT_CLASS="http://onto.fel.cvut.cz/ontologies/form-layout/has-layout-class",ae.LAYOUT={FORM:"form",QUESTION_SECTION:"section",WIZARD_STEP:"wizard-step",DATE:"date",TIME:"time",DATETIME:"datetime",TEXT:"text",TEXTAREA:"textarea",CHECKBOX:"checkbox",QUESTION_TYPEAHEAD:"type-ahead",MASKED_INPUT:"masked-input",ANSWERABLE:"answerable",SPARQL:"sparql",TURTLE:"ttl",DISABLED:"disabled",HIDDEN:"hidden",COLLAPSED:"collapsed",EMPHASISED:"emphasised",EMPHASISE_ON_RELEVANT:"emphasise-on-relevant",CATEGORY:["category-1","category-2","category-3","category-4","category-5"]},ae.HAS_INITIAL_INPUT_LENGTH="http://onto.fel.cvut.cz/ontologies/form-layout/has-initial-input-length",ae.VALUE_TYPE_CODE="code",ae.VALUE_TYPE_TEXT="text",ae.GENERATED_ROW_SIZE=1,ae.HAS_QUESTION_ORIGIN="http://onto.fel.cvut.cz/ontologies/form/has-question-origin",ae.HAS_ANSWER_ORIGIN="http://onto.fel.cvut.cz/ontologies/form/has-answer-origin",ae.HAS_DATA_VALUE="http://onto.fel.cvut.cz/ontologies/documentation/has_data_value",ae.HAS_OBJECT_VALUE="http://onto.fel.cvut.cz/ontologies/documentation/has_object_value",ae.HELP_DESCRIPTION="http://purl.org/dc/elements/1.1/description",ae.SOURCE="http://purl.org/dc/elements/1.1/source",ae.XSD={MAX_EXCLUSIVE:"http://www.w3.org/2001/XMLSchema#maxExclusive",MAX_INCLUSIVE:"http://www.w3.org/2001/XMLSchema#maxInclusive",MIN_EXCLUSIVE:"http://www.w3.org/2001/XMLSchema#minExclusive",MIN_INCLUSIVE:"http://www.w3.org/2001/XMLSchema#minInclusive",INT:"http://www.w3.org/2001/XMLSchema#int",INTEGER:"http://www.w3.org/2001/XMLSchema#integer",NEGATIVE_INTEGER:"http://www.w3.org/2001/XMLSchema#negativeInteger",NON_NEGATIVE_INTEGER:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",NON_POSITIVE_INTEGER:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",POSITIVE_INTEGER:"http://www.w3.org/2001/XMLSchema#positiveInteger",BOOLEAN:"http://www.w3.org/2001/XMLSchema#boolean"},ae.STEP="http://onto.fel.cvut.cz/ontologies/form/step",ae.ACCEPTS_ANSWER_VALUE="http://onto.fel.cvut.cz/ontologies/form/accepts-answer-value",ae.ACCEPTS="http://onto.fel.cvut.cz/ontologies/form/accepts",ae.HAS_DATATYPE="http://onto.fel.cvut.cz/ontologies/form/has-datatype",ae.HAS_LAYOUT_CLASS="http://onto.fel.cvut.cz/ontologies/form/has-layout-class",ae.HAS_POSSIBLE_VALUES_QUERY="http://onto.fel.cvut.cz/ontologies/form/has-possible-values-query",ae.HAS_REQUIRED_VALUE="http://onto.fel.cvut.cz/ontologies/form/has-required-value",ae.HAS_TESTED_QUESTION="http://onto.fel.cvut.cz/ontologies/form/has-tested-question",ae.HAS_TESTED_FORM="http://onto.fel.cvut.cz/ontologies/form/has-tested-form",ae.HAS_UNIT="http://onto.fel.cvut.cz/ontologies/form/has-unit",ae.HAS_VALID_ANSWER="http://onto.fel.cvut.cz/ontologies/form/has-valid-answer",ae.IS_RELEVANT_IF="http://onto.fel.cvut.cz/ontologies/form/is-relevant-if",ae.ACCEPTS_VALIDATION_VALUE="http://onto.fel.cvut.cz/ontologies/form/accepts-validation-value",ae.HAS_VALIDATION_MESSAGE="http://onto.fel.cvut.cz/ontologies/form/has-validation-message",ae.NEGATIVE_CONDITION="http://onto.fel.cvut.cz/ontologies/form/negative-condition",ae.REQUIRES_ANSWER="http://onto.fel.cvut.cz/ontologies/form/requires-answer",ae.REQUIRES_ANSWER_DESCRIPTION_IF="http://onto.fel.cvut.cz/ontologies/form/requires-answer-description-if",ae.REQUIRES_ANSWER_IF="http://onto.fel.cvut.cz/ontologies/form/requires-answer-if",ae.REQUIRES_ANSWER_VALUE="http://onto.fel.cvut.cz/ontologies/form/requires-answer-value",ae.REQUIRES_DESCRIPTION="http://onto.fel.cvut.cz/ontologies/form/requires-description",ae.HAS_PRECEDING_QUESTION="http://onto.fel.cvut.cz/ontologies/form/has-preceding-question",ae.HAS_PRECEDING_VALUE="http://onto.fel.cvut.cz/ontologies/form/has-preceding-value",ae.HAS_MEDIA_CONTENT="http://onto.fel.cvut.cz/ontologies/form/has-media-content",ae.CONDITION="http://onto.fel.cvut.cz/ontologies/form/condition",ae.OR_CONDITION="http://onto.fel.cvut.cz/ontologies/form/or-condition",ae.HAS_SUB_CONDITION="http://onto.fel.cvut.cz/ontologies/form/has-sub-condition",ae.HAS_PATTERN="http://onto.fel.cvut.cz/ontologies/form-lt/has-pattern",ae.HAS_DECLARED_PREFIX="http://onto.fel.cvut.cz/ontologies/form-spin/has-declared-prefix",ae.PREFIX="http://www.w3.org/ns/shacl#prefix",ae.NAMESPACE="http://www.w3.org/ns/shacl#namespace",ae.HAS_COMMENT="http://onto.fel.cvut.cz/ontologies/form/has-comment",ae.HAS_COMMENT_VALUE="http://onto.fel.cvut.cz/ontologies/form/has-comment-value",ae.HAS_AUTHOR="http://onto.fel.cvut.cz/ontologies/form/has-author",ae.HAS_TIMESTAMP="http://onto.fel.cvut.cz/ontologies/form/has-timestamp",ae.NOT_ANSWERED_QUESTION="http://onto.fel.cvut.cz/ontologies/form/not-answered-question",ae.ANSWERED_QUESTION="http://onto.fel.cvut.cz/ontologies/form/answered-question",ae.RDFS_LABEL=u.RDFS_LABEL,ae.RDFS_COMMENT=u.RDFS_COMMENT,ae.DEFAULT_HAS_CHILD=u.DEFAULT_HAS_CHILD,ae.DEFAULT_OPTIONS={icons:[{id:(ae.ICONS={QUESTION_COMMENTS:"questionComments",QUESTION_HELP:"questionHelp",QUESTION_LINK:"questionLink"}).QUESTION_HELP,behavior:(ae.ICON_BEHAVIOR={ENABLE:"enable",DISABLE:"disable",ON_HOVER:"onHover"}).ENABLE},{id:ae.ICONS.QUESTION_COMMENTS,behavior:ae.ICON_BEHAVIOR.ON_HOVER},{id:ae.ICONS.QUESTION_LINK,behavior:ae.ICON_BEHAVIOR.ON_HOVER}]},ae.LANG={cs:{locale:"cs",label:"Čestina"},en:{locale:"en",label:"English"}};var le=/*#__PURE__*/function(){function e(){}return e.getStringHash=function(e){var t=0,n=e?e.length:0;if(0===n)return t;for(var o=0;o<n;o++)t=(t<<5)-t+e.charCodeAt(o),t&=t;return t},e.asArray=function(e){return e?e.constructor===Array?e:[e]:[]},e}(),ue=/*#__PURE__*/function(){function e(){}return e.putObject=function(t,n){e.objectMap[t]=n},e.getObject=function(t){return e.objectMap[t]},e}();ue.objectMap={};var ce=/*#__PURE__*/function(){function e(){}return e.getFirstObject=function(e,t){var n=l.getValues(e,t);return 0===n.length?null:n[0]},e.compareValues=function(e,t){return t="object"==typeof t?t:{"@value":t},!!((e="object"==typeof e?e:{"@value":e})&&e["@value"]&&t&&t["@value"]&&("string"==typeof e["@value"]?e["@value"]:JSON.stringify(e["@value"]))===("string"==typeof t["@value"]?t["@value"]:JSON.stringify(t["@value"])))||l.compareValues(e,t)},e.toplogicalSort=function(e,t){var n;do{n=!1;for(var o=0;o<e.length;o++)for(var r=o;r<e.length;r++)if(e[o][t]&&("object"==typeof e[o][t]?e[o][t]["@id"]:e[o][t])===e[r]["@id"]){var s=e[o];e[o]=e[r],e[r]=s,n=!0;break}}while(n);return e},e.orderPreservingToplogicalSort=function(e,t){for(var n=c(),o={},r=function(r){var s=e[r]["@id"];n.add(s),o[s]=e[r],le.asArray(e[r][t]).map(function(e){return"object"==typeof e?e["@id"]:e}).map(function(e){return[e,s]}).forEach(function(e){return n.add(e)})},s=0;s<e.length;s++)r(s);for(var i=n.sort(),a=0;a<i.length;a++)e[a]=o[i[a]];return e},e.getCompareLocalizedLabelFunction=function(e){return function(t,n){var o=u.getLocalized(t[u.RDFS_LABEL],e),r=u.getLocalized(n[u.RDFS_LABEL],e);return o<r?-1:o>r?1:0}},e.orderByLocalizedLabels=function(t,n){return t.sort(e.getCompareLocalizedLabelFunction(n))},e.checkId=function(e,t){if(void 0!==e)return e.constructor===Array?!!e.find(function(e){return e["@id"]===t}):e.constructor===Object?e["@id"]===t:void 0},e}(),pe=/*#__PURE__*/function(){function e(){}return e.isForm=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.FORM)},e.isWizardStep=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.WIZARD_STEP)},e.isSection=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.QUESTION_SECTION)},e.isAnswerable=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.ANSWERABLE)},e.isTypeahead=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.QUESTION_TYPEAHEAD)},e.getPossibleValuesQuery=function(e){return u.getJsonAttValue(e,ae.HAS_OPTIONS_QUERY)},e.isDisabled=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.DISABLED)},e.isHidden=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.HIDDEN)},e.isTextarea=function(t,n){return n&&n.length>ae.INPUT_LENGTH_THRESHOLD&&!e.isTypeahead(t)||u.hasValue(t,ae.LAYOUT_CLASS,ae.LAYOUT.TEXTAREA)},e.isText=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.TEXT)},e.isCalendar=function(t){return e.isDate(t)||e.isTime(t)||e.isDateTime(t)},e.isDate=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.DATE)},e.isTime=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.TIME)},e.isDateTime=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.DATETIME)},e.isCheckbox=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.CHECKBOX)},e.isMaskedInput=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.MASKED_INPUT)},e.isSparqlInput=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.SPARQL)},e.isTurtleInput=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.TURTLE)},e.isCollapsed=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.COLLAPSED)},e.isEmphasised=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.EMPHASISED)},e.getCategory=function(e){return ae.LAYOUT.CATEGORY.find(function(t){return u.hasValue(e,ae.LAYOUT_CLASS,t)})},e.resolveValue=function(e){return e?e[ae.HAS_OBJECT_VALUE]?e[ae.HAS_OBJECT_VALUE]["@id"]:u.getJsonAttValue(e,ae.HAS_DATA_VALUE):null},e.resolveValueObject=function(e){return e?e[ae.HAS_OBJECT_VALUE]?le.asArray(e[ae.HAS_OBJECT_VALUE])[0]:e[ae.HAS_DATA_VALUE]?le.asArray(e[ae.HAS_DATA_VALUE])[0]:null:null},e.isRelevant=function(t){if(!t[ae.IS_RELEVANT_IF])return!0;for(var n,o=ne(le.asArray(t[ae.IS_RELEVANT_IF]));!(n=o()).done;)if(!e.testCondition(n.value))return!1;return!0},e.hasValidationLogic=function(e){return!!e[ae.REQUIRES_ANSWER_VALUE]||!!e[ae.REQUIRES_ANSWER]||!!e[ae.REQUIRES_ANSWER_IF]},e.isValid=function(e){if(!1===e[ae.HAS_VALID_ANSWER])return!1;for(var t,n=ne(le.asArray(e[ae.HAS_SUBQUESTION]));!(t=n()).done;)if(!1===this.isValid(t.value))return!1;return!0},e.testOrCondition=function(e){var t=e[ae.HAS_SUB_CONDITION];t||console.warn("Or condition does not have any sub-condition !");for(var n,o=ne(this._getMappedObjectsArray(t));!(n=o()).done;)if(this.testCondition(n.value))return!0;return!1},e.testCondition=function(t){var n,o=t[ae.ACCEPTS_VALIDATION_VALUE],r=t[ae.ACCEPTS_ANSWER_VALUE],s=t[ae.ACCEPTS],i=t[ae.HAS_TESTED_QUESTION];if(t[ae.HAS_SUB_CONDITION])return this.testOrCondition(t);if(o&&r&&console.warn("Support for validation and requirement constraints at same time is not implemented !"),s&&i){var a=le.asArray(s);if(1!==a.length&&console.warn("Support for multiple accepts values is not implemented !"),a[0]["@id"]===ae.ANSWERED_QUESTION){(r||o)&&console.warn("Support for accepted answer/validations values is not implemented !");for(var u,c=ne(this._getMappedObjectsArray(i));!(u=c()).done;)if(!this.hasAnswer(u.value))return!1;return!0}console.warn("No support to accept question of type "+a[0]["@id"]+" !")}if(o&&i){var p=le.asArray(o);(1!==p.length||!0!==p[0]&&"true"!==p[0])&&console.warn('Validation values other than "true" are not implemented !');for(var m,d=ne(le.asArray(i));!(m=d()).done;){if(void 0===(n=ue.getObject(m.value["@id"])))return console.warn("Questions is not loaded in an object map."),!0;if(!1===this.isValid(n))return!1}return!0}if(r&&i){n=ue.getObject(i["@id"]);for(var h,f=ne(le.asArray(r));!(h=f()).done;){var E=h.value;if(!n)return console.warn("Question is not defined."),!0;if(!n.hasOwnProperty(ae.HAS_ANSWER))return!1;var v=l.getValues(n,ae.HAS_ANSWER);if(0===v.length)return!1;var g=e.resolveValueObject(v[0]);if(g&&E&&g.hasOwnProperty("@value")&&E.hasOwnProperty("@id")&&g["@value"]==E["@id"])return!0;if(ce.compareValues(g,E))return!0}}return!1},e._getMappedObjectsArray=function(e,t){return le.asArray(e).map(function(e){var n=ue.getObject(e["@id"]);return void 0===n?(console.warn((t||"Object")+' "'+e["@id"]+'" is not loaded in an object map.'),null):n}).filter(function(e){return null!==e})},e.hasAnswer=function(t){if(!t)return!1;if(t.hasOwnProperty(ae.HAS_ANSWER)){var n=l.getValues(t,ae.HAS_ANSWER);if(n.length){var o=e.resolveValueObject(n[0]);if(o&&(o["@value"]||o["@id"]))return!0}}for(var r,s=ne(le.asArray(t[ae.HAS_SUBQUESTION]));!(r=s()).done;)if(e.hasAnswer(r.value))return!0;return!1},e.resolveDateTimeFormat=function(t,n,o){return"number"==typeof n?ae.DATETIME_NUMBER_FORMAT:e.isDate(t)?o.dateFormat:e.isTime(t)?o.timeFormat:o.dateTimeFormat},e}(),me={},de=[],he=/*#__PURE__*/e.createContext({}),fe=function(r){var s=t(r.data||me),i=s[0],a=s[1],l=t(r.formQuestions||de),u=l[0],c=l[1];o(function(){if(r.isFormValid){var e=pe.isValid(i);r.isFormValid(e)}},[]),o(function(){a(r.data||me),c(r.formQuestions||de)},[r.data,r.formQuestions]);var p=function(e){e&&a(Object.assign({},i,e))},m=function(e,t){if(!(!t||e<0||e>=u.length)){var n=[].concat(u);if(n[e]=Object.assign({},n[e],t),c(n),r.isFormValid){var o=pe.isValid(i);r.isFormValid(o)}}},d=function(){return i},h=function(e){return null==e?u:u[e]},f=n(function(){return{updateData:p,updateFormQuestionsData:m,getData:d,getFormQuestionsData:h}},[h,d]);/*#__PURE__*/return e.createElement(he.Provider,K({value:f},r),r.children)};fe.propTypes={children:a.element.isRequired,data:a.object.isRequired,formQuestions:a.array.isRequired,isFormValid:a.func};var Ee=/*#__PURE__*/function(t){function n(e){var n;return(n=t.call(this,e)||this).state={cursorPosition:0},n}Z(n,t);var o=n.prototype;return o.focus=function(){p.findDOMNode(this.input).focus()},o.getInputDOMNode=function(){return p.findDOMNode(this.input)},o.componentDidUpdate=function(e,t,n){(this.fieldDidShrink(e)||this.fieldDidExpand(e))&&this.updateFieldCursorPosition()},o.fieldDidExpand=function(e){return"textarea"===this.props.type&&"textarea"!==e.type},o.fieldDidShrink=function(e){return"text"===this.props.type&&"text"!==e.type},o.updateFieldCursorPosition=function(){this.focus(),this.getInputDOMNode().setSelectionRange(this.state.cursorPosition,this.state.cursorPosition)},o.saveCursorPosition=function(e){this.props.onChange(e),this.setState({cursorPosition:e.target.selectionStart})},o.render=function(){switch(this.props.type){case"radio":return this._renderRadio();case"checkbox":return this._renderCheckbox();case"select":return this._renderSelect();case"textarea":return this._renderTextArea();default:return this._renderInput()}},o._renderCheckbox=function(){var t=this;/*#__PURE__*/return e.createElement(m.Group,{size:"small",controlId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)},/*#__PURE__*/e.createElement(m.Check,K({type:"checkbox",ref:function(e){return t.input=e}},this.props,{label:this.props.label})))},o._renderRadio=function(){var t=this;/*#__PURE__*/return e.createElement(d,{size:"small"},/*#__PURE__*/e.createElement(m.Check,K({type:"radio",ref:function(e){return t.input=e}},this.props,{label:this.props.label})))},o._renderSelect=function(){var t=this;/*#__PURE__*/return e.createElement(d,{size:"small"},this._renderLabel(),/*#__PURE__*/e.createElement(h,K({as:"select",ref:function(e){return t.input=e}},this.props),this.props.children),this.props.validation&&/*#__PURE__*/e.createElement(h.Feedback,null),this._renderHelp())},o._renderLabel=function(){return this.props.label?/*#__PURE__*/e.createElement(m.Label,null,this.props.label):null},o._renderTextArea=function(){var t=this;/*#__PURE__*/return e.createElement(d,{size:"small"},this._renderLabel(),/*#__PURE__*/e.createElement(h,K({ref:function(e){return t.input=e},as:"textarea"},this.props,{onChange:function(e){return t.saveCursorPosition(e)}})),this.props.validation&&/*#__PURE__*/e.createElement(h.Feedback,null),this._renderHelp())},o._renderHelp=function(){return this.props.help?/*#__PURE__*/e.createElement(f,null,this.props.help):null},o._renderInput=function(){var t=this;/*#__PURE__*/return e.createElement(d,{size:"small"},this._renderLabel(),/*#__PURE__*/e.createElement(h,K({ref:function(e){return t.input=e},as:"input"},this.props,{onChange:function(e){return t.saveCursorPosition(e)}})),this.props.validation&&/*#__PURE__*/e.createElement(h.Feedback,null),this._renderHelp())},n}(e.Component);Ee.propTypes={type:a.string,label:a.object,value:a.any,onChange:a.func,help:a.string,validation:a.oneOf(["success","warning","error"])},Ee.defaultProps={type:"text"};var ve=["children"],ge=/*#__PURE__*/e.createContext({}),Se={components:{inputComponent:Ee},componentsOptions:{dateTimeAnswer:{dateFormat:"yyyy-MM-dd",timeFormat:"HH:mm:ss",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},readOnly:!1},options:{intl:{locale:"en"},i18n:{"wizard.next":"Next","wizard.previous":"Previous","section.collapse":"Collapse","section.expand":"Expand"},modalView:!1,modalProps:{},horizontalWizardNav:!0,wizardStepButtons:!0,enableForwardSkip:!1,startingStep:0}},Ae=function(t){var o=t.children,r=ee(t,ve),s=n(function(){return{inputComponent:r.components&&r.components.inputComponent||Se.components.inputComponent,componentsOptions:Object.assign({},Se.componentsOptions,r.componentsOptions),options:Object.assign({},Se.options,r.options),mapComponent:r.mapComponent}},[r]);/*#__PURE__*/return e.createElement(ge.Provider,{value:s},o)};Ae.propTypes={children:a.element.isRequired,components:a.object,mapComponent:a.func,options:a.object};var _e,Ce={"@graph":[{"@type":"http://onto.fel.cvut.cz/ontologies/documentation/question","http://onto.fel.cvut.cz/ontologies/form-layout/has-layout-class":"form","http://onto.fel.cvut.cz/ontologies/documentation/has_related_question":[{"http://onto.fel.cvut.cz/ontologies/form-layout/has-layout-class":["wizard-step","section"],"http://www.w3.org/2000/01/rdf-schema#label":[{"@language":"en","@value":"Description"},{"@language":"cs","@value":"Popis"}],"http://onto.fel.cvut.cz/ontologies/documentation/has_related_question":[{"@type":"http://onto.fel.cvut.cz/ontologies/documentation/question","http://onto.fel.cvut.cz/ontologies/form-layout/has-layout-class":["textarea"],"http://www.w3.org/2000/01/rdf-schema#label":[{"@language":"en","@value":"Description"},{"@language":"cs","@value":"Popis"}],"http://onto.fel.cvut.cz/ontologies/documentation/has_answer":{"@type":"http://onto.fel.cvut.cz/ontologies/documentation/answer","http://onto.fel.cvut.cz/ontologies/documentation/has_data_value":""}}]}]}]},Te=/*#__PURE__*/function(){function e(){}return e.generateForm=function(){return JSON.parse(JSON.stringify(Ce))},e}(),Ne={root:(_e={},_e[ae.HAS_LAYOUT_CLASS]=ae.FORM,_e),expandProperties:[ae.HAS_SUBQUESTION,ae.IS_RELEVANT_IF,ae.HAS_ANSWER,ae.HAS_DECLARED_PREFIX,ae.HAS_OPTION,ae.HAS_COMMENT]},Ie=/*#__PURE__*/function(){function e(){}return e.customFrame=function(e,t,n){if(arguments.length<2)return l.nextTick(function(){n(new TypeError("Could not frame, too few arguments."))});null===t&&(t=Ne);var o=function(e,t){};l.flatten(e,null,null,o)},e.expandStructure=function(e){var t,n={};e["@graph"].forEach(function(e){n[e["@id"]]=e,pe.isForm(e)&&(t=e)});try{this._expandGraph(t,Ne,n)}catch(e){console.error("Error '"+e+"' occured, while trying to apply frame-ing with custom shape.")}return n},e._expandGraph=function(e,t,n){var o,r,s,i=this;t.expandProperties.forEach(function(a){if(e.hasOwnProperty(a)){e[a]=le.asArray(e[a]),o=e[a];for(var l=0;l<o.length;l++)s=i._getId(o[l]),void 0!==(r=n[s])?(o[l]=r,i._expandGraph(r,t,n)):console.warn("object with @id "+s+" was not defined in input data.")}})},e._getId=function(e){return"string"==typeof e?e:e["@id"]},e}();Ie.compressStructure=function(e){var t=[],n=new Set;return(t=Ie._compressGraph(e,t,n)).sort(function(e,t){return e["@id"]&&t["@id"]?e["@id"].localeCompare(t["@id"]):0})},Ie._compressGraph=function(e,t,n){return n.has(e["@id"])||(t.push(e),n.add(e["@id"])),Ne.expandProperties.forEach(function(o){if(e.hasOwnProperty(o))for(var r=e[o],s=0;s<r.length;s++){var i=r[s];void 0!==i&&(r[s]=i,t=Ie._compressGraph(i,t,n),e[o][s]={"@id":i["@id"]})}}),t};var Oe=/*#__PURE__*/function(){function e(){}return e.constructDefaultForm=function(t){var n=Te.generateForm();return e._constructFormQuestions(n,t)},e.constructForm=function(t,n){return new Promise(function(o){return l.flatten(t,{},null,function(t,r){var s,i;t&&oe.error(t);try{var a=e._constructFormQuestions(r,n);i=a[1],s={formQuestions:a[0]}}catch(t){var l=e.constructDefaultForm(n);i=l[1],s={formQuestions:l[0]}}return o([s,i])})})},e._constructFormQuestions=function(e,t){var n,o,r,s=[];if(void 0!==e["@graph"][0]["@id"]?(r=Ie.expandStructure(e),Object.keys(r).map(function(e){ue.putObject(e,r[e])})):console.warn("default form is constructed."),!(o=(n=e["@graph"].find(function(e){return pe.isForm(e)}))[ae.HAS_SUBQUESTION]))throw oe.error("Could not find any questions in the received data."),"No questions in the form";return(s=o.filter(function(e){return!(!pe.isWizardStep(e)||pe.isHidden(e))||(oe.warn("Item is not a wizard step: "+e),!1)})).length||(oe.log("Could not find any wizard steps in the received data. Building form without steps"),n[ae.HAS_SUBQUESTION].forEach(function(e){return s.push(e)})),s.sort(ce.getCompareLocalizedLabelFunction(t)),ce.orderPreservingToplogicalSort(s,ae.HAS_PRECEDING_QUESTION),[s,{root:n}]},e}(),we=/*#__PURE__*/function(){function e(){}return e.buildQuestionAnswerModel=function(t,n){var o,r={subQuestions:[]};if(t&&(r.uri=t.root["@id"],r.origin=u.getJsonAttValue(t.root,ae.HAS_QUESTION_ORIGIN,"@id")),n)for(var s=0;s<n.length;s++)(o=e.processQuestionAnswerHierarchy(n[s]))&&r.subQuestions.push(o);return r},e.processQuestionAnswerHierarchy=function(t){return t?e._processQuestion(t):null},e._processQuestion=function(t){var n={};if(n.uri=t["@id"],n.origin=u.getJsonAttValue(t,ae.HAS_QUESTION_ORIGIN,"@id"),t[ae.HAS_SUBQUESTION]){n.subQuestions=[];for(var o=0;o<t[ae.HAS_SUBQUESTION].length;o++)n.subQuestions.push(e._processQuestion(t[ae.HAS_SUBQUESTION][o]))}if(t[ae.HAS_ANSWER]){n.answers=[],Array.isArray(t[ae.HAS_ANSWER])||(t[ae.HAS_ANSWER]=[t[ae.HAS_ANSWER]]);for(var r=0;r<t[ae.HAS_ANSWER].length;r++)n.answers.push(e.processAnswer(t[ae.HAS_ANSWER][r]))}if(t[ae.HAS_COMMENT]){n.comments=[],Array.isArray(t[ae.HAS_COMMENT])||(t[ae.HAS_COMMENT]=[t[ae.HAS_COMMENT]]);for(var s=0;s<t[ae.HAS_COMMENT].length;s++)n.comments.push(e.processComment(t[ae.HAS_COMMENT][s]))}return n},e.processComment=function(e){var t={};return t.author=u.getJsonAttValue(e,ae.HAS_AUTHOR,"@id"),t.value=u.getJsonAttValue(e,ae.HAS_COMMENT_VALUE),t.timestamp=u.getJsonAttValue(e,ae.HAS_TIMESTAMP,"@id"),t},e.processAnswer=function(e){var t={};return t.uri=e["@id"],t.origin=u.getJsonAttValue(e,ae.HAS_ANSWER_ORIGIN,"@id"),e[ae.HAS_OBJECT_VALUE]?t.codeValue=u.getJsonAttValue(e,ae.HAS_OBJECT_VALUE,"@id"):t.textValue=u.getJsonAttValue(e,ae.HAS_DATA_VALUE),t},e.generateAnswer=function(e){var t={};return t[ae.HAS_DATA_VALUE]="",t},e}(),ye=/*#__PURE__*/function(){function e(){}return e.resolveValidationProperties=function(e){var t={};return!1===e[ae.HAS_VALID_ANSWER]&&(t.validation="error",t.help=e[ae.HAS_VALIDATION_MESSAGE]),t},e}(),be=function(t){var n=r(ge),o=n.componentsOptions,s=t.question;/*#__PURE__*/return e.createElement(n.inputComponent,Object.assign({},ye.resolveValidationProperties(s),{type:"checkbox",label:t.label,title:t.title,checked:!0===t.value||"true"===t.value,onChange:function(e){t.onChange(e.target.checked)},disabled:o.readOnly||pe.isDisabled(s)}))};be.propTypes={question:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.oneOfType([a.string,a.bool]),onChange:a.func.isRequired,mouseHover:a.bool};var Le=function(t){var n,o=r(ge).componentsOptions,s=pe.resolveDateTimeFormat(t.question,t.value,o.dateTimeAnswer),i=pe.isDate(t.question),a=pe.isTime(t.question);n=a&&t.value?new Date("0 "+t.value):t.value?new Date(t.value):null;var l="x"===s?o.dateTimeAnswer.dateTimeFormat:s;/*#__PURE__*/return e.createElement(d,{size:"small"},/*#__PURE__*/e.createElement(m.Label,{className:"w-100"},t.label),/*#__PURE__*/e.createElement(x,{selected:n,placeholderText:l.toUpperCase(),onChange:function(e){t.onChange(s===ae.DATETIME_NUMBER_FORMAT?Number(e):D(e,s))},showTimeSelect:!i,showTimeSelectOnly:a,timeFormat:"HH:mm",timeIntervals:1,timeCaption:"Time",dateFormat:l,className:"form-control",disabled:o.readOnly||pe.isDisabled(t.question)}))};Le.propTypes={question:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.oneOfType([a.string,a.number]),onChange:a.func.isRequired};var Re=[ae.XSD.INT,ae.XSD.INTEGER,ae.XSD.NON_NEGATIVE_INTEGER,ae.XSD.NON_POSITIVE_INTEGER,ae.XSD.NEGATIVE_INTEGER,ae.XSD.POSITIVE_INTEGER],He={};He[ae.XSD.NON_NEGATIVE_INTEGER]={min:0},He[ae.XSD.NON_POSITIVE_INTEGER]={max:0},He[ae.XSD.NEGATIVE_INTEGER]={max:-1},He[ae.XSD.POSITIVE_INTEGER]={min:1};var xe={"string-2":"prefixed",atom:"var"},De=/*#__PURE__*/function(){function e(){}return e._resolveInputType=function(t,n){return pe.isSparqlInput(t)||pe.isTurtleInput(t)||pe.isTextarea(t,n)?"textarea":e._isNumeric(t)?"number":"text"},e._isNumeric=function(e){for(var t=0,n=Re.length;t<n;t++)if(u.hasValue(e,ae.HAS_DATATYPE,Re[t]))return!0;return!1},e.resolveInputProperties=function(t,n,o){var r={};switch(r.type=e._resolveInputType(t,n),r.type){case"textarea":r.rows=5;break;case"number":r=Object.assign({},r,e._resolveNumberRestrictions(t),this._resolveStepRestriction(t))}return r.disabled=o.readOnly||pe.isDisabled(t),!1===t[ae.HAS_VALID_ANSWER]&&(r.validation="error",r.help=t[ae.HAS_VALIDATION_MESSAGE]),r},e._resolveStepRestriction=function(e){var t={};return void 0!==e[ae.STEP]&&(t.step=u.getJsonAttValue(e,ae.STEP)),t},e._resolveNumberRestrictions=function(e){var t={};return Object.getOwnPropertyNames(He).forEach(function(n){u.hasValue(e,ae.HAS_DATATYPE,n)&&(t=Object.assign({},t,He[n]))}),void 0!==e[ae.XSD.MIN_INCLUSIVE]&&(t.min=e[ae.XSD.MIN_INCLUSIVE]),void 0!==e[ae.XSD.MIN_EXCLUSIVE]&&(t.min=e[ae.XSD.MIN_EXCLUSIVE]+1),void 0!==e[ae.XSD.MAX_EXCLUSIVE]&&(t.max=e[ae.XSD.MAX_EXCLUSIVE]-1),void 0!==e[ae.XSD.MAX_INCLUSIVE]&&(t.max=e[ae.XSD.MAX_INCLUSIVE]),t},e}(),Ve=function(t){var n=r(ge),o=n.inputComponent,s=n.componentsOptions,i=t.question,a=t.answer,l=t.value;return a[ae.HAS_OBJECT_VALUE]&&a[ae.HAS_OBJECT_VALUE][u.RDFS_LABEL]&&(l=u.getJsonAttValue(a[ae.HAS_OBJECT_VALUE],u.RDFS_LABEL)),/*#__PURE__*/e.createElement(o,Object.assign({},De.resolveInputProperties(i,l,s),{label:t.label,title:t.title,value:null==l?"":l,onChange:function(e){t.onChange(e.target.value),(t.sparql||t.turtle)&&(void 0).hide()},onFocus:function(e){if(t.sparql){var n=V.fromTextArea(e.target);n.setValue(l),n.on("change",function(){t.onChange(n.getValue())}),V.Autocompleters.prefixes.appendPrefixIfNeeded=function(e,n){if(e.autocompleters.getTrie(n)&&e.options.autocompleters&&-1!==e.options.autocompleters.indexOf(n)){var o=e.getCursor(),r=e.getTokenAt(o);if("prefixed"===xe[r.type]){var s=r.string.indexOf(":");if(-1!==s){var i=e.getPreviousNonWsToken(o.line,r).string.toUpperCase(),a=e.getTokenAt({line:o.line,ch:r.start});if("PREFIX"!==i&&("ws"===a.type||null==a.type)){var l=r.string.substring(0,s+1);if(null==e.getPrefixesFromQuery()[l.slice(0,-1)])if(t.question[ae.HAS_DECLARED_PREFIX]&&t.question[ae.HAS_DECLARED_PREFIX].filter(function(e){return e[ae.PREFIX]===l.slice(0,-1)}).length){var u=t.question[ae.HAS_DECLARED_PREFIX].filter(function(e){return e[ae.PREFIX]===l.slice(0,-1)}),c={};c[u[0][ae.PREFIX]]=u[0][ae.NAMESPACE],e.addPrefixes(c)}else{var p=e.autocompleters.getTrie(n).autoComplete(l);p.length>0&&e.addPrefixes(p[0])}}}}}}}else if(t.turtle){console.log("TTL");var o=V.fromTextArea(e.target);o.setValue(l),o.on("change",function(){t.onChange(o.getValue())})}}}))};Ve.propTypes={question:a.object.isRequired,answer:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.oneOfType([a.string,a.number]),onChange:a.func.isRequired};var Ue={D:"1",M:"1",Y:"1",h:"1",m:"1",s:"1"},Me=/*#__PURE__*/function(){function e(){}return e.mapMask=function(e){if(!e)return e;for(var t,n="",o=0,r=e.length;o<r;o++)t=e.charAt(o),n+=Ue[t]?Ue[t]:t;return n},e}(),je=["size","placeholder"];function Pe(e){var t,n,o,r;if(void 0!==e.selectionStart)t=e.selectionStart,n=e.selectionEnd;else try{e.focus(),r=(o=e.createTextRange()).duplicate(),o.moveToBookmark(document.selection.createRange().getBookmark()),r.setEndPoint("EndToStart",o),n=(t=r.text.length)+o.text.length}catch(e){}return{start:t,end:n}}var qe=/*#__PURE__*/function(t){function n(e){var n;return(n=t.call(this,e)||this)._updatePattern=function(e){n.mask.setPattern(Me.mapMask(e.mask),{value:n.mask.getRawValue(),selection:Pe(n.input)})},n._updateMaskSelection=function(){n.mask.selection=Pe(n.input)},n._updateInputSelection=function(){!function(e,t){var n;try{void 0!==e.selectionStart?(e.focus(),e.setSelectionRange(t.start,t.end)):(e.focus(),(n=e.createTextRange()).collapse(!0),n.moveStart("character",t.start),n.moveEnd("character",t.end-t.start),n.select())}catch(e){}}(n.input,n.mask.selection)},n._onChange=function(e){var t=n.mask.getValue();if(e.target.value!==t){if(e.target.value.length<t.length){var o=t.length-e.target.value.length;n._updateMaskSelection(),n.mask.selection.end=n.mask.selection.start+o,n.mask.backspace()}var r=n._getDisplayValue();e.target.value=r,r&&n._updateInputSelection()}n.props.onChange&&n.props.onChange(e)},n._onKeyDown=function(e){if(function(e){return e.ctrlKey&&90===e.keyCode}(e))e.preventDefault(),n.mask.undo()&&(e.target.value=n._getDisplayValue(),n._updateInputSelection(),n.props.onChange&&n.props.onChange(e));else if(function(e){return e.ctrlKey&&89===e.keyCode}(e))e.preventDefault(),n.mask.redo()&&(e.target.value=n._getDisplayValue(),n._updateInputSelection(),n.props.onChange&&n.props.onChange(e));else if("Backspace"===e.key&&(e.preventDefault(),n._updateMaskSelection(),n.mask.backspace())){var t=n._getDisplayValue();e.target.value=t,t&&n._updateInputSelection(),n.props.onChange&&n.props.onChange(e)}},n._onKeyPress=function(e){e.metaKey||e.altKey||e.ctrlKey||"Enter"===e.key||(e.preventDefault(),n._updateMaskSelection(),n.mask.input(e.key)&&(e.target.value=n.mask.getValue(),n._updateInputSelection(),n.props.onChange&&n.props.onChange(e)))},n._onPaste=function(e){e.preventDefault(),n._updateMaskSelection(),n.mask.paste(e.clipboardData.getData("Text"))&&(e.target.value=n.mask.getValue(),setTimeout(n._updateInputSelection,0),n.props.onChange&&n.props.onChange(e))},n.mask=new U({pattern:Me.mapMask(e.mask),value:e.value,formatCharacters:e.formatCharacters,placeholderChar:e.placeholderChar||"_"}),n}Z(n,t);var o=n.prototype;return o.componentDidUpdate=function(e){e.mask!==this.props.mask&&this._updatePattern(this.props),e.mask!==this.props.mask&&e.value!==this.props.mask?this.mask.getValue()===this.mask.emptyValue?this.mask.setPattern(Me.mapMask(this.props.mask),{value:this.props.value}):this.mask.setPattern(Me.mapMask(this.props.mask),{value:this.mask.getRawValue()}):e.mask!==this.props.mask?this.mask.setPattern(Me.mapMask(this.props.mask),{value:this.mask.getRawValue()}):e.value!==this.props.value&&this.mask.setValue(this.props.value),e.mask!==this.props.mask&&this.mask.selection.start&&this._updateInputSelection()},o._getDisplayValue=function(){var e=this.mask.getValue();return e===this.mask.emptyValue?"":e},o.focus=function(){this.input.focus()},o.blur=function(){this.input.blur()},o.render=function(){var t=this,n=this.props,o=n.size,r=n.placeholder,s=ee(n,je),i=this.mask.pattern.length;/*#__PURE__*/return e.createElement(this.context.inputComponent,Object.assign({},s,{ref:function(e){e&&(t.input=e.input?p.findDOMNode(e.input):e)},maxLength:i,onChange:this._onChange,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onPaste:this._onPaste,placeholder:r||this.mask.emptyValue,size:o||i,value:this._getDisplayValue(),type:"text"}))},n}(e.Component);qe.contextType=ge,qe.propTypes={mask:a.string.isRequired},qe.defaultProps={value:""};var Qe=function(t){var n=r(ge).componentsOptions,o=t.question,s=t.value,i=u.getJsonAttValue(o,ae.INPUT_MASK);return i?/*#__PURE__*/e.createElement(qe,{mask:i,value:s,label:t.label,title:t.title,placeholder:i,onChange:function(e){return t.onChange(e.target.value)},disabled:n.readOnly||pe.isDisabled(o)}):(oe.warn("Input mask not provided. Falling back to regular input."),/*#__PURE__*/e.createElement(Ve,t))};Qe.propTypes={question:a.object.isRequired,answer:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.oneOfType([a.string,a.number]),onChange:a.func.isRequired};var Fe=/*#__PURE__*/function(t){function n(){return t.apply(this,arguments)||this}Z(n,t);var o=n.prototype;return o._generateSelectOptions=function(t){var n=[];t.sort(function(e,t){var n=u.getJsonAttValue(e,ae.RDFS_LABEL),o=u.getJsonAttValue(t,ae.RDFS_LABEL);return n<o?-1:n>o?1:0});for(var o=0;o<t.length;o++)n.push(/*#__PURE__*/e.createElement("option",{value:u.getJsonAttValue(t[o],ae.RDFS_LABEL),key:"opt-"+o},u.getJsonAttValue(t[o],ae.RDFS_LABEL)));return n},o.render=function(){var t=this,n=this.props.question;/*#__PURE__*/return e.createElement(this.context.inputComponent,{type:"select",label:this.props.label,value:this.props.value,title:this.props.title,onChange:function(e){t.props.onChange(e.target.value)},disabled:this.context.componentsOptions.readOnly||pe.isDisabled(n)},this._generateSelectOptions(n[ae.HAS_OPTION]))},n}(e.Component);Fe.contextType=ge,Fe.propTypes={question:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.string,onChange:a.func.isRequired};var ze=function(t){var n=t.options,o=t.children,r=t.maxHeight,s=(0,t.getValue)(),i=s&&s[0]?40*n.indexOf(s[0]):0;/*#__PURE__*/return e.createElement(P,{height:r,itemCount:o.length,itemSize:40,initialScrollOffset:i,width:""},function(t){/*#__PURE__*/return e.createElement("div",{className:"option-wrapper",style:t.style},o[t.index])})},ke=function(e,t){return e?(e.sort(ce.getCompareLocalizedLabelFunction(t)),ce.orderPreservingToplogicalSort(e,ae.HAS_PRECEDING_VALUE),u.processTypeaheadOptions(e,t)):[]},Be=function(n){var s=le.getStringHash(pe.getPossibleValuesQuery(n.question)),i=r(se),a=r(ge),l=a.options.intl,u=t(!0),c=u[0],p=u[1],h=t(ke(n.options,l)),f=h[0],E=h[1];o(function(){var e=!1,t=n.question;return!t[ae.HAS_OPTION]&&pe.getPossibleValuesQuery(t)?function(){try{var n=function(n,o){try{var r=Promise.resolve(i.loadFormOptions(s,pe.getPossibleValuesQuery(t))).then(function(t){e||(p(!1),E(ke(t,l)))})}catch(e){return o()}return r&&r.then?r.then(void 0,o):r}(0,function(){oe.error("An error has occurred during loadFormOptions for query hash: "+s)});Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}():(p(!1),E(ke(t[ae.HAS_OPTION],l))),function(){e=!0}},[]),o(function(){E(ke(n.question[ae.HAS_OPTION],l))},[l]);var v=j.Option;/*#__PURE__*/return e.createElement(d,{size:"small"},/*#__PURE__*/e.createElement(m.Label,null,n.label),/*#__PURE__*/e.createElement(M,{options:f,isSearchable:!0,isLoading:c,isClearable:!0,isDisabled:c||a.componentsOptions.readOnly||pe.isDisabled(n.question),value:f.filter(function(e){return e.id===n.value}),placeholder:"",getOptionLabel:function(e){return e.name},getOptionValue:function(e){return e.id},onChange:function(e){n.onChange(e?e.id:null)},components:{MenuList:ze,Option:function(t){var n=Object.assign({},t.innerProps,{title:t.data.description});/*#__PURE__*/return e.createElement(v,K({},t,{title:t.data.description,innerProps:n}))}}}))};Be.propTypes={question:a.object.isRequired,answer:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.string,onChange:a.func.isRequired};var We=function(t){/*#__PURE__*/return e.createElement("svg",{className:"caret-square-up",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"28",viewBox:"0 0 24 28"},/*#__PURE__*/e.createElement("title",null,t.title||""),/*#__PURE__*/e.createElement("path",{d:"M17.891 17.453c-0.172 0.344-0.516 0.547-0.891 0.547h-10c-0.375 0-0.719-0.203-0.891-0.547-0.172-0.328-0.141-0.734 0.078-1.031l5-7c0.187-0.266 0.484-0.422 0.812-0.422s0.625 0.156 0.812 0.422l5 7c0.219 0.297 0.25 0.703 0.078 1.031zM20 21.5v-15c0-0.266-0.234-0.5-0.5-0.5h-15c-0.266 0-0.5 0.234-0.5 0.5v15c0 0.266 0.234 0.5 0.5 0.5h15c0.266 0 0.5-0.234 0.5-0.5zM24 6.5v15c0 2.484-2.016 4.5-4.5 4.5h-15c-2.484 0-4.5-2.016-4.5-4.5v-15c0-2.484 2.016-4.5 4.5-4.5h15c2.484 0 4.5 2.016 4.5 4.5z"}))},Xe=function(t){/*#__PURE__*/return e.createElement("svg",{className:"caret-square-down",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"28",viewBox:"0 0 24 28"},/*#__PURE__*/e.createElement("title",null,t.title||""),/*#__PURE__*/e.createElement("path",{d:"M17.891 10.547c0.172 0.328 0.141 0.734-0.078 1.031l-5 7c-0.187 0.266-0.484 0.422-0.812 0.422s-0.625-0.156-0.812-0.422l-5-7c-0.219-0.297-0.25-0.703-0.078-1.031 0.172-0.344 0.516-0.547 0.891-0.547h10c0.375 0 0.719 0.203 0.891 0.547zM20 21.5v-15c0-0.266-0.234-0.5-0.5-0.5h-15c-0.266 0-0.5 0.234-0.5 0.5v15c0 0.266 0.234 0.5 0.5 0.5h15c0.266 0 0.5-0.234 0.5-0.5zM24 6.5v15c0 2.484-2.016 4.5-4.5 4.5h-15c-2.484 0-4.5-2.016-4.5-4.5v-15c0-2.484 2.016-4.5 4.5-4.5h15c2.484 0 4.5 2.016 4.5 4.5z"}))},Ge=function(){/*#__PURE__*/return e.createElement("svg",{className:"info-circle",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"28",viewBox:"0 0 24 28"},/*#__PURE__*/e.createElement("title",null,"info-circle"),/*#__PURE__*/e.createElement("path",{d:"M16 21.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-1.5v-8c0-0.281-0.219-0.5-0.5-0.5h-5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h1.5v5h-1.5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h7c0.281 0 0.5-0.219 0.5-0.5zM14 7.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"}))},Ye=function(){/*#__PURE__*/return e.createElement("svg",{className:"question-circle",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"28",viewBox:"0 0 24 28"},/*#__PURE__*/e.createElement("path",{d:"M14 21.5v-3c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v3c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM18 11c0-2.859-3-5-5.688-5-2.547 0-4.453 1.094-5.797 3.328-0.141 0.219-0.078 0.5 0.125 0.656l2.063 1.563c0.078 0.063 0.187 0.094 0.297 0.094 0.141 0 0.297-0.063 0.391-0.187 0.734-0.938 1.047-1.219 1.344-1.437 0.266-0.187 0.781-0.375 1.344-0.375 1 0 1.922 0.641 1.922 1.328 0 0.812-0.422 1.219-1.375 1.656-1.109 0.5-2.625 1.797-2.625 3.313v0.562c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5v0c0-0.359 0.453-1.125 1.188-1.547 1.188-0.672 2.812-1.578 2.812-3.953zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"}))},Je=function(n){var o=t("right"),r=o[0],s=o[1];/*#__PURE__*/return e.createElement("span",{ref:function(e){return function(e){e&&(e.getBoundingClientRect().x>window.innerWidth/2?s("left"):s("right"))}(e)}},/*#__PURE__*/e.createElement(E,{overlay:/*#__PURE__*/e.createElement(v,{className:"tooltip-content",id:n.id},n.tooltipContent),placement:n.overlayPlacement||r},/*#__PURE__*/e.createElement("span",null,n.children)))};Je.propTypes={tooltipContent:a.oneOfType([a.object.isRequired,a.string.isRequired]),id:a.string.isRequired,overlayPlacement:a.string,absolutePosition:a.bool},Je.defaultProps={iconClassContainer:"",iconClass:"",absolutePosition:!0};var Ke=function(n){var o=t("right"),r=o[1];/*#__PURE__*/return e.createElement("div",{ref:function(e){return function(e){e&&(e.getBoundingClientRect().x>window.innerWidth/2?r("left"):r("right"))}(e)}},/*#__PURE__*/e.createElement(Je,{id:"help-icon-tooltip-",overlayPlacement:n.overlayPlacement||o[0],absolutePosition:n.absolutePosition,tooltipContent:n.text},/*#__PURE__*/e.createElement(Ye,{className:n.iconClass})))};Ke.propTypes={text:a.string.isRequired,iconClassContainer:a.string,iconClass:a.string,overlayPlacement:a.string,absolutePosition:a.bool},Ke.defaultProps={iconClassContainer:"",iconClass:"",absolutePosition:!0};var Ze=function(){/*#__PURE__*/return e.createElement("svg",{className:"external-link-icon",width:"24",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/e.createElement("path",{d:"M5,2 C5.55228,2 6,2.44772 6,3 C6,3.55228 5.55228,4 5,4 L4,4 L4,12 L12,12 L12,11 C12,10.4477 12.4477,10 13,10 C13.5523,10 14,10.4477 14,11 L14,12 C14,13.1046 13.1046,14 12,14 L4,14 C2.89543,14 2,13.1046 2,12 L2,4 C2,2.89543 2.89543,2 4,2 L5,2 Z M15,1 L15,5.99814453 C15,6.55043453 14.5523,6.99814453 14,6.99814453 C13.4477,6.99814453 13,6.55043453 13,5.99814453 L13,4.41419 L8.71571,8.69846 C8.32519,9.08899 7.69202,9.08899 7.3015,8.69846 C6.91097,8.30794 6.91097,7.67477 7.3015,7.28425 L11.5858,3 L9.99619141,3 C9.44391141,3 8.99619141,2.55228 8.99619141,2 C8.99619141,1.44772 9.44391141,1 9.99619141,1 L15,1 Z"}))},$e=function(t){/*#__PURE__*/return e.createElement(Je,{tooltipContent:t.url["@id"]||t.url,id:"url-tooltip",overlayPlacement:t.overlayPlacement},/*#__PURE__*/e.createElement("a",{href:t.url["@id"]||t.url,target:"_blank",className:t.iconClassContainer},/*#__PURE__*/e.createElement(Ze,{className:t.iconClass})))};$e.propTypes={url:a.oneOfType([a.string.isRequired,a.object.isRequired]),iconClassContainer:a.string,iconClass:a.string,overlayPlacement:a.string,absolutePosition:a.bool},$e.defaultProps={iconClassContainer:"",iconClass:"",absolutePosition:!0};var et=function(){/*#__PURE__*/return e.createElement("svg",{className:"question-comment",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",width:"24",height:"28"},/*#__PURE__*/e.createElement("path",{d:"M30,1.5c-16.542,0-30,12.112-30,27c0,5.204,1.646,10.245,4.768,14.604c-0.591,6.537-2.175,11.39-4.475,13.689 c-0.304,0.304-0.38,0.769-0.188,1.153C0.275,58.289,0.625,58.5,1,58.5c0.046,0,0.092-0.003,0.139-0.01 c0.405-0.057,9.813-1.411,16.618-5.339C21.621,54.71,25.737,55.5,30,55.5c16.542,0,30-12.112,30-27S46.542,1.5,30,1.5z M16,32.5 c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S18.206,32.5,16,32.5z M30,32.5c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4 S32.206,32.5,30,32.5z M44,32.5c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S46.206,32.5,44,32.5z"}))},tt=function(){/*#__PURE__*/return e.createElement("svg",{className:"recycle-bin-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",height:"15px",width:"15px",viewBox:"0 0 512 512"},/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("path",{d:"M331.636,69.818V0H180.364v69.818h-128v128h34.909V512h337.455V197.818h34.909v-128H331.636z M215.273,34.909h81.455\nv34.909h-81.455V34.909z M389.818,477.091H122.182V197.818h267.636V477.091z M424.727,162.909H87.273v-58.182h337.455V162.909z"}))),/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("rect",{x:"168.727",y:"256",width:"34.909",height:"162.909"}))),/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("rect",{x:"308.364",y:"256",width:"34.909",height:"162.909"}))),/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("rect",{x:"238.545",y:"256",width:"34.909",height:"162.909"}))))},nt=function(n){var o=r(ge).options,s=t(!1),i=s[0],a=s[1],l=t(!1),u=l[0],c=l[1];F.addLocale(k),F.addLocale(z),F.setDefaultLocale(ae.LANG.en.locale);var p,m=new F(o.intl.locale),d=function(){if(o&&o.users){var e=o.users.find(function(e){return e.id===o.currentUser});if(n.author)return e.label?e.label:h()}return"Unknown author"},h=function(){return n.author["@id"].replace(/.*[#\/]/,"... ")},f=function(){a(!i)};/*#__PURE__*/return e.createElement("div",{className:"comment-content",onMouseEnter:function(){c(!0)},onMouseLeave:function(){c(!1)}},/*#__PURE__*/e.createElement("div",{className:"row"},/*#__PURE__*/e.createElement("div",{className:"col-auto comment-author",onMouseEnter:f,onMouseLeave:f},/*#__PURE__*/e.createElement(e.Fragment,null,i?/*#__PURE__*/e.createElement(e.Fragment,null,d(),/*#__PURE__*/e.createElement($e,{iconClassContainer:"emphasise-on-relevant-icon",url:n.author?Object.values(n.author).toString():"Unknown author"})):d())),/*#__PURE__*/e.createElement("div",{className:"col-auto text-muted comment-timestamp"},/*#__PURE__*/e.createElement(Je,{id:"exact-time-overlay",tooltipContent:(p=new Date(parseInt(n.timestamp)),new Intl.DateTimeFormat(o.intl.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}).format(p))},m.format(parseInt(n.timestamp)))),u?/*#__PURE__*/e.createElement(B.div,{className:"comment-delete emphasise-on-relevant-icon",whileHover:{scale:1.2},whileTap:{scale:.9},onClick:function(){n.onDeleteQuestionComment(n.index),n.onDeleteViewComment()}},/*#__PURE__*/e.createElement(tt,null)):null),/*#__PURE__*/e.createElement("div",{className:"row"},/*#__PURE__*/e.createElement("div",{className:"col comment-value"},n.commentValue)))};nt.propTypes={author:a.object.isRequired,timestamp:a.string.isRequired,commentValue:a.string.isRequired,onDeleteQuestionComment:a.func.isRequired,onDeleteViewComment:a.func,index:a.number.isRequired};var ot=function(e){var n=e.comments,r=e.onDeleteCommentClick,i=s(null),a=t(!1),l=a[0],u=a[1],c=function(){u(!0),setTimeout(function(){u(!1)},2e3)};return o(function(){null!==i.current&&(i.current.scrollTop=i.current.scrollHeight)},[JSON.stringify(n)]),q("span",{children:l?Q("div",{className:"comment-delete",children:[q(W,{color:"#00BFFF",height:80,width:80}),q("p",{children:"Deleting comment..."})]}):q("div",{className:"comment-list-items",ref:i,children:n.map(function(e,t){return q("div",{className:"comment-list-item",children:q(nt,{commentValue:e[ae.HAS_COMMENT_VALUE],author:e[ae.HAS_AUTHOR]?e[ae.HAS_AUTHOR]:null,timestamp:e[ae.HAS_TIMESTAMP],onDeleteQuestionComment:r,onDeleteViewComment:c,index:t})},t)})})})},rt=function(){/*#__PURE__*/return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24"},/*#__PURE__*/e.createElement("path",{d:"M6.185 4.843l11.927 7.157-11.927 7.157 2.982-7.157-2.982-7.157zm-4.185-4.843l5 12-5 12 20-12-20-12z"}))},st=function(n){var r=t(""),i=r[0],a=r[1],l=s(null),u=X();o(function(){l.current.focus()},[]);var c=function(e){e.preventDefault(),n.onChange(i),a("")},p=function(){var e=l.current;e.style.height="auto",d(e)},d=function(e){e.style.height=e.scrollHeight+"px",parseInt(e.style.height)>parseInt("300px")&&(e.style.height="300px")};/*#__PURE__*/return e.createElement(m,{onSubmit:c,onKeyUp:function(e){"Enter"===e.key&&e.ctrlKey&&i.trim()&&c(e)},onClick:function(e){e.stopPropagation()}},/*#__PURE__*/e.createElement(m.Group,{className:"m-2",controlId:"formBasicComment"},/*#__PURE__*/e.createElement(g,{className:"col-lg-12 p-0"},/*#__PURE__*/e.createElement(S,{className:"container-fluid p-0 m-0"},/*#__PURE__*/e.createElement("div",{id:"comment-form"},/*#__PURE__*/e.createElement(m.Control,{className:"comment-form-control",name:"comment",as:"textarea",placeholder:u.formatMessage({id:"comment.form.placeholder"}),required:!0,value:i,onChange:function(e){a(e.target.value)},ref:l,onKeyPress:p,onKeyDown:p}),/*#__PURE__*/e.createElement(A,{className:"comment-form-button",variant:"primary",type:"submit"},/*#__PURE__*/e.createElement(rt,null)))))))};st.propTypes={onChange:a.func.isRequired};var it=function(){/*#__PURE__*/return e.createElement("svg",{className:"close-icon",width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/e.createElement("path",{d:"M13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29-4.3 4.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l4.29-4.3 4.29 4.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"}))},at=function(n){var i=r(ge),a=s(null),l=s(null),u=s(null),c=t(!1),p=c[0],m=c[1],d=t("right"),h=d[0],f=d[1];o(function(){O(u.current)});var E=function(){m(!1)},g=function(){var e=n.question;return e[ae.HAS_COMMENT]||(e[ae.HAS_COMMENT]=[]),Array.isArray(e[ae.HAS_COMMENT])||(e[ae.HAS_COMMENT]=[e[ae.HAS_COMMENT]]),e[ae.HAS_COMMENT]},S=function(e){var t={};A(t,e),n.onChange(I(),t)},A=function(e,t){i.options.currentUser&&(e[ae.HAS_AUTHOR]={"@id":i.options.currentUser}),e[ae.HAS_COMMENT_VALUE]=t,e[ae.HAS_TIMESTAMP]=Date.now().toString()},T=function(e){g().splice(e,1)},N=function(e){e.preventDefault(),e.stopPropagation()},I=function(){return g().length},O=function(e){e&&(e.getBoundingClientRect().x>window.innerWidth/2?f("left"):f("right"))};/*#__PURE__*/return e.createElement("div",{ref:u,onClick:N},/*#__PURE__*/e.createElement("span",{className:"comment-bubble",ref:a,onClick:function(e){N(e),m(!p)}},/*#__PURE__*/e.createElement(et,null),I()>0?/*#__PURE__*/e.createElement(_,{className:"comment-badge",pill:!0,variant:"primary"},I()):null),/*#__PURE__*/e.createElement(B.div,{className:"overlay-comment",ref:l,drag:!0,dragConstraints:{top:-50,left:-50,right:50,bottom:50}},/*#__PURE__*/e.createElement(C,{target:a.current,show:p,placement:h,rootClose:!1,onHide:E,container:l},function(t){/*#__PURE__*/return e.createElement(v,K({className:"comment-tooltip"},t),/*#__PURE__*/e.createElement("span",{onKeyDown:function(e){!function(e){"Escape"===e.key&&E()}(e)}},/*#__PURE__*/e.createElement(B.div,{className:"close-comment-icon",onClick:E,whileHover:{scale:1.1,transition:{duration:.1}}},/*#__PURE__*/e.createElement(it,null)),/*#__PURE__*/e.createElement(ot,{comments:g(),onDeleteCommentClick:T}),/*#__PURE__*/e.createElement(st,{onChange:S})))})))};at.propTypes={question:a.object.isRequired,onChange:a.func.isRequired};var lt=/*#__PURE__*/function(){function t(){}return t.renderIcons=function(t,n,o,r){var s;s=n.icons?n.icons:ae.DEFAULT_OPTIONS.icons;for(var i=[],a=this.renderQuestionHelp(t,n,o,r),l=this.renderQuestionComments(t,n,o,r),u=this.renderQuestionLink(t,n,o,r),c=0;c<s.length;c++)s[c].id===ae.ICONS.QUESTION_COMMENTS&&i.push(/*#__PURE__*/e.createElement("li",{key:c,className:"icon-list-item"},l)),s[c].id===ae.ICONS.QUESTION_HELP&&i.push(/*#__PURE__*/e.createElement("li",{key:c,className:"icon-list-item"},a)),s[c].id===ae.ICONS.QUESTION_LINK&&i.push(/*#__PURE__*/e.createElement("li",{key:c,className:"icon-list-item"},u));/*#__PURE__*/return e.createElement("ol",{className:"icon-list-items"},i)},t.renderQuestionHelp=function(e,t,n,o){return this.getIconComponentFromName(ae.ICONS.QUESTION_HELP,e,t,n,o)},t.renderQuestionLink=function(e,t,n,o){return this.getIconComponentFromName(ae.ICONS.QUESTION_LINK,e,t,n,o)},t.getIconComponentFromName=function(e,t,n,o,r){var s=this.getIconFromIconList(n.icons?n.icons:ae.DEFAULT_OPTIONS.icons,e);return this.getIconComponent(s,t,n,o,r)},t.getIconComponent=function(t,n,o,r,s){var i;if(t&&(t.behavior===ae.ICON_BEHAVIOR.ON_HOVER||t.behavior===ae.ICON_BEHAVIOR.ENABLE))return t.behavior===ae.ICON_BEHAVIOR.ENABLE?(s=!0,i=""):i="emphasise-on-relevant-icon",t.id===ae.ICONS.QUESTION_HELP&&n[ae.HELP_DESCRIPTION]?s?/*#__PURE__*/e.createElement("div",{className:i},/*#__PURE__*/e.createElement(Ke,{text:u.getLocalized(n[ae.HELP_DESCRIPTION],o.intl),absolutePosition:!1})):null:t.id===ae.ICONS.QUESTION_LINK&&n[ae.SOURCE]?s?/*#__PURE__*/e.createElement("div",{className:i},/*#__PURE__*/e.createElement($e,{url:n[ae.SOURCE]})):null:t.id===ae.ICONS.QUESTION_COMMENTS&&s?/*#__PURE__*/e.createElement("div",{className:i},/*#__PURE__*/e.createElement(at,{question:n,onChange:r})):null},t}();lt.renderQuestionComments=function(e,t,n,o){return lt.getIconComponentFromName(ae.ICONS.QUESTION_COMMENTS,e,t,n,o)},lt.getIconFromIconList=function(e,t){return e?e.find(function(e){return e.id===t}):null};var ut=function(t){var n,o,r=e.useContext(se),s=e.useContext(ge).options,i=function(e){var n=Object.assign({},t.answer);a(n,e),t.onChange(t.index,n)},a=function(e,n){null===n?(e[ae.HAS_OBJECT_VALUE]=null,e[ae.HAS_DATA_VALUE]=null):t.answer[ae.HAS_OBJECT_VALUE]||pe.isTypeahead(t.question)?e[ae.HAS_OBJECT_VALUE]={"@id":n}:e[ae.HAS_DATA_VALUE]={"@value":n}},l=t.question,c=pe.resolveValue(t.answer),p=function(n){var o=u.getLocalized(n[ae.RDFS_LABEL],s.intl);/*#__PURE__*/return e.createElement("div",{className:"question-header"},o,lt.renderIcons(t.question,s,t.onCommentChange,t.showIcon))}(l),m=u.getLocalized(l[ae.RDFS_COMMENT],s.intl);return n=pe.isTypeahead(l)?function(n,o,s){var a=le.getStringHash(pe.getPossibleValuesQuery(t.question)),l=r.getOptions(a)||[];/*#__PURE__*/return e.createElement(Be,{question:t.question,answer:t.answer,label:o,title:s,value:n,onChange:i,options:l})}(c,p,m):(o=l)[ae.HAS_OPTION]&&0!==o[ae.HAS_OPTION].length?function(n,o,r){/*#__PURE__*/return e.createElement(Fe,{question:t.question,label:o,title:r,value:n,onChange:i})}(c,p,m):pe.isCalendar(l)?function(n,o,r){/*#__PURE__*/return e.createElement(Le,{question:t.question,value:n,title:r,label:o,onChange:i})}(c,p,m):pe.isCheckbox(l)?function(n,o,r){/*#__PURE__*/return e.createElement(be,{label:o,title:r,value:n,onChange:i,question:t.question})}(c,p,m):pe.isMaskedInput(l)?function(n,o,r){/*#__PURE__*/return e.createElement(Qe,{label:o,title:r,value:n,onChange:i,question:t.question,answer:t.answer})}(c,p,m):pe.isSparqlInput(l)?function(n,o,r){/*#__PURE__*/return e.createElement(Ve,{question:t.question,answer:t.answer,label:o,title:r,value:n,onChange:i,sparql:!0})}(c,p,m):pe.isTurtleInput(l)?function(n,o,r){/*#__PURE__*/return e.createElement(Ve,{question:t.question,answer:t.answer,label:o,title:r,value:n,onChange:i,turtle:!0})}(c,p,m):function(n,o,r){/*#__PURE__*/return e.createElement(Ve,{question:t.question,answer:t.answer,label:o,title:r,value:n,onChange:i})}(c,p,m),n};ut.propTypes={answer:a.object.isRequired,question:a.object.isRequired,onChange:a.func.isRequired,onCommentChange:a.func.isRequired,index:a.number,icons:a.object};var ct=/*#__PURE__*/function(){function e(){}return e.createValidator=function(t,n){return t[ae.REQUIRES_ANSWER]?pe.isCheckbox(t)?e._generateRequiresAnswerCheckBoxValidator(t,n):e._generateRequiresAnswerValidator(t,n):function(){var e={};return e[ae.HAS_VALID_ANSWER]=!0,delete e[ae.HAS_VALIDATION_MESSAGE],e}},e._generateRequiresAnswerValidator=function(e,t){return function(n){var o=null;n[ae.HAS_DATA_VALUE]?o=u.getJsonAttValue(n,ae.HAS_DATA_VALUE):n[ae.HAS_OBJECT_VALUE]&&(o=u.getJsonAttValue(n,ae.HAS_OBJECT_VALUE,"@id"));var r=null!=o&&""!==o,s={};return s[ae.HAS_VALID_ANSWER]=r,s[ae.HAS_VALIDATION_MESSAGE]=r?null:u.getLocalized(e[u.RDFS_LABEL],t)+" is missing a value.",s}},e._generateRequiresAnswerCheckBoxValidator=function(e,t){return function(n){var o=null;n[ae.HAS_DATA_VALUE]?o=u.getJsonAttValue(n,ae.HAS_DATA_VALUE):n[ae.HAS_OBJECT_VALUE]&&(o=u.getJsonAttValue(n,ae.HAS_OBJECT_VALUE,"@id"));var r=null!=o&&""!==o&&!1!==o,s={};return s[ae.HAS_VALID_ANSWER]=r,s[ae.HAS_VALIDATION_MESSAGE]=r?null:u.getLocalized(e[u.RDFS_LABEL],t)+" must be checked.",s}},e}(),pt=/*#__PURE__*/function(t){function n(e){var n;return(n=t.call(this,e)||this).state={prefixes:e.prefixes},n}return Z(n,t),n.prototype.render=function(){var t=/*#__PURE__*/e.createElement(T,{id:"prefixes",title:"Prefixes"},/*#__PURE__*/e.createElement(N,null,this.state.prefixes.sort(function(e,t){return e[ae.PREFIX]<t[ae.PREFIX]?-1:1}).map(function(t){/*#__PURE__*/return e.createElement(I,{key:t[ae.PREFIX]},/*#__PURE__*/e.createElement("strong",null,t[ae.PREFIX]),": ",t[ae.NAMESPACE])})));/*#__PURE__*/return e.createElement(E,{trigger:"click",placement:"right",overlay:t},/*#__PURE__*/e.createElement("span",{className:this.props.iconClass},this.props.children))},n}(e.Component);pt.propTypes={prefixes:a.array.isRequired,children:a.element.isRequired,iconClass:a.string},pt.defaultProps={iconClass:""};var mt=function(e){var t;return(t=e.question[ae.HAS_MEDIA_CONTENT])?Array.isArray(t)?q("div",{className:"col-6",children:t.map(function(e,n){return q("div",{className:"row embed-responsive-21by9 media-content-video-container mb-3",children:q("iframe",{src:t[n],className:"embed-responsive-item",allowFullScreen:!0})},n)})}):q("div",{className:"col-6",children:q("iframe",{src:t,className:"embed-responsive-item",allowFullScreen:!0})}):null},dt=/*#__PURE__*/function(t){function n(e){var n;return(n=t.call(this,e)||this).handleAnswerChange=function(e,t){if(pe.isSection(n.props.question)){var o=!!pe.resolveValue(t);n.setState({expanded:o})}n._handleChange(ae.HAS_ANSWER,e,t)},n.handleSubQuestionChange=function(e,t){n._handleChange(ae.HAS_SUBQUESTION,e,t)},n.handleCommentChange=function(e,t){n._handleChange(ae.HAS_COMMENT,e,t)},n._toggleCollapse=function(){if(n.props.collapsible){var e=n.props.question;if(!n.context.options.debugMode&&pe.isAnswerable(e)&&pe.isSection(e)&&!n._getFirstAnswerValue())return;n.setState({expanded:!n.state.expanded})}},n._onMouseEnterHandler=function(){n.setState({showIcon:!0})},n._onMouseLeaveHandler=function(){n.setState({showIcon:!1})},ue.putObject(e.question["@id"],e.question),n.state={validator:null,expanded:!pe.isCollapsed(e.question),showIcon:!1},n}Z(n,t);var o=n.prototype;return o.componentDidMount=function(){this.setState({validator:ct.createValidator(this.props.question,this.context.options.intl)})},o.componentDidUpdate=function(){var e=this.props.question,t=this.context.options.startingQuestionId,n=e[ae.HAS_SUBQUESTION].find(function(e){return e["@id"]===t});if(pe.isSection(e)&&pe.isAnswerable(e)){var o=this._getFirstAnswerValue();if(this.context.options.debugMode)return null;if(n)return null;this.state.expanded&&!o&&this.setState({expanded:!1})}},o._handleChange=function(e,t,n){var o=Object.assign({},this.props.question);if(o[e][t]=n,e===ae.HAS_ANSWER){var r=this.state.validator(n);o=Object.assign({},o,r)}ue.putObject(o["@id"],o),this.props.onChange(this.props.index,o)},o.render=function(){var t=this.props.question,n=t[ae.HAS_SUBQUESTION],o=this.context.options,r=this.renderQuestion(t);return pe.isHidden(t)?null:pe.isRelevant(t)||!this.context.options.debugMode&&!ce.checkId(n,o.startingQuestionId)?pe.isRelevant(t)?r:null:/*#__PURE__*/e.createElement("div",{className:"show-irrelevant"},r)},o.renderQuestion=function(t){if(pe.isAnswerable(t)&&!pe.isSection(t))/*#__PURE__*/return e.createElement("div",{id:t["@id"]},/*#__PURE__*/e.createElement("div",{className:"panel-title answerable-question"},this.renderAnswers()),/*#__PURE__*/e.createElement("div",{className:"answerable-subquestions"},this.renderSubQuestions()));if(pe.isSection(t)){var o=this.props,r=o.collapsible,s=o.withoutCard,i=n._getQuestionCategoryClass(t);if(s)/*#__PURE__*/return e.createElement("div",null,this._renderQuestionContent());var a=u.getLocalized(t[u.RDFS_LABEL],this.context.options.intl),l=Y(pe.isEmphasised(t)?n.getEmphasizedClass(t):"section-background",r?"cursor-pointer":"",n.getEmphasizedOnRelevantClass(t));if(pe.isAnswerable(t))return this.renderAnswerableSection();var c=/*#__PURE__*/e.createElement(O.Body,{className:Y("p-3",i)},this._renderQuestionContent());/*#__PURE__*/return e.createElement(w,{defaultActiveKey:this.state.expanded?void 0:a},/*#__PURE__*/e.createElement(O,{className:"mb-3"},/*#__PURE__*/e.createElement(w.Toggle,{as:O.Header,onClick:this.toggleCollapse,className:l+" question-header",onMouseEnter:this._onMouseEnterHandler,onMouseLeave:this._onMouseLeaveHandler},/*#__PURE__*/e.createElement("h6",{className:"d-inline",id:t["@id"]},r&&this._renderCollapseToggle(),a),this.renderQuestionIcons(),this.renderHeaderExtension()),r?/*#__PURE__*/e.createElement(w.Collapse,null,c):{cardBody:c}))}/*#__PURE__*/return e.createElement("div",null,this._renderQuestionContent())},o._renderQuestionContent=function(){var t=[];return this.state.expanded&&t.push(/*#__PURE__*/e.createElement(mt,{key:this.props.question["@id"]+"-media",question:this.props.question})),t.push(this.renderAnswers()),t.push(this.renderSubQuestions()),t},o.renderQuestionIcons=function(){return lt.renderIcons(this.props.question,this.context.options,this.handleCommentChange,this.state.showIcon)},o.renderHeaderExtension=function(){},o.renderAnswerableSection=function(){var t=this.props.question,o=this.props.collapsible,r=n._getQuestionCategoryClass(t),s=[pe.isEmphasised(t)?n.getEmphasizedClass(t):"section-background",this.state.expanded?"section-expanded":"section-collapsed",n.getEmphasizedOnRelevantClass(t)];o&&this._getFirstAnswerValue()&&s.push("cursor-pointer");var i=this.getShowIrrelevantClassname(t),a=/*#__PURE__*/e.createElement(O.Body,{className:Y("p-3",r)},this.renderSubQuestions(i));/*#__PURE__*/return e.createElement(w,{activeKey:this.state.expanded?t["@id"]:void 0,className:"answerable-section"},/*#__PURE__*/e.createElement(O,{className:"mb-3"},/*#__PURE__*/e.createElement(O.Header,{onClick:this._toggleCollapse,className:Y(s)},this.renderAnswers()),o?/*#__PURE__*/e.createElement(w.Collapse,{className:i,eventKey:t["@id"]},a):{cardBody:a}))},o.getShowIrrelevantClassname=function(e){return!this.context.options.debugMode&&!ce.checkId(e[ae.HAS_SUBQUESTION],this.context.options.startingQuestionId)||pe.hasAnswer(e)?"":"show-irrelevant"},o.renderAnswers=function(){for(var t,o=this.props.question,r=[],s=this._getAnswers(),i=0,a=s.length;i<a;i++)pe.isTextarea(o,pe.resolveValue(s[i]))||pe.isSparqlInput(o)||pe.isTurtleInput(o),t=Y("answer",n._getQuestionCategoryClass(o),n.getEmphasizedOnRelevantClass(o)),r.push(/*#__PURE__*/e.createElement("div",{key:"row-item-"+i,className:t,id:o["@id"],onMouseEnter:this._onMouseEnterHandler,onMouseLeave:this._onMouseLeaveHandler},/*#__PURE__*/e.createElement("div",{className:"answer-content",style:this._getAnswerWidthStyle()},/*#__PURE__*/e.createElement(ut,{index:i,answer:s[i],question:o,onChange:this.handleAnswerChange,onCommentChange:this.handleCommentChange,showIcon:this.state.showIcon})),this._renderUnits(),this._renderPrefixes()));return r},o._getAnswers=function(){var e=this.props.question;return e[ae.HAS_ANSWER]||(e[ae.HAS_ANSWER]=[]),Array.isArray(e[ae.HAS_ANSWER])||(e[ae.HAS_ANSWER]=[e[ae.HAS_ANSWER]]),0===e[ae.HAS_ANSWER].length&&(e[ae.HAS_ANSWER]=pe.isSection(e)&&!pe.isAnswerable(e)||pe.isWizardStep(e)?[]:[we.generateAnswer(e)]),e[ae.HAS_ANSWER]},o._getAnswerWidthStyle=function(){var e=Number(this.props.question[ae.HAS_INITIAL_INPUT_LENGTH]);return e?{flexGrow:0,maxWidth:"none",width:"calc("+e+"ch + 1.5rem + 2px)"}:{}},n._getAnswerClass=function(e,t){return t?"col-12":1===ae.GENERATED_ROW_SIZE?"col-6":"col-"+ae.COLUMN_COUNT/ae.GENERATED_ROW_SIZE},n._getQuestionCategoryClass=function(e){var t=pe.getCategory(e);return t?"question-"+t:""},n.getEmphasizedClass=function(e){return pe.isEmphasised(e)?"bg-warning":""},n.getEmphasizedOnRelevantClass=function(e){return u.hasValue(e,ae.LAYOUT_CLASS,ae.LAYOUT.EMPHASISE_ON_RELEVANT)?"emphasise-on-relevant":""},o._renderCollapseToggle=function(){var t=this.context.options,n=this.state.expanded?t.i18n["section.collapse"]:t.i18n["section.expand"];/*#__PURE__*/return e.createElement("span",{onClick:this.toggleCollapse,title:n},/*#__PURE__*/e.createElement(this.state.expanded?We:Xe,{title:n}))},o._renderPrefixes=function(){var t=this.props.question;return t[ae.HAS_DECLARED_PREFIX]&&t[ae.HAS_DECLARED_PREFIX].length?/*#__PURE__*/e.createElement(pt,{prefixes:t[ae.HAS_DECLARED_PREFIX],iconClass:"help-icon-checkbox"},/*#__PURE__*/e.createElement(Ge,null)):null},o._renderUnits=function(){var t=this.props.question;return t[ae.HAS_UNIT]?/*#__PURE__*/e.createElement("div",{className:"has-unit-label"},t[ae.HAS_UNIT]):null},o.renderSubQuestions=function(t){for(var o=[],r=this._getSubQuestions(),s=this.context.options.debugMode,i=this.context.options.startingQuestionId,a=0;a<r.length;a++){var l=r[a],u=this.context.mapComponent(l,n),c=null;(s||"show-irrelevant"!==t||!s&&ce.checkId(l,i))&&(c=/*#__PURE__*/e.createElement(u,{key:"sub-question-"+a,question:l,onChange:this.handleSubQuestionChange,index:a})),o.push(c)}return o},o._getSubQuestions=function(){var e=this.props.question;return e[ae.HAS_SUBQUESTION]||(e[ae.HAS_SUBQUESTION]=[]),Array.isArray(e[ae.HAS_SUBQUESTION])||(e[ae.HAS_SUBQUESTION]=[e[ae.HAS_SUBQUESTION]]),ce.orderByLocalizedLabels(e[ae.HAS_SUBQUESTION],this.context.options.intl),ce.orderPreservingToplogicalSort(e[ae.HAS_SUBQUESTION],ae.HAS_PRECEDING_QUESTION),e[ae.HAS_SUBQUESTION]},o._getFirstAnswerValue=function(){return pe.resolveValue(this._getAnswers()[0])},n}(e.Component);dt.contextType=ge,dt.propTypes={question:a.object.isRequired,onChange:a.func.isRequired,index:a.number,withoutCard:a.bool,collapsible:a.bool},dt.defaultProps={withoutCard:!1,collapsible:!0};var ht=/*#__PURE__*/function(t){function n(n){var o;return(o=t.call(this,n)||this).onNextStep=function(){o.context.updateFormQuestionsData(o.props.stepIndex,o.context.getFormQuestionsData()),o.props.onNextStep()},o.onPreviousStep=function(){o.props.onPreviousStep()},o.onCommentChange=function(e,t){o._onChange(ae.HAS_COMMENT,e,t)},o._renderWizardStepButtons=function(){/*#__PURE__*/return e.createElement(y,{className:"m-3 float-right"},!o.props.isFirstStep&&/*#__PURE__*/e.createElement(A,{className:"mr-2",onClick:o.onPreviousStep,variant:"primary",size:"sm"},o.props.options.i18n["wizard.previous"]),!o.props.isLastStep&&/*#__PURE__*/e.createElement(A,{onClick:o.onNextStep,variant:"primary",size:"sm"},o.props.options.i18n["wizard.next"]))},o.onChange=function(e,t){o.context.updateFormQuestionsData(o.props.stepIndex||e,Object.assign({},o.props.step,t))},o._onMouseEnterHandler=function(){o.setState({showIcon:!0})},o._onMouseLeaveHandler=function(){o.setState({showIcon:!1})},o.state={showIcon:!1},o}Z(n,t);var o=n.prototype;return o._onChange=function(e,t,n){var o=Object.assign({},this.props.step);o[e][t]=n,ue.putObject(o["@id"],o),this.onChange(this.props.index,o)},o.render=function(){var t=dt._getQuestionCategoryClass(this.props.step),n=this.context.getFormQuestionsData([this.props.stepIndex]),o=this.props.options,r=this.props.mapComponent(this.props.step,dt),s=/*#__PURE__*/e.createElement(r,{question:this.props.step,onChange:this.onChange,withoutCard:!0,index:this.props.stepIndex});/*#__PURE__*/return e.createElement("div",{className:"wizard-step"},/*#__PURE__*/e.createElement(O,{className:"wizard-step-content"},/*#__PURE__*/e.createElement(O.Header,{className:"bg-primary text-white question-header",as:"h6",id:this.props.step["@id"],onMouseEnter:this._onMouseEnterHandler,onMouseLeave:this._onMouseLeaveHandler},u.getLocalized(this.props.step[u.RDFS_LABEL],this.props.options.intl),lt.renderIcons(n,o,this.onCommentChange,this.state.showIcon)),/*#__PURE__*/e.createElement(O.Body,{className:t},s)),this.props.options.wizardStepButtons&&this._renderWizardStepButtons())},n}(e.Component);ht.contextType=he,ht.propTypes={options:a.object.isRequired,step:a.object.isRequired,onNextStep:a.func,onPreviousStep:a.func,mapComponent:a.func,stepIndex:a.number.isRequired,isFirstStep:a.bool,isLastStep:a.bool};var ft=function(t){var n=t.steps,o=t.onNavigate,s=t.currentStep,i=r(ge).options;/*#__PURE__*/return e.createElement(O.Header,null,/*#__PURE__*/e.createElement(b,{variant:"tabs",activeKey:s,onSelect:function(e){return o(parseInt(e))}},n.map(function(t,n){/*#__PURE__*/return e.createElement(L,{key:"nav"+n,id:"wizard-nav-"+n,className:dt.getEmphasizedClass(t)},/*#__PURE__*/e.createElement(R,{eventKey:n,active:n===s,disabled:!pe.isRelevant(t)},u.getLocalized(t[u.RDFS_LABEL],i.intl)))})))};ft.propTypes={currentStep:a.number.isRequired,steps:a.array.isRequired,onNavigate:a.func.isRequired};var Et=function(t){var n=t.steps,o=t.onNavigate,s=t.currentStep,i=r(ge).options;/*#__PURE__*/return e.createElement("div",{className:"wizard-nav col-2 p-0"},/*#__PURE__*/e.createElement(N,null,n.map(function(t,n){/*#__PURE__*/return e.createElement(I,{hidden:!i.debugMode&&!pe.isRelevant(t),key:"nav"+n,onClick:function(){return o(n)},id:"wizard-nav-"+n,action:!0,active:n===s?"active":"",variant:"default",className:i.debugMode&&!pe.isRelevant(t)?"show-irrelevant":dt.getEmphasizedClass(t)},u.getLocalized(t[u.RDFS_LABEL],i.intl))})))};Et.propTypes={currentStep:a.number.isRequired,steps:a.array.isRequired,onNavigate:a.func.isRequired};var vt=function(e,t){var n=function e(n,o){return n?n["@id"]===t?o:le.asArray(n[ae.HAS_SUBQUESTION]).findIndex(function(t,n){return-1!==e(t,n)}):-1};return e.findIndex(function(e,t){return-1!==n(e,t)})},gt=function(){var t=e.useContext(he),n=e.useContext(ge),r=n.options,s=n.mapComponent,i=0;r.startingQuestionId?-1===(i=vt(t.getFormQuestionsData(),r.startingQuestionId))&&(console.warn("Question with id "+r.startingQuestionId+" not found!"),i=0):r.startingStep&&(i=r.startingStep<t.getFormQuestionsData().length?r.startingStep:0);var a=e.useState(i),l=a[0],u=a[1],c=e.useState(!1),p=c[0],m=c[1];o(function(){if(r.startingQuestionId&&!p){var e=document.getElementById(r.startingQuestionId);e&&(e.scrollIntoView(),e.classList.add("text-danger"),m(!0))}});var d,h=null;t.getFormQuestionsData().length>1&&(d=t.getFormQuestionsData(),h=/*#__PURE__*/e.createElement(r.horizontalWizardNav?ft:Et,{currentStep:l,steps:d,onNavigate:function(e){var n=t.getFormQuestionsData();e===l||e>=n.length||e>l&&!n[e].visited&&!r.enableForwardSkip||u(e)}}));var f,E,v=r.horizontalWizardNav;/*#__PURE__*/return e.createElement(O,{className:v?"":"flex-row p-3"},h,/*#__PURE__*/e.createElement("div",{className:v?"card-body p-3":h?"col-10 p-0 pl-3":"col-12 p-0"},(E=s(f=t.getFormQuestionsData()[l],ht),/*#__PURE__*/e.createElement(E,{options:r,key:"step"+l,step:f,onNextStep:function(){var e=t.getFormQuestionsData();l!==e.length-1&&(e[l+1].visited=!0,u(function(e){return e+1}))},onPreviousStep:function(){0!==l&&u(function(e){return e-1})},mapComponent:s,stepIndex:l,isFirstStep:0===l,isLastStep:l===t.getFormQuestionsData().length-1}))))},St=/*#__PURE__*/e.forwardRef(function(t,n){var o=e.useContext(ge).options;/*#__PURE__*/return e.createElement(H,K({size:"xl",animation:!0},o.modalProps),/*#__PURE__*/e.createElement(H.Header,{closeButton:!0},/*#__PURE__*/e.createElement(H.Title,null,o.modalProps.title)),/*#__PURE__*/e.createElement(H.Body,{className:"overflow-hidden p-0"},t.children))});St.propTypes={children:a.element.isRequired};var At=/*#__PURE__*/function(t){function n(){for(var n,o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return(n=t.call.apply(t,[this].concat(r))||this).getFormData=function(){var e=n.context.getData(),t=n.context.getFormQuestionsData();return we.buildQuestionAnswerModel(e,t)},n.getFormQuestionsData=function(){return n.context.getFormQuestionsData()},n.handleStepChange=function(e,t,o){n.context.updateFormQuestionsData(t,Object.assign({},e,o))},n.renderWizardlessForm=function(){var t=n.context.getFormQuestionsData();/*#__PURE__*/return e.createElement(J,{className:"p-3"},t.map(function(e,t){return n._mapQuestion(e,t)}))},n}Z(n,t);var o=n.prototype;return o._mapQuestion=function(t,n){var o=this,r=this.props.mapComponent(t,dt);/*#__PURE__*/return e.createElement(r,{key:t["@id"],question:t,onChange:function(e,n){return o.handleStepChange(t,e,n)},index:n})},o.render=function(){var t=this.props.modalView,n=this.context.getFormQuestionsData();if(!n.length)/*#__PURE__*/return e.createElement(J,{className:"p-3 font-italic"},"There are no questions available...");var o=n.every(function(e){return!pe.isWizardStep(e)});return t?/*#__PURE__*/e.createElement(St,null,o?this.renderWizardlessForm():/*#__PURE__*/e.createElement(gt,null)):o?this.renderWizardlessForm():/*#__PURE__*/e.createElement(gt,null)},n}(e.Component);At.contextType=he;var _t=/*#__PURE__*/i(function(n,r){var s=t(!0),i=s[0],a=s[1],l=t(null),u=l[0],c=l[1],p=t(null),m=p[0],d=p[1];if(o(function(){!function(){try{Promise.resolve(Oe.constructForm(n.form,n.options.intl)).then(function(e){var t=e[0],n=e[1];t.formQuestions.some(function(e){return pe.isWizardStep(e)})&&(t.formQuestions[0].visited=!0),c(t),d(n),a(!1)})}catch(e){return Promise.reject(e)}}()},[n.form]),i)return n.loader||/*#__PURE__*/e.createElement(O,{className:"p-3 font-italic"},"Loading SForms...");var h=function(e,t){return function(n,o){if(!e)return o;for(var r,s=ne(e);!(r=s()).done;){var i=r.value,a=i.component;if((0,i.mapRule)(n,t))return a}return o}}(n.componentMapRules,m);/*#__PURE__*/return e.createElement(Ae,{components:n.components,componentsOptions:n.componentsOptions,mapComponent:h,options:n.options},/*#__PURE__*/e.createElement(ie,{fetchTypeAheadValues:n.fetchTypeAheadValues},/*#__PURE__*/e.createElement(fe,{data:m,formQuestions:u.formQuestions,isFormValid:n.isFormValid},/*#__PURE__*/e.createElement(At,{ref:r,modalView:n.options&&n.options.modalView,mapComponent:h}))))});_t.propTypes={form:a.object.isRequired,options:a.object.isRequired,componentMapRules:a.array,components:a.object,componentsOptions:a.object,fetchTypeAheadValues:a.func,isFormValid:a.func,loader:a.element};var Ct={"comment.form.placeholder":"Sem napište své komentáře (Ctrl+Enter pro potvrzení)"},Tt={"comment.form.placeholder":"Write your comments here (Ctrl+Enter to confirm, Esc to cancel)"},Nt=/*#__PURE__*/e.createContext({}),It=function(e){var t=e.locale,n=void 0===t?navigator.language:t,o=Tt;return n===ae.LANG.cs.locale&&(o=Ct),q(Nt.Provider,{value:{locale:n,lang:o},children:q(G,{locale:n,messages:o,children:e.children})})};export{ut as Answer,ge as ConfigurationContext,ae as Constants,he as FormQuestionsContext,pe as FormUtils,Ke as HelpIcon,It as IntlContextProvider,Ie as JsonLdFramingUtils,ue as JsonLdObjectMap,ce as JsonLdObjectUtils,dt as Question,lt as QuestionStatic,ht as WizardStep,_t as default};
1
+ import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.promise.js";import"core-js/modules/es.array.some.js";import e,{useState as t,useMemo as n,useEffect as o,useContext as r,useRef as s,forwardRef as i}from"react";import a from"prop-types";import"core-js/modules/es.object.assign.js";import l from"jsonld";import"core-js/modules/es.array.concat.js";import"core-js/modules/es.array.find.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.array.map.js";import u from"jsonld-utils";import"core-js/modules/es.array.sort.js";import"core-js/modules/es.array.for-each.js";import"core-js/modules/web.dom-collections.for-each.js";import c from"tsort";import"core-js/modules/es.number.max-safe-integer.js";import"core-js/modules/es.number.constructor.js";import p from"react-dom";import{Form as m,FormGroup as d,FormControl as h,FormText as f,OverlayTrigger as E,Tooltip as v,Col as g,Row as S,Button as A,Badge as _,Overlay as C,Popover as T,ListGroup as N,ListGroupItem as O,Card as I,Accordion as w,ButtonToolbar as y,Nav as b,NavItem as L,NavLink as R,Modal as H}from"react-bootstrap";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.array.iterator.js";import"core-js/modules/es.set.js";import"core-js/modules/es.string.iterator.js";import"core-js/modules/esnext.set.add-all.js";import"core-js/modules/esnext.set.delete-all.js";import"core-js/modules/esnext.set.difference.js";import"core-js/modules/esnext.set.every.js";import"core-js/modules/esnext.set.filter.js";import"core-js/modules/esnext.set.find.js";import"core-js/modules/esnext.set.intersection.js";import"core-js/modules/esnext.set.is-disjoint-from.js";import"core-js/modules/esnext.set.is-subset-of.js";import"core-js/modules/esnext.set.is-superset-of.js";import"core-js/modules/esnext.set.join.js";import"core-js/modules/esnext.set.map.js";import"core-js/modules/esnext.set.reduce.js";import"core-js/modules/esnext.set.some.js";import"core-js/modules/esnext.set.symmetric-difference.js";import"core-js/modules/esnext.set.union.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.array.every.js";import"core-js/modules/es.array.is-array.js";import"core-js/modules/es.array.find-index.js";import"core-js/modules/es.date.to-string.js";import x from"react-datepicker";import{format as D}from"date-fns";import"core-js/modules/es.object.get-own-property-names.js";import"core-js/modules/es.array.index-of.js";import"core-js/modules/es.array.slice.js";import V from"yasgui-yasqe";import"@triply/yasgui/build/yasgui.min.css";import"core-js/modules/web.timers.js";import U from"inputmask-core";import"core-js/modules/es.symbol.js";import"core-js/modules/es.symbol.description.js";import"core-js/modules/es.function.name.js";import j,{components as M}from"react-select";import{FixedSizeList as P}from"react-window";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.date.now.js";import"core-js/modules/es.array.splice.js";import{jsx as q,jsxs as Q}from"react/jsx-runtime";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.string.replace.js";import"core-js/modules/es.object.values.js";import"core-js/modules/es.parse-int.js";import k from"javascript-time-ago";import z from"javascript-time-ago/locale/en";import F from"javascript-time-ago/locale/cs";import{motion as B}from"framer-motion/dist/framer-motion";import{Rings as W}from"react-loader-spinner";import"core-js/modules/es.string.trim.js";import{useIntl as X,IntlProvider as G}from"react-intl";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import"core-js/modules/es.array.last-index-of.js";import Y from"react-image-zooom";import J from"classnames";import K from"react-bootstrap/Card";function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Z.apply(this,arguments)}function $(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ee(e,t)}function ee(e,t){return ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ee(e,t)}function te(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(n=s[o])>=0||(r[n]=e[n]);return r}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function oe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var re=/*#__PURE__*/function(){function e(){}return e.log=function(e){console.log(e)},e.warn=function(e){console.warn?console.warn(e):console.log("WARNING: "+e)},e.error=function(e){console.error?console.error(e):console.log("ERROR: "+e)},e}(),se=["children"],ie=/*#__PURE__*/e.createContext({}),ae=function(o){var r=o.children,s=te(o,se),i=t({}),a=i[0],u=i[1],c=function(e,t){try{var n=a[e];return n&&n.length?Promise.resolve(n):Promise.resolve(s.fetchTypeAheadValues(t)).then(function(t){return t.length?new Promise(function(n){l.frame(t,{},null,function(t,o){var r=o["@graph"];return u(function(t){var n;return Object.assign({},t,((n={})[e]=r,n))}),n(r)})}):(re.warn("No data received when loading options using id "+e),[])})}catch(e){return Promise.reject(e)}},p=function(e){return a[e]||[]},m=n(function(){return{loadFormOptions:c,getOptions:p}},[c,p]);/*#__PURE__*/return e.createElement(ie.Provider,Z({value:m},s),r)};ae.propTypes={children:a.element.isRequired,fetchTypeAheadValues:a.func};var le=function(){};le.COLUMN_COUNT=12,le.INPUT_LENGTH_THRESHOLD=50,le.DATETIME_NUMBER_FORMAT="x",le.FORM="http://onto.fel.cvut.cz/ontologies/documentation/form",le.HAS_SUBQUESTION="http://onto.fel.cvut.cz/ontologies/documentation/has_related_question",le.HAS_ANSWER="http://onto.fel.cvut.cz/ontologies/documentation/has_answer",le.HAS_OPTION="http://onto.fel.cvut.cz/ontologies/form/has-possible-value",le.HAS_OPTIONS_QUERY="http://onto.fel.cvut.cz/ontologies/form/has-possible-values-query",le.HAS_VALUE_TYPE="http://onto.fel.cvut.cz/ontologies/form/has-value-type",le.IS_DISABLED="http://onto.fel.cvut.cz/ontologies/aviation/form-376/is-disabled",le.INPUT_MASK="http://onto.fel.cvut.cz/ontologies/form/has-input-mask",le.LAYOUT_CLASS="http://onto.fel.cvut.cz/ontologies/form-layout/has-layout-class",le.LAYOUT={FORM:"form",QUESTION_SECTION:"section",WIZARD_STEP:"wizard-step",DATE:"date",TIME:"time",DATETIME:"datetime",TEXT:"text",TEXTAREA:"textarea",CHECKBOX:"checkbox",QUESTION_TYPEAHEAD:"type-ahead",MASKED_INPUT:"masked-input",ANSWERABLE:"answerable",SPARQL:"sparql",TURTLE:"ttl",DISABLED:"disabled",HIDDEN:"hidden",COLLAPSED:"collapsed",EMPHASISED:"emphasised",EMPHASISE_ON_RELEVANT:"emphasise-on-relevant",CATEGORY:["category-1","category-2","category-3","category-4","category-5"]},le.HAS_INITIAL_INPUT_LENGTH="http://onto.fel.cvut.cz/ontologies/form-layout/has-initial-input-length",le.VALUE_TYPE_CODE="code",le.VALUE_TYPE_TEXT="text",le.GENERATED_ROW_SIZE=1,le.HAS_QUESTION_ORIGIN="http://onto.fel.cvut.cz/ontologies/form/has-question-origin",le.HAS_ANSWER_ORIGIN="http://onto.fel.cvut.cz/ontologies/form/has-answer-origin",le.HAS_DATA_VALUE="http://onto.fel.cvut.cz/ontologies/documentation/has_data_value",le.HAS_OBJECT_VALUE="http://onto.fel.cvut.cz/ontologies/documentation/has_object_value",le.HELP_DESCRIPTION="http://purl.org/dc/elements/1.1/description",le.SOURCE="http://purl.org/dc/elements/1.1/source",le.XSD={MAX_EXCLUSIVE:"http://www.w3.org/2001/XMLSchema#maxExclusive",MAX_INCLUSIVE:"http://www.w3.org/2001/XMLSchema#maxInclusive",MIN_EXCLUSIVE:"http://www.w3.org/2001/XMLSchema#minExclusive",MIN_INCLUSIVE:"http://www.w3.org/2001/XMLSchema#minInclusive",INT:"http://www.w3.org/2001/XMLSchema#int",INTEGER:"http://www.w3.org/2001/XMLSchema#integer",NEGATIVE_INTEGER:"http://www.w3.org/2001/XMLSchema#negativeInteger",NON_NEGATIVE_INTEGER:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",NON_POSITIVE_INTEGER:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",POSITIVE_INTEGER:"http://www.w3.org/2001/XMLSchema#positiveInteger",BOOLEAN:"http://www.w3.org/2001/XMLSchema#boolean"},le.STEP="http://onto.fel.cvut.cz/ontologies/form/step",le.ACCEPTS_ANSWER_VALUE="http://onto.fel.cvut.cz/ontologies/form/accepts-answer-value",le.ACCEPTS="http://onto.fel.cvut.cz/ontologies/form/accepts",le.HAS_DATATYPE="http://onto.fel.cvut.cz/ontologies/form/has-datatype",le.HAS_LAYOUT_CLASS="http://onto.fel.cvut.cz/ontologies/form/has-layout-class",le.HAS_POSSIBLE_VALUES_QUERY="http://onto.fel.cvut.cz/ontologies/form/has-possible-values-query",le.HAS_REQUIRED_VALUE="http://onto.fel.cvut.cz/ontologies/form/has-required-value",le.HAS_TESTED_QUESTION="http://onto.fel.cvut.cz/ontologies/form/has-tested-question",le.HAS_TESTED_FORM="http://onto.fel.cvut.cz/ontologies/form/has-tested-form",le.HAS_UNIT="http://onto.fel.cvut.cz/ontologies/form/has-unit",le.HAS_VALID_ANSWER="http://onto.fel.cvut.cz/ontologies/form/has-valid-answer",le.IS_RELEVANT_IF="http://onto.fel.cvut.cz/ontologies/form/is-relevant-if",le.ACCEPTS_VALIDATION_VALUE="http://onto.fel.cvut.cz/ontologies/form/accepts-validation-value",le.HAS_VALIDATION_MESSAGE="http://onto.fel.cvut.cz/ontologies/form/has-validation-message",le.NEGATIVE_CONDITION="http://onto.fel.cvut.cz/ontologies/form/negative-condition",le.REQUIRES_ANSWER="http://onto.fel.cvut.cz/ontologies/form/requires-answer",le.REQUIRES_ANSWER_DESCRIPTION_IF="http://onto.fel.cvut.cz/ontologies/form/requires-answer-description-if",le.REQUIRES_ANSWER_IF="http://onto.fel.cvut.cz/ontologies/form/requires-answer-if",le.REQUIRES_ANSWER_VALUE="http://onto.fel.cvut.cz/ontologies/form/requires-answer-value",le.REQUIRES_DESCRIPTION="http://onto.fel.cvut.cz/ontologies/form/requires-description",le.HAS_PRECEDING_QUESTION="http://onto.fel.cvut.cz/ontologies/form/has-preceding-question",le.HAS_PRECEDING_VALUE="http://onto.fel.cvut.cz/ontologies/form/has-preceding-value",le.HAS_MEDIA_CONTENT="http://onto.fel.cvut.cz/ontologies/form/has-media-content",le.CONDITION="http://onto.fel.cvut.cz/ontologies/form/condition",le.OR_CONDITION="http://onto.fel.cvut.cz/ontologies/form/or-condition",le.HAS_SUB_CONDITION="http://onto.fel.cvut.cz/ontologies/form/has-sub-condition",le.HAS_PATTERN="http://onto.fel.cvut.cz/ontologies/form-lt/has-pattern",le.HAS_DECLARED_PREFIX="http://onto.fel.cvut.cz/ontologies/form-spin/has-declared-prefix",le.PREFIX="http://www.w3.org/ns/shacl#prefix",le.NAMESPACE="http://www.w3.org/ns/shacl#namespace",le.HAS_COMMENT="http://onto.fel.cvut.cz/ontologies/form/has-comment",le.HAS_COMMENT_VALUE="http://onto.fel.cvut.cz/ontologies/form/has-comment-value",le.HAS_AUTHOR="http://onto.fel.cvut.cz/ontologies/form/has-author",le.HAS_TIMESTAMP="http://onto.fel.cvut.cz/ontologies/form/has-timestamp",le.NOT_ANSWERED_QUESTION="http://onto.fel.cvut.cz/ontologies/form/not-answered-question",le.ANSWERED_QUESTION="http://onto.fel.cvut.cz/ontologies/form/answered-question",le.RDFS_LABEL=u.RDFS_LABEL,le.RDFS_COMMENT=u.RDFS_COMMENT,le.DEFAULT_HAS_CHILD=u.DEFAULT_HAS_CHILD,le.DEFAULT_OPTIONS={icons:[{id:(le.ICONS={QUESTION_COMMENTS:"questionComments",QUESTION_HELP:"questionHelp",QUESTION_LINK:"questionLink"}).QUESTION_HELP,behavior:(le.ICON_BEHAVIOR={ENABLE:"enable",DISABLE:"disable",ON_HOVER:"onHover"}).ENABLE},{id:le.ICONS.QUESTION_COMMENTS,behavior:le.ICON_BEHAVIOR.ON_HOVER},{id:le.ICONS.QUESTION_LINK,behavior:le.ICON_BEHAVIOR.ON_HOVER}]},le.LANG={cs:{locale:"cs",label:"Čestina"},en:{locale:"en",label:"English"}};var ue=/*#__PURE__*/function(){function e(){}return e.getStringHash=function(e){var t=0,n=e?e.length:0;if(0===n)return t;for(var o=0;o<n;o++)t=(t<<5)-t+e.charCodeAt(o),t&=t;return t},e.asArray=function(e){return e?e.constructor===Array?e:[e]:[]},e}(),ce=/*#__PURE__*/function(){function e(){}return e.putObject=function(t,n){e.objectMap[t]=n},e.getObject=function(t){return e.objectMap[t]},e}();ce.objectMap={};var pe=/*#__PURE__*/function(){function e(){}return e.getFirstObject=function(e,t){var n=l.getValues(e,t);return 0===n.length?null:n[0]},e.compareValues=function(e,t){return t="object"==typeof t?t:{"@value":t},!!((e="object"==typeof e?e:{"@value":e})&&e["@value"]&&t&&t["@value"]&&("string"==typeof e["@value"]?e["@value"]:JSON.stringify(e["@value"]))===("string"==typeof t["@value"]?t["@value"]:JSON.stringify(t["@value"])))||l.compareValues(e,t)},e.toplogicalSort=function(e,t){var n;do{n=!1;for(var o=0;o<e.length;o++)for(var r=o;r<e.length;r++)if(e[o][t]&&("object"==typeof e[o][t]?e[o][t]["@id"]:e[o][t])===e[r]["@id"]){var s=e[o];e[o]=e[r],e[r]=s,n=!0;break}}while(n);return e},e.orderPreservingToplogicalSort=function(e,t){for(var n=c(),o={},r=function(r){var s=e[r]["@id"];n.add(s),o[s]=e[r],ue.asArray(e[r][t]).map(function(e){return"object"==typeof e?e["@id"]:e}).map(function(e){return[e,s]}).forEach(function(e){return n.add(e)})},s=0;s<e.length;s++)r(s);for(var i=n.sort(),a=0;a<i.length;a++)e[a]=o[i[a]];return e},e.getCompareLocalizedLabelFunction=function(e){return function(t,n){var o=u.getLocalized(t[u.RDFS_LABEL],e),r=u.getLocalized(n[u.RDFS_LABEL],e);return o<r?-1:o>r?1:0}},e.orderByLocalizedLabels=function(t,n){return t.sort(e.getCompareLocalizedLabelFunction(n))},e.checkId=function(e,t){if(void 0!==e)return e.constructor===Array?!!e.find(function(e){return e["@id"]===t}):e.constructor===Object?e["@id"]===t:void 0},e}(),me=/*#__PURE__*/function(){function e(){}return e.isForm=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.FORM)},e.isWizardStep=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.WIZARD_STEP)},e.isSection=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.QUESTION_SECTION)},e.isAnswerable=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.ANSWERABLE)},e.isTypeahead=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.QUESTION_TYPEAHEAD)},e.getPossibleValuesQuery=function(e){return u.getJsonAttValue(e,le.HAS_OPTIONS_QUERY)},e.isDisabled=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.DISABLED)},e.isHidden=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.HIDDEN)},e.isTextarea=function(t,n){return n&&n.length>le.INPUT_LENGTH_THRESHOLD&&!e.isTypeahead(t)||u.hasValue(t,le.LAYOUT_CLASS,le.LAYOUT.TEXTAREA)},e.isText=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.TEXT)},e.isCalendar=function(t){return e.isDate(t)||e.isTime(t)||e.isDateTime(t)},e.isDate=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.DATE)},e.isTime=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.TIME)},e.isDateTime=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.DATETIME)},e.isCheckbox=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.CHECKBOX)},e.isMaskedInput=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.MASKED_INPUT)},e.isSparqlInput=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.SPARQL)},e.isTurtleInput=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.TURTLE)},e.isCollapsed=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.COLLAPSED)},e.isEmphasised=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.EMPHASISED)},e.getCategory=function(e){return le.LAYOUT.CATEGORY.find(function(t){return u.hasValue(e,le.LAYOUT_CLASS,t)})},e.resolveValue=function(e){return e?e[le.HAS_OBJECT_VALUE]?e[le.HAS_OBJECT_VALUE]["@id"]:u.getJsonAttValue(e,le.HAS_DATA_VALUE):null},e.resolveValueObject=function(e){return e?e[le.HAS_OBJECT_VALUE]?ue.asArray(e[le.HAS_OBJECT_VALUE])[0]:e[le.HAS_DATA_VALUE]?ue.asArray(e[le.HAS_DATA_VALUE])[0]:null:null},e.isRelevant=function(t){if(!t[le.IS_RELEVANT_IF])return!0;for(var n,o=oe(ue.asArray(t[le.IS_RELEVANT_IF]));!(n=o()).done;)if(!e.testCondition(n.value))return!1;return!0},e.hasValidationLogic=function(e){return!!e[le.REQUIRES_ANSWER_VALUE]||!!e[le.REQUIRES_ANSWER]||!!e[le.REQUIRES_ANSWER_IF]},e.isValid=function(e){if(!1===e[le.HAS_VALID_ANSWER])return!1;for(var t,n=oe(ue.asArray(e[le.HAS_SUBQUESTION]));!(t=n()).done;)if(!1===this.isValid(t.value))return!1;return!0},e.testOrCondition=function(e){var t=e[le.HAS_SUB_CONDITION];t||console.warn("Or condition does not have any sub-condition !");for(var n,o=oe(this._getMappedObjectsArray(t));!(n=o()).done;)if(this.testCondition(n.value))return!0;return!1},e.testCondition=function(t){var n,o=t[le.ACCEPTS_VALIDATION_VALUE],r=t[le.ACCEPTS_ANSWER_VALUE],s=t[le.ACCEPTS],i=t[le.HAS_TESTED_QUESTION];if(t[le.HAS_SUB_CONDITION])return this.testOrCondition(t);if(o&&r&&console.warn("Support for validation and requirement constraints at same time is not implemented !"),s&&i){var a=ue.asArray(s);if(1!==a.length&&console.warn("Support for multiple accepts values is not implemented !"),a[0]["@id"]===le.ANSWERED_QUESTION){(r||o)&&console.warn("Support for accepted answer/validations values is not implemented !");for(var u,c=oe(this._getMappedObjectsArray(i));!(u=c()).done;)if(!this.hasAnswer(u.value))return!1;return!0}console.warn("No support to accept question of type "+a[0]["@id"]+" !")}if(o&&i){var p=ue.asArray(o);(1!==p.length||!0!==p[0]&&"true"!==p[0])&&console.warn('Validation values other than "true" are not implemented !');for(var m,d=oe(ue.asArray(i));!(m=d()).done;){if(void 0===(n=ce.getObject(m.value["@id"])))return console.warn("Questions is not loaded in an object map."),!0;if(!1===this.isValid(n))return!1}return!0}if(r&&i){n=ce.getObject(i["@id"]);for(var h,f=oe(ue.asArray(r));!(h=f()).done;){var E=h.value;if(!n)return console.warn("Question is not defined."),!0;if(!n.hasOwnProperty(le.HAS_ANSWER))return!1;var v=l.getValues(n,le.HAS_ANSWER);if(0===v.length)return!1;var g=e.resolveValueObject(v[0]);if(g&&E&&g.hasOwnProperty("@value")&&E.hasOwnProperty("@id")&&g["@value"]==E["@id"])return!0;if(pe.compareValues(g,E))return!0}}return!1},e._getMappedObjectsArray=function(e,t){return ue.asArray(e).map(function(e){var n=ce.getObject(e["@id"]);return void 0===n?(console.warn((t||"Object")+' "'+e["@id"]+'" is not loaded in an object map.'),null):n}).filter(function(e){return null!==e})},e.hasAnswer=function(t){if(!t)return!1;if(t.hasOwnProperty(le.HAS_ANSWER)){var n=l.getValues(t,le.HAS_ANSWER);if(n.length){var o=e.resolveValueObject(n[0]);if(o&&(o["@value"]||o["@id"]))return!0}}for(var r,s=oe(ue.asArray(t[le.HAS_SUBQUESTION]));!(r=s()).done;)if(e.hasAnswer(r.value))return!0;return!1},e.resolveDateTimeFormat=function(t,n,o){return"number"==typeof n?le.DATETIME_NUMBER_FORMAT:e.isDate(t)?o.dateFormat:e.isTime(t)?o.timeFormat:o.dateTimeFormat},e}(),de={},he=[],fe=/*#__PURE__*/e.createContext({}),Ee=function(r){var s=t(r.data||de),i=s[0],a=s[1],l=t(r.formQuestions||he),u=l[0],c=l[1];o(function(){if(r.isFormValid){var e=me.isValid(i);r.isFormValid(e)}},[]),o(function(){a(r.data||de),c(r.formQuestions||he)},[r.data,r.formQuestions]);var p=function(e){e&&a(Object.assign({},i,e))},m=function(e,t){if(!(!t||e<0||e>=u.length)){var n=[].concat(u);if(n[e]=Object.assign({},n[e],t),c(n),r.isFormValid){var o=me.isValid(i);r.isFormValid(o)}}},d=function(){return i},h=function(e){return null==e?u:u[e]},f=n(function(){return{updateData:p,updateFormQuestionsData:m,getData:d,getFormQuestionsData:h}},[h,d]);/*#__PURE__*/return e.createElement(fe.Provider,Z({value:f},r),r.children)};Ee.propTypes={children:a.element.isRequired,data:a.object.isRequired,formQuestions:a.array.isRequired,isFormValid:a.func};var ve=/*#__PURE__*/function(t){function n(e){var n;return(n=t.call(this,e)||this).state={cursorPosition:0},n}$(n,t);var o=n.prototype;return o.focus=function(){p.findDOMNode(this.input).focus()},o.getInputDOMNode=function(){return p.findDOMNode(this.input)},o.componentDidUpdate=function(e,t,n){(this.fieldDidShrink(e)||this.fieldDidExpand(e))&&this.updateFieldCursorPosition()},o.fieldDidExpand=function(e){return"textarea"===this.props.type&&"textarea"!==e.type},o.fieldDidShrink=function(e){return"text"===this.props.type&&"text"!==e.type},o.updateFieldCursorPosition=function(){this.focus(),this.getInputDOMNode().setSelectionRange(this.state.cursorPosition,this.state.cursorPosition)},o.saveCursorPosition=function(e){this.props.onChange(e),this.setState({cursorPosition:e.target.selectionStart})},o.render=function(){switch(this.props.type){case"radio":return this._renderRadio();case"checkbox":return this._renderCheckbox();case"select":return this._renderSelect();case"textarea":return this._renderTextArea();default:return this._renderInput()}},o._renderCheckbox=function(){var t=this;/*#__PURE__*/return e.createElement(m.Group,{size:"small",controlId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)},/*#__PURE__*/e.createElement(m.Check,Z({type:"checkbox",ref:function(e){return t.input=e}},this.props,{label:this.props.label})))},o._renderRadio=function(){var t=this;/*#__PURE__*/return e.createElement(d,{size:"small"},/*#__PURE__*/e.createElement(m.Check,Z({type:"radio",ref:function(e){return t.input=e}},this.props,{label:this.props.label})))},o._renderSelect=function(){var t=this;/*#__PURE__*/return e.createElement(d,{size:"small"},this._renderLabel(),/*#__PURE__*/e.createElement(h,Z({as:"select",ref:function(e){return t.input=e}},this.props),this.props.children),this.props.validation&&/*#__PURE__*/e.createElement(h.Feedback,null),this._renderHelp())},o._renderLabel=function(){return this.props.label?/*#__PURE__*/e.createElement(m.Label,null,this.props.label):null},o._renderTextArea=function(){var t=this;/*#__PURE__*/return e.createElement(d,{size:"small"},this._renderLabel(),/*#__PURE__*/e.createElement(h,Z({ref:function(e){return t.input=e},as:"textarea"},this.props,{onChange:function(e){return t.saveCursorPosition(e)}})),this.props.validation&&/*#__PURE__*/e.createElement(h.Feedback,null),this._renderHelp())},o._renderHelp=function(){return this.props.help?/*#__PURE__*/e.createElement(f,null,this.props.help):null},o._renderInput=function(){var t=this;/*#__PURE__*/return e.createElement(d,{size:"small"},this._renderLabel(),/*#__PURE__*/e.createElement(h,Z({ref:function(e){return t.input=e},as:"input"},this.props,{onChange:function(e){return t.saveCursorPosition(e)}})),this.props.validation&&/*#__PURE__*/e.createElement(h.Feedback,null),this._renderHelp())},n}(e.Component);ve.propTypes={type:a.string,label:a.object,value:a.any,onChange:a.func,help:a.string,validation:a.oneOf(["success","warning","error"])},ve.defaultProps={type:"text"};var ge=["children"],Se=/*#__PURE__*/e.createContext({}),Ae={components:{inputComponent:ve},componentsOptions:{dateTimeAnswer:{dateFormat:"yyyy-MM-dd",timeFormat:"HH:mm:ss",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},readOnly:!1},options:{intl:{locale:"en"},i18n:{"wizard.next":"Next","wizard.previous":"Previous","section.collapse":"Collapse","section.expand":"Expand"},modalView:!1,modalProps:{},horizontalWizardNav:!0,wizardStepButtons:!0,enableForwardSkip:!1,startingStep:0}},_e=function(t){var o=t.children,r=te(t,ge),s=n(function(){return{inputComponent:r.components&&r.components.inputComponent||Ae.components.inputComponent,componentsOptions:Object.assign({},Ae.componentsOptions,r.componentsOptions),options:Object.assign({},Ae.options,r.options),mapComponent:r.mapComponent}},[r]);/*#__PURE__*/return e.createElement(Se.Provider,{value:s},o)};_e.propTypes={children:a.element.isRequired,components:a.object,mapComponent:a.func,options:a.object};var Ce,Te={"@graph":[{"@type":"http://onto.fel.cvut.cz/ontologies/documentation/question","http://onto.fel.cvut.cz/ontologies/form-layout/has-layout-class":"form","http://onto.fel.cvut.cz/ontologies/documentation/has_related_question":[{"http://onto.fel.cvut.cz/ontologies/form-layout/has-layout-class":["wizard-step","section"],"http://www.w3.org/2000/01/rdf-schema#label":[{"@language":"en","@value":"Description"},{"@language":"cs","@value":"Popis"}],"http://onto.fel.cvut.cz/ontologies/documentation/has_related_question":[{"@type":"http://onto.fel.cvut.cz/ontologies/documentation/question","http://onto.fel.cvut.cz/ontologies/form-layout/has-layout-class":["textarea"],"http://www.w3.org/2000/01/rdf-schema#label":[{"@language":"en","@value":"Description"},{"@language":"cs","@value":"Popis"}],"http://onto.fel.cvut.cz/ontologies/documentation/has_answer":{"@type":"http://onto.fel.cvut.cz/ontologies/documentation/answer","http://onto.fel.cvut.cz/ontologies/documentation/has_data_value":""}}]}]}]},Ne=/*#__PURE__*/function(){function e(){}return e.generateForm=function(){return JSON.parse(JSON.stringify(Te))},e}(),Oe={root:(Ce={},Ce[le.HAS_LAYOUT_CLASS]=le.FORM,Ce),expandProperties:[le.HAS_SUBQUESTION,le.IS_RELEVANT_IF,le.HAS_ANSWER,le.HAS_DECLARED_PREFIX,le.HAS_OPTION,le.HAS_COMMENT]},Ie=/*#__PURE__*/function(){function e(){}return e.customFrame=function(e,t,n){if(arguments.length<2)return l.nextTick(function(){n(new TypeError("Could not frame, too few arguments."))});null===t&&(t=Oe);var o=function(e,t){};l.flatten(e,null,null,o)},e.expandStructure=function(e){var t,n={};e["@graph"].forEach(function(e){n[e["@id"]]=e,me.isForm(e)&&(t=e)});try{this._expandGraph(t,Oe,n)}catch(e){console.error("Error '"+e+"' occured, while trying to apply frame-ing with custom shape.")}return n},e._expandGraph=function(e,t,n){var o,r,s,i=this;t.expandProperties.forEach(function(a){if(e.hasOwnProperty(a)){e[a]=ue.asArray(e[a]),o=e[a];for(var l=0;l<o.length;l++)s=i._getId(o[l]),void 0!==(r=n[s])?(o[l]=r,i._expandGraph(r,t,n)):console.warn("object with @id "+s+" was not defined in input data.")}})},e._getId=function(e){return"string"==typeof e?e:e["@id"]},e}();Ie.compressStructure=function(e){var t=[],n=new Set;return(t=Ie._compressGraph(e,t,n)).sort(function(e,t){return e["@id"]&&t["@id"]?e["@id"].localeCompare(t["@id"]):0})},Ie._compressGraph=function(e,t,n){return n.has(e["@id"])||(t.push(e),n.add(e["@id"])),Oe.expandProperties.forEach(function(o){if(e.hasOwnProperty(o))for(var r=e[o],s=0;s<r.length;s++){var i=r[s];void 0!==i&&(r[s]=i,t=Ie._compressGraph(i,t,n),e[o][s]={"@id":i["@id"]})}}),t};var we=/*#__PURE__*/function(){function e(){}return e.constructDefaultForm=function(t){var n=Ne.generateForm();return e._constructFormQuestions(n,t)},e.constructForm=function(t,n){return new Promise(function(o){return l.flatten(t,{},null,function(t,r){var s,i;t&&re.error(t);try{var a=e._constructFormQuestions(r,n);i=a[1],s={formQuestions:a[0]}}catch(t){var l=e.constructDefaultForm(n);i=l[1],s={formQuestions:l[0]}}return o([s,i])})})},e._constructFormQuestions=function(e,t){var n,o,r,s=[];if(void 0!==e["@graph"][0]["@id"]?(r=Ie.expandStructure(e),Object.keys(r).map(function(e){ce.putObject(e,r[e])})):console.warn("default form is constructed."),!(o=(n=e["@graph"].find(function(e){return me.isForm(e)}))[le.HAS_SUBQUESTION]))throw re.error("Could not find any questions in the received data."),"No questions in the form";return(s=o.filter(function(e){return!(!me.isWizardStep(e)||me.isHidden(e))||(re.warn("Item is not a wizard step: "+e),!1)})).length||(re.log("Could not find any wizard steps in the received data. Building form without steps"),n[le.HAS_SUBQUESTION].forEach(function(e){return s.push(e)})),s.sort(pe.getCompareLocalizedLabelFunction(t)),pe.orderPreservingToplogicalSort(s,le.HAS_PRECEDING_QUESTION),[s,{root:n}]},e}(),ye=/*#__PURE__*/function(){function e(){}return e.buildQuestionAnswerModel=function(t,n){var o,r={subQuestions:[]};if(t&&(r.uri=t.root["@id"],r.origin=u.getJsonAttValue(t.root,le.HAS_QUESTION_ORIGIN,"@id")),n)for(var s=0;s<n.length;s++)(o=e.processQuestionAnswerHierarchy(n[s]))&&r.subQuestions.push(o);return r},e.processQuestionAnswerHierarchy=function(t){return t?e._processQuestion(t):null},e._processQuestion=function(t){var n={};if(n.uri=t["@id"],n.origin=u.getJsonAttValue(t,le.HAS_QUESTION_ORIGIN,"@id"),t[le.HAS_SUBQUESTION]){n.subQuestions=[];for(var o=0;o<t[le.HAS_SUBQUESTION].length;o++)n.subQuestions.push(e._processQuestion(t[le.HAS_SUBQUESTION][o]))}if(t[le.HAS_ANSWER]){n.answers=[],Array.isArray(t[le.HAS_ANSWER])||(t[le.HAS_ANSWER]=[t[le.HAS_ANSWER]]);for(var r=0;r<t[le.HAS_ANSWER].length;r++)n.answers.push(e.processAnswer(t[le.HAS_ANSWER][r]))}if(t[le.HAS_COMMENT]){n.comments=[],Array.isArray(t[le.HAS_COMMENT])||(t[le.HAS_COMMENT]=[t[le.HAS_COMMENT]]);for(var s=0;s<t[le.HAS_COMMENT].length;s++)n.comments.push(e.processComment(t[le.HAS_COMMENT][s]))}return n},e.processComment=function(e){var t={};return t.author=u.getJsonAttValue(e,le.HAS_AUTHOR,"@id"),t.value=u.getJsonAttValue(e,le.HAS_COMMENT_VALUE),t.timestamp=u.getJsonAttValue(e,le.HAS_TIMESTAMP,"@id"),t},e.processAnswer=function(e){var t={};return t.uri=e["@id"],t.origin=u.getJsonAttValue(e,le.HAS_ANSWER_ORIGIN,"@id"),e[le.HAS_OBJECT_VALUE]?t.codeValue=u.getJsonAttValue(e,le.HAS_OBJECT_VALUE,"@id"):t.textValue=u.getJsonAttValue(e,le.HAS_DATA_VALUE),t},e.generateAnswer=function(e){var t={};return t[le.HAS_DATA_VALUE]="",t},e}(),be=/*#__PURE__*/function(){function e(){}return e.resolveValidationProperties=function(e){var t={};return!1===e[le.HAS_VALID_ANSWER]&&(t.validation="error",t.help=e[le.HAS_VALIDATION_MESSAGE]),t},e}(),Le=function(t){var n=r(Se),o=n.componentsOptions,s=t.question;/*#__PURE__*/return e.createElement(n.inputComponent,Object.assign({},be.resolveValidationProperties(s),{type:"checkbox",label:t.label,title:t.title,checked:!0===t.value||"true"===t.value,onChange:function(e){t.onChange(e.target.checked)},disabled:o.readOnly||me.isDisabled(s)}))};Le.propTypes={question:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.oneOfType([a.string,a.bool]),onChange:a.func.isRequired,mouseHover:a.bool};var Re=function(t){var n,o=r(Se).componentsOptions,s=me.resolveDateTimeFormat(t.question,t.value,o.dateTimeAnswer),i=me.isDate(t.question),a=me.isTime(t.question);n=a&&t.value?new Date("0 "+t.value):t.value?new Date(t.value):null;var l="x"===s?o.dateTimeAnswer.dateTimeFormat:s;/*#__PURE__*/return e.createElement(d,{size:"small"},/*#__PURE__*/e.createElement(m.Label,{className:"w-100"},t.label),/*#__PURE__*/e.createElement(x,{selected:n,placeholderText:l.toUpperCase(),onChange:function(e){t.onChange(s===le.DATETIME_NUMBER_FORMAT?Number(e):D(e,s))},showTimeSelect:!i,showTimeSelectOnly:a,timeFormat:"HH:mm",timeIntervals:1,timeCaption:"Time",dateFormat:l,className:"form-control",disabled:o.readOnly||me.isDisabled(t.question)}))};Re.propTypes={question:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.oneOfType([a.string,a.number]),onChange:a.func.isRequired};var He=[le.XSD.INT,le.XSD.INTEGER,le.XSD.NON_NEGATIVE_INTEGER,le.XSD.NON_POSITIVE_INTEGER,le.XSD.NEGATIVE_INTEGER,le.XSD.POSITIVE_INTEGER],xe={};xe[le.XSD.NON_NEGATIVE_INTEGER]={min:0},xe[le.XSD.NON_POSITIVE_INTEGER]={max:0},xe[le.XSD.NEGATIVE_INTEGER]={max:-1},xe[le.XSD.POSITIVE_INTEGER]={min:1};var De={"string-2":"prefixed",atom:"var"},Ve=/*#__PURE__*/function(){function e(){}return e._resolveInputType=function(t,n){return me.isSparqlInput(t)||me.isTurtleInput(t)||me.isTextarea(t,n)?"textarea":e._isNumeric(t)?"number":"text"},e._isNumeric=function(e){for(var t=0,n=He.length;t<n;t++)if(u.hasValue(e,le.HAS_DATATYPE,He[t]))return!0;return!1},e.resolveInputProperties=function(t,n,o){var r={};switch(r.type=e._resolveInputType(t,n),r.type){case"textarea":r.rows=5;break;case"number":r=Object.assign({},r,e._resolveNumberRestrictions(t),this._resolveStepRestriction(t))}return r.disabled=o.readOnly||me.isDisabled(t),!1===t[le.HAS_VALID_ANSWER]&&(r.validation="error",r.help=t[le.HAS_VALIDATION_MESSAGE]),r},e._resolveStepRestriction=function(e){var t={};return void 0!==e[le.STEP]&&(t.step=u.getJsonAttValue(e,le.STEP)),t},e._resolveNumberRestrictions=function(e){var t={};return Object.getOwnPropertyNames(xe).forEach(function(n){u.hasValue(e,le.HAS_DATATYPE,n)&&(t=Object.assign({},t,xe[n]))}),void 0!==e[le.XSD.MIN_INCLUSIVE]&&(t.min=e[le.XSD.MIN_INCLUSIVE]),void 0!==e[le.XSD.MIN_EXCLUSIVE]&&(t.min=e[le.XSD.MIN_EXCLUSIVE]+1),void 0!==e[le.XSD.MAX_EXCLUSIVE]&&(t.max=e[le.XSD.MAX_EXCLUSIVE]-1),void 0!==e[le.XSD.MAX_INCLUSIVE]&&(t.max=e[le.XSD.MAX_INCLUSIVE]),t},e}(),Ue=function(t){var n=r(Se),o=n.inputComponent,s=n.componentsOptions,i=t.question,a=t.answer,l=t.value;return a[le.HAS_OBJECT_VALUE]&&a[le.HAS_OBJECT_VALUE][u.RDFS_LABEL]&&(l=u.getJsonAttValue(a[le.HAS_OBJECT_VALUE],u.RDFS_LABEL)),/*#__PURE__*/e.createElement(o,Object.assign({},Ve.resolveInputProperties(i,l,s),{label:t.label,title:t.title,value:null==l?"":l,onChange:function(e){t.onChange(e.target.value),(t.sparql||t.turtle)&&(void 0).hide()},onFocus:function(e){if(t.sparql){var n=V.fromTextArea(e.target);n.setValue(l),n.on("change",function(){t.onChange(n.getValue())}),V.Autocompleters.prefixes.appendPrefixIfNeeded=function(e,n){if(e.autocompleters.getTrie(n)&&e.options.autocompleters&&-1!==e.options.autocompleters.indexOf(n)){var o=e.getCursor(),r=e.getTokenAt(o);if("prefixed"===De[r.type]){var s=r.string.indexOf(":");if(-1!==s){var i=e.getPreviousNonWsToken(o.line,r).string.toUpperCase(),a=e.getTokenAt({line:o.line,ch:r.start});if("PREFIX"!==i&&("ws"===a.type||null==a.type)){var l=r.string.substring(0,s+1);if(null==e.getPrefixesFromQuery()[l.slice(0,-1)])if(t.question[le.HAS_DECLARED_PREFIX]&&t.question[le.HAS_DECLARED_PREFIX].filter(function(e){return e[le.PREFIX]===l.slice(0,-1)}).length){var u=t.question[le.HAS_DECLARED_PREFIX].filter(function(e){return e[le.PREFIX]===l.slice(0,-1)}),c={};c[u[0][le.PREFIX]]=u[0][le.NAMESPACE],e.addPrefixes(c)}else{var p=e.autocompleters.getTrie(n).autoComplete(l);p.length>0&&e.addPrefixes(p[0])}}}}}}}else if(t.turtle){console.log("TTL");var o=V.fromTextArea(e.target);o.setValue(l),o.on("change",function(){t.onChange(o.getValue())})}}}))};Ue.propTypes={question:a.object.isRequired,answer:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.oneOfType([a.string,a.number]),onChange:a.func.isRequired};var je={D:"1",M:"1",Y:"1",h:"1",m:"1",s:"1"},Me=/*#__PURE__*/function(){function e(){}return e.mapMask=function(e){if(!e)return e;for(var t,n="",o=0,r=e.length;o<r;o++)t=e.charAt(o),n+=je[t]?je[t]:t;return n},e}(),Pe=["size","placeholder"];function qe(e){var t,n,o,r;if(void 0!==e.selectionStart)t=e.selectionStart,n=e.selectionEnd;else try{e.focus(),r=(o=e.createTextRange()).duplicate(),o.moveToBookmark(document.selection.createRange().getBookmark()),r.setEndPoint("EndToStart",o),n=(t=r.text.length)+o.text.length}catch(e){}return{start:t,end:n}}var Qe=/*#__PURE__*/function(t){function n(e){var n;return(n=t.call(this,e)||this)._updatePattern=function(e){n.mask.setPattern(Me.mapMask(e.mask),{value:n.mask.getRawValue(),selection:qe(n.input)})},n._updateMaskSelection=function(){n.mask.selection=qe(n.input)},n._updateInputSelection=function(){!function(e,t){var n;try{void 0!==e.selectionStart?(e.focus(),e.setSelectionRange(t.start,t.end)):(e.focus(),(n=e.createTextRange()).collapse(!0),n.moveStart("character",t.start),n.moveEnd("character",t.end-t.start),n.select())}catch(e){}}(n.input,n.mask.selection)},n._onChange=function(e){var t=n.mask.getValue();if(e.target.value!==t){if(e.target.value.length<t.length){var o=t.length-e.target.value.length;n._updateMaskSelection(),n.mask.selection.end=n.mask.selection.start+o,n.mask.backspace()}var r=n._getDisplayValue();e.target.value=r,r&&n._updateInputSelection()}n.props.onChange&&n.props.onChange(e)},n._onKeyDown=function(e){if(function(e){return e.ctrlKey&&90===e.keyCode}(e))e.preventDefault(),n.mask.undo()&&(e.target.value=n._getDisplayValue(),n._updateInputSelection(),n.props.onChange&&n.props.onChange(e));else if(function(e){return e.ctrlKey&&89===e.keyCode}(e))e.preventDefault(),n.mask.redo()&&(e.target.value=n._getDisplayValue(),n._updateInputSelection(),n.props.onChange&&n.props.onChange(e));else if("Backspace"===e.key&&(e.preventDefault(),n._updateMaskSelection(),n.mask.backspace())){var t=n._getDisplayValue();e.target.value=t,t&&n._updateInputSelection(),n.props.onChange&&n.props.onChange(e)}},n._onKeyPress=function(e){e.metaKey||e.altKey||e.ctrlKey||"Enter"===e.key||(e.preventDefault(),n._updateMaskSelection(),n.mask.input(e.key)&&(e.target.value=n.mask.getValue(),n._updateInputSelection(),n.props.onChange&&n.props.onChange(e)))},n._onPaste=function(e){e.preventDefault(),n._updateMaskSelection(),n.mask.paste(e.clipboardData.getData("Text"))&&(e.target.value=n.mask.getValue(),setTimeout(n._updateInputSelection,0),n.props.onChange&&n.props.onChange(e))},n.mask=new U({pattern:Me.mapMask(e.mask),value:e.value,formatCharacters:e.formatCharacters,placeholderChar:e.placeholderChar||"_"}),n}$(n,t);var o=n.prototype;return o.componentDidUpdate=function(e){e.mask!==this.props.mask&&this._updatePattern(this.props),e.mask!==this.props.mask&&e.value!==this.props.mask?this.mask.getValue()===this.mask.emptyValue?this.mask.setPattern(Me.mapMask(this.props.mask),{value:this.props.value}):this.mask.setPattern(Me.mapMask(this.props.mask),{value:this.mask.getRawValue()}):e.mask!==this.props.mask?this.mask.setPattern(Me.mapMask(this.props.mask),{value:this.mask.getRawValue()}):e.value!==this.props.value&&this.mask.setValue(this.props.value),e.mask!==this.props.mask&&this.mask.selection.start&&this._updateInputSelection()},o._getDisplayValue=function(){var e=this.mask.getValue();return e===this.mask.emptyValue?"":e},o.focus=function(){this.input.focus()},o.blur=function(){this.input.blur()},o.render=function(){var t=this,n=this.props,o=n.size,r=n.placeholder,s=te(n,Pe),i=this.mask.pattern.length;/*#__PURE__*/return e.createElement(this.context.inputComponent,Object.assign({},s,{ref:function(e){e&&(t.input=e.input?p.findDOMNode(e.input):e)},maxLength:i,onChange:this._onChange,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onPaste:this._onPaste,placeholder:r||this.mask.emptyValue,size:o||i,value:this._getDisplayValue(),type:"text"}))},n}(e.Component);Qe.contextType=Se,Qe.propTypes={mask:a.string.isRequired},Qe.defaultProps={value:""};var ke=function(t){var n=r(Se).componentsOptions,o=t.question,s=t.value,i=u.getJsonAttValue(o,le.INPUT_MASK);return i?/*#__PURE__*/e.createElement(Qe,{mask:i,value:s,label:t.label,title:t.title,placeholder:i,onChange:function(e){return t.onChange(e.target.value)},disabled:n.readOnly||me.isDisabled(o)}):(re.warn("Input mask not provided. Falling back to regular input."),/*#__PURE__*/e.createElement(Ue,t))};ke.propTypes={question:a.object.isRequired,answer:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.oneOfType([a.string,a.number]),onChange:a.func.isRequired};var ze=/*#__PURE__*/function(t){function n(){return t.apply(this,arguments)||this}$(n,t);var o=n.prototype;return o._generateSelectOptions=function(t){var n=[];t.sort(function(e,t){var n=u.getJsonAttValue(e,le.RDFS_LABEL),o=u.getJsonAttValue(t,le.RDFS_LABEL);return n<o?-1:n>o?1:0});for(var o=0;o<t.length;o++)n.push(/*#__PURE__*/e.createElement("option",{value:u.getJsonAttValue(t[o],le.RDFS_LABEL),key:"opt-"+o},u.getJsonAttValue(t[o],le.RDFS_LABEL)));return n},o.render=function(){var t=this,n=this.props.question;/*#__PURE__*/return e.createElement(this.context.inputComponent,{type:"select",label:this.props.label,value:this.props.value,title:this.props.title,onChange:function(e){t.props.onChange(e.target.value)},disabled:this.context.componentsOptions.readOnly||me.isDisabled(n)},this._generateSelectOptions(n[le.HAS_OPTION]))},n}(e.Component);ze.contextType=Se,ze.propTypes={question:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.string,onChange:a.func.isRequired};var Fe=function(t){var n=t.options,o=t.children,r=t.maxHeight,s=(0,t.getValue)(),i=s&&s[0]?40*n.indexOf(s[0]):0;/*#__PURE__*/return e.createElement(P,{height:r,itemCount:o.length,itemSize:40,initialScrollOffset:i,width:""},function(t){/*#__PURE__*/return e.createElement("div",{className:"option-wrapper",style:t.style},o[t.index])})},Be=function(e,t){return e?(e.sort(pe.getCompareLocalizedLabelFunction(t)),pe.orderPreservingToplogicalSort(e,le.HAS_PRECEDING_VALUE),u.processTypeaheadOptions(e,t)):[]},We=function(n){var s=ue.getStringHash(me.getPossibleValuesQuery(n.question)),i=r(ie),a=r(Se),l=a.options.intl,u=t(!0),c=u[0],p=u[1],h=t(Be(n.options,l)),f=h[0],E=h[1];o(function(){var e=!1,t=n.question;return!t[le.HAS_OPTION]&&me.getPossibleValuesQuery(t)?function(){try{var n=function(n,o){try{var r=Promise.resolve(i.loadFormOptions(s,me.getPossibleValuesQuery(t))).then(function(t){e||(p(!1),E(Be(t,l)))})}catch(e){return o()}return r&&r.then?r.then(void 0,o):r}(0,function(){re.error("An error has occurred during loadFormOptions for query hash: "+s)});Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}():(p(!1),E(Be(t[le.HAS_OPTION],l))),function(){e=!0}},[]),o(function(){E(Be(n.question[le.HAS_OPTION],l))},[l]);var v=M.Option;/*#__PURE__*/return e.createElement(d,{size:"small"},/*#__PURE__*/e.createElement(m.Label,null,n.label),/*#__PURE__*/e.createElement(j,{options:f,isSearchable:!0,isLoading:c,isClearable:!0,isDisabled:c||a.componentsOptions.readOnly||me.isDisabled(n.question),value:f.filter(function(e){return e.id===n.value}),placeholder:"",getOptionLabel:function(e){return e.name},getOptionValue:function(e){return e.id},onChange:function(e){n.onChange(e?e.id:null)},components:{MenuList:Fe,Option:function(t){var n=Object.assign({},t.innerProps,{title:t.data.description});/*#__PURE__*/return e.createElement(v,Z({},t,{title:t.data.description,innerProps:n}))}}}))};We.propTypes={question:a.object.isRequired,answer:a.object.isRequired,label:a.object.isRequired,title:a.string,value:a.string,onChange:a.func.isRequired};var Xe=function(t){/*#__PURE__*/return e.createElement("svg",{className:"caret-square-up",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"28",viewBox:"0 0 24 28"},/*#__PURE__*/e.createElement("title",null,t.title||""),/*#__PURE__*/e.createElement("path",{d:"M17.891 17.453c-0.172 0.344-0.516 0.547-0.891 0.547h-10c-0.375 0-0.719-0.203-0.891-0.547-0.172-0.328-0.141-0.734 0.078-1.031l5-7c0.187-0.266 0.484-0.422 0.812-0.422s0.625 0.156 0.812 0.422l5 7c0.219 0.297 0.25 0.703 0.078 1.031zM20 21.5v-15c0-0.266-0.234-0.5-0.5-0.5h-15c-0.266 0-0.5 0.234-0.5 0.5v15c0 0.266 0.234 0.5 0.5 0.5h15c0.266 0 0.5-0.234 0.5-0.5zM24 6.5v15c0 2.484-2.016 4.5-4.5 4.5h-15c-2.484 0-4.5-2.016-4.5-4.5v-15c0-2.484 2.016-4.5 4.5-4.5h15c2.484 0 4.5 2.016 4.5 4.5z"}))},Ge=function(t){/*#__PURE__*/return e.createElement("svg",{className:"caret-square-down",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"28",viewBox:"0 0 24 28"},/*#__PURE__*/e.createElement("title",null,t.title||""),/*#__PURE__*/e.createElement("path",{d:"M17.891 10.547c0.172 0.328 0.141 0.734-0.078 1.031l-5 7c-0.187 0.266-0.484 0.422-0.812 0.422s-0.625-0.156-0.812-0.422l-5-7c-0.219-0.297-0.25-0.703-0.078-1.031 0.172-0.344 0.516-0.547 0.891-0.547h10c0.375 0 0.719 0.203 0.891 0.547zM20 21.5v-15c0-0.266-0.234-0.5-0.5-0.5h-15c-0.266 0-0.5 0.234-0.5 0.5v15c0 0.266 0.234 0.5 0.5 0.5h15c0.266 0 0.5-0.234 0.5-0.5zM24 6.5v15c0 2.484-2.016 4.5-4.5 4.5h-15c-2.484 0-4.5-2.016-4.5-4.5v-15c0-2.484 2.016-4.5 4.5-4.5h15c2.484 0 4.5 2.016 4.5 4.5z"}))},Ye=function(){/*#__PURE__*/return e.createElement("svg",{className:"info-circle",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"28",viewBox:"0 0 24 28"},/*#__PURE__*/e.createElement("title",null,"info-circle"),/*#__PURE__*/e.createElement("path",{d:"M16 21.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-1.5v-8c0-0.281-0.219-0.5-0.5-0.5h-5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h1.5v5h-1.5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h7c0.281 0 0.5-0.219 0.5-0.5zM14 7.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"}))},Je=function(){/*#__PURE__*/return e.createElement("svg",{className:"question-circle",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"28",viewBox:"0 0 24 28"},/*#__PURE__*/e.createElement("path",{d:"M14 21.5v-3c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v3c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM18 11c0-2.859-3-5-5.688-5-2.547 0-4.453 1.094-5.797 3.328-0.141 0.219-0.078 0.5 0.125 0.656l2.063 1.563c0.078 0.063 0.187 0.094 0.297 0.094 0.141 0 0.297-0.063 0.391-0.187 0.734-0.938 1.047-1.219 1.344-1.437 0.266-0.187 0.781-0.375 1.344-0.375 1 0 1.922 0.641 1.922 1.328 0 0.812-0.422 1.219-1.375 1.656-1.109 0.5-2.625 1.797-2.625 3.313v0.562c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5v0c0-0.359 0.453-1.125 1.188-1.547 1.188-0.672 2.812-1.578 2.812-3.953zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"}))},Ke=function(n){var o=t("right"),r=o[0],s=o[1];/*#__PURE__*/return e.createElement("span",{ref:function(e){return function(e){e&&(e.getBoundingClientRect().x>window.innerWidth/2?s("left"):s("right"))}(e)}},/*#__PURE__*/e.createElement(E,{overlay:/*#__PURE__*/e.createElement(v,{className:"tooltip-content",id:n.id},n.tooltipContent),placement:n.overlayPlacement||r},/*#__PURE__*/e.createElement("span",null,n.children)))};Ke.propTypes={tooltipContent:a.oneOfType([a.object.isRequired,a.string.isRequired]),id:a.string.isRequired,overlayPlacement:a.string,absolutePosition:a.bool},Ke.defaultProps={iconClassContainer:"",iconClass:"",absolutePosition:!0};var Ze=function(n){var o=t("right"),r=o[1];/*#__PURE__*/return e.createElement("div",{ref:function(e){return function(e){e&&(e.getBoundingClientRect().x>window.innerWidth/2?r("left"):r("right"))}(e)}},/*#__PURE__*/e.createElement(Ke,{id:"help-icon-tooltip-",overlayPlacement:n.overlayPlacement||o[0],absolutePosition:n.absolutePosition,tooltipContent:n.text},/*#__PURE__*/e.createElement(Je,{className:n.iconClass})))};Ze.propTypes={text:a.string.isRequired,iconClassContainer:a.string,iconClass:a.string,overlayPlacement:a.string,absolutePosition:a.bool},Ze.defaultProps={iconClassContainer:"",iconClass:"",absolutePosition:!0};var $e=function(){/*#__PURE__*/return e.createElement("svg",{className:"external-link-icon",width:"24",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/e.createElement("path",{d:"M5,2 C5.55228,2 6,2.44772 6,3 C6,3.55228 5.55228,4 5,4 L4,4 L4,12 L12,12 L12,11 C12,10.4477 12.4477,10 13,10 C13.5523,10 14,10.4477 14,11 L14,12 C14,13.1046 13.1046,14 12,14 L4,14 C2.89543,14 2,13.1046 2,12 L2,4 C2,2.89543 2.89543,2 4,2 L5,2 Z M15,1 L15,5.99814453 C15,6.55043453 14.5523,6.99814453 14,6.99814453 C13.4477,6.99814453 13,6.55043453 13,5.99814453 L13,4.41419 L8.71571,8.69846 C8.32519,9.08899 7.69202,9.08899 7.3015,8.69846 C6.91097,8.30794 6.91097,7.67477 7.3015,7.28425 L11.5858,3 L9.99619141,3 C9.44391141,3 8.99619141,2.55228 8.99619141,2 C8.99619141,1.44772 9.44391141,1 9.99619141,1 L15,1 Z"}))},et=function(t){return t.showOverlay?/*#__PURE__*/e.createElement(Ke,{tooltipContent:t.url["@id"]||t.url,id:"url-tooltip",overlayPlacement:t.overlayPlacement},/*#__PURE__*/e.createElement("a",{href:t.url["@id"]||t.url,target:"_blank",className:t.iconClassContainer},/*#__PURE__*/e.createElement($e,{className:t.iconClass}))):/*#__PURE__*/e.createElement("a",{href:t.url["@id"]||t.url,target:"_blank",className:t.iconClassContainer},/*#__PURE__*/e.createElement($e,{className:t.iconClass}))};et.propTypes={url:a.oneOfType([a.string.isRequired,a.object.isRequired]),iconClassContainer:a.string,iconClass:a.string,overlayPlacement:a.string,absolutePosition:a.bool,showOverlay:a.bool},et.defaultProps={iconClassContainer:"",iconClass:"",absolutePosition:!0,showOverlay:!0};var tt=function(){/*#__PURE__*/return e.createElement("svg",{className:"question-comment",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",width:"24",height:"28"},/*#__PURE__*/e.createElement("path",{d:"M30,1.5c-16.542,0-30,12.112-30,27c0,5.204,1.646,10.245,4.768,14.604c-0.591,6.537-2.175,11.39-4.475,13.689 c-0.304,0.304-0.38,0.769-0.188,1.153C0.275,58.289,0.625,58.5,1,58.5c0.046,0,0.092-0.003,0.139-0.01 c0.405-0.057,9.813-1.411,16.618-5.339C21.621,54.71,25.737,55.5,30,55.5c16.542,0,30-12.112,30-27S46.542,1.5,30,1.5z M16,32.5 c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S18.206,32.5,16,32.5z M30,32.5c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4 S32.206,32.5,30,32.5z M44,32.5c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S46.206,32.5,44,32.5z"}))},nt=function(){/*#__PURE__*/return e.createElement("svg",{className:"recycle-bin-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",height:"15px",width:"15px",viewBox:"0 0 512 512"},/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("path",{d:"M331.636,69.818V0H180.364v69.818h-128v128h34.909V512h337.455V197.818h34.909v-128H331.636z M215.273,34.909h81.455\nv34.909h-81.455V34.909z M389.818,477.091H122.182V197.818h267.636V477.091z M424.727,162.909H87.273v-58.182h337.455V162.909z"}))),/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("rect",{x:"168.727",y:"256",width:"34.909",height:"162.909"}))),/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("rect",{x:"308.364",y:"256",width:"34.909",height:"162.909"}))),/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("g",null,/*#__PURE__*/e.createElement("rect",{x:"238.545",y:"256",width:"34.909",height:"162.909"}))))},ot=function(n){var o=r(Se).options,s=t(!1),i=s[0],a=s[1],l=t(!1),u=l[0],c=l[1];k.addLocale(F),k.addLocale(z),k.setDefaultLocale(le.LANG.en.locale);var p,m=new k(o.intl.locale),d=function(){if(o&&o.users){var e=o.users.find(function(e){return e.id===o.currentUser});if(n.author)return e.label?e.label:h()}return"Unknown author"},h=function(){return n.author["@id"].replace(/.*[#\/]/,"... ")},f=function(){a(!i)};/*#__PURE__*/return e.createElement("div",{className:"comment-content",onMouseEnter:function(){c(!0)},onMouseLeave:function(){c(!1)}},/*#__PURE__*/e.createElement("div",{className:"row"},/*#__PURE__*/e.createElement("div",{className:"col-auto comment-author",onMouseEnter:f,onMouseLeave:f},/*#__PURE__*/e.createElement(e.Fragment,null,i?/*#__PURE__*/e.createElement(e.Fragment,null,d(),/*#__PURE__*/e.createElement(et,{iconClassContainer:"emphasise-on-relevant-icon",url:n.author?Object.values(n.author).toString():"Unknown author"})):d())),/*#__PURE__*/e.createElement("div",{className:"col-auto text-muted comment-timestamp"},/*#__PURE__*/e.createElement(Ke,{id:"exact-time-overlay",tooltipContent:(p=new Date(parseInt(n.timestamp)),new Intl.DateTimeFormat(o.intl.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}).format(p))},m.format(parseInt(n.timestamp)))),u?/*#__PURE__*/e.createElement(B.div,{className:"comment-delete emphasise-on-relevant-icon",whileHover:{scale:1.2},whileTap:{scale:.9},onClick:function(){n.onDeleteQuestionComment(n.index),n.onDeleteViewComment()}},/*#__PURE__*/e.createElement(nt,null)):null),/*#__PURE__*/e.createElement("div",{className:"row"},/*#__PURE__*/e.createElement("div",{className:"col comment-value"},n.commentValue)))};ot.propTypes={author:a.object.isRequired,timestamp:a.string.isRequired,commentValue:a.string.isRequired,onDeleteQuestionComment:a.func.isRequired,onDeleteViewComment:a.func,index:a.number.isRequired};var rt=function(e){var n=e.comments,r=e.onDeleteCommentClick,i=s(null),a=t(!1),l=a[0],u=a[1],c=function(){u(!0),setTimeout(function(){u(!1)},2e3)};return o(function(){null!==i.current&&(i.current.scrollTop=i.current.scrollHeight)},[JSON.stringify(n)]),q("span",{children:l?Q("div",{className:"comment-delete",children:[q(W,{color:"#00BFFF",height:80,width:80}),q("p",{children:"Deleting comment..."})]}):q("div",{className:"comment-list-items",ref:i,children:n.map(function(e,t){return q("div",{className:"comment-list-item",children:q(ot,{commentValue:e[le.HAS_COMMENT_VALUE],author:e[le.HAS_AUTHOR]?e[le.HAS_AUTHOR]:null,timestamp:e[le.HAS_TIMESTAMP],onDeleteQuestionComment:r,onDeleteViewComment:c,index:t})},t)})})})},st=function(){/*#__PURE__*/return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24"},/*#__PURE__*/e.createElement("path",{d:"M6.185 4.843l11.927 7.157-11.927 7.157 2.982-7.157-2.982-7.157zm-4.185-4.843l5 12-5 12 20-12-20-12z"}))},it=function(n){var r=t(""),i=r[0],a=r[1],l=s(null),u=X();o(function(){l.current.focus()},[]);var c=function(e){e.preventDefault(),n.onChange(i),a("")},p=function(){var e=l.current;e.style.height="auto",d(e)},d=function(e){e.style.height=e.scrollHeight+"px",parseInt(e.style.height)>parseInt("300px")&&(e.style.height="300px")};/*#__PURE__*/return e.createElement(m,{onSubmit:c,onKeyUp:function(e){"Enter"===e.key&&e.ctrlKey&&i.trim()&&c(e)},onClick:function(e){e.stopPropagation()}},/*#__PURE__*/e.createElement(m.Group,{className:"m-2",controlId:"formBasicComment"},/*#__PURE__*/e.createElement(g,{className:"col-lg-12 p-0"},/*#__PURE__*/e.createElement(S,{className:"container-fluid p-0 m-0"},/*#__PURE__*/e.createElement("div",{id:"comment-form"},/*#__PURE__*/e.createElement(m.Control,{className:"comment-form-control",name:"comment",as:"textarea",placeholder:u.formatMessage({id:"comment.form.placeholder"}),required:!0,value:i,onChange:function(e){a(e.target.value)},ref:l,onKeyPress:p,onKeyDown:p}),/*#__PURE__*/e.createElement(A,{className:"comment-form-button",variant:"primary",type:"submit"},/*#__PURE__*/e.createElement(st,null)))))))};it.propTypes={onChange:a.func.isRequired};var at=function(){/*#__PURE__*/return e.createElement("svg",{className:"close-icon",width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/e.createElement("path",{d:"M13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29-4.3 4.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l4.29-4.3 4.29 4.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"}))},lt=function(n){var i=r(Se),a=s(null),l=s(null),u=s(null),c=t(!1),p=c[0],m=c[1],d=t("right"),h=d[0],f=d[1];o(function(){I(u.current)});var E=function(){m(!1)},g=function(){var e=n.question;return e[le.HAS_COMMENT]||(e[le.HAS_COMMENT]=[]),Array.isArray(e[le.HAS_COMMENT])||(e[le.HAS_COMMENT]=[e[le.HAS_COMMENT]]),e[le.HAS_COMMENT]},S=function(e){var t={};A(t,e),n.onChange(O(),t)},A=function(e,t){i.options.currentUser&&(e[le.HAS_AUTHOR]={"@id":i.options.currentUser}),e[le.HAS_COMMENT_VALUE]=t,e[le.HAS_TIMESTAMP]=Date.now().toString()},T=function(e){g().splice(e,1)},N=function(e){e.preventDefault(),e.stopPropagation()},O=function(){return g().length},I=function(e){e&&(e.getBoundingClientRect().x>window.innerWidth/2?f("left"):f("right"))};/*#__PURE__*/return e.createElement("div",{ref:u,onClick:N},/*#__PURE__*/e.createElement("span",{className:"comment-bubble",ref:a,onClick:function(e){N(e),m(!p)}},/*#__PURE__*/e.createElement(tt,null),O()>0?/*#__PURE__*/e.createElement(_,{className:"comment-badge",pill:!0,variant:"primary"},O()):null),/*#__PURE__*/e.createElement(B.div,{className:"overlay-comment",ref:l,drag:!0,dragConstraints:{top:-50,left:-50,right:50,bottom:50}},/*#__PURE__*/e.createElement(C,{target:a.current,show:p,placement:h,rootClose:!1,onHide:E,container:l},function(t){/*#__PURE__*/return e.createElement(v,Z({className:"comment-tooltip"},t),/*#__PURE__*/e.createElement("span",{onKeyDown:function(e){!function(e){"Escape"===e.key&&E()}(e)}},/*#__PURE__*/e.createElement(B.div,{className:"close-comment-icon",onClick:E,whileHover:{scale:1.1,transition:{duration:.1}}},/*#__PURE__*/e.createElement(at,null)),/*#__PURE__*/e.createElement(rt,{comments:g(),onDeleteCommentClick:T}),/*#__PURE__*/e.createElement(it,{onChange:S})))})))};lt.propTypes={question:a.object.isRequired,onChange:a.func.isRequired};var ut=/*#__PURE__*/function(){function t(){}return t.renderIcons=function(t,n,o,r){var s;s=n.icons?n.icons:le.DEFAULT_OPTIONS.icons;for(var i=[],a=this.renderQuestionHelp(t,n,o,r),l=this.renderQuestionComments(t,n,o,r),u=this.renderQuestionLink(t,n,o,r),c=0;c<s.length;c++)s[c].id===le.ICONS.QUESTION_COMMENTS&&i.push(/*#__PURE__*/e.createElement("li",{key:c,className:"icon-list-item"},l)),s[c].id===le.ICONS.QUESTION_HELP&&i.push(/*#__PURE__*/e.createElement("li",{key:c,className:"icon-list-item"},a)),s[c].id===le.ICONS.QUESTION_LINK&&i.push(/*#__PURE__*/e.createElement("li",{key:c,className:"icon-list-item"},u));/*#__PURE__*/return e.createElement("ol",{className:"icon-list-items"},i)},t.renderQuestionHelp=function(e,t,n,o){return this.getIconComponentFromName(le.ICONS.QUESTION_HELP,e,t,n,o)},t.renderQuestionLink=function(e,t,n,o){return this.getIconComponentFromName(le.ICONS.QUESTION_LINK,e,t,n,o)},t.getIconComponentFromName=function(e,t,n,o,r){var s=this.getIconFromIconList(n.icons?n.icons:le.DEFAULT_OPTIONS.icons,e);return this.getIconComponent(s,t,n,o,r)},t.getIconComponent=function(t,n,o,r,s){var i;if(t&&(t.behavior===le.ICON_BEHAVIOR.ON_HOVER||t.behavior===le.ICON_BEHAVIOR.ENABLE))return t.behavior===le.ICON_BEHAVIOR.ENABLE?(s=!0,i=""):i="emphasise-on-relevant-icon",t.id===le.ICONS.QUESTION_HELP&&n[le.HELP_DESCRIPTION]?s?/*#__PURE__*/e.createElement("div",{className:i},/*#__PURE__*/e.createElement(Ze,{text:u.getLocalized(n[le.HELP_DESCRIPTION],o.intl),absolutePosition:!1})):null:t.id===le.ICONS.QUESTION_LINK&&n[le.SOURCE]?s?/*#__PURE__*/e.createElement("div",{className:i},/*#__PURE__*/e.createElement(et,{url:n[le.SOURCE]})):null:t.id===le.ICONS.QUESTION_COMMENTS&&s?/*#__PURE__*/e.createElement("div",{className:i},/*#__PURE__*/e.createElement(lt,{question:n,onChange:r})):null},t}();ut.renderQuestionComments=function(e,t,n,o){return ut.getIconComponentFromName(le.ICONS.QUESTION_COMMENTS,e,t,n,o)},ut.getIconFromIconList=function(e,t){return e?e.find(function(e){return e.id===t}):null};var ct=function(t){var n,o,r=e.useContext(ie),s=e.useContext(Se).options,i=function(e){var n=Object.assign({},t.answer);a(n,e),t.onChange(t.index,n)},a=function(e,n){null===n?(e[le.HAS_OBJECT_VALUE]=null,e[le.HAS_DATA_VALUE]=null):t.answer[le.HAS_OBJECT_VALUE]||me.isTypeahead(t.question)?e[le.HAS_OBJECT_VALUE]={"@id":n}:e[le.HAS_DATA_VALUE]={"@value":n}},l=t.question,c=me.resolveValue(t.answer),p=function(n){var o=u.getLocalized(n[le.RDFS_LABEL],s.intl);/*#__PURE__*/return e.createElement("div",{className:"question-header"},o,ut.renderIcons(t.question,s,t.onCommentChange,t.showIcon))}(l),m=u.getLocalized(l[le.RDFS_COMMENT],s.intl);return n=me.isTypeahead(l)?function(n,o,s){var a=ue.getStringHash(me.getPossibleValuesQuery(t.question)),l=r.getOptions(a)||[];/*#__PURE__*/return e.createElement(We,{question:t.question,answer:t.answer,label:o,title:s,value:n,onChange:i,options:l})}(c,p,m):(o=l)[le.HAS_OPTION]&&0!==o[le.HAS_OPTION].length?function(n,o,r){/*#__PURE__*/return e.createElement(ze,{question:t.question,label:o,title:r,value:n,onChange:i})}(c,p,m):me.isCalendar(l)?function(n,o,r){/*#__PURE__*/return e.createElement(Re,{question:t.question,value:n,title:r,label:o,onChange:i})}(c,p,m):me.isCheckbox(l)?function(n,o,r){/*#__PURE__*/return e.createElement(Le,{label:o,title:r,value:n,onChange:i,question:t.question})}(c,p,m):me.isMaskedInput(l)?function(n,o,r){/*#__PURE__*/return e.createElement(ke,{label:o,title:r,value:n,onChange:i,question:t.question,answer:t.answer})}(c,p,m):me.isSparqlInput(l)?function(n,o,r){/*#__PURE__*/return e.createElement(Ue,{question:t.question,answer:t.answer,label:o,title:r,value:n,onChange:i,sparql:!0})}(c,p,m):me.isTurtleInput(l)?function(n,o,r){/*#__PURE__*/return e.createElement(Ue,{question:t.question,answer:t.answer,label:o,title:r,value:n,onChange:i,turtle:!0})}(c,p,m):function(n,o,r){/*#__PURE__*/return e.createElement(Ue,{question:t.question,answer:t.answer,label:o,title:r,value:n,onChange:i})}(c,p,m),n};ct.propTypes={answer:a.object.isRequired,question:a.object.isRequired,onChange:a.func.isRequired,onCommentChange:a.func.isRequired,index:a.number,icons:a.object};var pt=/*#__PURE__*/function(){function e(){}return e.createValidator=function(t,n){return t[le.REQUIRES_ANSWER]?me.isCheckbox(t)?e._generateRequiresAnswerCheckBoxValidator(t,n):e._generateRequiresAnswerValidator(t,n):function(){var e={};return e[le.HAS_VALID_ANSWER]=!0,delete e[le.HAS_VALIDATION_MESSAGE],e}},e._generateRequiresAnswerValidator=function(e,t){return function(n){var o=null;n[le.HAS_DATA_VALUE]?o=u.getJsonAttValue(n,le.HAS_DATA_VALUE):n[le.HAS_OBJECT_VALUE]&&(o=u.getJsonAttValue(n,le.HAS_OBJECT_VALUE,"@id"));var r=null!=o&&""!==o,s={};return s[le.HAS_VALID_ANSWER]=r,s[le.HAS_VALIDATION_MESSAGE]=r?null:u.getLocalized(e[u.RDFS_LABEL],t)+" is missing a value.",s}},e._generateRequiresAnswerCheckBoxValidator=function(e,t){return function(n){var o=null;n[le.HAS_DATA_VALUE]?o=u.getJsonAttValue(n,le.HAS_DATA_VALUE):n[le.HAS_OBJECT_VALUE]&&(o=u.getJsonAttValue(n,le.HAS_OBJECT_VALUE,"@id"));var r=null!=o&&""!==o&&!1!==o,s={};return s[le.HAS_VALID_ANSWER]=r,s[le.HAS_VALIDATION_MESSAGE]=r?null:u.getLocalized(e[u.RDFS_LABEL],t)+" must be checked.",s}},e}(),mt=/*#__PURE__*/function(t){function n(e){var n;return(n=t.call(this,e)||this).state={prefixes:e.prefixes},n}return $(n,t),n.prototype.render=function(){var t=/*#__PURE__*/e.createElement(T,{id:"prefixes",title:"Prefixes"},/*#__PURE__*/e.createElement(N,null,this.state.prefixes.sort(function(e,t){return e[le.PREFIX]<t[le.PREFIX]?-1:1}).map(function(t){/*#__PURE__*/return e.createElement(O,{key:t[le.PREFIX]},/*#__PURE__*/e.createElement("strong",null,t[le.PREFIX]),": ",t[le.NAMESPACE])})));/*#__PURE__*/return e.createElement(E,{trigger:"click",placement:"right",overlay:t},/*#__PURE__*/e.createElement("span",{className:this.props.iconClass},this.props.children))},n}(e.Component);mt.propTypes={prefixes:a.array.isRequired,children:a.element.isRequired,iconClass:a.string},mt.defaultProps={iconClass:""};var dt=function(e){var t,n=e.question,o=r(Se).options,s=function(e){return e.includes("/file/d/")&&e.includes("https://drive.google.com/")},i=function(e){return e.includes("https://www.youtube.com/")&&(e.includes("watch?v=")||e.includes("embed/"))},a=function(e){return s(e)?e.substring(e.indexOf("/file/d/")+"/file/d/".length,e.lastIndexOf("/")):i(e)?e.substring(e.indexOf("watch?v=")+"watch?v=".length):void 0},l=function(e){return s(e)?"https://drive.google.com/uc?export=view&id="+a(e):i(e)&&!e.includes("embed/")?"https://www.youtube.com/embed/"+a(e):e},u=function(e){return i(e)||s(e)&&o.unifyMediaContent?Q("div",{className:"media-content-image",children:[q(et,{url:e,iconClassContainer:"media-content-link",showOverlay:!1}),q("iframe",{src:l(e),allowFullScreen:!0})]}):Q("div",{className:"media-content-image",children:[q(et,{url:e,iconClassContainer:"media-content-link",showOverlay:!1}),q(Y,{className:"media-content-item-image",src:l(e),alt:e,width:"100%",height:"100%"})]})};return q("div",{className:"media-content",children:(t=n[le.HAS_MEDIA_CONTENT],t?Array.isArray(t)?q("div",{className:"media-content-items",children:t.map(function(e,n){return q("div",{className:"media-content-item",children:u(t[n])},n)})}):q("div",{className:"media-content-item",children:u(t)}):null)})},ht=/*#__PURE__*/function(t){function n(e){var n;return(n=t.call(this,e)||this).handleAnswerChange=function(e,t){if(me.isSection(n.props.question)){var o=!!me.resolveValue(t);n.setState({expanded:o})}n._handleChange(le.HAS_ANSWER,e,t)},n.handleSubQuestionChange=function(e,t){n._handleChange(le.HAS_SUBQUESTION,e,t)},n.handleCommentChange=function(e,t){n._handleChange(le.HAS_COMMENT,e,t)},n._toggleCollapse=function(){if(n.props.collapsible){var e=n.props.question;if(!n.context.options.debugMode&&me.isAnswerable(e)&&me.isSection(e)&&!n._getFirstAnswerValue())return;n.setState({expanded:!n.state.expanded})}},n._onMouseEnterHandler=function(){n.setState({showIcon:!0})},n._onMouseLeaveHandler=function(){n.setState({showIcon:!1})},ce.putObject(e.question["@id"],e.question),n.state={validator:null,expanded:!me.isCollapsed(e.question),showIcon:!1},n}$(n,t);var o=n.prototype;return o.componentDidMount=function(){this.setState({validator:pt.createValidator(this.props.question,this.context.options.intl)})},o.componentDidUpdate=function(){var e=this.props.question,t=this.context.options.startingQuestionId,n=e[le.HAS_SUBQUESTION].find(function(e){return e["@id"]===t});if(me.isSection(e)&&me.isAnswerable(e)){var o=this._getFirstAnswerValue();if(this.context.options.debugMode)return null;if(n)return null;this.state.expanded&&!o&&this.setState({expanded:!1})}},o._handleChange=function(e,t,n){var o=Object.assign({},this.props.question);if(o[e][t]=n,e===le.HAS_ANSWER){var r=this.state.validator(n);o=Object.assign({},o,r)}ce.putObject(o["@id"],o),this.props.onChange(this.props.index,o)},o.render=function(){var t=this.props.question,n=t[le.HAS_SUBQUESTION],o=this.context.options,r=this.renderQuestion(t);return me.isHidden(t)?null:me.isRelevant(t)||!this.context.options.debugMode&&!pe.checkId(n,o.startingQuestionId)?me.isRelevant(t)?r:null:/*#__PURE__*/e.createElement("div",{className:"show-irrelevant"},r)},o.renderQuestion=function(t){if(me.isAnswerable(t)&&!me.isSection(t))/*#__PURE__*/return e.createElement("div",{id:t["@id"]},/*#__PURE__*/e.createElement("div",{className:"panel-title answerable-question"},this.renderAnswers()),/*#__PURE__*/e.createElement("div",{className:"answerable-subquestions"},this.renderSubQuestions()));if(me.isSection(t)){var o=this.props,r=o.collapsible,s=o.withoutCard,i=n._getQuestionCategoryClass(t);if(s)/*#__PURE__*/return e.createElement("div",null,this._renderQuestionContent());var a=u.getLocalized(t[u.RDFS_LABEL],this.context.options.intl),l=J(me.isEmphasised(t)?n.getEmphasizedClass(t):"section-background",r?"cursor-pointer":"",n.getEmphasizedOnRelevantClass(t));if(me.isAnswerable(t))return this.renderAnswerableSection();var c=/*#__PURE__*/e.createElement(I.Body,{className:J("p-3",i)},this._renderQuestionContent());/*#__PURE__*/return e.createElement(w,{defaultActiveKey:this.state.expanded?void 0:a},/*#__PURE__*/e.createElement(I,{className:"mb-3"},/*#__PURE__*/e.createElement(w.Toggle,{as:I.Header,onClick:this.toggleCollapse,className:l+" question-header",onMouseEnter:this._onMouseEnterHandler,onMouseLeave:this._onMouseLeaveHandler},/*#__PURE__*/e.createElement("h6",{className:"d-inline",id:t["@id"]},r&&this._renderCollapseToggle(),a),this.renderQuestionIcons(),this.renderHeaderExtension()),r?/*#__PURE__*/e.createElement(w.Collapse,null,c):{cardBody:c}))}/*#__PURE__*/return e.createElement("div",null,this._renderQuestionContent())},o._renderQuestionContent=function(){var t=[];return this.state.expanded&&t.push(/*#__PURE__*/e.createElement(dt,{key:this.props.question["@id"]+"-media",question:this.props.question})),t.push(this.renderAnswers()),t.push(this.renderSubQuestions()),t},o.renderQuestionIcons=function(){return ut.renderIcons(this.props.question,this.context.options,this.handleCommentChange,this.state.showIcon)},o.renderHeaderExtension=function(){},o.renderAnswerableSection=function(){var t=this.props.question,o=this.props.collapsible,r=n._getQuestionCategoryClass(t),s=[me.isEmphasised(t)?n.getEmphasizedClass(t):"section-background",this.state.expanded?"section-expanded":"section-collapsed",n.getEmphasizedOnRelevantClass(t)];o&&this._getFirstAnswerValue()&&s.push("cursor-pointer");var i=this.getShowIrrelevantClassname(t),a=/*#__PURE__*/e.createElement(I.Body,{className:J("p-3",r)},this.renderSubQuestions(i));/*#__PURE__*/return e.createElement(w,{activeKey:this.state.expanded?t["@id"]:void 0,className:"answerable-section"},/*#__PURE__*/e.createElement(I,{className:"mb-3"},/*#__PURE__*/e.createElement(I.Header,{onClick:this._toggleCollapse,className:J(s)},this.renderAnswers()),o?/*#__PURE__*/e.createElement(w.Collapse,{className:i,eventKey:t["@id"]},a):{cardBody:a}))},o.getShowIrrelevantClassname=function(e){return!this.context.options.debugMode&&!pe.checkId(e[le.HAS_SUBQUESTION],this.context.options.startingQuestionId)||me.hasAnswer(e)?"":"show-irrelevant"},o.renderAnswers=function(){for(var t,o=this.props.question,r=[],s=this._getAnswers(),i=0,a=s.length;i<a;i++)me.isTextarea(o,me.resolveValue(s[i]))||me.isSparqlInput(o)||me.isTurtleInput(o),t=J("answer",n._getQuestionCategoryClass(o),n.getEmphasizedOnRelevantClass(o)),r.push(/*#__PURE__*/e.createElement("div",{key:"row-item-"+i,className:t,id:o["@id"],onMouseEnter:this._onMouseEnterHandler,onMouseLeave:this._onMouseLeaveHandler},/*#__PURE__*/e.createElement("div",{className:"answer-content",style:this._getAnswerWidthStyle()},/*#__PURE__*/e.createElement(ct,{index:i,answer:s[i],question:o,onChange:this.handleAnswerChange,onCommentChange:this.handleCommentChange,showIcon:this.state.showIcon})),this._renderUnits(),this._renderPrefixes()));return r},o._getAnswers=function(){var e=this.props.question;return e[le.HAS_ANSWER]||(e[le.HAS_ANSWER]=[]),Array.isArray(e[le.HAS_ANSWER])||(e[le.HAS_ANSWER]=[e[le.HAS_ANSWER]]),0===e[le.HAS_ANSWER].length&&(e[le.HAS_ANSWER]=me.isSection(e)&&!me.isAnswerable(e)||me.isWizardStep(e)?[]:[ye.generateAnswer(e)]),e[le.HAS_ANSWER]},o._getAnswerWidthStyle=function(){var e=Number(this.props.question[le.HAS_INITIAL_INPUT_LENGTH]);return e?{flexGrow:0,maxWidth:"none",width:"calc("+e+"ch + 1.5rem + 2px)"}:{}},n._getAnswerClass=function(e,t){return t?"col-12":1===le.GENERATED_ROW_SIZE?"col-6":"col-"+le.COLUMN_COUNT/le.GENERATED_ROW_SIZE},n._getQuestionCategoryClass=function(e){var t=me.getCategory(e);return t?"question-"+t:""},n.getEmphasizedClass=function(e){return me.isEmphasised(e)?"bg-warning":""},n.getEmphasizedOnRelevantClass=function(e){return u.hasValue(e,le.LAYOUT_CLASS,le.LAYOUT.EMPHASISE_ON_RELEVANT)?"emphasise-on-relevant":""},o._renderCollapseToggle=function(){var t=this.context.options,n=this.state.expanded?t.i18n["section.collapse"]:t.i18n["section.expand"];/*#__PURE__*/return e.createElement("span",{onClick:this.toggleCollapse,title:n},/*#__PURE__*/e.createElement(this.state.expanded?Xe:Ge,{title:n}))},o._renderPrefixes=function(){var t=this.props.question;return t[le.HAS_DECLARED_PREFIX]&&t[le.HAS_DECLARED_PREFIX].length?/*#__PURE__*/e.createElement(mt,{prefixes:t[le.HAS_DECLARED_PREFIX],iconClass:"help-icon-checkbox"},/*#__PURE__*/e.createElement(Ye,null)):null},o._renderUnits=function(){var t=this.props.question;return t[le.HAS_UNIT]?/*#__PURE__*/e.createElement("div",{className:"has-unit-label"},t[le.HAS_UNIT]):null},o.renderSubQuestions=function(t){for(var o=[],r=this._getSubQuestions(),s=this.context.options.debugMode,i=this.context.options.startingQuestionId,a=0;a<r.length;a++){var l=r[a],u=this.context.mapComponent(l,n),c=null;(s||"show-irrelevant"!==t||!s&&pe.checkId(l,i))&&(c=/*#__PURE__*/e.createElement(u,{key:"sub-question-"+a,question:l,onChange:this.handleSubQuestionChange,index:a})),o.push(c)}return o},o._getSubQuestions=function(){var e=this.props.question;return e[le.HAS_SUBQUESTION]||(e[le.HAS_SUBQUESTION]=[]),Array.isArray(e[le.HAS_SUBQUESTION])||(e[le.HAS_SUBQUESTION]=[e[le.HAS_SUBQUESTION]]),pe.orderByLocalizedLabels(e[le.HAS_SUBQUESTION],this.context.options.intl),pe.orderPreservingToplogicalSort(e[le.HAS_SUBQUESTION],le.HAS_PRECEDING_QUESTION),e[le.HAS_SUBQUESTION]},o._getFirstAnswerValue=function(){return me.resolveValue(this._getAnswers()[0])},n}(e.Component);ht.contextType=Se,ht.propTypes={question:a.object.isRequired,onChange:a.func.isRequired,index:a.number,withoutCard:a.bool,collapsible:a.bool},ht.defaultProps={withoutCard:!1,collapsible:!0};var ft=/*#__PURE__*/function(t){function n(n){var o;return(o=t.call(this,n)||this).onNextStep=function(){o.context.updateFormQuestionsData(o.props.stepIndex,o.context.getFormQuestionsData()),o.props.onNextStep()},o.onPreviousStep=function(){o.props.onPreviousStep()},o.onCommentChange=function(e,t){o._onChange(le.HAS_COMMENT,e,t)},o._renderWizardStepButtons=function(){/*#__PURE__*/return e.createElement(y,{className:"m-3 float-right"},!o.props.isFirstStep&&/*#__PURE__*/e.createElement(A,{className:"mr-2",onClick:o.onPreviousStep,variant:"primary",size:"sm"},o.props.options.i18n["wizard.previous"]),!o.props.isLastStep&&/*#__PURE__*/e.createElement(A,{onClick:o.onNextStep,variant:"primary",size:"sm"},o.props.options.i18n["wizard.next"]))},o.onChange=function(e,t){o.context.updateFormQuestionsData(o.props.stepIndex||e,Object.assign({},o.props.step,t))},o._onMouseEnterHandler=function(){o.setState({showIcon:!0})},o._onMouseLeaveHandler=function(){o.setState({showIcon:!1})},o.state={showIcon:!1},o}$(n,t);var o=n.prototype;return o._onChange=function(e,t,n){var o=Object.assign({},this.props.step);o[e][t]=n,ce.putObject(o["@id"],o),this.onChange(this.props.index,o)},o.render=function(){var t=ht._getQuestionCategoryClass(this.props.step),n=this.context.getFormQuestionsData([this.props.stepIndex]),o=this.props.options,r=this.props.mapComponent(this.props.step,ht),s=/*#__PURE__*/e.createElement(r,{question:this.props.step,onChange:this.onChange,withoutCard:!0,index:this.props.stepIndex});/*#__PURE__*/return e.createElement("div",{className:"wizard-step"},/*#__PURE__*/e.createElement(I,{className:"wizard-step-content"},/*#__PURE__*/e.createElement(I.Header,{className:"bg-primary text-white question-header",as:"h6",id:this.props.step["@id"],onMouseEnter:this._onMouseEnterHandler,onMouseLeave:this._onMouseLeaveHandler},u.getLocalized(this.props.step[u.RDFS_LABEL],this.props.options.intl),ut.renderIcons(n,o,this.onCommentChange,this.state.showIcon)),/*#__PURE__*/e.createElement(I.Body,{className:t},s)),this.props.options.wizardStepButtons&&this._renderWizardStepButtons())},n}(e.Component);ft.contextType=fe,ft.propTypes={options:a.object.isRequired,step:a.object.isRequired,onNextStep:a.func,onPreviousStep:a.func,mapComponent:a.func,stepIndex:a.number.isRequired,isFirstStep:a.bool,isLastStep:a.bool};var Et=function(t){var n=t.steps,o=t.onNavigate,s=t.currentStep,i=r(Se).options;/*#__PURE__*/return e.createElement(I.Header,null,/*#__PURE__*/e.createElement(b,{variant:"tabs",activeKey:s,onSelect:function(e){return o(parseInt(e))}},n.map(function(t,n){/*#__PURE__*/return e.createElement(L,{key:"nav"+n,id:"wizard-nav-"+n,className:ht.getEmphasizedClass(t)},/*#__PURE__*/e.createElement(R,{eventKey:n,active:n===s,disabled:!me.isRelevant(t)},u.getLocalized(t[u.RDFS_LABEL],i.intl)))})))};Et.propTypes={currentStep:a.number.isRequired,steps:a.array.isRequired,onNavigate:a.func.isRequired};var vt=function(t){var n=t.steps,o=t.onNavigate,s=t.currentStep,i=r(Se).options;/*#__PURE__*/return e.createElement("div",{className:"wizard-nav col-2 p-0"},/*#__PURE__*/e.createElement(N,null,n.map(function(t,n){/*#__PURE__*/return e.createElement(O,{hidden:!i.debugMode&&!me.isRelevant(t),key:"nav"+n,onClick:function(){return o(n)},id:"wizard-nav-"+n,action:!0,active:n===s?"active":"",variant:"default",className:i.debugMode&&!me.isRelevant(t)?"show-irrelevant":ht.getEmphasizedClass(t)},u.getLocalized(t[u.RDFS_LABEL],i.intl))})))};vt.propTypes={currentStep:a.number.isRequired,steps:a.array.isRequired,onNavigate:a.func.isRequired};var gt=function(e,t){var n=function e(n,o){return n?n["@id"]===t?o:ue.asArray(n[le.HAS_SUBQUESTION]).findIndex(function(t,n){return-1!==e(t,n)}):-1};return e.findIndex(function(e,t){return-1!==n(e,t)})},St=function(){var t=e.useContext(fe),n=e.useContext(Se),r=n.options,s=n.mapComponent,i=0;r.startingQuestionId?-1===(i=gt(t.getFormQuestionsData(),r.startingQuestionId))&&(console.warn("Question with id "+r.startingQuestionId+" not found!"),i=0):r.startingStep&&(i=r.startingStep<t.getFormQuestionsData().length?r.startingStep:0);var a=e.useState(i),l=a[0],u=a[1],c=e.useState(!1),p=c[0],m=c[1];o(function(){if(r.startingQuestionId&&!p){var e=document.getElementById(r.startingQuestionId);e&&(e.scrollIntoView(),e.classList.add("text-danger"),m(!0))}});var d,h=null;t.getFormQuestionsData().length>1&&(d=t.getFormQuestionsData(),h=/*#__PURE__*/e.createElement(r.horizontalWizardNav?Et:vt,{currentStep:l,steps:d,onNavigate:function(e){var n=t.getFormQuestionsData();e===l||e>=n.length||e>l&&!n[e].visited&&!r.enableForwardSkip||u(e)}}));var f,E,v=r.horizontalWizardNav;/*#__PURE__*/return e.createElement(I,{className:v?"":"flex-row p-3"},h,/*#__PURE__*/e.createElement("div",{className:v?"card-body p-3":h?"col-10 p-0 pl-3":"col-12 p-0"},(E=s(f=t.getFormQuestionsData()[l],ft),/*#__PURE__*/e.createElement(E,{options:r,key:"step"+l,step:f,onNextStep:function(){var e=t.getFormQuestionsData();l!==e.length-1&&(e[l+1].visited=!0,u(function(e){return e+1}))},onPreviousStep:function(){0!==l&&u(function(e){return e-1})},mapComponent:s,stepIndex:l,isFirstStep:0===l,isLastStep:l===t.getFormQuestionsData().length-1}))))},At=/*#__PURE__*/e.forwardRef(function(t,n){var o=e.useContext(Se).options;/*#__PURE__*/return e.createElement(H,Z({size:"xl",animation:!0},o.modalProps),/*#__PURE__*/e.createElement(H.Header,{closeButton:!0},/*#__PURE__*/e.createElement(H.Title,null,o.modalProps.title)),/*#__PURE__*/e.createElement(H.Body,{className:"overflow-hidden p-0"},t.children))});At.propTypes={children:a.element.isRequired};var _t=/*#__PURE__*/function(t){function n(){for(var n,o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return(n=t.call.apply(t,[this].concat(r))||this).getFormData=function(){var e=n.context.getData(),t=n.context.getFormQuestionsData();return ye.buildQuestionAnswerModel(e,t)},n.getFormQuestionsData=function(){return n.context.getFormQuestionsData()},n.handleStepChange=function(e,t,o){n.context.updateFormQuestionsData(t,Object.assign({},e,o))},n.renderWizardlessForm=function(){var t=n.context.getFormQuestionsData();/*#__PURE__*/return e.createElement(K,{className:"p-3"},t.map(function(e,t){return n._mapQuestion(e,t)}))},n}$(n,t);var o=n.prototype;return o._mapQuestion=function(t,n){var o=this,r=this.props.mapComponent(t,ht);/*#__PURE__*/return e.createElement(r,{key:t["@id"],question:t,onChange:function(e,n){return o.handleStepChange(t,e,n)},index:n})},o.render=function(){var t=this.props.modalView,n=this.context.getFormQuestionsData();if(!n.length)/*#__PURE__*/return e.createElement(K,{className:"p-3 font-italic"},"There are no questions available...");var o=n.every(function(e){return!me.isWizardStep(e)});return t?/*#__PURE__*/e.createElement(At,null,o?this.renderWizardlessForm():/*#__PURE__*/e.createElement(St,null)):o?this.renderWizardlessForm():/*#__PURE__*/e.createElement(St,null)},n}(e.Component);_t.contextType=fe;var Ct=/*#__PURE__*/i(function(n,r){var s=t(!0),i=s[0],a=s[1],l=t(null),u=l[0],c=l[1],p=t(null),m=p[0],d=p[1];if(o(function(){!function(){try{Promise.resolve(we.constructForm(n.form,n.options.intl)).then(function(e){var t=e[0],n=e[1];t.formQuestions.some(function(e){return me.isWizardStep(e)})&&(t.formQuestions[0].visited=!0),c(t),d(n),a(!1)})}catch(e){return Promise.reject(e)}}()},[n.form]),i)return n.loader||/*#__PURE__*/e.createElement(I,{className:"p-3 font-italic"},"Loading SForms...");var h=function(e,t){return function(n,o){if(!e)return o;for(var r,s=oe(e);!(r=s()).done;){var i=r.value,a=i.component;if((0,i.mapRule)(n,t))return a}return o}}(n.componentMapRules,m);/*#__PURE__*/return e.createElement(_e,{components:n.components,componentsOptions:n.componentsOptions,mapComponent:h,options:n.options},/*#__PURE__*/e.createElement(ae,{fetchTypeAheadValues:n.fetchTypeAheadValues},/*#__PURE__*/e.createElement(Ee,{data:m,formQuestions:u.formQuestions,isFormValid:n.isFormValid},/*#__PURE__*/e.createElement(_t,{ref:r,modalView:n.options&&n.options.modalView,mapComponent:h}))))});Ct.propTypes={form:a.object.isRequired,options:a.object.isRequired,componentMapRules:a.array,components:a.object,componentsOptions:a.object,fetchTypeAheadValues:a.func,isFormValid:a.func,loader:a.element};var Tt={"comment.form.placeholder":"Sem napište své komentáře (Ctrl+Enter pro potvrzení)"},Nt={"comment.form.placeholder":"Write your comments here (Ctrl+Enter to confirm, Esc to cancel)"},Ot=/*#__PURE__*/e.createContext({}),It=function(e){var t=e.locale,n=void 0===t?navigator.language:t,o=Nt;return n===le.LANG.cs.locale&&(o=Tt),q(Ot.Provider,{value:{locale:n,lang:o},children:q(G,{locale:n,messages:o,children:e.children})})};export{ct as Answer,Se as ConfigurationContext,le as Constants,fe as FormQuestionsContext,me as FormUtils,Ze as HelpIcon,It as IntlContextProvider,Ie as JsonLdFramingUtils,ce as JsonLdObjectMap,pe as JsonLdObjectUtils,ht as Question,ut as QuestionStatic,ft as WizardStep,Ct as default};
2
2
  //# sourceMappingURL=s-forms.js.map