"use strict";(self.webpackChunkdami=self.webpackChunkdami||[]).push([[7769],{97769:(o,t,a)=>{a.r(t),a.d(t,{default:()=>e});const e=async function({data:o,id:t},{refData:a}){try{if(!this.activeTab.id)throw new Error("no-tab");if(this.loopList[o.loopId]){const t=this.loopList[o.loopId].index+1;this.loopList[o.loopId].index=t,a.loopData[o.loopId]={$index:t,data:this.loopList[o.loopId].data[t]}}else{const e=+o.maxLoop||0,{elements:l,url:i,loopId:d}=await this._sendMessageToTab({id:t,label:"loop-data",data:{max:e,multiple:!0,...o}});this.loopEls.push({url:i,loopId:d,max:e,blockId:t,findBy:o.findBy,selector:o.selector});const s={maxLoop:e,index:0,blockId:t,data:l,id:o.loopId,type:"elements"};"none"!==o.loadMoreAction&&(s.loadMoreAction={maxLoop:e,loopAttrId:d,loopId:o.loopId,findBy:o.findBy,type:o.loadMoreAction,selector:o.selector.trim(),scrollToBottom:o.scrollToBottom,actionElMaxWaitTime:o.actionElMaxWaitTime,actionElSelector:o.actionElSelector.trim(),actionPageMaxWaitTime:o.actionPageMaxWaitTime}),this.loopList[o.loopId]=s,a.loopData[o.loopId]={$index:0,data:l[0]}}return{data:a.loopData[o.loopId],nextBlockId:this.getBlockConnections(t)}}catch(t){throw"element-not-found"===t?.message&&(t.data={selector:o.selector}),t}}}}]);