"use strict";(self["webpackChunkcarabi_x2"]=self["webpackChunkcarabi_x2"]||[]).push([[3305],{3240:function(t,e,i){i.r(e),i.d(e,{default:function(){return u}});var s=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{display:"flex","flex-wrap":"wrap",flex:"1"}},[t._t("default",null,{width:t.itemWidth})],2)},n=[],h=i(7063),c=class{constructor(t,e,i=20){this.callback=t=>{e(t)},this.resizeObs=new ResizeObserver((t=>{h.A.start(this.callback,i,t)})),this.resizeObs.observe(t)}disconnect(){this.resizeObs.disconnect(),h.A.cancel(this.callback)}},r={name:"AdaptiveList",props:{minItemWidth:{type:Number}},data(){return{width:0}},computed:{itemCount(){let t=Math.floor(this.width/this.minItemWidth);return Math.max(t,1)},itemWidth(){return 1===this.itemCount?"100%":100/this.itemCount-.001+"%"}},async mounted(){this.calcWidth(),this.resizeObs=new c(this.$el,(t=>{this.calcWidth()}))},beforeDestroy(){this.resizeObs&&this.resizeObs.disconnect()},methods:{calcWidth(){let t=this.$el.getBoundingClientRect();this.width=t.width}}},l=r,a=i(1656),d=(0,a.A)(l,s,n,!1,null,null,null),u=d.exports}}]);
//# sourceMappingURL=AdaptiveList.b235c2a8.js.map