PageSourceSearch

https://folkloradatbazis.hu/assets/SegmentMelodyRelations-Du-hUfpy.js

js folkloradatbazis.hu collected 2026-10-02 20:36:28 UTC 14,514 bytes, 1 lines download raw bytes

1var t=(t,e,a)=>new Promise((l,n)=>{var s=t=>{try{o(a.next(t))}catch(e){n(e)}},i=t=>{try{o(a.throw(t))}catch(e){n(e)}},o=t=>t.done?l(t.value):Promise.resolve(t.value).then(s,i);o((a=a.apply(t,e)).next())});import{b as e,u as a,r as l,w as n,R as s,g as i,j as o,D as r,x as E,f as d,A as c,k as m,ae as L,F as T,a9 as u,ac as O,C as g,i as S,y as _,m as R,L as I,M as N,N as D,O as v,a7 as M,a6 as A,ad as f,ai as y,aa as k}from"./vue-vendor-T8bqCPPe.js";import{_ as C}from"./SegmentMap-MqV0p71e.js";import{s as p}from"./segmentService-C76qxeql.js";import{d as b,s as V,h,l as G,m as Y}from"./index-BfRVwcG_.js";import{E as x}from"./EventsScroller-D6RbyIx_.js";import"./vendor-ZZoDGEXE.js";import"./leaflet-cnZB7tUR.js";const H={class:"segment-melody-relations"},w={class:"segment-melody-relations-wrapper"},z={class:"content-container"},P={class:"mx-4 sm:mx-8 mb-8"},F={class:"page-title"},j={class:"subtitle"},K={key:0},$={key:1},B={class:"media"},U={key:0,class:"music"},q={class:"content-container"},J={key:0,class:"segment-melody-relations-content"},W={class:"px-4 sm:px-8"},Q={key:0,class:"my-10 text-2xl font-black text overflow-hidden"},X={key:1,class:"my-10 text-2xl font-black text"},Z={class:"segment-melody-relations-content-head"},tt={class:"segment-melody-relations-content-body mb-8"},et=["href","id","onClick"],at={class:"segment-melody-relations-content-playlist-item"},lt={class:"handle whitespace-nowrap text-black/50"},nt=["data-label"],st=["data-label"],it=["data-label"],ot={key:0},rt=["data-label"],Et={key:0},dt=["data-label"],ct={key:0},mt=["data-label"],Lt={key:0},Tt=["data-label"],ut={key:0},Ot={__name:"SegmentMelodyRelations",setup(Ot){const{t:gt}=e({inheritLocale:!0});O();const St=a(),_t=St.currentRoute.value.params.id,Rt=l({segmentData:[],segmentDataLoading:!1,activeRow:null,folkEvent:null,seletedPlaylistItem:{},shareLinkDialogIsVisible:!1,shareLink:"",segmentDetails:{},segmentMelodyRelations:{},rootVariation:null,selectedVariation:0,playbackInProgress:!1});function It(e,a=0){return t(this,null,function*(){Rt.segmentDataLoading=!0;const t=yield p.getSegmentsData(e);t.length?(Rt.segmentData=t.sort((t,e)=>{var a;const l=null==(a=t.validityLoc)?void 0:a.localeCompare(e.validityLoc);return 0!==l?l:t.informers[0].name.localeCompare(e.informers[0].name)}),vt(),Rt.segmentData.forEach(t=>{t.duration=Y(t.duration)}),V.state.segmentMelodyRelations.segmentDataForScroller=Rt.segmentData):(Rt.segmentData=[],V.state.segmentMelodyRelations.segmentDataForScroller=null),Rt.segmentDataLoading=!1})}function Nt(e,a){return t(this,null,function*(){var t;Rt.activeRow=null,It(null==(t=Rt.segmentMelodyRelations)?void 0:t.relatedVariations[a]),Rt.selectedVariation=a,V.state.segmentMelodyRelations.selectedVariationBySegmentId[_t]=a})}function Dt(e,a,l){return t(this,null,function*(){if(["actionsContextMenu","handle"].some(t=>t===e))return;Rt.folkEvent=yield h.getAsync(`folkEvent/getEvent/${l}`),Rt.activeRow=a!==Rt.activeRow?a:null;const t=document.getElementById(e);setTimeout(()=>{t.scrollIntoView(!0)},100)})}function vt(){Rt.segmentData.forEach(t=>{t.formattedFromDate=G(t.fromDate)})}return window.onpopstate=t=>{t.preventDefault();const e=b(),a=V.state.segmentMelodyRelations.navigateBackUrl,l=a.startsWith("/")?`/${e}${a}`:a;St.push(l)},n(()=>V.state.currentLanguage,()=>t(this,null,function*(){vt()})),s(()=>t(this,null,function*(){var t,e,a,l;Rt.playListsLoading=!0,Rt.segmentDetails=yield h.getAsyncNoLanguage(`folkEvent/segmentData/${_t}`,null,!1);const n=yield h.getAsync(`folkEvent/segmentMelodyRelations/${_t}`);if(n){n.relatedVariations.forEach((t,e)=>{t.some(t=>t===parseInt(St.currentRoute.value.params.id))&&(Rt.rootVariation=e,Rt.selectedVariation=e)});const l=null==(t=V.state.segmentMelodyRelations.selectedVariationBySegmentId)?void 0:t[_t];if("number"==typeof l){const t=n.relatedVariations.length-1;l>=0&&l<=t&&(Rt.selectedVariation=l)}Rt.segmentDetails.relatedVariations=n.relatedVariations,Rt.segmentDetails.relatedVariations[0]=null==(e=Rt.segmentDetails.relatedVariations[0])?void 0:e.filter(t=>t!==_t),Rt.segmentDetails.relatedVariations.totalCount=Rt.segmentDetails.relatedVariations.length,Rt.segmentDetails.relatedVariations.variationsCount=n.count,Rt.segmentDetails.relatedVariations.closeRootMelodiesCount=Rt.segmentDetails.relatedVariations.length-1,Rt.segmentDetails.relatedVariations.closeVariationsCount=n.relCount-(null==(a=Rt.segmentDetails.relatedVariations[0])?void 0:a.length),Rt.segmentDetails.relatedVariations.relCount=n.relCount}Rt.segmentMelodyRelations={originalSegmentId:_t,originalReference:Rt.segmentDetails.reference,relatedVariations:Rt.segmentDetails.relatedVariations};
1const s=null==(l=Rt.segmentMelodyRelations)?void 0:l.relatedVariations[Rt.selectedVariation];s&&s.length&&It(s),Rt.favouriteSegmentListIsEmpty=!Rt.segmentData.length,Rt.playListsLoading=!1})),(e,a)=>{var l,n,s,O,p,V,G;const Y=N,Ot=v,_t=D,It=I,vt=C,Mt=g("router-link"),At=f,ft=A,yt=M,kt=u;return S(),i(T,null,[o("section",H,[o("div",w,[o("div",z,[o("section",P,[o("h1",F,E(d(gt)("TITLE")),1),o("div",j,E(d(gt)("SUBTITLE",{closeRootMelodiesCount:null==(n=null==(l=Rt.segmentDetails)?void 0:l.relatedVariations)?void 0:n.totalCount,closeVariationsCount:null==(O=null==(s=Rt.segmentDetails)?void 0:s.relatedVariations)?void 0:O.relCount})),1)])]),r(x,{items:(null==(p=Rt.segmentMelodyRelations)?void 0:p.relatedVariations)||[],"selected-index":Rt.selectedVariation,"show-scroller":(null==(G=null==(V=Rt.segmentMelodyRelations)?void 0:V.relatedVariations)?void 0:G.length)>1,"auto-scroll":!1,"scroll-on-mount":!1,onItemClick:Nt},{default:c(({item:t,index:e})=>[0===e?(S(),i("div",K,E(d(gt)("SEGMENT_MELODY_RELATIONS.EVENTS_SCROLLER.CARD.ROOT_MELODY")),1)):(S(),i("div",$,E(d(gt)("SEGMENT_MELODY_RELATIONS.EVENTS_SCROLLER.CARD.RELATED_MELODY",{index:e})),1)),o("div",B,[t.length>0?(S(),i("span",U,[a[6]||(a[6]=o("i",{class:"fas fa-music pr-1"},null,-1)),_(" "+E(d(gt)("SEGMENT_MELODY_RELATIONS.EVENTS_SCROLLER.CARD.VARIATION",{count:t.length})),1)])):m("",!0)])]),_:1},8,["items","selected-index","show-scroller"]),o("div",q,[Rt.segmentData.length?(S(),i("section",J,[o("div",W,[Rt.selectedVariation==Rt.rootVariation?(S(),i("h2",Q,E(d(gt)("SEGMENT_MELODY_RELATIONS.ROOT_TITLE",{originalReference:Rt.segmentMelodyRelations.originalReference})),1)):(S(),i("h2",X,E(d(gt)("SEGMENT_MELODY_RELATIONS.TITLE",{originalReference:Rt.segmentMelodyRelations.originalReference,selectedVariation:Rt.selectedVariation})),1))]),o("section",Z,[a[7]||(a[7]=o("div",null,null,-1)),o("div",null,E(d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.TITLE")),1),o("div",null,E(d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.DATE_OF_COLLECTION")),1),o("div",null,E(d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.LOCATION_OF_COLLECTION")),1),o("div",null,E(d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.COLLECTORS")),1),o("div",null,E(d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.VALIDITY_LOC")),1),o("div",null,E(d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.INFORMANTS")),1),o("div",null,E(d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.DURATION")),1)]),o("section",tt,[r(d(L),{list:Rt.segmentData,handle:".handle",class:"draggable",disabled:!0},{item:c(({element:e,index:l})=>[r(Mt,{to:{name:"folkEventSegment",params:{lang:d(b)(),id:e.folkEventId,sid:e.id}},custom:""},{default:c(({href:n})=>[o("a",{href:n,class:"segment-melody-relations-content-body-row",id:"playlistItem-"+l,onClick:R(t=>function(t,e,a){"actionsContextMenu"===t.target.id||t.target.closest("#actionsContextMenu")||t.target.closest(".handle")||Dt(`playlistItem-${e}`,e,a)}(t,l,e.folkEventId),["prevent"])},[o("div",at,[o("div",lt,[o("span",null,E(l+1)+".",1)]),o("div",{"data-label":d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.TITLE")+":"},[_(E(e.segmentMapNr)+". "+E(e.bandName)+" ",1),e.title?(S(),i(T,{key:0},[_(": "+E(e.title),1)],64)):m("",!0)],8,nt),o("div",{"data-label":d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.DATE_OF_COLLECTION")+":"},E(e.formattedFromDate),9,st),o("div",{"data-label":d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.LOCATION_OF_COLLECTION")+":"},[e.placeOfCollection?(S(),i("span",ot,E(e.placeOfCollection.expr),1)):m("",!0)],8,it),o("div",{"data-label":d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.COLLECTORS")+":"},[e.collector?(S(),i("span",Et,E(e.collector.map(t=>t.expr).join(", ")),1)):m("",!0)],8,rt),o("div",{"data-label":d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.VALIDITY_LOC")+":"},[e.validityLoc?(S(),i("span",ct,E(e.validityLoc),1)):m("",!0)],8,dt),o("div",{"data-label":d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.INFORMANTS")+":"},[e.informers?(S(),i("span",Lt,E(e.informers.map(t=>t.name).join(", ")),1)):m("",!0)],8,mt),o("div",{"data-label":d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.HEADER.DURATION")+":"},[e.duration?(S(),i("span",ut,E(e.duration),1)):m("",!0)],8,Tt),o("div",null,[r(It,{"popper-class":"fdb-context-menu"},{dropdown:c(()=>[r(_t,null,{default:c(()=>[r(Ot,{onClick:R(a=>function(e){return t(this,null,function*(){const t=b();St.push(`/${t}/event/${e}`)})}(e.folkEventId),["stop"])},{default:c(()=>[a[9]||(a[9]=o("i",{class:"far fa-arrow-right"},null,-1)),_(" "+E(d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.ACTIONS.NAVIGATE_TO_EVENT")),1)]),_:1},8,["onClick"]),r(Ot,{onClick:R(a=>function(e){return t(this,null,function*(){Rt.shareLinkDialogIsVisible=!0;const t=yield h.getAsync(`folkEvent/getEvent/${e.folkEventId}`);Rt.shareLink=`${location.origin}/event/${e.folkEventId}/${t.reference}/segment/${e.id}`})}(e),["stop"])},{default:c(()=>[a[10]||(a[10]=o("i",{class:"far fa-share"},null,-1)),_(" "+E(d(gt)("SEGMENT_MELODY_RELATIONS.SEGMENTS.ACTIONS.SHARE")),1
1)]),_:1},8,["onClick"])]),_:2},1024)]),default:c(()=>[r(Y,{link:""},{default:c(()=>[...a[8]||(a[8]=[o("i",{id:"actionsContextMenu",class:"fa fa-ellipsis-v cursor-pointer text-black/50"},null,-1)])]),_:1})]),_:2},1024)])]),Rt.activeRow===l&&e?(S(),i("div",{key:0,class:"segment-melody-relations-content-playlist-segment-map",onClick:a[2]||(a[2]=R(()=>{},["stop"]))},[r(vt,{"folk-event":Rt.folkEvent,"segment-id":e.id,"start-playback":Rt.playbackInProgress,onPlaybackStarted:a[0]||(a[0]=t=>Rt.playbackInProgress=!0),onPlaybackStopped:a[1]||(a[1]=t=>Rt.playbackInProgress=!1),onPlaybackEnded:()=>function(e){return t(this,null,function*(){let a=e+1;var l;a>=Rt.segmentData.length&&(a=0),Rt.playbackInProgress=!0,l=()=>t(this,null,function*(){const t=Rt.segmentData[a];yield Dt("playlistItem-"+a,a,t.folkEventId)}),requestAnimationFrame(()=>{requestAnimationFrame(l)})})}(l)},null,8,["folk-event","segment-id","start-playback","onPlaybackEnded"])])):m("",!0)],8,et)]),_:2},1032,["to"])]),_:1},8,["list"])])])):m("",!0)])])]),r(kt,{modelValue:Rt.shareLinkDialogIsVisible,"onUpdate:modelValue":a[5]||(a[5]=t=>Rt.shareLinkDialogIsVisible=t),title:d(gt)("SEGMENT_MELODY_RELATIONS.SHARE_LINK_MODAL.SHARE_LINK")},{default:c(()=>[r(yt,{"label-position":"top"},{default:c(()=>[r(ft,null,{default:c(()=>[r(At,{modelValue:Rt.shareLink,"onUpdate:modelValue":a[4]||(a[4]=t=>Rt.shareLink=t),class:"w-50 my-2",size:"large"},{append:c(()=>[r(Y,{type:"primary",icon:d(y),onClick:a[3]||(a[3]=e=>function(){return t(this,null,function*(){yield navigator.clipboard.writeText(Rt.shareLink),k({message:gt("SEGMENT_MELODY_RELATIONS.SHARE_LINK_MODAL.LINK_COPIED_TO_CLIPBOARD"),type:"success",duration:2e3}),Rt.shareLinkDialogIsVisible=!1})}())},{default:c(()=>[_(E(d(gt)("SEGMENT_MELODY_RELATIONS.SHARE_LINK_MODAL.COPY")),1)]),_:1},8,["icon"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue","title"])],64)}}};!function(t){const e=t;e.__i18n=e.__i18n||[],e.__i18n.push({locale:"",resource:{hu:{TITLE:{t:0,b:{t:2,i:[{t:3}],s:"Rokon dallamok"}},SUBTITLE:{t:0,b:{t:2,i:[{t:4,k:"closeRootMelodiesCount"},{t:3,v:" törzsdallam, "},{t:4,k:"closeVariationsCount"},{t:3,v:" változat"}]}},SEGMENT_MELODY_RELATIONS:{ROOT_TITLE:{t:0,b:{t:2,i:[{t:4,k:"originalReference"},{t:3,v:" jelzetű dallam változatai"}]}},TITLE:{t:0,b:{t:2,i:[{t:4,k:"originalReference"},{t:3,v:" jelzetű dallam "},{t:4,k:"selectedVariation"},{t:3,v:". rokon törzsdallamának változatai"}]}},EVENTS_SCROLLER:{CARD:{ROOT_MELODY:{t:0,b:{t:2,i:[{t:3}],s:"Keresett törzsdallam"}},RELATED_MELODY:{t:0,b:{t:2,i:[{t:4,k:"index"},{t:3,v:". rokon törzsdallam"}]}},VARIATION:{t:0,b:{t:2,i:[{t:4,k:"count"},{t:3,v:" dallamváltozat"}]}}}},SEGMENTS:{HEADER:{TITLE:{t:0,b:{t:2,i:[{t:3}],s:"Megnevezés"}},DATE_OF_COLLECTION:{t:0,b:{t:2,i:[{t:3}],s:"Gyűjtés dátuma"}},LOCATION_OF_COLLECTION:{t:0,b:{t:2,i:[{t:3}],s:"Gyűjtés helye"}},COLLECTORS:{t:0,b:{t:2,i:[{t:3}],s:"Gyűjtő(k)"}},VALIDITY_LOC:{t:0,b:{t:2,i:[{t:3}],s:"Érvényességi terület"}},INFORMANTS:{t:0,b:{t:2,i:[{t:3}],s:"Adatközlő(k)"}},DURATION:{t:0,b:{t:2,i:[{t:3}],s:"Időtartam"}}},ACTIONS:{NAVIGATE_TO_EVENT:{t:0,b:{t:2,i:[{t:3}],s:"Foklóresemény megnyitása"}},SHARE:{t:0,b:{t:2,i:[{t:3}],s:"Megosztás"}}}},SHARE_LINK_MODAL:{SHARE_LINK:{t:0,b:{t:2,i:[{t:3}],s:"Link megosztása"}},COPY:{t:0,b:{t:2,i:[{t:3}],s:"Másolás"}},LINK_COPIED_TO_CLIPBOARD:{t:0,b:{t:2,i:[{t:3}],s:"Vágólapra másolva"}}}}},en:{TITLE:{t:0,b:{t:2,i:[{t:3}],s:"Related melodies"}},SUBTITLE:{t:0,b:{t:2,i:[{t:4,k:"closeRootMelodiesCount"},{t:3,v:" root melody(s), "},{t:4,k:"closeVariationsCount"},{t:3,v:" variation(s)"}]}},SEGMENT_MELODY_RELATIONS:{ROOT_TITLE:{t:0,b:{t:2,i:[{t:4,k:"originalReference"},{t:3,v:" jelzetű dallam változatai"}]}},TITLE:{t:0,b:{t:2,i:[{t:4,k:"originalReference"},{t:3,v:" jelzetű dallam "},{t:4,k:"selectedVariation"},{t:3,v:". rokon törzsdallamának változatai"}]}},EVENTS_SCROLLER:{CARD:{ROOT_MELODY:{t:0,b:{t:2,i:[{t:3}],s:"Root melody"}},RELATED_MELODY:{t:0,b:{t:2,i:[{t:4,k:"index"},{t:3,v:". related melody"}]}},VARIATION:{t:0,b:{t:2,i:[{t:4,k:"count"},{t:3,v:" dallamváltozat"}]}}}},SEGMENTS:{HEADER:{TITLE:{t:0,b:{t:2,i:[{t:3}],s:"Title"}},DATE_OF_COLLECTION:{t:0,b:{t:2,i:[{t:3}],s:"Date of collection"}},LOCATION_OF_COLLECTION:{t:0,b:{t:2,i:[{t:3}],s:"Location of collection"}},COLLECTORS:{t:0,b:{t:2,i:[{t:3}],s:"Collector(s)"}},VALIDITY_LOC:{t:0,b:{t:2,i:[{t:3}],s:"Validity location"}},INFORMANTS:{t:0,b:{t:2,i:[{t:3}],s:"Informant(s)"}},DURATION:{t:0,b:{t:2,i:[{t:3}],s:"Duration"}}},ACTIONS:{NAVIGATE_TO_EVENT:{t:0,b:{t:2,i:[{t:3}],s:"Navigate to event"}},SHARE:{t:0,b:{t:2,i:[{t:3}],s:"Share"}}}}
1,SHARE_LINK_MODAL:{SHARE_LINK:{t:0,b:{t:2,i:[{t:3}],s:"Share link"}},COPY:{t:0,b:{t:2,i:[{t:3}],s:"Copy"}},LINK_COPIED_TO_CLIPBOARD:{t:0,b:{t:2,i:[{t:3}],s:"Link copied to clipboard"}}}}}}})}(Ot);export{Ot as default};

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.