1'use strict'; 2(() => { 3 const layer = [ 4 { 5 name: 'TOP', 6 href: '/', 7 }, 8 { 9 name: 'DISCOGRAPHY', 10 href: '/disco/', 11 }, 12 ]; 13 14 PAGE_FUNCTION.add('disco_in', { 15 enter() { 16 var _PAGE_LAYER, _PAGE_LAYER$change; 17 (_PAGE_LAYER = PAGE_LAYER) === null || _PAGE_LAYER === void 0 ? void 0 : (_PAGE_LAYER$change = _PAGE_LAYER.change) === null || _PAGE_LAYER$change === void 0 ? void 0 : _PAGE_LAYER$change.call(_PAGE_LAYER, layer); 18 PAGE_DISCO_IN.setup(); 19 }, 20 leave() { 21 PAGE_DISCO_IN.destroy(); 22 }, 23 }); 24 25 const PAGE_DISCO_IN = { 26 instance: {}, 27 setup() { 28 this.instance[CURRENT_AREA_ID] = Vue.createApp(vDiscoIn); 29 this.instance[CURRENT_AREA_ID].mount($_CURRENT_CONTENT.find('.v-disco-in').get()[0]); 30 }, 31 destroy() { 32 this.instance[PREV_AREA_ID].unmount(); 33 }, 34 }; 35 36 const vDiscoIn = Vue.defineComponent({ 37 name: 'DiscoIn', 38 setup(props, context) { 39 var _barba, _barba$history, _barba$history$previo, _barba2, _barba2$history, _barba2$history$previ; 40 // ========== INITIAL AREA ========== 41 const init = Vue.ref(false); 42 const show = Vue.ref(false); 43 const state = Vue.ref(vStore.state); 44 45 Vue.onMounted(() => { 46 $body.addClass('is-v-disco-in-load'); 47 if (!id) Pjax.changePage(''.concat(root.value, '/disco/')); 48 }); 49 function DiscoInLoaded() { 50 var _PAGE_LAYER2, _PAGE_LAYER2$push, _disco$value; 51 (_PAGE_LAYER2 = PAGE_LAYER) === null || _PAGE_LAYER2 === void 0 52 ? void 0 53 : (_PAGE_LAYER2$push = _PAGE_LAYER2.push) === null || _PAGE_LAYER2$push === void 0 54 ? void 0 55 : _PAGE_LAYER2$push.call(_PAGE_LAYER2, { 56 name: disco === null || disco === void 0 ? void 0 : (_disco$value = disco.value) === null || _disco$value === void 0 ? void 0 : _disco$value.title, 57 }); 58 Vue.nextTick(() => { 59 Lazy.update(); 60 show.value = true; 61 setTimeout(() => { 62 $body.removeClass('is-v-disco-in-load'); 63 }, 100); 64 }); 65 } 66 // DISCO IN 67 const query = url.getQuery(); 68 const id = query.id; 69 const indies = query.indies; 70 const discoDetailApi = vStore.API.discoDetail; 71 const disco = Vue.ref(null); 72 if (id) { 73 if (indies) { 74 disco.value = discoDetailApi.data[id]; 75 discInitialize(disco.value); 76 init.value = true; 77 setTimeout(DiscoInLoaded, 100); 78 } else { 79 SetAPI.addDiscoDetail(id, () => { 80 disco.value = discoDetailApi.data[id]; 81 discInitialize(disco.value); 82 83 init.value = true; 84 setTimeout(DiscoInLoaded, 100); 85 }); 86 } 87 } 88 function unitDisc(disc, data) { 89 let _discArray = []; 90 for (let i = 0; i < disc.length; i++) { 91 let _tracks = disc.filter((item) => item.disc_number === i + 1); 92 if (_tracks.length > 0) { 93 _discArray[i] = _tracks; 94 } 95 } 96 return _discArray; 97 } 98 99 // functions 100 function dlLinkExist(obj) { 101 let _valueArray = []; 102 Object.keys(obj).map((value, index) => { 103 _valueArray[index] = obj[value]; 104 }); 105 _valueArray = _valueArray.filter((item) => item !== ''); 106 return _valueArray.length > 0; 107 } 108 function discInitialize(data) { 109 if (!(data !== null && data !== void 0 && data.initialize)) { 110 data.id = !data.id || data.id === '' ? data.representative_goods_number : data.id; 111 data.tracks = indies ? data.tracks : unitDisc(data.discs, data); 112 data.deliveries_exist = dlLinkExist(data.deliveries); 113 data.date = data.release_date; 114 data.category = setDiscoCategory(data.type); 115 data.type = setDiscoType(data.type); 116 data.price = data.price !== '' ? Math.round(data.price_extax).toLocaleString() : data.price; 117 data.modelNumber = (data === null || data === void 0 ? void 0 : data.display_goods_number) !== '' ? (data === null || data === void 0 ? void 0 : data.display_goods_number) : disco === null || disco === void 0 ? void 0 : disco.representative_goods_number; 118 data.thumb = data.image_resize ? imgResize(data.image_resize) : data.image; 119 data.links = [];
120 Object.keys(data.deliveries).forEach((_key) => { 121 if (data.deliveries[_key] !== '') 122 data.links.push({ 123 name: dlLink(_key), 124 link: data.deliveries[_key], 125 }); 126 }); 127 if (!data.image) { 128 data.image = data.thumb; 129 } 130 data.initialize = true; 131 } 132 } 133 134 function discoTitleClass(str) { 135 return str.length >= 20 ? '-s' : str.length >= 10 ? '-m' : '-l'; 136 } 137 138 // back 139 const prevQuery = 140 ((_barba = barba) === null || _barba === void 0 ? void 0 : (_barba$history = _barba.history) === null || _barba$history === void 0 ? void 0 : (_barba$history$previo = _barba$history.previous) === null || _barba$history$previo === void 0 ? void 0 : _barba$history$previo.url) && 141 new URI( 142 (_barba2 = barba) === null || _barba2 === void 0 ? void 0 : (_barba2$history = _barba2.history) === null || _barba2$history === void 0 ? void 0 : (_barba2$history$previ = _barba2$history.previous) === null || _barba2$history$previ === void 0 ? void 0 : _barba2$history$previ.url 143 ).search(); 144 145 return { 146 // initial 147 root: root, 148 init, 149 show, 150 state, 151 // disco in 152 disco, 153 dlLink, 154 imgReplace, 155 discoTitleClass, 156 zeroPad: Default.zeroPadding, 157 // url 158 prevQuery, 159 }; 160 }, 161 }); 162})();
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.