System.register(["jimu-core","jimu-arcgis","jimu-ui","jimu-ui/basic/color-picker","esri/widgets/Sketch","esri/widgets/Sketch/SketchViewModel","esri/layers/GraphicsLayer","esri/Graphic"],(function(e,t){var r={},n={},c={},o={},a={},s={},i={},l={};return{setters:[function(e){r.React=e.React,r.classNames=e.classNames},function(e){n.JimuMapViewComponent=e.JimuMapViewComponent},function(e){c.Button=e.Button,c.Popper=e.Popper,c.WidgetPlaceholder=e.WidgetPlaceholder},function(e){o.ColorPicker=e.ColorPicker},function(e){a.default=e.default},function(e){s.default=e.default},function(e){i.default=e.default},function(e){l.default=e.default}],execute:function(){e((()=>{var e={82:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(81),c=r.n(n),o=r(645),a=r.n(o)()(c());a.push([e.id,"#sketch-button:hover{background-color:#b4c0c3}#text-button:hover{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}#text-button.active{fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1);background-color:var(--calcite-ui-foreground-3)}\n",""]);const s=a},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,c,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),c&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=c):u[4]="".concat(c)),t.push(u))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},379:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},795:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var c=void 0!==r.layer;c&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,c&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},339:e=>{e.exports=''},659:e=>{e.exports=''},160:e=>{e.exports=''},844:e=>{e.exports=''},129:e=>{"use strict";e.exports=l},231:e=>{"use strict";e.exports=i},560:e=>{"use strict";e.exports=a},878:e=>{"use strict";e.exports=s},826:e=>{"use strict";e.exports=n},891:e=>{"use strict";e.exports=r},726:e=>{"use strict";e.exports=c},362:e=>{"use strict";e.exports=o}},t={};function u(r){var n=t[r];if(void 0!==n)return n.exports;var c=t[r]={id:r,exports:{}};return e[r](c,c.exports,u),c.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.p="",u.nc=void 0;var p={};return u.p=window.jimuConfig.baseUrl,(()=>{"use strict";u.r(p),u.d(p,{__set_webpack_public_path__:()=>_,default:()=>A});var e=u(891),t=u(826),r=u(726),n=u(339),c=u.n(n);const o=t=>{const r=window.SVG,{className:n}=t,o=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(n=Object.getOwnPropertySymbols(e);c{const r=window.SVG,{className:n}=t,c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(n=Object.getOwnPropertySymbols(e);c{const r=window.SVG,{className:n}=t,c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(n=Object.getOwnPropertySymbols(e);c{var c;const a="#A92A4E",s=V(null),l=V(null),u=V(null),[p,d]=z(!1),[b,x]=z(a),[S,O]=z(null),E=V(null),M=V(null),j=V(null),N=V(null);N.current=b,Z((()=>{if(E.current&&E.current.destroy(),!E.current&&S){const e=S.view,t=document.createElement("div");if(s.current.append(t),e){const r=new g.default({title:n.intl.formatMessage({id:"sketchLayerName",defaultMessage:"Zeichnungen"})});e.map.add(r),l.current=r;const c=new v.default({layer:r,view:e,creationMode:"continuous",container:t,layout:"vertical",visibleElements:{createTools:{rectangle:!1,circle:!1},selectionTools:{"lasso-selection":!1},settingsMenu:!1}});E.current=c,P(a);const o=new h.default({layer:r,view:e,pointSymbol:{type:"text",text:"",font:{family:"Ubuntu",style:"normal",weight:"normal",size:"18px"}}});o.on("create",(e=>{var t;let r;if("complete"===e.state){const c=null===(t=S.view)||void 0===t?void 0:t.toScreen(e.graphic.geometry),a=document.querySelector(".esri-view-root");if(a){r=document.createElement("div"),r.id="popup-container",r.style.position="absolute",r.style.left=c.x-2+"px",r.style.top=c.y-24+"px";const t=document.createElement("input");t.type="text",t.placeholder=n.intl.formatMessage({id:"placeholderText",defaultMessage:"Geben Sie hier Ihren Text ein"}),t.size=30,t.style.border="none",t.style.backgroundColor="transparent",t.style.fontSize="18px",t.style.fontFamily="Arial",t.style.color=N.current,t.addEventListener("change",(t=>{l.current.remove(e.graphic),l.current.add(new y.default({geometry:e.graphic.geometry,symbol:{type:"text",color:N.current,text:t.target.value,horizontalAlignment:"left",font:{family:"Arial",style:"normal",weight:"normal",size:"18px"}}})),r.remove(),j.current.classList.remove("active")})),t.addEventListener("blur",(()=>{l.current.remove(e.graphic),r.remove(),o.cancel(),j.current.classList.remove("active")})),t.addEventListener("keyup",(t=>{"Escape"===t.code&&(l.current.remove(e.graphic),r.remove(),o.cancel(),j.current.classList.remove("active"))})),r.append(t),a.append(r),t.focus(),t.select()}}"cancel"===e.state&&j.current.classList.remove("active")})),M.current=o}}}),[S]);const P=e=>{if(E.current){const t=E.current.viewModel;t&&(t.pointSymbol.color=e,t.polylineSymbol.color=e,t.polygonSymbol.color=e)}x(e)};return e.React.createElement("div",{className:"widget-sketch-widget h-100"},n.useMapWidgetIds&&0===n.useMapWidgetIds.length&&e.React.createElement(r.WidgetPlaceholder,{icon:w(),widgetId:n.id,message:"Please select a map widget."}),e.React.createElement(t.JimuMapViewComponent,{useMapWidgetId:null===(c=n.useMapWidgetIds)||void 0===c?void 0:c[0],onActiveViewChange:e=>{O(e)}}),e.React.createElement(r.Button,{ref:u,onClick:()=>{p&&(E.current.cancel(),M.current.cancel()),d((e=>!e))},title:n.intl.formatMessage({id:"sketchLabel",defaultMessage:"Zeichnen"}),className:"border-0 rounded-0 w-100 h-100",id:"sketch-button"},p?e.React.createElement(o,{className:"mr-0"}):e.React.createElement(i,{className:"mr-0"})),e.React.createElement(r.Popper,{floating:!1,open:p,reference:u.current,keepMount:!0,showArrow:!1,placement:"right",offset:[0,15]},e.React.createElement("div",{style:{width:"46px"}},e.React.createElement("div",{className:"bg-white w-auto h-auto",ref:s}),e.React.createElement(f.ColorPicker,{onChange:e=>{x(e),P(e)},color:b,type:"default",className:"bg-white shadow-none",width:46}),e.React.createElement("div",{className:"p-2"},e.React.createElement(r.Button,{id:"text-button",onClick:()=>{M.current.create("point"),j.current.classList.add("active")},className:"d-flex justify-content-center border-0 w-100",ref:j},e.React.createElement(m,{className:"mr-0"}))))))};function _(e){u.p=e}})(),p})())}}}));