PageSourceSearch

https://www.hamienet.com/assets/utils-CEVb7nN1.js

js hamienet.com collected 2026-10-02 04:59:08 UTC 19,828 bytes, 653 lines download raw bytes

1import "./index-w5lXls15.js";
2import { i as instance } from "./vendor-i18n-BC7ZMXWQ.js";
3const GM_INSTRUMENTS = [
4  "Acoustic Grand Piano",
5  "Bright Acoustic Piano",
6  "Electric Grand Piano",
7  "Honky-tonk Piano",
8  "Electric Piano 1",
9  "Electric Piano 2",
10  "Harpsichord",
11  "Clavinet",
12  "Celesta",
13  "Glockenspiel",
14  "Music Box",
15  "Vibraphone",
16  "Marimba",
17  "Xylophone",
18  "Tubular Bells",
19  "Dulcimer",
20  "Drawbar Organ",
21  "Percussive Organ",
22  "Rock Organ",
23  "Church Organ",
24  "Reed Organ",
25  "Accordion",
26  "Harmonica",
27  "Tango Accordion",
28  "Acoustic Nylon Guitar",
29  "Acoustic Steel Guitar",
30  "Electric Jazz Guitar",
31  "Electric Clean Guitar",
32  "Electric Muted Guitar",
33  "Overdriven Guitar",
34  "Distortion Guitar",
35  "Guitar Harmonics",
36  "Acoustic Bass",
37  "Electric Bass Finger",
38  "Electric Bass Pick",
39  "Fretless Bass",
40  "Slap Bass 1",
41  "Slap Bass 2",
42  "Synth Bass 1",
43  "Synth Bass 2",
44  "Violin",
45  "Viola",
46  "Cello",
47  "Contrabass",
48  "Tremolo Strings",
49  "Pizzicato Strings",
50  "Orchestral Harp",
51  "Timpani",
52  "String Ensemble 1",
53  "String Ensemble 2",
54  "Synth Strings 1",
55  "Synth Strings 2",
56  "Choir Aahs",
57  "Voice Oohs",
58  "Synth Voice",
59  "Orchestra Hit",
60  "Trumpet",
61  "Trombone",
62  "Tuba",
63  "Muted Trumpet",
64  "French Horn",
65  "Brass Section",
66  "Synth Brass 1",
67  "Synth Brass 2",
68  "Soprano Sax",
69  "Alto Sax",
70  "Tenor Sax",
71  "Baritone Sax",
72  "Oboe",
73  "English Horn",
74  "Bassoon",
75  "Clarinet",
76  "Piccolo",
77  "Flute",
78  "Recorder",
79  "Pan Flute",
80  "Blown Bottle",
81  "Shakuhachi",
82  "Whistle",
83  "Ocarina",
84  "Square Wave Lead",
85  "Sawtooth Wave Lead",
86  "Calliope Lead",
87  "Chiff Lead",
88  "Charang Lead",
89  "Voice Lead",
90  "Fifths Lead",
91  "Bass Lead",
92  "New Age Pad",
93  "Warm Pad",
94  "Polysynth Pad",
95  "Choir Pad",
96  "Bowed Pad",
97  "Metallic Pad",
98  "Halo Pad",
99  "Sweep Pad",
100  "Rain Effect",
101  "Soundtrack Effect",
102  "Crystal Effect",
103  "Atmosphere Effect",
104  "Brightness Effect",
105  "Goblins Effect",
106  "Echoes Effect",
107  "Sci-Fi Effect",
108  "Sitar",
109  "Banjo",
110  "Shamisen",
111  "Koto",
112  "Kalimba",
113  "Bagpipe",
114  "Fiddle",
115  "Shanai",
116  "Tinkle Bell",
117  "Agogo",
118  "Steel Drums",
119  "Woodblock",
120  "Taiko Drum",
121  "Melodic Tom",
122  "Synth Drum",
123  "Reverse Cymbal",
124  "Guitar Fret Noise",
125  "Breath Noise",
126  "Seashore",
127  "Bird Tweet",
128  "Telephone Ring",
129  "Helicopter",
130  "Applause",
131  "Gunshot"
132];
133const INSTRUMENT_CATEGORIES = [
134  { name: "Piano", start: 0, end: 7 },
135  { name: "Chromatic Percussion", start: 8, end: 15 },
136  { name: "Organ", start: 16, end: 23 },
137  { name: "Guitar", start: 24, end: 31 },
138  { name: "Bass", start: 32, end: 39 },
139  { name: "Strings", start: 40, end: 47 },
140  { name: "Ensemble", start: 48, end: 55 },
141  { name: "Brass", start: 56, end: 63 },
142  { name: "Reed", start: 64, end: 71 },
143  { name: "Pipe", start: 72, end: 79 },
144  { name: "Synth Lead", start: 80, end: 87 },
145  { name: "Synth Pad", start: 88, end: 95 },
146  { name: "Synth Effects", start: 96, end: 103 },
147  { name: "Ethnic", start: 104, end: 111 },
148  { name: "Percussive", start: 112, end: 119 },
149  { name: "Sound Effects", start: 120, end: 127 }
150];
151const SOUNDFONT_INSTRUMENTS = [
152  "acoustic_grand_piano",
153  "bright_acoustic_piano",
154  "electric_grand_piano",
155  "honkytonk_piano",
156  "electric_piano_1",
157  "electric_piano_2",
158  "harpsichord",
159  "clavi",
160  "celesta",
161  "glockenspiel",
162  "music_box",
163  "vibraphone",
164  "marimba",
165  "xylophone",
166  "tubular_bells",
167  "dulcimer",
168  "drawbar_organ",
169  "percussive_organ",
170  "rock_organ",
171  "church_organ",
172  "reed_organ",
173  "accordion",
174  "harmonica",
175  "tango_accordion",
176  "acoustic_guitar_nylon",
177  "acoustic_guitar_steel",
178  "electric_guitar_jazz",
179  "electric_guitar_clean",
180  "electric_guitar_muted",
181  "overdriven_guitar",
182  "distortion_guitar",
183  "guitar_harmonics",
184  "acoustic_bass",
185  "electric_bass_finger",
186  "electric_bass_pick",
187  "fretless_bass",
188  "slap_bass_1",
189  "slap_bass_2",
190  "synth_bass_1",
191  "synth_bass_2",
192  "violin",
193  "viola",
194  "cello",
195  "contrabass",
196  "tremolo_strings",
197  "pizzicato_strings",
198  "orchestral_harp",
199  "timpani",
200  "string_ensemble_1",
201  "string_ensemble_2",
202  "synthstrings_1",
203  "synthstrings_2",
204  "choir_aahs",
205  "voice_oohs",
206  "synth_voice",
207  "orchestra_hit",
208  "trumpet",
209  "trombone",
210  "tuba",
211  "muted_trumpet",
212  "french_horn",
213  "brass_section",
214  "synthbrass_1",
215  "synthbrass_2",
216  "soprano_sax",
217  "alto_sax",
218  "tenor_sax",
219  "baritone_sax",
220  "oboe",
221  "english_horn",
222  "bassoon",
223  "clarinet",
224  "piccolo",
225  "flute",
226  "recorder",
227  "pan_flute",
228  "blown_bottle",
229  "shakuhachi",
230  "whistle",
231  "ocarina",
232  "lead_1_square",
233  "lead_2_sawtooth",
234  "lead_3_calliope",
235  "lead_4_chiff",
236  "lead_5_charang",
237  "lead_6_voice",
238  "lead_7_fifths",
239  "lead_8_bass_lead",
240  "pad_1_new_age",
241  "pad_2_warm",
242  "pad_3_polysynth",
243  "pad_4_choir",
244  "pad_5_bowed",
245  "pad_6_metallic",
246  "pad_7_halo",
247  "pad_8_sweep",
248  "fx_1_rain",
249  "fx_2_soundtrack",
250  "fx_3_crystal",
251  "fx_4_atmosphere",
252  "fx_5_brightness",
253  "fx_6_goblins",
254  "fx_7_echoes",
255  "fx_8_sci_fi",
256  "sitar",
257  "banjo",
258  "shamisen",
259  "koto",
260  "kalimba",
261  "bagpipe",
262  "fiddle",
263  "shanai",
264  "tinkle_bell",
265  "agogo",
266  "steel_drums",
267  "woodblock",
268  "taiko_drum",
269  "melodic_tom",
270  "synth_drum",
271  "reverse_cymbal",
272  "guitar_fret_noise",
273  "breath_noise",
274  "seashore",
275  "bird_tweet",
276  "telephone_ring",
277  "helicopter",
278  "applause",
279  "gunshot"
280];
281const getInstrumentName = (program, channel) => {
282  if (channel === 9) return "Percussion";
283  if (program === void 0 || program === null || program < 0 || program > 127) return instance.t("instruments.unknown", { defaultValue: "Unknown Instrument" });
284  const defaultName = GM_INSTRUMENTS[program] || "Unknown Instrument";
285  return instance.t(`instruments.${program}`, { defaultValue: defaultName });
286};
287const getSoundfontInstrumentName = (program) => {
288  if (program === 128) return "percussion";
289  if (program === void 0 || program === null || program < 0 || program > 127) return "acoustic_grand_piano";
290  return SOUNDFONT_INSTRUMENTS[program] || "acoustic_grand_piano";
291};
292const GM_PERCUSSION_MAP = {
293  35: "Acoustic Bass Drum",
294  36: "Bass Drum 1",
295  37: "Side Stick",
296  38: "Acoustic Snare",
297  39: "Hand Clap",
298  40: "Electric Snare",
299  41: "Low Floor Tom",
300  42: "Closed High Hat",
301  43: "High Floor Tom",
302  44: "Pedal High Hat",
303  45: "Low Tom",
304  46: "Open High Hat",
305  47: "Low Mid Tom",
306  48: "High Mid Tom",
307  49: "Crash Cymbal 1",
308  50: "High Tom",
309  51: "Ride Cymbal 1",
310  52: "Chinese Cymbal",
311  53: "Ride Bell",
312  54: "Tambourine",
313  55: "Splash Cymbal",
314  56: "Cowbell",
315  57: "Crash Cymbal 2",
316  58: "Vibraslap",
317  59: "Ride Cymbal 2",
318  60: "High Bongo",
319  61: "Low Bongo",
320  62: "Mute High Conga",
321  63: "Open High Conga",
322  64: "Low Conga",
323  65: "High Timbale",
324  66: "Low Timbale",
325  67: "High Agogo",
326  68: "Low Agogo",
327  69: "Cabasa",
328  70: "Maracas",
329  71: "Short Whistle",
330  72: "Long Whistle",
331  73: "Short Guiro",
332  74: "Long Guiro",
333  75: "Claves",
334  76: "High Wood Block",
335  77: "Low Wood Block",
336  78: "Mute Cuica",
337  79: "Open Cuica",
338  80: "Mute Triangle",
339  81: "Open Triangle"
340};
341const isContentBlocked = (userCountry, blockedRegions) => {
342  if (!blockedRegions || blockedRegions.length === 0) return false;
343  return blockedRegions.includes(userCountry);
344};
345const extractJson = (text) => {
346  if (!text) return "{}";
347  const match = text.match(/```json\s*([\s\S]*?)\s*```/i);
348  if (match) return match[1];
349  const match2 = text.match(/```\s*([\s\S]*?)\s*```/);
350  if (match2) return match2[1];
351  const startObj = text.indexOf("{");
352  const endObj = text.lastIndexOf("}");
353  const startArr = text.indexOf("[");
354  const endArr = text.lastIndexOf("]");
355  let start = -1;
356  let end = -1;
357  if (startObj !== -1 && endObj !== -1 && endObj > startObj) {
358    start = startObj;
359    end = endObj;
360  }
361  if (startArr !== -1 && endArr !== -1 && endArr > startArr) {
362    if (start === -1 || startArr < start && endArr > end) {
363      start = startArr;
364      end = endArr;
365    }
366  }
367  if (start !== -1 && end !== -1) {
368    return text.substring(start, end + 1);
369  }
370  return text;
371};
372const extractCode = (text) => {
373  if (!text) return "";
374  const match = text.match(/```(?:\w+)?\s*([\s\S]*?)\s*```/);
375  if (match) return match[1].trim();
376  return text.trim();
377};
378const generatePseudoWaveform = (seed, length = 1e3) => {
379  const seedStr = String(seed);
380  const data = [];
381  let hash = 0;
382  for (let i = 0; i < seedStr.length; i++) {
383    hash = (hash << 5) - hash + seedStr.charCodeAt(i);
384    hash |= 0;
385  }
386  const random = () => {
387    const x = Math.sin(hash++) * 1e4;
388    return x - Math.floor(x);
389  };
390  for (let i = 0; i < length; i++) {
391    const lowFreq = Math.sin(i * 0.2) * 0.5 + 0.5;
392    const highFreq = random() > 0.8 ? random() * 0.8 : 0;
393    const midFreq = random() * 0.3;
394    let val = lowFreq * 0.6 + highFreq + midFreq;
395    val = Math.max(0.15, Math.min(1, val));
396    data.push(val);
397  }
398  return data;
399};
400const getPlaceholderUrl = (width, height, text, bgColor = "f3f4f6", textColor = "9ca3af") => {
401  const svg = `<svg width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="#${bgColor}"/><text x="50%" y="50%" font-family="sans-serif" font-size="14" font-weight="bold" fill="#${textColor}" text-anchor="middle" dy=".3em">${text}</text></svg>`;
402  return `data:image/svg+xml;base64,${btoa(svg)}`;
403};
404const slugify = (text) => {
405  return text.toString().toLowerCase().trim().replace(/\s+/g, "-").replace(/[^\w\-]+/g, "").replace(/\-\-+/g, "-");
406};
407const generateTrackUrl = (track) => {
408  if (!track || !track.id) return "/";
409  const slug = slugify(track.title);
410  return `/midi${track.id}_${slug}.html`;
411};
412const timeAgo = (dateString) => {
413  const date = new Date(dateString);
414  const now = /* @__PURE__ */ new Date();
415  const seconds = Math.floor((now.getTime() - date.getTime()) / 1e3);
416  let interval = seconds / 31536e3;
417  if (interval > 1) return instance.t("time.yearsAgo", { count: Math.floor(interval), defaultValue: "{{count}} years ago" });
418  interval = seconds / 2592e3;
419  if (interval > 1) return instance.t("time.monthsAgo", { count: Math.floor(interval), defaultValue: "{{count}} months ago" });
420  interval = seconds / 604800;
421  if (interval > 1) return instance.t("time.weeksAgo", { count: Math.floor(interval), defaultValue: "{{count}} weeks ago" });
422  interval = seconds / 86400;
423  if (interval > 1) return instance.t("time.daysAgo", { count: Math.floor(interval), defaultValue: "{{count}} days ago" });
424  interval = seconds / 3600;
425  if (interval > 1) return instance.t("time.hoursAgo", { count: Math.floor(interval), defaultValue: "{{count}} hours ago" });
426  interval = seconds / 60;
427  if (interval > 1) return instance.t("time.minutesAgo", { count: Math.floor(interval), defaultValue: "{{count}} minutes ago" });
428  return instance.t("time.secondsAgo", { count: Math.floor(seconds), defaultValue: "{{count}} seconds ago" });
429};
430const getTrackColor = (index) => {
431  const hue = index * 137.508 % 360;
432  const saturation = 65 + index % 3 * 10;
433  const lightness = 50 + index % 2 * 10;
434  return `hsl(${hue}, ${saturation}%, ${lightness}%)`;
435};
436const isPro = (user) => {
437  var _a;
438  if (!user) return false;
439  const tier = (_a = user.subscriptionTier) == null ? void 0 : _a.toLowerCase();
440  return tier === "pro" || tier === "gold" || tier === "premium" || user.role === "ADMIN";
441};
442const formatFileSize = (bytes) => {
443  if (!bytes || bytes <= 0) return "0 B";
444  const k = 1024;
445  const sizes = ["B", "KB", "MB", "GB", "TB"];
446  const i = Math.floor(Math.log(bytes) / Math.log(k));
447  return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
448};
449const formatTicketDate = (dateStr) => {
450  if (!dateStr) return "";
451  const d = new Date(dateStr);
452  if (isNaN(d.getTime())) {
453    return String(dateStr);
454  }
455  return d.toLocaleString();
456};
457const isMobileDevice = () => {
458  if (typeof window === "undefined" || typeof navigator === "undefined") return false;
459  const ua = navigator.userAgent || "";
460  if (/Windows NT/i.test(ua)) return false;
461  return /Mobi|Android|iPhone|iPad/i.test(ua) || /Macintosh/i.test(ua) && navigator.maxTouchPoints > 0;
462};
463const isSlowMobile = () => {
464  if (typeof window === "undefined" || typeof navigator === "undefined") return false;
465  const isMobile = isMobileDevice();
466  if (!isMobile) return false;
467  const cores = navigator.hardwareConcurrency;
468  if (cores && cores < 4) {
469    return true;
470  }
471  const memory = navigator.deviceMemory;
472  if (memory && memory < 4) {
473    return true;
474  }
475  const lowPerfManual = localStorage.getItem("low_performance") === "true";
476  if (lowPerfManual) {
477    return true;
478  }
479  return false;
480};
481const getColorsFromHash = (str) => {
482  let hash = 0;
483  for (let i = 0; i < str.length; i++) {
484    hash = str.charCodeAt(i) + ((hash << 5) - hash);
485  }
486  const isClient = typeof document !== "undefined";
487  const isDark = isClient && document.documentElement.classList.contains("dark");
488  const isFun = isClient && document.body.classList.contains("fun-mode");
489  const isRetro = isClient && document.body.classList.contains("retro-mode");
490  const h1 = Math.abs(hash) % 360;
491  const h2 = (h1 + 60) % 360;
492  const h3 = (h1 + 120) % 360;
493  if (isClient && !isDark && !isFun && !isRetro) {
494    return {
495      gradient: `radial-gradient(at 0% 0%, hsl(${h1}, 75%, 85%) 0px, transparent 55%),
496                       radial-gradient(at 100% 0%, hsl(${h2}, 70%, 88%) 0px, transparent 55%),
497                       radial-gradient(at 50% 100%, hsl(${h3}, 80%, 86%) 0px, transparent 55%),
498                       #f4f4f5`,
499      glow: `0 8px 24px -8px hsla(${h1}, 75%, 50%, 0.12)`,
500      waveformBg: `hsla(${h1}, 50%, 45%, 0.25)`,
501      waveformFg: `hsl(${h1}, 70%, 40%)`,
502      waveformBgActive: `hsla(${h1}, 60%, 40%, 0.35)`,
503      waveformFgActive: `hsl(${h1}, 85%, 35%)`
504    };
505  }
506  if (isClient && isFun) {
507    return {
508      gradient: `radial-gradient(at 0% 0%, #ffe4e6 0px, transparent 55%),
509                       radial-gradient(at 100% 0%, #dbeafe 0px, transparent 55%),
510                       radial-gradient(at 50% 100%, #fef9c3 0px, transparent 55%),
511                       #fff1f2`,
512      glow: `0 8px 24px -8px rgba(251, 113, 133, 0.15)`,
513      waveformBg: `rgba(244, 63, 94, 0.15)`,
514      waveformFg: `rgb(244, 63, 94)`,
515      waveformBgActive: `rgba(244, 63, 94, 0.25)`,
516      waveformFgActive: `rgb(225, 29, 72)`
517    };
518  }
519  if (isClient && isRetro) {
520    return {
521      gradient: `linear-gradient(135deg, #DEE3E7, #EFEFEF)`,
522      glow: "none",
523      waveformBg: `#9ca3af`,
524      waveformFg: `#111827`,
525      waveformBgActive: `#6b7280`,
526      waveformFgActive: `#000000`
527    };
528  }
529  return {
530    gradient: `radial-gradient(at 0% 0%, hsl(${h1}, 75%, 25%) 0px, transparent 50%),
531                   radial-gradient(at 100% 0%, hsl(${h2}, 70%, 20%) 0px, transparent 50%),
532                   radial-gradient(at 50% 100%, hsl(${h3}, 80%, 15%) 0px, transparent 50%),
533                   #121214`,
534    glow: `0 10px 30px -10px hsla(${h1}, 80%, 50%, 0.35)`,
535    waveformBg: `hsla(${h1}, 50%, 75%, 0.15)`,
536    waveformFg: `hsl(${h1}, 80%, 65%)`,
537    waveformBgActive: `hsla(${h1}, 65%, 80%, 0.25)`,
538    waveformFgActive: `hsl(${h1}, 95%, 75%)`
539  };
540};
541function getBestAudioMode(track, isSlowMobileDevice, hasWebMidiSupport, hasMidiOutputs, pitchSemitones = 0, isWatchPage = false, engineOrder = null, preferredMode = null, isMobile = isMobileDevice()
541) {
542  var _a;
543  const isOpusAvailable = ((_a = track.midiMetadata) == null ? void 0 : _a.generatedFiles) ? !!track.midiMetadata.generatedFiles.opus : true;
544  const hasStems = isOpusAvailable && !!(track.instruments && track.instruments.some((i) => i.stemPath));
545  const isProcessed = track.status === "completed";
546  const hasMasterAudio = isProcessed && !!(track.opusPath || track.mp3PathHigh || track.mp3Path);
547  if (preferredMode) {
548    if (preferredMode === "opus" && hasStems && isWatchPage) return { mode: "opus", isLiveSynthFallback: false };
549    if (preferredMode === "singleopus" && hasMasterAudio && pitchSemitones === 0) return { mode: "singleopus", isLiveSynthFallback: false };
550    if (preferredMode === "webmidi" && hasWebMidiSupport && hasMidiOutputs) return { mode: "webmidi", isLiveSynthFallback: true };
551    if (preferredMode === "wasmsynth" || preferredMode === "fmsynth" || preferredMode === "chiptune" || preferredMode === "synth") {
552      return { mode: preferredMode, isLiveSynthFallback: true };
553    }
554  }
555  let list = null;
556  if (engineOrder) {
557    if (isSlowMobileDevice && engineOrder.slowMobile) {
558      list = engineOrder.slowMobile;
559    } else if (isWatchPage) {
560      list = isMobile || isSlowMobileDevice ? engineOrder.watchMobile || engineOrder.watchDesktop : engineOrder.watchDesktop;
561    } else {
562      list = engineOrder.miniPlayer;
563    }
564  }
565  if (list && Array.isArray(list) && list.length > 0) {
566    for (const engine of list) {
567      if (engine === "opus") {
568        if (hasStems && isWatchPage) {
569          return { mode: "opus", isLiveSynthFallback: false };
570        }
571      } else if (engine === "singleopus") {
572        if (hasMasterAudio && pitchSemitones === 0) {
573          return { mode: "singleopus", isLiveSynthFallback: false };
574        }
575      } else if (engine === "webmidi") {
576        if (hasWebMidiSupport && hasMidiOutputs) {
577          return { mode: "webmidi", isLiveSynthFallback: true };
578        }
579      } else if (engine === "wasmsynth") {
580        return { mode: "wasmsynth", isLiveSynthFallback: true };
581      } else if (engine === "fmsynth") {
582        return { mode: "fmsynth", isLiveSynthFallback: true };
583      } else if (engine === "chiptune") {
584        return { mode: "chiptune", isLiveSynthFallback: true };
585      } else if (engine === "synth") {
586        return { mode: "synth", isLiveSynthFallback: true };
587      }
588    }
589    for (const engine of list) {
590      if (engine === "wasmsynth" || engine === "fmsynth" || engine === "chiptune" || engine === "synth") {
591        return { mode: engine, isLiveSynthFallback: true };
592      }
593    }
594  }
595  if (isSlowMobileDevice) {
596    if (hasMasterAudio && pitchSemitones === 0) {
597      return { mode: "singleopus", isLiveSynthFallback: false };
598    } else if (hasWebMidiSupport && hasMidiOutputs) {
599      return { mode: "webmidi", isLiveSynthFallback: true };
600    } else {
601      return { mode: "chiptune", isLiveSynthFallback: true };
602    }
603  } else if (isMobile) {
604    if (hasMasterAudio && pitchSemitones === 0) {
605      return { mode: "singleopus", isLiveSynthFallback: false };
606    } else if (hasStems && isWatchPage) {
607      return { mode: "opus", isLiveSynthFallback: false };
608    } else {
609      return { mode: "wasmsynth", isLiveSynthFallback: true };
610    }
611  } else {
612    if (hasStems && isWatchPage) {
613      return { mode: "opus", isLiveSynthFallback: false };
614    } else if (hasMasterAudio && pitchSemitones === 0) {
615      return { mode: "singleopus", isLiveSynthFallback: false };
616    } else {
617      return { mode: "wasmsynth", isLiveSynthFallback: true };
618    }
619  }
620}
621const getOptimizedImageUrl = (url, size = "banner") => {
622  if (!url) return void 0;
623  if (url.startsWith("/storage/")) {
624    const separator = url.includes("?") ? "&" : "?";
625    return `${url}${separator}size=${size}`;
626  }
627  return url;
628};
629export {
630  GM_PERCUSSION_MAP as G,
631  INSTRUMENT_CATEGORIES as I,
632  SOUNDFONT_INSTRUMENTS as S,
633  generateTrackUrl as a,
634  getInstrumentName as b,
635  generatePseudoWaveform as c,
636  isContentBlocked as d,
637  isMobileDevice as e,
638  isSlowMobile as f,
639  getColorsFromHash as g,
640  getBestAudioMode as h,
641  isPro as i,
642  formatFileSize as j,
643  getTrackColor as k,
644  GM_INSTRUMENTS as l,
645  formatTicketDate as m,
646  getOptimizedImageUrl as n,
647  getSoundfontInstrumentName as o,
648  getPlaceholderUrl as p,
649  extractCode as q,
650  extractJson as r,
651  slugify as s,
652  timeAgo as t
653};

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.