2026-10-05 18:40:49 +03:30
|
|
|
import{_ as ve}from"./BasicModal.vue_vue_type_style_index_0_lang-f76fec1b.js";import{_ as _e}from"./BasicInput.vue_vue_type_style_index_0_lang-644caa39.js";import{u as H,_ as fe}from"./useBaseTable-45427402.js";import{_ as he}from"./button.vue_vue_type_style_index_0_lang-e7cef717.js";import{I as D}from"./Icon-b8613529.js";import{t as ge}from"./useDataTime-7db5a46b.js";import{g as we,a as xe,v as ye}from"./itemViews-372a60c0.js";import{_ as be,I as ke,J as ee,K as Me,d as Ae,i as v,z as Ie,B as W,o as A,c as I,e as o,w as m,f as J,b as s,l as x,t as O,L as X,n as V,H as h,M as K}from"./index-166b4ef1.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-b9bbd6f2.js";import{M as Ce}from"./index-58b86fb2.js";import{S as G}from"./index-de862045.js";import{T as P}from"./isSymbol-c953ccc2.js";import{U as Q}from"./index-6c7cbb7d.js";import"./usePrice-bc935b83.js";import"./index-7005b758.js";import"./SearchOutlined-3d6399d7.js";import"./omit-55909a9d.js";import"./vnode-c85f1a09.js";import"./FormItemContext-0e89b3aa.js";import"./index-08810a1f.js";import"./_plugin-vue_export-helper-e5be29c6.js";import"./isPlainObject-ed4c9976.js";import"./index-011e0893.js";import"./updateLocale-6eb93789.js";import"./shallowequal-78a96afc.js";import"./useState-43a565ec.js";import"./useMemo-99a24173.js";import"./lodash-593efeb6.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-6e462f47.js";import"./index-8bcb6210.js";import"./Badge-a3c7a3a7.js";import"./isNumeric-3f69e2aa.js";import"./index-ad625a72.js";import"./index-1465c5c8.js";import"./styleChecker-2eddf97d.js";import"./index-75be736e.js";import"./index-7f046693.js";import"./DialogWrap-88ddfe3e.js";import"./pickAttrs-5cd7ef1f.js";import"./css-aae66f86.js";import"./index-3ad11dd3.js";import"./toArray-cf38ce67.js";import"./isMobile-e2e89480.js";import"./index-991e4e35.js";import"./supabaseTableQuery-41e25409.js";import"./index-f98d2511.js";import"./_flatRest-ae97161b.js";import"./Col-6dc2da7a.js";import"./index-dfddf43f.js";import"./useRefs-ca4d56b6.js";const Te=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:l=>l.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"زیرعنوان",dataIndex:"sub_title",key:"sub_title"},{title:"زمان",dataIndex:"time",key:"time",customRender:l=>{const p=l.record.time||{minutes:0,seconds:0},r=String(p.minutes??0).padStart(2,"0"),g=String(p.seconds??0).padStart(2,"0");return`${r}:${g}`}},{title:"صوت",dataIndex:"src",key:"src",customRender:l=>l.record.src?"دارد":"-"},{title:"ترتیب",dataIndex:"sort_order",key:"sort_order",align:"center"},{title:"نمایش",dataIndex:"show",key:"show",align:"center",customRender:l=>l.record.show===!1?"مخفی":"نمایش"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:l=>ge(l.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],te="music_macharta_audio";async function Ue(l){const p=await ke("music_macharta_audios",l);return Array.isArray(p)?p:[p]}async function Re(l,p){const r=await ee("music_macharta_audios",l,{...p,updated_at:new Date().toISOString()});return Array.isArray(r)?r:[r]}async function Se(l,p){const r=await ee("music_macharta_audios",l,{show:p,updated_at:new Date().toISOString()});return Array.isArray(r)?r:[r]}async function De(l){await Me("music_macharta_audios",l)}function $e(l){return xe(l,te)}function Z(l,p){return we(l,p,te)}async function Le(l){const{TableEngineRequest:p}=await be(()=>import("./buildSupabaseQuery-ef077dbd.js"),["assets/buildSupabaseQuery-ef077dbd.js","assets/index-166b4ef1.js","assets/index-0643191e.css"]),r={...l};!r.sort&&!r.order&&(r.sort={key:"sort_order",order:"desc"});const g=await p(r,"music_macharta_audios");try{if(Array.isArray(g==null?void 0:g.rows)){const y=r.page||1,T=r.limit||20,U=(y-1)*T,C=g.rows.map((c,$)=>({...c,title:c.title??"",sub_title:c.sub_title??"",cover:c.cover??null,src:c.src??null,time:c.time??{minutes:0,seconds:0},show:c.show??!0,sort_order:c.sort_order??0
|