PageSourceSearch

https://www.vg-lingenfeld.de/:res/modules/common/common/layout/dyn…/ccldg.system.js?fp=7436fa909001

js vg-lingenfeld.de collected 2026-09-25 05:18:08 UTC 49,965 bytes, 2 lines download raw bytes

1System.register(["vue","dynamicgrid-lib","axios","interactjs","ccldg.css"],function(t,e){"use strict";var i,n,r,s,o,a,l;return{setters:[function(t){i=t.default},function(t){n=t.TileBase,r=t.GlideSlider,s=t.shared},function(t){o=t.default},function(t){a=t.default},function(t){l=t.default}],execute:function(){var t={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("tile-wrapper",t._b({scopedSlots:t._u([{key:"controls",fn:function(){return[i("div",{staticClass:"tile-controls-wrapper"},[i("button",{ref:"newsOptionsToggle",staticClass:"tile-control ccldg__news-options-toggle",class:{"is-active":t.isVisibleOptions},attrs:{role:"button",title:"Optionen"},on:{click:t.toggleNewsOptions}},[i("ionas-icon-settings",[i("i",{staticClass:"fa fa-gears"})])],1),t._v(" "),i("div",{staticClass:"ccldg__news-options",style:{display:t.isVisibleOptions?"block":"none"}},[i("label",[i("span",[t._v("Zeichenlänge für Teasertext")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model.lazy",value:t.teaserTextLength,expression:"teaserTextLength",modifiers:{lazy:!0}}],staticClass:"ccldg__teaser-length-input",attrs:{type:"number"},domProps:{value:t.teaserTextLength},on:{change:[function(e){t.teaserTextLength=e.target.value},t.teaserTextLengthChange]}})])])])]},proxy:!0}])},"tile-wrapper",t.$props,!1))},staticRenderFns:[],data:()=>({isVisibleOptions:!1,teaserTextLength:150,teaserTextElements:[],storeElement:null,currentBreakpoint:null}),name:"news-tile",extends:n,methods:{teaserTextLengthChange(){this.teaserTextLength<0&&(this.teaserTextLength=0),this.writeStore()},toggleNewsOptions(){this.isVisibleOptions=!this.isVisibleOptions},truncate(t,e){if(t.length<=e)return t;let i=t.substr(0,e-1),n=i.substr(0,i.lastIndexOf(" "));return n+(n.length>0?" &hellip;":"")},truncateTeaserText(){this.teaserTextElements.forEach(t=>{let e=t.getAttribute("data-teasertext"),i=this.truncate(e,this.teaserTextLength);t.querySelector("p").innerHTML=i})},writeStore(){let t={};try{t=JSON.parse(this.storeElement.textContent)}catch(t){}t.teaserTextLengths||(t.teaserTextLengths={}),t.teaserTextLengths[this.$parent.$parent.lastBreakpoint]=this.teaserTextLength,this.storeElement.textContent=JSON.stringify(t),this.truncateTeaserText()},updateTeaserTextLengthFromStore(){let t={};try{t=JSON.parse(this.storeElement.textContent)}catch(t){}t.teaserTextLengths||(t.teaserTextLengths={});let e=t.teaserTextLengths[this.$parent.$parent.lastBreakpoint];e?this.teaserTextLength=e:(this.teaserTextLength=150,t.teaserTextLengths[this.$parent.$parent.lastBreakpoint]=this.teaserTextLength,this.storeElement.textContent=JSON.stringify(t)),this.truncateTeaserText()}},mounted(){if(this.sliderContainer=this.$el.querySelector(".ccldg__news"),this.teaserTextElements=this.$el.querySelectorAll(".ccldg__news__teaser-text"),this.storeElement=this.content.querySelector(".tile-store"),this.updateTeaserTextLengthFromStore(),this.$el.querySelector(".glide__slide")){let t=new r(this.sliderContainer,this);t.init(),t.mount()}},watch:{"$parent.$parent.lastBreakpoint":function(){this.updateTeaserTextLengthFromStore()}}},c={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("tile-wrapper",t._b({},"tile-wrapper",t.$props,!1))},staticRenderFns:[],extends:n,name:"icon-tile",data:()=>({componentWrapper:null,showBacksideButton:null,showFrontsideButton:null,flippable:!1,frontSide:null,backSide:null}),mounted(){this.componentWrapper=this.$el.querySelector(".ccldg__icon-wrapper"),this.flippable=this.componentWrapper.matches(".is-flippable"),this.frontSide=this.componentWrapper.querySelector(".ccldg__icon"),this.backSide=this.componentWrapper.querySelector(".ccldg__icon-backside"),this.componentWrapper.classList.add("is-hidden-backside"),this.flippable&&(this.showBacksideButton=this.componentWrapper.querySelector(".ccldg__show-backside-button"),this.showFrontsideButton=this.componentWrapper.querySelector(".ccldg__show-frontside-button"),this.showBacksideButton.addEventListener("click",()=>{this.componentWrapper.classList.remove("is-hidden-backside"),this.componentWrapper.style.pointerEvents="none",setTimeout(()=>{this.componentWrapper.classList.add("is-visible-backside"),setTimeout(()=>{this.componentWrapper.style.pointerEvents="all"},600)},0)}
1),this.showFrontsideButton.addEventListener("click",()=>{this.componentWrapper.classList.remove("is-visible-backside"),this.componentWrapper.style.pointerEvents="none",setTimeout(()=>{this.componentWrapper.classList.add("is-hidden-backside"),this.componentWrapper.style.pointerEvents="all"},600)}))}},d={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("tile-wrapper",t._b({},"tile-wrapper",t.$props,!1))},staticRenderFns:[],data:()=>({sliderContainer:null,imageCounter:null}),extends:n,name:"images-tile",mounted(){if(this.sliderContainer=this.$el.querySelector(".ccldg__image-list-container"),!this.sliderContainer.querySelector(".glide__slide"))return;let t=new r(this.sliderContainer,this);t.init(),t.glide.on("mount.after",()=>{let e=t.glide._c.Sizes.length;e>1&&(this.imageCounter=document.createElement("div"),this.imageCounter.setAttribute("class","ccldg__image-counter-wrapper image-counter-wrapper"),this.imageCounter.innerHTML="<span class='ccldg__image-current-count image-current-count'>"+(t.glide.index+1)+"</span><span class='ccldg__image-count-divider image-count-divider'>/</span><span class='ccldg__image-count image-count'>"+e+"</span>",this.sliderContainer.append(this.imageCounter))}),t.glide.on("run.after",()=>{let e=this.imageCounter.querySelector(".image-current-count");e&&(e.textContent=t.glide.index+1)}),t.mount()}},h={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("tile-wrapper",t._b({},"tile-wrapper",t.$props,!1),[t._t("controls")],2)},staticRenderFns:[],extends:n,name:"image-with-text-tile"},u={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("tile-wrapper",t._b({},"tile-wrapper",t.$props,!1),[t._t("controls")],2)},staticRenderFns:[],extends:n,name:"image-with-text-tile"},p={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("tile-wrapper",t._b({},"tile-wrapper",t.$props,!1))},staticRenderFns:[],extends:n,name:"richtext-tile"};let g=Pegasus.defineNamespace("Common.Common.Default");function m(t,e){this.videoContainer=t,this.videoContainerParent=this.videoContainer.parentElement,this.videoType=this.videoContainer.getAttribute("data-videotype"),this.userPreviewImage=this.videoContainer.querySelector(".user-preview-image"),this.previewImageWrapper=this.videoContainer.querySelector(".ccldg__video-preview-image-wrapper"),this.src=this.videoContainer.getAttribute("data-src"),this.id=this.videoContainer.getAttribute("data-id"),this.dialogElement=e,this.dialogContent=this.dialogElement.querySelector(".ccldg__video-dialog-content"),this.dialogClose=this.dialogElement.querySelector(".ccldg__video-dialog-close"),this.openInDialog=this.videoContainer.getAttribute("data-open-in-dialog"),this.destroyed=!1,this.dialogCancelHandler=null,this.dialogCloseHandler=null,this.init()}function f(t){this.video=t,this.player=null}function v(t){this.video=t,this.id=this.video.videoContainer.getAttribute("data-yt-video-id"),this.player=null,this.nocookie=this.video.videoContainer.hasAttribute("data-yt-nocookie")&&"false"!==this.video.videoContainer.getAttribute("data-yt-nocookie")}function y(t){this.video=t,this.player=null,this.loaded=!1}m.prototype.init=function(){var t=this;this.src&&("youtube"==this.videoType&&(this.video=new v(this)),"vimeo"==this.videoType&&(this.video=new y(this)),"local"==this.videoType&&(this.video=new f(this)),this.updatePreviewImage(),document.querySelector("body").matches(".mode-editor")||("true"===this.openInDialog?this.video.load().then(function(){t.destroyed||(t.previewImageWrapper.addEventListener("click",function(){t.dialogContent.appendChild(t.videoContainer),t.previewImageWrapper.style.display="none",t.dialogElement.showModal(),t.video.play()}),t.dialogCancelHandler=function(){t.video.pause(),t.videoContainerParent.appendChild(t.videoContainer),t.previewImageWrapper.style.display="initial"},t.dialogCloseHandler=function(){t.dialogCancelHandler(),t.dialogElement.close()},t.dialogElement.addEventListener("cancel",t.dialogCancelHandler),t.dialogClose.addEventListener("click",t.dialogCloseHandler))}).catch(t=>{console.error(t)}):this.previewImageWrapper.addEventListener("click",function(e){t.previewImageWrapper.remove(),t.video.load().then(function(){t.video.mute(),t.video.play()})})))},m.prototype.destroy=function(){this.destroyed=!0,this.dialogCancelHandler&&(this.dialogElement.removeEventListener("cancel",this.dialogCancelHandler),this.dialogCancelHandler=null),this.dialogCloseHandler&&(this.dialogClose.removeEventListener("click",this.dialogCloseHandler),this.dialogCloseHandler=null),this.dialogElement.open&&this.dialogElement.close(),this.video&&(this.video.destroy(),this.video=null),this.videoContainer.parentElement!==this.videoContainerParent&&this.videoContainerParent.appendChild(this.videoContainer)},m.prototype.updatePreviewImage=function(){var t=this;this.userPreviewImage||this.video.loadPreviewImage().then(function(){t.previewImage=new Image,t.previewImage.src=t.video.previewImageSrc,t.previewImage.classList.add("ccldg__video-preview-image"),t.previewImageWrapper.appendChild(t.previewImage)}).catch(function(t){console.log(t)})},f.prototype.load=function(){let t=this;return new Promise(function(e){t.player=t.video.videoContainer.querySelector("#player-"+t.video.id),e()})},f.prototype.loadPreviewImage=function(){let t=this;return new Promise(function(e,i){t.userPreviewImage?e():i(`video-${t.video.id} has no preview image`)})},f.prototype.mute=function(){this.player.muted=!0}
1,f.prototype.play=function(){this.player.play()},f.prototype.pause=function(){this.player.pause()},f.prototype.destroy=function(){this.player&&(this.player.pause(),this.player=null)},v.prototype.load=function(){var t=this;return g.loadYoutubeIframeAPI().then(function(){return new Promise(function(e){if(!t.player){var i={videoId:t.id,height:"9999",width:"9999",playerVars:{color:"white",loop:0,playsinline:1,modestbranding:1,enablejsapi:1,controls:1,iv_load_policy:3},events:{onReady:function(t){e()},onStateChange:function(t){}}};t.nocookie&&(i.host="https://www.youtube-nocookie.com"),t.player=new YT.Player("player-"+t.video.id,i)}})})},v.prototype.loadPreviewImage=function(){var t=this;return new Promise(function(e){t.previewImageSrc="https://img.youtube.com/vi/"+t.id+"/hqdefault.jpg",e()})},v.prototype.mute=function(){this.player.mute()},v.prototype.play=function(){this.player.playVideo()},v.prototype.pause=function(){this.player.pauseVideo()},v.prototype.destroy=function(){this.player&&(this.player.destroy(),this.player=null)},y.prototype.loadPreviewImage=function(){let t=this;return new Promise(function(e){let i=new XMLHttpRequest,n="https://vimeo.com/api/oembed.json?url="+t.video.src;i.onreadystatechange=function(){if(4==this.readyState&&200==this.status){let i=JSON.parse(this.responseText);t.previewImageSrc=i.thumbnail_url,e()}},i.open("GET",n,!0),i.send()})},y.prototype.load=function(){let t=this;return g.loadVimeoAPI().then(function(){return new Promise(function(e){t.player&&function i(){t.loaded?e():setTimeout(i,100)}(),t.player||(t.player=new window.Vimeo.Player("player-"+t.video.id,{url:t.video.src,muted:!0}),t.player.on("loaded",function(){t.loaded=!0,e()}))})})},y.prototype.play=function(){this.player.play()},y.prototype.pause=function(){this.player.pause()},y.prototype.mute=function(){this.player.setVolume(0)},y.prototype.destroy=function(){this.player&&(this.player.destroy().catch(function(t){console.log(t)}),this.player=null,this.loaded=!1)};var b={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("tile-wrapper",t._b({},"tile-wrapper",t.$props,!1))},staticRenderFns:[],extends:n,name:"video-tile",data:()=>({videoInst:null}),mounted(){this.videoElement=null,this.initVideo(),this.contentObserver=new MutationObserver(()=>{this.initVideo()}),this.contentObserver.observe(this.$el,{childList:!0,subtree:!0})},beforeDestroy(){this.contentObserver&&(this.contentObserver.disconnect(),this.contentObserver=null),this.videoInst&&(this.videoInst.destroy(),this.videoInst=null)},methods:{initVideo(){const t=this.$el.querySelector(".ccldg__video");t!==this.videoElement&&(this.videoInst&&(this.videoInst.destroy(),this.videoInst=null),this.videoElement=t,t&&(this.videoInst=new m(t,this.$el.querySelector("#ccldg__video-dialog"))))}}},C={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"wrapper",staticClass:"ccldg__color-palettes-wrapper",class:{"wrap-items":t.wrapItems},style:t.styleObject},[i("div",{staticClass:"ccldg__color-palettes"},t._l(t.colorPalettes,function(e,n){return i("div",{ref:"colorPalette",refInFor:!0,staticClass:"ccldg__color-palette"},t._l(e,function(e){return i("button",{staticClass:"ccldg__color",class:{"is-active":t.activeColor===e},style:{"background-color":e},attrs:{title:e,"data-color":e,"data-is-transparent":"#00000000"===e},on:{click:function(i){return t.pickedColor(e)}}})}),0)}),0)])},staticRenderFns:[],mounted(){this.colorPalettes.forEach(t=>{t.forEach((e,i)=>{t[i]=e.toLowerCase()})}),document.body.addEventListener("mousedown",t=>{t.target.closest(".ccldg__color-palettes-wrapper")||this.isToggle(t.target)||(this.toggles.forEach(t=>{t.classList.remove("is-active")}),this.$el.style.display="none")})},computed:{wrapItems(){for(let t=0;t<this.colorPalettes.length;t++){let e=this.colorPalettes[t],i=0;for(let t=0;t<Object.entries(e).length;t++)i++;if(i>12)return!0}return!1}},methods:{isToggle(t){for(let e=0;e<this.toggles.length;e++){if(this.toggles[e]===t)return!0}},registerToggle(t){-1===this.toggles.indexOf(t)&&this.toggles.push(t)},toggle(t,e){this.event=t,e&&(this.position=e),this.toggles.forEac
1h(e=>{e!==t.target&&e.classList.remove("is-active")}),t.target.matches(".is-active")?(this.$el.style.display="none",t.target.classList.remove("is-active")):(this.$el.style.display="block",this.show(),t.target.classList.add("is-active"))},show(){let t,e;this.$el.style.display="block";let i=10;switch(this.position){case"rightBottom":t=i,e=i;break;case"leftBottom":t=-this.$el.clientWidth-i,e=i;break;case"leftTop":t=-this.$el.clientWidth-i,e=-this.$el.clientHeight-i;break;case"rightTop":t=i,e=-this.$el.clientHeight-i}var n=this.event.clientX+t+"px",r=this.event.clientY+e+"px";this.$el.style.left=n,this.$el.style.top=r},pickedColor(t){this.$emit("update:activeColor",t)}},data:()=>({position:"rightBottom",toggles:[],event:null,styleObject:{display:"none"}}),props:{colorPalettes:Array,activeColor:String},watch:{activeColor(){this.$emit("updateActiveColor",{colorValue:this.activeColor.toLowerCase()})}}};function k(t,e){return t!==e&&(!(t.x+t.w<=e.x)&&(!(t.x>=e.x+e.w)&&(!(t.y+t.h<=e.y)&&!(t.y>=e.y+e.h))))}function w(t){const e=[],i=z(t),n=Array(t.length);for(let r=0,s=i.length;r<s;r++){let s=i[r];s.y<0&&(s.y=0),s=_(e,s),e.push(s),n[t.indexOf(s)]=s,s.moved=!1}return n}function _(t,e){for(;e.y>0&&!$(t,e);)e.y--;let i;for(;i=$(t,e);)e.y=i.y+i.h;return e}function B(t,e){if(null===e)return[];for(let i=0,n=t.length;i<n;i++){const n=t[i];n.x+n.w>e&&(n.x=e-n.w),n.x<0&&(n.x=0,n.w=e)}return t}function x(t,e){for(let i=0,n=t.length;i<n;i++)if(t[i].i===e)return t[i]}function $(t,e){for(let i=0,n=t.length;i<n;i++)if(k(t[i],e))return t[i]}function S(t,e,i,n,r){const s=n&&e.y>n;"number"==typeof i&&(e.x=i),"number"==typeof n&&(e.y=n),e.moved=!0;let o=z(t);s&&(o=o.reverse());const a=function(t,e){return t.filter(t=>k(t,e))}(o,e);for(let i=0,n=a.length;i<n;i++){const n=a[i];n.moved||(e.y>n.y&&e.y-n.y>n.h/4||(t=E(t,e,n,r)))}return t}function E(t,e,i,n){if(n){const n={x:i.x,y:i.y,w:i.w,h:i.h,i:"-1"};if(n.y=Math.max(e.y-i.h,0),!$(t,n))return S(t,i,void 0,n.y)}return S(t,i,void 0,i.y+1)}function z(t){return[].concat(t).sort(function(t,e){return t.y>e.y||t.y===e.y&&t.x>e.x?1:-1})}function T(t){return function(t){const e=t.target.offsetParent||document.body,i=t.offsetParent===document.body?{left:0,top:0}:e.getBoundingClientRect(),n=t.clientX+e.scrollLeft-i.left,r=t.clientY+e.scrollTop-i.top;return{x:n,y:r}}(t)}function M(t,e,i,n){var r;return!("number"==typeof(r=t)&&!isNaN(r))?{deltaX:0,deltaY:0,lastX:i,lastY:n,x:i,y:n}:{deltaX:i-t,deltaY:n-e,lastX:t,lastY:e,x:i,y:n}}var I={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"item",staticClass:"vue-grid-item",class:t.classObj,style:t.style,attrs:{"data-observe-resizing":""}},[t._t("default"),t._v(" "),t.resizable?i("span",{ref:"handle",class:t.resizableHandleClass}):t._e()],2)},staticRenderFns:[],name:"GridItem",props:{isDraggable:{type:Boolean,required:!1,default:null},isResizable:{type:Boolean,required:!1,default:null},minH:{type:Number,required:!1,default:1},minW:{type:Number,required:!1,default:1},maxH:{type:Number,required:!1,default:1/0},maxW:{type:Number,required:!1,default:1/0},x:{type:Number,required:!0},y:{type:Number,required:!0},w:{type:Number,required:!0},h:{type:Number,required:!0},i:{required:!0},dragIgnoreFrom:{type:String,required:!1,default:"a, button"},dragAllowFrom:{type:String,required:!1,default:null},resizeIgnoreFrom:{type:String,required:!1,default:"a, button"}},inject:["eventBus"],data:function(){return{draggable:null,resizable:null,isDragging:!1,dragging:null,isResizing:!1,resizing:null,lastX:NaN,lastY:NaN,lastW:NaN,lastH:NaN,style:{},dragEventSet:!1,resizeEventSet:!1,previousW:null,previousH:null,previousX:null,previousY:null,innerX:this.x,innerY:this.y,innerW:this.w,innerH:this.h}},created(){this.compactHandler=()=>{this.createStyle()},this.setDraggableHandler=t=>{null===this.isDraggable&&(this.draggable=t)},this.setResizableHandler=t=>{null===this.isResizable&&(this.resizable=t)},this.eventBus.$on("compact",this.compactHandler),this.eventBus.$on("setDraggable",this.setDraggableHandler),this.eventBus.$on("setResizable",this.setResizableHandler)},beforeDestroy:function(){this.eventBus.$off("compact",this.compactHandler),this.eventBus.$off("setDraggable",this.setDraggableHandler),this.eventBus.$off("setResizable",this.setResizableHandler),this.interactObj.unset()},mounted:function(){this.draggable=this.$parent.isDraggable,this.resizable=this.$parent.isResizable,this.createStyle(),this.eventBus.$emit("item-mounted",this),this.$refs.item.onElementResize=t=>{this.$emit("resize",this,t.contentRect.width,t.contentRect.height),this.eventBus.$emit("grid-item-resize",this,t.contentRect.width,t.contentRect.height)}},watch:{isDraggable:function(){this.draggable=this.isDraggable},draggable:function(){this.tryMakeDraggable()},isResizable:function(){this.resizable=this.isResizable},resizable:function(){this.tryMakeResizable()},"$parent.rowHeight":function(){this.createStyle()},"$parent.currentColCount":function(){this.tryMakeResizable(),this.createStyle()},"$parent.width":function(){this.tryMakeResizable(),this.createStyle()},x:function(t){this.innerX=t,this.createStyle()},y:function(t){this.innerY=t,this.createStyle()},h:function(t){this.innerH=t,this.createStyle()},w:function(t){this.innerW=t,this.createStyle()},minH:function(){this.tryMakeResizable()},maxH:function(){this.tryMakeResizable()},minW:function(){this.tryMakeResizable()},maxW:function(){this.tryMakeResizable()}},computed:{classObj(){return{"vue-resizable":this.resizable,resizing:this.isResizing,"vue-draggable-dragging":this.isDragging,"disable-userselect":this.isDragging,"no-touch":this.isAndroid&&this.draggableOrResizable}},draggableOrResizable(){return this.draggable||this.resizable},isAndroid:()=>-1!==navigator.userAgent.toLowerCase().indexOf("android"),resizableHandleClass:()=>"vue-resizable-handle"},methods:{createStyle:function(){this.x+this.w>this.$parent.currentColCount?(this.innerX=0,this.innerW=this.w>this.$parent.currentColCount?this.$parent.currentColCount:this.w):(this.innerX=this.x,this.innerW=this.w);let t=this.calcPosition(this.innerX,this.innerY,this.innerW,this.innerH);this.isDragging&&(t.top=this.dragging.top,t.left=this.dragging.left),this.isResizing&&(t.width=this.resizing.width,t.height=this.resizing.height),this.style=function(t,e,
1i,n){const r="translate3d("+e+"px,"+t+"px, 0px)";return{transform:r,WebkitTransform:r,MozTransform:r,msTransform:r,OTransform:r,width:i+"px",height:n+"px",position:"absolute"}}(t.top,t.left,t.width,t.height)},handleResize:function(t){const e=T(t);if(null==e)return;const{x:i,y:n}=e,r={width:0,height:0};let s;switch(t.type){case"resizestart":this.previousW=this.innerW,this.previousH=this.innerH,s=this.calcPosition(this.innerX,this.innerY,this.innerW,this.innerH),r.width=s.width,r.height=s.height,this.resizing=r,this.isResizing=!0;break;case"resizemove":{const t=M(this.lastW,this.lastH,i,n);r.width=this.resizing.width+t.deltaX,r.height=this.resizing.height+t.deltaY,this.resizing=r;break}case"resizeend":s=this.calcPosition(this.innerX,this.innerY,this.innerW,this.innerH),r.width=s.width,r.height=s.height,this.resizing=null,this.isResizing=!1}s=this.calcWH(r.height,r.width),s.w<this.minW&&(s.w=this.minW),s.w>this.maxW&&(s.w=this.maxW),s.h<this.minH&&(s.h=this.minH),s.h>this.maxH&&(s.h=this.maxH),s.h<1&&(s.h=1),s.w<1&&(s.w=1),this.lastW=i,this.lastH=n,"resizeend"===t.type&&(this.$emit("resized",this,this.i,s.h,s.w,r.height,r.width),this.eventBus.$emit("grid-item-resize-end",this,this.i,s.h,s.w,r.height,r.width)),this.eventBus.$emit("resizeEvent",t.type,this.i,this.innerX,this.innerY,s.h,s.w)},handleDrag(t){if(this.isResizing)return;const e=T(t);if(null===e)return;const{x:i,y:n}=e;let r,s={top:0,left:0};switch(t.type){case"dragstart":{this.previousX=this.innerX,this.previousY=this.innerY;let e=t.target.offsetParent.getBoundingClientRect(),i=t.target.getBoundingClientRect();s.left=i.left-e.left,s.top=i.top-e.top,this.dragging=s,this.isDragging=!0;break}case"dragend":{if(!this.isDragging)return;let e=t.target.offsetParent.getBoundingClientRect(),i=t.target.getBoundingClientRect();s.left=i.left-e.left,s.top=i.top-e.top,this.dragging=null,this.isDragging=!1;break}case"dragmove":{const t=M(this.lastX,this.lastY,i,n);s.left=this.dragging.left+t.deltaX,s.top=this.dragging.top+t.deltaY,this.dragging=s;break}}r=this.calcXY(s.top,s.left),this.lastX=i,this.lastY=n,this.innerX===r.x&&this.innerY===r.y||this.$emit("move",this.i,r.x,r.y),"dragend"!==t.type||this.previousX===this.innerX&&this.previousY===this.innerY||this.$emit("moved",this.i,r.x,r.y),this.eventBus.$emit("dragEvent",t.type,this.i,r.x,r.y,this.innerH,this.innerW)},calcPosition:function(t,e,i,n){const r=this.calcColWidth();return{left:Math.round(r*t+t*this.$parent.currentMargin),top:Math.round(this.$parent.rowHeight*e+e*this.$parent.currentMargin),width:i===1/0?i:Math.round(r*i+Math.max(0,i-1)*this.$parent.currentMargin),height:n===1/0?n:Math.round(this.$parent.rowHeight*n+Math.max(0,n-1)*this.$parent.currentMargin)}},calcXY(t,e){const i=this.calcColWidth();let n=Math.round(e/(i+this.$parent.currentMargin)),r=Math.round(t/(this.$parent.rowHeight+this.$parent.currentMargin));return n=Math.max(Math.min(n,this.$parent.currentColCount-this.innerW),0),{x:n,y:r}},calcColWidth(){return(this.$parent.width-this.$parent.currentMargin*(this.$parent.currentColCount-1))/this.$parent.currentColCount},calcWH(t,e){const i=this.calcColWidth();let n=Math.round((e+this.$parent.currentMargin)/(i+this.$parent.currentMargin)),r=Math.round((t+this.$parent.currentMargin)/(this.$parent.rowHeight+this.$parent.currentMargin));return n=Math.max(Math.min(n,this.$parent.currentColCount-this.innerX),0),{w:n,h:r}},tryMakeDraggable:function(){const t=this;if(null!==this.interactObj&&void 0!==this.interactObj||(this.interactObj=a(this.$refs.item)),this.draggable){const e={ignoreFrom:this.dragIgnoreFrom,allowFrom:this.dragAllowFrom};this.interactObj.draggable(e),this.dragEventSet||(this.dragEventSet=!0,this.interactObj.on("dragstart dragmove dragend",function(e){t.handleDrag(e)}))}else this.interactObj.draggable({enabled:!1})},tryMakeResizable:function(){const t=this;if(null!==this.interactObj&&void 0!==this.interactObj||(this.interactObj=a(this.$refs.item)),this.resizable){let e=this.calcPosition(0,0,this.maxW,this.maxH),i=this.calcPosition(0,0,this.minW,this.minH);const n={preserveAspectRatio:!0,edges:{left:!1,right:"."+this.resizableHandleClass,bottom:"."+this.resizableHandleClass,top:!1},ignoreFrom:this.resizeIgnoreFrom,restrictSize:{min:{height:i.height,width:i.width},max:{height:e.height,width:e.width}}};this.interactObj.resizable(n),this.resizeEventSet||(this.resizeEventSet=!0,this.interactObj.on("resizestart resizemove resizeend",function(e){t.handleResize(e)}
1))}else this.interactObj.resizable({enabled:!1})}}},O={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"item",staticClass:"vue-grid-layout",style:t.mergedStyle,attrs:{"data-observe-resizing":""}},[t._t("default"),t._v(" "),i("grid-item",{directives:[{name:"show",rawName:"v-show",value:t.isDragging,expression:"isDragging"}],staticClass:"vue-grid-placeholder",attrs:{x:t.placeholder.x,y:t.placeholder.y,w:t.placeholder.w,h:t.placeholder.h,i:t.placeholder.i}})],2)},staticRenderFns:[],name:"GridLayout",provide:()=>({eventBus:null}),components:{GridItem:I},props:{layouts:null,itemRatio:{type:Number,default:1},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},breakpoints:{type:Object,default:function(){return{lg:1200,md:996,sm:768,xs:480,xxs:0}}},margin:{type:Object,default:function(){return{lg:10,md:10,sm:10,xs:10,xxs:10}}}},data:()=>({cols:{},rowHeight:60,width:null,mergedStyle:{},isDragging:!1,currentColCount:null,currentMargin:null,lastBreakpoint:null,layout:[],lastPlaceholderWidth:null,lastPlaceholderHeight:null,placeholder:{x:0,y:0,w:0,h:0,i:-1}}),created(){this.resizeEventHandler=(t,e,i,n,r,s)=>{this.resizeEvent(t,e,i,n,r,s)},this.dragEventHandler=(t,e,i,n,r,s)=>{this.dragEvent(t,e,i,n,r,s)},this._provided.eventBus=new Vue,this.eventBus=this._provided.eventBus,this.eventBus.$on("resizeEvent",this.resizeEventHandler),this.eventBus.$on("dragEvent",this.dragEventHandler),this.$emit("layout-created",this.layout),this.$on("add-item",t=>{let e={x:0,y:9999,w:2,h:2};e.i=void 0!==t?t:this.layout.length;let i=Object.entries(this.layouts);for(let t=0;t<i.length;t++){let n=i[t][1],r=Object.assign({},e);n.push(r)}this.$emit("item-added",t)}),this.eventBus.$on("removeItem",t=>{let e=Object.assign({},this.layouts),i=Object.entries(e);for(let e=0;e<i.length;e++){let n=i[e][1];n.some((e,i)=>{e.i==t&&n.splice(i,1)})}this.$emit("update:layouts",e),this.$emit("itemRemoved",t)})},beforeDestroy:function(){this.eventBus.$off("resizeEvent",this.resizeEventHandler),this.eventBus.$off("dragEvent",this.dragEventHandler),this.eventBus.$off("removeItem"),this.eventBus.$destroy()},mounted:function(){if(!this.layouts){let t=Object.entries(this.breakpoints),e={};for(let i=0;i<t.length;i++){e[t[i][0]]=[]}this.$emit("update:layouts",e)}this.$nextTick(()=>{this.onWindowResize(),this.$refs.item.onElementResize=t=>{this.onWindowResize()},this.$nextTick(()=>{this.$emit("mounted-and-resized")})})},watch:{margin(){this.resizeEvent()},breakpoints(){let t=Object.assign({},this.layouts),e=Object.assign({},this.margin),i=Object.entries(t),n=Object.entries(this.breakpoints).sort((t,e)=>t[1]-e[1]);for(let n=0;n<i.length;n++){let r=i[n][0];this.breakpoints[r]||(delete t[r],delete e[r])}for(let i=0;i<n.length;i++){let r=n[i][0];if(i-1>=0){let s=n[i-1][0];if(!t[r]){let i=JSON.parse(JSON.stringify(t[s]));t[r]=i,e[r]=this.margin[s]}}}this.$emit("update:layouts",t),this.$emit("update:margin",e),this.resizeEvent()},width:function(t,e){this.$nextTick(()=>{null===e&&this.$nextTick(()=>{this.$emit("layout-ready",this.layout)}),this.updateHeight()})},layout:function(){w(B(this.layout,this.currentColCount)),this.$emit("update:currentLayout",this.layout),this.updateHeight()},isDraggable:function(){this.eventBus.$emit("setDraggable",this.isDraggable)},isResizable:function(){this.eventBus.$emit("setResizable",this.isResizable)}},methods:{sortBreakpoints:t=>Object.keys(t).sort(function(e,i){return t[e]-t[i]}),getLastBreakpoint(){const t=this.sortBreakpoints(this.breakpoints);let e=t[0];for(let i=1,n=t.length;i<n;i++){const n=t[i];this.width>=this.breakpoints[n]&&(e=n)}return e},calcColWidths(){let t=Object.entries(this.breakpoints),e={};for(let i=0;i<t.length;i++){let n=40,r=0,s=t[i][0],o=t[i][1];for(;r<50&&n>=2;)n--,r=(o-this.margin[s]*(n-1))/n;n%2!=0&&n%3!=0&&n>2&&n--,e[s]=n}this.cols=e},updateHeight:function(){this.mergedStyle={height:this.containerHeight()}},onWindowResize:function(){this.width=this.$refs.item.offsetWidth,this.lastBreakpoint=this.getLastBreakpoint(),this.currentMargin=this.margin[this.lastBreakpoint],this.layout=this.layouts[this.lastBreakpoint],this.calcColWidths(),this.currentColCount=this.cols[this.lastBreakpoint],this.rowHeight=(this.width-this.currentMargin*(this.currentColCount-1))/this.currentColCount*this.itemRatio,this.eventBus.$emit("resizeEvent")},containerHeight:function(){return function(t){let e,i=0;for(let n=0,r=t.length;n<r;n++)e=t[n].y+t[n].h,e>i&&(i=e);return i}(this.layout)*(this.rowHeight+this.currentMargin)-this.currentMargin+"px"}
1,dragEvent:function(t,e,i,n,r,s){let o=x(this.layout,e);null==o&&(o={x:0,y:0}),"dragmove"===t||"dragstart"===t?(this.placeholder.i=e,this.placeholder.x=o.x,this.placeholder.y=o.y,this.placeholder.w=s,this.placeholder.h=r,this.$nextTick(function(){this.isDragging=!0})):this.$nextTick(function(){this.isDragging=!1}),S(this.layout,o,i,n,!0),w(B(this.layout,this.currentColCount)),this.eventBus.$emit("compact"),this.updateHeight(),"dragend"===t&&this.$emit("layout-updated",this.layout)},resizeEvent:function(t,e,i,n,r,s){let o=x(this.layout,e);null==o&&(o={h:0,w:0}),o.w=s,o.h=r,"resizestart"===t||"resizemove"===t?(this.placeholder.i=e,this.placeholder.x=i,this.placeholder.y=n,this.placeholder.w=o.w,this.placeholder.h=o.h,this.$nextTick(function(){this.isDragging=!0})):this.$nextTick(function(){this.isDragging=!1});let a=this.lastBreakpoint;this.lastBreakpoint=this.getLastBreakpoint(),this.currentMargin=this.margin[this.lastBreakpoint],this.layout=this.layouts[this.lastBreakpoint],this.calcColWidths(),this.currentColCount=this.cols[this.lastBreakpoint],this.rowHeight=(this.width-this.currentMargin*(this.currentColCount-1))/this.currentColCount*this.itemRatio,w(B(this.layout,this.currentColCount)),this.eventBus.$emit("compact"),this.updateHeight(),a!==this.lastBreakpoint&&this.$emit("breakpoint-change",{currentColCount:this.currentColCount,rowHeight:this.rowHeight,lastBreakpoint:a,currentBreakpoint:this.lastBreakpoint,currentMargin:this.currentMargin,layout:this.layout,cols:this.cols}),this.$emit("data-updated",{currentColCount:this.currentColCount,rowHeight:this.rowHeight,lastBreakpoint:a,currentBreakpoint:this.lastBreakpoint,currentMargin:this.currentMargin,layout:this.layout,cols:this.cols}),"resizeend"===t&&this.$emit("layout-updated",this.layout)}}},H={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"componentWrapper",staticClass:"ccldg__component-wrapper",class:{"is-empty":0===t.currentLayout.length,ie11:t.isIe11}},[t.inEditMode?i("div",{ref:"gridControls",staticClass:"ccldg__controls"},[i("div",{staticClass:"ccldg__controls-top-bar ccldg__gridconfigs-bar"},t._l(t.sortedBreakpoints,function(e,n){return i("div",{class:["ccldg__gridconfig-option",{active:t.activeBreakpoint===e[0]}],style:[{width:t.gridconfigOptionWidth(n)}],on:{click:function(i){t.activeBreakpoint=e[0]}}},[i("div",{staticClass:"ccldg__gridconfig-option-size-label"},[t._v(t._s(e[1])+"px")])])}),0),t._v(" "),i("div",{staticClass:"ccldg__controls-bottom-bar"},[i("div",{staticClass:"ccldg__controls-input-wrapper"},[i("label",[t._v("Spalten ")]),t._v("\n        "+t._s(t.currentColCount)+"\n      ")]),t._v(" "),i("div",{staticClass:"ccldg__controls-input-wrapper"},[i("label",[t._v("Breakpoint (px) ")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:t.currentBreakpointSize,expression:"currentBreakpointSize",modifiers:{lazy:!0,number:!0}}],staticClass:"ccldg__custom-grid-width ccldg__controls-input",attrs:{type:"number"},domProps:{value:t.currentBreakpointSize},on:{change:function(e){t.currentBreakpointSize=t._n(e.target.value)},blur:function(e){return t.$forceUpdate()}}})]),t._v(" "),i("div",{staticClass:"ccldg__controls-input-wrapper"},[i("label",[t._v("Abstand (px)")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:t.currentMargin,expression:"currentMargin",modifiers:{lazy:!0,number:!0}}],staticClass:"ccldg__grid-margin ccldg__controls-input",attrs:{type:"number"},domProps:{value:t.currentMargin},on:{change:function(e){t.currentMargin=t._n(e.target.value)},blur:function(e){return t.$forceUpdate()}}})]),t._v(" "),t.mayAddBreakpoint?i("a",{staticClass:"ccldg__add-grid-button",attrs:{href:"#",role:"button"},on:{click:function(e){return e.preventDefault(),t.addBreakpoint()}}},[i("ionas-icon-plus",[i("i",{staticClass:"sf sf-filled-in sf-add-1"})]),t._v("\n        Breakpoint hinzufügen\n      ")],1):t._e(),t._v(" "),t.sortedBreakpoints.length>1?i("a",{staticClass:"ccldg__remove-grid-button",attrs:{href:"#",role:"button"},on:{click:function(e){return e.preventDefault(),t.removeBreakpoint()}}},[i("ionas-icon-minus",[i("i",{staticClass:"sf sf-filled-in sf-cross-1"})]),t._v("\n        Breakpoint entfernen\n      ")],1):t._e()])]):t._e(),t._v(" "),i("div",{ref:"outerContainer",staticClass:"ccldg__outer-container outer-container",class:t.outerClass},[t.inEditMode?t._e():t._t("default"),t._v(" "),t.gridDataReady?i("grid-layout",{ref:"gridLayout",staticClass:"ccldg",class:t.outerClass,style:{"max-width":t.inEditMode?"none":t.maxWidth},attrs:{"current-layout":t.currentLayout,layouts:t.layouts,breakpoints:t.breakpoints,margin:t.margin,itemRatio:t.itemRatio,"is-resizable":t.inEditMode,"is-draggable":t.inEditMode},on:{"update:currentLayout":function(e){t.currentLayout=e},"update:current-layout":function(e){t.currentLayout=e},"update:layouts":function(e){t.layouts=e},"update:breakpoints":function(e){t.breakpoints=e},"update:margin":function(e){t.margin=e},"layout-updated":t.layoutUpdated,"item-added":t.itemAdded,itemRemoved:t.itemRemoved,"data-updated":t.dataUpdated,"breakpoint-change":t.breakpointChanged,"mounted-and-resized":t.gridMountedAndResized}},[t.inEditMode?t._t("default"):t._e(),t._v(" "),t._l(t.currentLayout,function(e){return i("grid-item",{key:e.i,ref:"gridItem",refInFor:!0,class:["ccldg__item"].concat(e.className||[]),attrs:{dragAllowFrom:".tile-move",x:e.x,y:e.y,w:e.w,h:e.h,i:e.i},on:{resize:t.onItemResize,resized:t.onItemResized}},[i(t.currentComponent[e.i]?t.currentComponent[e.i].tagName:"",{tag:"component",attrs:{"component-id":e.i,"grid-item":e,"tile-colors":t.defaultTileColors,"in-edit-mode":t.inEditMode,content:t.currentComponent[e.i]?t.currentComponent[e.i].content:""}})],1)})],2):t._e()],2),t._v(" "),t.inEditMode?i("div",{staticClass:"ccldg__button-controls"},[i("button",{ref:"addTileButton",staticClass:"ccldg__add-tile-button ccldg__round-button",attrs:{title:"Kachel hinzufügen"},on:{click:function(e){return t.addItem()}}},[i("ionas-icon-plus",[i("span",{staticClass:"sf sf-filled-in sf-add-1"})])],1),t._v(" "),i("button",{directives:[{name:"color-palette-toggle",rawName:"v-color-palette-toggle.leftTop",value:".ccldg__grid-color-palettes",expression:"'.ccldg__grid-color-palettes'",modifiers:{leftTop:!0}}],staticClass:"ccldg__color-picker ccldg__round-button",attrs:{title:"Hintergrundfarbe auswählen"}},[i("ionas-icon-dynamicgrid-fill",[i("span",{staticClass:"sf sf-filled-in sf-bucket"})])],1)]):t._e(),t._v(" "),t.defaultGridColors.length>0?i("color-palette",{ref:"gridColors",staticClass:"ccldg__grid-color-palettes",attrs:{colorPalettes:t.defaultGridColors,activeColor:t.activeGridColor},on:{"update:activeColor":function(e){t.activeGridColor=e},"update:active-color":function(e){t.activeGridColor=e},updateActiveColor:t.updateActiveGridColor}}):t._e(),t._v(" "),t.defaultTileColors.length>0?i("color-palette",{ref:"tileColors",staticClass:"ccldg__tile-color-palettes",attrs:{colorPalettes:t.defaultTileColors,activeColor:t.activeTileColor},on:{"update:activeColor":function(e){t.activeTileColor=e},"update:active-color":function(e){t.activeTileColor=e},updateActiveColor:t.updateActiveTileColor,removedColor:t.removedTileColor}}):t._e()],1)},staticRenderFns:[],data(){return{currentLayout:[],gridDataReady:!1,layouts:null,breakpoints:null,margin:null,componentIdStore:null,unprocessedComponents:null,layoutsStore:null,componentIds:[],activeBreakpoint:null,currentBreakpointSize:null,currentMargin:null,currentColCount:null,currentComponent:{},tileColorsOld:null,activeTileColor:this.defaultTileColor.toLowerCase(),activeGridColor:this.defaultGridColor.toLowerCase(),gridBackgroun
1dElement:null,activeTileData:null,lastW:null,lastH:null}},name:"dynamic-grid",provide:()=>({ccldgEventBus:null}),computed:{isIe11:()=>!!window.MSInputMethodContext&&!!document.documentMode,sortedBreakpoints(){return s.sortedEntries(this.breakpoints)},sortedBreakpointKeys(){return s.sortedEntries(this.breakpoints).map(t=>t[0])},mayAddBreakpoint(){if(!this.activeBreakpoint)return!1;let t=this.sortedBreakpointKeys.indexOf(this.activeBreakpoint),e=this.sortedBreakpoints[t][1];if(t<this.sortedBreakpointKeys.length-1){let i=t+1,n=this.sortedBreakpointKeys[i];if(this.breakpoints[n]-e<=10)return!1}return!0}},created(){this._provided.ccldgEventBus=new Vue({data:this.$data}),this.ccldgEventBus=this._provided.ccldgEventBus,this.transformDefaultBreakpoints(),this.transformDefaultMargin()},mounted(){if(this.layoutsStore=document.getElementById(`layouts-store-${this.id}`),this.componentIdStore=document.getElementById(`component-id-store-${this.id}`),this.unprocessedComponents=document.getElementById(`unprocessed-components-${this.id}`),this.buildLayouts(),this.gridDataReady=!0,this.inEditMode){document.body.addEventListener("mouseover",t=>{t.target.closest(".tile-controls")||t.target.closest(".vue-resizable-handle")?document.body.classList.add("hide-i4-markers"):document.body.classList.remove("hide-i4-markers")}),this.ccldgEventBus.$on("updateActiveTileColor",t=>{this.activeTileData=t.data,this.activeTileColor=t.data.activeColor});let t={attributes:!1,childList:!0,characterData:!1,subtree:!0};new MutationObserver(t=>{t.forEach(t=>{if(1===t.addedNodes.length&&1===t.removedNodes.length){let e=t.addedNodes[0];"function"==typeof e.matches&&e.parentElement.matches(".dynamic-grid-component")&&this.createTileInstance(e)}})}).observe(this.$el,t)}else this.ccldgEventBus.$on("breakpoint-changed",t=>{let e=[...t.layout];e.sort((t,e)=>t.y!==e.y?t.y-e.y:t.x-e.x),this.currentLayout=e});try{this.componentIds=JSON.parse(this.componentIdStore.textContent)}catch(t){}},methods:{gridMountedAndResized(){if(this.gridBackgroundElement=this.$refs.componentWrapper.querySelector(".ccldg__bg-image-container"),this.gridBackgroundElement.style.backgroundColor=this.activeGridColor,this.$refs.componentWrapper.style.setProperty("--ccldg-background-color",this.activeGridColor),this.inEditMode){let t=localStorage.getItem("tiles-last-breakpoint");this.breakpoints[t]?this.activeBreakpoint=t:this.activeBreakpoint=this.sortedBreakpoints[0][0]}this.componentIds.forEach((t,e)=>{this.currentLayout.some((e,i)=>{if(e.i===t){let e=this.unprocessedComponents.querySelector("#"+t);return this.createTileInstance(e),!0}})})},updateActiveTileColor(t){this.activeTileData&&(this.activeTileData.activeColor=t.colorValue,this.activeTileColor=t.colorValue)},updateActiveGridColor(t){this.gridBackgroundElement&&(this.gridBackgroundElement.style.backgroundColor=t.colorValue),this.activeGridColor=t.colorValue,this.$refs.componentWrapper.style.setProperty("--ccldg-background-color",this.activeGridColor)},transformDefaultMargin(){if((parseInt(this.defaultMargin)||0==this.defaultMargin)&&this.defaultMargin>=0){let t=Object.entries(this.breakpoints),e={};for(let i=0;i<t.length;i++){e[t[i][0]]=this.defaultMargin}this.margin=e}},transformDefaultBreakpoints(){if(!this.defaultBreakpoints||this.defaultBreakpoints&&0===this.defaultBreakpoints.length)return;let t={};this.defaultBreakpoints.forEach(e=>{let i=s.shortId();t[i]=e}),this.breakpoints=t},dataUpdated(t){this.$nextTick(()=>{this.currentColCount=t.currentColCount})},breakpointChanged(t){this.$nextTick(()=>{this.ccldgEventBus.$emit("breakpoint-changed",t)})},removedTileColor(t){this.ccldgEventBus.$emit("removedTileColor",t)},createTileInstance(t){let i=t.closest(".dynamic-grid-component"),n=i.getAttribute("id"),r=t.querySelector("[data-tile-component]");r&&(this.currentComponent[n]&&Vue.delete(this.currentComponent,n),this.$nextTick(()=>{if(r.hasAttribute("data-web-component"))e.import(r.getAttribute("data-web-component")).then(t=>{let e=Object.assign({},this.currentComponent);e[n]={},e[n].tagName=r.getAttribute("data-tile-component"),e[n].content=i,this.currentComponent=e});else{let t=Object.assign({},this.currentComponent);t[n]={}
1,t[n].tagName=r.getAttribute("data-tile-component"),t[n].content=i,this.currentComponent=t}}),this.inEditMode&&parent.ionas.marker.markAsDirty())},onItemResize(t,e,i){this.classifyTileSize(t,e,i),document.body.classList.add("hide-i4-markers")},onItemResized(t,e,i,n,r,s){this.lastW=null,this.lastH=null},classifyTileSize(t,e,i){let n=function(){let t=e*i;return s.TILE_VOLUMES.filter(e=>{let i=void 0===e.min?0:e.min,n=void 0===e.max?99999999:e.max;if(t>=i&&t<=n)return!0})[0].cssClass}(),r=function(){let t=e/i,n="";return t<.85&&(n="tall"),t>1.35&&t<2.5&&(n="wide"),t>=2.5&&(n="wide ultra-wide"),t>=.85&&t<=1.35&&(n="squarish"),n}(),o=[];o.push(n);let a=r.split(" ").filter(t=>t.length>0);o.push(...a),this.currentLayout.some((e,i)=>{let n=Object.assign({},e);if(e.i===t.i)return n.className=o,this.currentLayout.splice(i,1,n),!0}),this.ccldgEventBus.$emit("tileSizeChanged",t)},addBreakpoint(){let t=s.shortId(),e=this.breakpoints[this.activeBreakpoint]+300,i=Object.assign({},this.breakpoints),n=this.sortedBreakpointKeys.indexOf(this.activeBreakpoint),r=this.sortedBreakpoints[n][1];if(n<this.sortedBreakpointKeys.length-1){let t=n+1,i=this.sortedBreakpointKeys[t],s=this.breakpoints[i];e=r+Math.ceil(.5*(s-r))}i[t]=e,this.breakpoints=i,this.activeBreakpoint=t},removeBreakpoint(){let t=Object.assign({},this.breakpoints),e=JSON.parse(JSON.stringify(this.sortedBreakpointKeys)),i=e.indexOf(this.activeBreakpoint)-1,n=e[i];delete t[this.activeBreakpoint],this.activeBreakpoint=n||e[1],this.breakpoints=t},gridconfigOptionWidth(t){let e=this.sortedBreakpoints[this.sortedBreakpoints.length-1][1],i=this.sortedBreakpoints[0][1];if(t+1<this.sortedBreakpoints.length){return(this.sortedBreakpoints[t+1][1]-this.sortedBreakpoints[t][1])/(e-i)*100+"%"}},buildLayouts(){let t={},e=this.layoutsStore.textContent;try{if(t=JSON.parse(e),t.layouts&&(this.layouts=t.layouts),t.breakpoints&&(this.breakpoints=t.breakpoints),t.margin&&(this.margin=t.margin),t.tileColors){let e=t.tileColors;e.length>0&&!(e[0]instanceof Array)&&(this.tileColorsOld=JSON.parse(JSON.stringify(e))),delete t.tileColors}t.gridColors&&delete t.gridColors,t.gridColor&&(this.activeGridColor=t.gridColor)}catch(t){console.warn("Fehler beim Parsen der gespeicherten Layout-Konfiguration")}this.updateStore()},updateStore(){let t={},e=null;this.layouts&&(e=JSON.parse(JSON.stringify(this.layouts)),Object.entries(e).forEach(t=>{t[1].forEach(t=>{delete t.moved,delete t.className})})),e&&(t.layouts=e),t.breakpoints=this.breakpoints,t.margin=this.margin,t.gridColor=this.activeGridColor,this.layoutsStore.textContent=JSON.stringify(t)},layoutUpdated(){this.updateStore(),this.ccldgEventBus.$emit("layout-updated")},itemAdded(){this.updateStore()},itemRemoved(t){this.componentIds.splice(this.componentIds.indexOf(t),1),this.updateStore()},addItem(){let t="component-"+s.shortId();o.get(window.location.href,{params:{i4Selector:"#"+t,componentId:t}}).then(e=>{this.$refs.gridLayout.$emit("add-item",t);let i=document.createElement("div");i.innerHTML=e.data;let n=i.firstChild;this.componentIds.push(t),this.$nextTick(()=>{let t=n.firstElementChild;this.createTileInstance(t);let e=new parent.ionas.api.Component(t,t.getAttribute("data-ionas4-path"));parent.ionas.component.selectComponent(e.getChooserId(),e.getValue(),t=>{t&&e.setComponentAndShowProperties(t).then(()=>{})})})})}},watch:{componentIds(t){this.componentIdStore.textContent=JSON.stringify(t)},activeTileColor(){this.activeTileData&&(this.activeTileData.activeColor=this.activeTileColor)},activeGridColor(){this.updateStore()},layouts(){this.updateStore()},currentBreakpointSize(t,e){if(!this.inEditMode)return;let i=this.sortedBreakpointKeys[this.sortedBreakpointKeys.indexOf(this.activeBreakpoint)-1],n=this.breakpoints[i],r=this.sortedBreakpointKeys[this.sortedBreakpointKeys.indexOf(this.activeBreakpoint)+1],s=this.breakpoints[r];s&&this.currentBreakpointSize===s&&(this.currentBreakpointSize=s+1),n&&this.currentBreakpointSize===n&&(this.currentBreakpointSize=n-1),this.currentBreakpointSize<this.gridMinWidth&&(this.currentBreakpointSize=this.gridMinWidth),this.currentBreakpointSize>3840&&(this.currentBreakpointSize=3840),this.breakpoints[this.activeBreakpoint]=this.currentBreakpointSize,this.$refs.gridLayout.$el.style.width=this.currentBreakpointSize+"px",this.updateStore(
1)},currentMargin(t){if(!this.inEditMode)return;this.currentMargin>=this.maxMargin&&(this.currentMargin=this.maxMargin),this.currentMargin<0&&(this.currentMargin=0);let e=Object.assign({},this.margin);e[this.activeBreakpoint]=this.currentMargin,this.margin=e,this.updateStore()},activeBreakpoint(){this.inEditMode&&this.$nextTick(()=>{this.currentBreakpointSize=this.breakpoints[this.activeBreakpoint],this.currentMargin=this.margin[this.activeBreakpoint],localStorage.setItem("tiles-last-breakpoint",this.activeBreakpoint)})}},components:{GridLayout:O,GridItem:I,ColorPalette:C},props:{maxWidth:{type:String,default:"none"},defaultTileColors:{type:Array,default:()=>[]},defaultTileColor:String,defaultGridColor:String,defaultGridColors:{type:Array,default:()=>[]},maxMargin:{type:Number,default:30},defaultBreakpoints:Array,defaultMargin:Number,outerClass:{type:String},itemRatio:{type:Number,default:.75},gridMinWidth:{type:Number,default:270},gridMaxWidth:{type:Number,default:2800},id:String,inEditMode:{type:Boolean}}},L={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.inEditMode?i("div",{staticClass:"tile-controls"},[t._t("controls"),t._v(" "),i("div",{directives:[{name:"color-palette-toggle",rawName:"v-color-palette-toggle",value:".ccldg__tile-color-palettes",expression:"'.ccldg__tile-color-palettes'"}],ref:"colorToggle",staticClass:"tile-control tile-color-palettes",attrs:{role:"button",title:"Farbe auswählen"},on:{click:function(e){return t.updateActiveTileColor()}}},[i("ionas-icon-dynamicgrid-colorpicker",[i("i",{staticClass:"sf sf-filled-in sf-bucket"})])],1),t._v(" "),i("button",{ref:"tileRemoveButton",staticClass:"tile-control tile-remove",attrs:{role:"button",title:"Kachel entfernen"},on:{click:t.removeItem}},[i("ionas-icon-minus",[i("i",{staticClass:"sf sf-filled-in sf-bin-2"})])],1),t._v(" "),i("div",{staticClass:"tile-control tile-move",attrs:{role:"button",title:"Kachel bewegen"}},[i("ionas-icon-dynamicgrid-move",[i("i",{staticClass:"sf sf-filled-in sf-scroll-omnidirectional-1"})])],1)],2):t._e(),t._v(" "),i("div",{ref:"content",staticClass:"tile-content"},[t._t("default")],2)])},staticRenderFns:[],data:()=>({activeColor:null,storeElement:null}),inject:["eventBus","ccldgEventBus"],methods:{updateActiveTileColor(t){this.ccldgEventBus.$emit("updateActiveTileColor",{data:this.$data})},removeItem(){this.eventBus.$emit("removeItem",this.gridItem.i)},applyBackgroundColor(){this.$refs.content.querySelectorAll("[data-colorpicker-receiver]").forEach(t=>{t.style.backgroundColor=this.activeColor})}},created(){this.activeColor=this.ccldgEventBus.activeTileColor},mounted(){if(this.$refs.content.appendChild(this.content),this.storeElement=this.$refs.content.querySelector(".tile-store"),!this.storeElement)throw new Error("Element mit der componentId "+this.componentId+" hat keinen tile-store. Dieser muss in der Komponente angelegt werden.");try{let t=JSON.parse(this.storeElement.textContent);t.colorId&&this.ccldgEventBus.tileColorsOld&&(this.ccldgEventBus.tileColorsOld.forEach(e=>{Object.entries(e).some(e=>{if(e[0]===t.colorId)return this.activeColor=e[1],!0})}),delete t.colorId,this.storeElement.textContent=JSON.stringify(t)),t.color&&(this.activeColor=t.color)}catch(t){}this.applyBackgroundColor(),s.generateColorInfo(this.$refs.content)},watch:{activeColor(){let t={};try{t=JSON.parse(this.storeElement.textContent)}catch(t){}t.color=this.activeColor,this.storeElement.textContent=JSON.stringify(t),this.applyBackgroundColor(),s.generateColorInfo(this.$refs.content),this.$emit("colorUpdate",this.activeColor)}},props:["gridItem","componentId","content","tileColors","inEditMode"]};document.adoptedStyleSheets=[...document.adoptedStyleSheets,l],document.adoptedStyleSheets=[...document.adoptedStyleSheets,l],document.adoptedStyleSheets=[...document.adoptedStyleSheets,l],document.adoptedStyleSheets=[...document.adoptedStyleSheets,l],i.component("news-tile",t),i.component("icon-tile",c),i.component("tile-wrapper",L),i.component("images-tile",d),i.component("richtext-tile",p),i.component("image-with-text-tile",h),i.component("image-with-text-aside-tile",u),i.component("video-tile",b),i.component("search-tile",L),i.directive("color-palette-toggle",{bind:function(t,e,
1i){let n=e.value,r=Object.entries(e.modifiers),s=1===r.length?r[0][0]:null;t.addEventListener("click",e=>{let i=document.querySelector(n);if(i){let n=i.__vue__;n&&(n.registerToggle(t),n.toggle(e,s))}})}}),Pegasus.Common.Common.Framework.Vuejs.registerComponent("dynamic-grid",{DynamicGrid:H})}}});
2//# sourceMappingURL=ccldg.system.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.